diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 04d4d239fc8282..28be6acd95b45c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -17,7 +17,7 @@ "build": { "dockerfile": "Dockerfile", "args": { - "BUILD_VERSION": "0.5.45" + "BUILD_VERSION": "0.5.48" } }, "remoteUser": "vscode", diff --git a/.github/workflows/android.yaml b/.github/workflows/android.yaml index c89a6ab877c6be..2737de15bd9bac 100644 --- a/.github/workflows/android.yaml +++ b/.github/workflows/android.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-android:0.5.45 + image: connectedhomeip/chip-build-android:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" @@ -58,10 +58,10 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-{arm,arm64,x64,x86}-chip-*' build" - - name: Build Android Studio build (arm64 only) - run: | - ./scripts/run_in_build_env.sh \ - "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build" + # - name: Build Android Studio build (arm64 only) + # run: | + # ./scripts/run_in_build_env.sh \ + # "./scripts/build/build_examples.py --no-log-timestamps --target-glob 'android-androidstudio-arm64-chip-tool' build" - name: Run Android build rule tests run: | ./scripts/run_in_build_env.sh \ diff --git a/.github/workflows/bloat_check.yaml b/.github/workflows/bloat_check.yaml index 0cf2b5fb1b3c90..7488636f5bbe8d 100644 --- a/.github/workflows/bloat_check.yaml +++ b/.github/workflows/bloat_check.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 steps: - name: Checkout diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 295a4f32aa3490..68cef7b29446a9 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -98,7 +98,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -118,11 +118,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Initialize CodeQL - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/init@v1 - with: - languages: "cpp" + # - name: Initialize CodeQL + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/init@v1 + # with: + # languages: "cpp" - name: Bootstrap timeout-minutes: 10 run: scripts/build/gn_bootstrap.sh @@ -187,15 +187,15 @@ jobs: # - name: Upload Code Coverage # if: ${{ contains('main', env.BUILD_TYPE) }} # run: bash <(curl -s https://codecov.io/bash) - - name: Remove third_party binaries for CodeQL Analysis - run: find out -type d -name "third_party" -exec rm -rf {} + - - name: Remove dbus binaries for CodeQL Analysis - run: find out -type d -name "dbus" -exec rm -rf {} + - - name: Remove nrfxlib binaries for CodeQL Analysis - run: find . -type d -name "nrfxlib" -exec rm -rf {} + - - name: Perform CodeQL Analysis - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/analyze@v1 + # - name: Remove third_party binaries for CodeQL Analysis + # run: find out -type d -name "third_party" -exec rm -rf {} + + # - name: Remove dbus binaries for CodeQL Analysis + # run: find out -type d -name "dbus" -exec rm -rf {} + + # - name: Remove nrfxlib binaries for CodeQL Analysis + # run: find . -type d -name "nrfxlib" -exec rm -rf {} + + # - name: Perform CodeQL Analysis + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/analyze@v1 build_linux_python_lib: name: Build on Linux (python_lib) timeout-minutes: 60 @@ -204,7 +204,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: @@ -249,11 +249,11 @@ jobs: uses: actions/checkout@v2 with: submodules: true - - name: Initialize CodeQL - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/init@v1 - with: - languages: "cpp" + #- name: Initialize CodeQL + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/init@v1 + # with: + # languages: "cpp" - name: Setup Environment run: brew install openssl pkg-config - name: Try to ensure the directory for diagnostic log collection exists @@ -308,9 +308,9 @@ jobs: with: name: crash-log-darwin path: ~/Library/Logs/DiagnosticReports/ - - name: Perform CodeQL Analysis - if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} - uses: github/codeql-action/analyze@v1 + # - name: Perform CodeQL Analysis + # if: ${{ github.event_name == 'push' && github.event.ref == 'refs/heads/master' }} + # uses: github/codeql-action/analyze@v1 # TODO Log Upload https://github.com/project-chip/connectedhomeip/issues/2227 # TODO https://github.com/project-chip/connectedhomeip/issues/1512 # - name: Run Code Coverage diff --git a/.github/workflows/cirque.yaml b/.github/workflows/cirque.yaml index 88b15371de336d..0348783b4e495d 100644 --- a/.github/workflows/cirque.yaml +++ b/.github/workflows/cirque.yaml @@ -29,7 +29,7 @@ jobs: timeout-minutes: 60 env: - DOCKER_RUN_VERSION: 0.5.45 + DOCKER_RUN_VERSION: 0.5.48 GITHUB_CACHE_PATH: /tmp/cirque-cache/ runs-on: ubuntu-latest @@ -38,7 +38,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: connectedhomeip/chip-build-cirque:0.5.45 +# image: connectedhomeip/chip-build-cirque:0.5.48 # volumes: # - "/tmp:/tmp" # - "/dev/pts:/dev/pts" diff --git a/.github/workflows/doxygen.yaml b/.github/workflows/doxygen.yaml index 1cb45ddf44eceb..8d68e1302e3b89 100644 --- a/.github/workflows/doxygen.yaml +++ b/.github/workflows/doxygen.yaml @@ -30,7 +30,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-doxygen:0.5.45 + image: connectedhomeip/chip-build-doxygen:0.5.48 if: github.actor != 'restyled-io[bot]' diff --git a/.github/workflows/examples-ameba.yaml b/.github/workflows/examples-ameba.yaml index 8129ce907c82b8..1dc04c95e25846 100644 --- a/.github/workflows/examples-ameba.yaml +++ b/.github/workflows/examples-ameba.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-ameba:0.5.45 + image: connectedhomeip/chip-build-ameba:0.5.48 options: --user root steps: diff --git a/.github/workflows/examples-efr32.yaml b/.github/workflows/examples-efr32.yaml index 9e24ea5d1a1feb..cebd9102383422 100644 --- a/.github/workflows/examples-efr32.yaml +++ b/.github/workflows/examples-efr32.yaml @@ -35,7 +35,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-efr32:0.5.45 + image: connectedhomeip/chip-build-efr32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 5dd137d1a286e0..aab13cbee7937b 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.45 + image: connectedhomeip/chip-build-esp32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" @@ -115,7 +115,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32:0.5.40 + image: connectedhomeip/chip-build-esp32:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-infineon.yaml b/.github/workflows/examples-infineon.yaml index ba78656ed6b9c8..b3157925fbc754 100644 --- a/.github/workflows/examples-infineon.yaml +++ b/.github/workflows/examples-infineon.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-infineon:0.5.45 + image: connectedhomeip/chip-build-infineon:0.5.48 steps: - name: Checkout diff --git a/.github/workflows/examples-k32w.yaml b/.github/workflows/examples-k32w.yaml index 5be6002ed2859d..3208296b54f571 100644 --- a/.github/workflows/examples-k32w.yaml +++ b/.github/workflows/examples-k32w.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-k32w:0.5.45 + image: connectedhomeip/chip-build-k32w:0.5.48 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 514ce8910cdbaa..87663e1975e2be 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -31,7 +31,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-crosscompile:0.5.45 + image: connectedhomeip/chip-build-crosscompile:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-linux-standalone.yaml b/.github/workflows/examples-linux-standalone.yaml index 33b8bbd88aa0be..a71152986ecced 100644 --- a/.github/workflows/examples-linux-standalone.yaml +++ b/.github/workflows/examples-linux-standalone.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-mbed.yaml b/.github/workflows/examples-mbed.yaml index 4a01d1bd9ba60c..48bd90395f8698 100644 --- a/.github/workflows/examples-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -37,7 +37,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-mbed-os:0.5.45 + image: connectedhomeip/chip-build-mbed-os:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-nrfconnect.yaml b/.github/workflows/examples-nrfconnect.yaml index 02f49360b8ef12..37fce11739e023 100644 --- a/.github/workflows/examples-nrfconnect.yaml +++ b/.github/workflows/examples-nrfconnect.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-nrf-platform:0.5.40 + image: connectedhomeip/chip-build-nrf-platform:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index d5f8193f1df4a6..c923a60558cd5f 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/examples-telink.yaml b/.github/workflows/examples-telink.yaml index efa7bfa52071a3..d68aa72bf398c8 100644 --- a/.github/workflows/examples-telink.yaml +++ b/.github/workflows/examples-telink.yaml @@ -32,7 +32,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-telink:0.5.45 + image: connectedhomeip/chip-build-telink:0.5.48 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/examples-tizen.yaml b/.github/workflows/examples-tizen.yaml index 7f430f6645f887..a241a8982ff296 100644 --- a/.github/workflows/examples-tizen.yaml +++ b/.github/workflows/examples-tizen.yaml @@ -28,7 +28,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-tizen:0.5.45 + image: connectedhomeip/chip-build-tizen:0.5.48 options: --user root volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" diff --git a/.github/workflows/qemu.yaml b/.github/workflows/qemu.yaml index 5c5f538f120b55..63b5a9968c921e 100644 --- a/.github/workflows/qemu.yaml +++ b/.github/workflows/qemu.yaml @@ -34,7 +34,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: connectedhomeip/chip-build-esp32-qemu:0.5.45 + image: connectedhomeip/chip-build-esp32-qemu:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" diff --git a/.github/workflows/release_artifacts.yaml b/.github/workflows/release_artifacts.yaml index 0ce6a64044b271..c7f3493db68f37 100644 --- a/.github/workflows/release_artifacts.yaml +++ b/.github/workflows/release_artifacts.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-esp32:0.5.45 + image: connectedhomeip/chip-build-esp32:0.5.48 steps: - name: Checkout @@ -70,7 +70,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build-efr32:0.5.45 + image: connectedhomeip/chip-build-efr32:0.5.48 steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 19a1554de3366e..f38ba1a4e819d3 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 options: --privileged --sysctl "net.ipv6.conf.all.disable_ipv6=0 net.ipv4.conf.all.forwarding=1 net.ipv6.conf.all.forwarding=1" diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 481c0fddf14584..0d29df63563a08 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest container: - image: connectedhomeip/chip-build:0.5.45 + image: connectedhomeip/chip-build:0.5.48 volumes: - "/tmp/log_output:/tmp/test_logs" options: diff --git a/.github/workflows/zap_regeneration.yaml b/.github/workflows/zap_regeneration.yaml index abe02380faf34c..72a0175d7057e8 100644 --- a/.github/workflows/zap_regeneration.yaml +++ b/.github/workflows/zap_regeneration.yaml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.42 + image: connectedhomeip/chip-build-zap:0.5.48 defaults: run: shell: sh diff --git a/.github/workflows/zap_templates.yaml b/.github/workflows/zap_templates.yaml index e8ef4e1497897b..d864068be61821 100644 --- a/.github/workflows/zap_templates.yaml +++ b/.github/workflows/zap_templates.yaml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-20.04 container: - image: connectedhomeip/chip-build-zap:0.5.42 + image: connectedhomeip/chip-build-zap:0.5.48 defaults: run: shell: sh diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter new file mode 100644 index 00000000000000..4814e7bc04dbdb --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -0,0 +1,3084 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AccessControl = 31 { + enum AuthMode : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum Privilege : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + struct AccessControlEntry { + fabric_idx fabricIndex = 0; + Privilege privilege = 1; + AuthMode authMode = 2; + nullable INT64U subjects[] = 3; + nullable Target targets[] = 4; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + struct ExtensionEntry { + fabric_idx fabricIndex = 0; + OCTET_STRING data = 1; + } + + attribute(writable, reportable) AccessControlEntry acl[] = 0; + attribute(writable, reportable) ExtensionEntry extension[] = 1; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster BooleanState = 69 { + info event StateChange = 0 { + boolean stateValue = 0; + } + + attribute(readonly, reportable) boolean stateValue = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BridgedActions = 37 { + enum ActionErrorEnum : ENUM8 { + kUnknown = 0; + kInterrupted = 1; + } + + enum ActionStateEnum : ENUM8 { + kInactive = 0; + kActive = 1; + kPaused = 2; + kDisabled = 3; + } + + enum ActionTypeEnum : ENUM8 { + kOther = 0; + kScene = 1; + kSequence = 2; + kAutomation = 3; + kException = 4; + kNotification = 5; + kAlarm = 6; + } + + enum EndpointListTypeEnum : ENUM8 { + kOther = 0; + kRoom = 1; + kZone = 2; + } + + struct ActionStruct { + INT16U actionID = 1; + CHAR_STRING name = 2; + ActionTypeEnum type = 3; + INT16U endpointListID = 4; + INT16U supportedCommands = 5; + ActionStateEnum status = 6; + } + + struct EndpointListStruct { + INT16U endpointListID = 1; + CHAR_STRING name = 2; + EndpointListTypeEnum type = 3; + ENDPOINT_NO endpoints[] = 4; + } + + info event StateChanged = 0 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + } + + info event ActionFailed = 1 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + ActionErrorEnum error = 3; + } + + attribute(readonly, reportable) ActionStruct actionList[] = 0; + attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; + attribute(readonly, reportable) long_char_string setupUrl = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster BridgedDeviceBasic = 57 { + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +server cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster ElectricalMeasurement = 2820 { + attribute(readonly, reportable) bitmap32 measurementType = 0; + attribute(readonly, reportable) int32s totalActivePower = 772; + attribute(readonly, reportable) int16u rmsVoltage = 1285; + attribute(readonly, reportable) int16u rmsVoltageMin = 1286; + attribute(readonly, reportable) int16u rmsVoltageMax = 1287; + attribute(readonly, reportable) int16u rmsCurrent = 1288; + attribute(readonly, reportable) int16u rmsCurrentMin = 1289; + attribute(readonly, reportable) int16u rmsCurrentMax = 1290; + attribute(readonly, reportable) int16s activePower = 1291; + attribute(readonly, reportable) int16s activePowerMin = 1292; + attribute(readonly, reportable) int16s activePowerMax = 1293; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + struct GroupKeySet { + INT16U groupKeySetID = 0; + GroupKeySecurityPolicy securityPolicy = 1; + OCTET_STRING epochKey0 = 2; + INT64U epochStartTime0 = 3; + OCTET_STRING epochKey1 = 4; + INT64U epochStartTime1 = 5; + OCTET_STRING epochKey2 = 6; + INT64U epochStartTime2 = 7; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetWriteRequest { + GroupKeySet groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse { + GroupKeySet groupKeySet = 0; + } + + command KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + command KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + command KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + command KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster IasZone = 1280 { + enum IasEnrollResponseCode : ENUM8 { + kSuccess = 0; + kNotSupported = 1; + kNoEnrollPermit = 2; + kTooManyZones = 3; + } + + enum IasZoneType : ENUM16 { + kStandardCie = 0; + kMotionSensor = 13; + kContactSwitch = 21; + kFireSensor = 40; + kWaterSensor = 42; + kGasSensor = 43; + kPersonalEmergencyDevice = 44; + kVibrationMovementSensor = 45; + kRemoteControl = 271; + kKeyFob = 277; + kKeypad = 541; + kStandardWarningDevice = 549; + kGlassBreakSensor = 550; + kCarbonMonoxideSensor = 551; + kSecurityRepeater = 553; + kInvalidZoneType = 65535; + } + + attribute(readonly, reportable) enum8 zoneState = 0; + attribute(readonly, reportable) enum16 zoneType = 1; + attribute(readonly, reportable) bitmap16 zoneStatus = 2; + attribute(writable, reportable) node_id iasCieAddress = 16; + attribute(readonly, reportable) int8u zoneId = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ZoneEnrollRequestRequest { + IasZoneType zoneType = 0; + INT16U manufacturerCode = 1; + } + + request struct ZoneStatusChangeNotificationRequest { + IasZoneStatus zoneStatus = 0; + BITMAP8 extendedStatus = 1; + INT8U zoneId = 2; + INT16U delay = 3; + } + + response struct ZoneEnrollResponse { + IasEnrollResponseCode enrollResponseCode = 0; + INT8U zoneId = 1; + } + + command ZoneEnrollRequest(ZoneEnrollRequestRequest): ZoneEnrollResponse = 1; + command ZoneStatusChangeNotification(ZoneStatusChangeNotificationRequest): DefaultSuccess = 0; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster IlluminanceMeasurement = 1024 { + enum LightSensorType : ENUM8 { + kPhotodiode = 0; + kCmos = 1; + } + + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) enum8 lightSensorType = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster LowPower = 1288 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +server cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(readonly, reportable) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ModeSelect = 80 { + struct ModeOptionStruct { + CHAR_STRING label = 1; + INT8U mode = 2; + INT32U semanticTag = 3; + } + + attribute(readonly, reportable) int8u currentMode = 0; + attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; + attribute(writable, reportable) int8u onMode = 2; + attribute(readonly, reportable) int8u startUpMode = 3; + attribute(readonly, reportable) char_string description = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + struct NullablesAndOptionalsStruct { + nullable INT16U nullableInt = 1; + optional INT16U optionalInt = 2; + optional nullable INT16U nullableOptionalInt = 3; + nullable CHAR_STRING nullableString = 4; + optional CHAR_STRING optionalString = 5; + optional nullable CHAR_STRING nullableOptionalString = 6; + nullable SimpleStruct nullableStruct = 7; + optional SimpleStruct optionalStruct = 8; + optional nullable SimpleStruct nullableOptionalStruct = 9; + nullable SimpleEnum nullableList[] = 10; + optional SimpleEnum optionalList[] = 11; + optional nullable SimpleEnum nullableOptionalList[] = 12; + } + + struct SimpleStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleEnum c = 3; + OCTET_STRING d = 4; + CHAR_STRING e = 5; + SimpleBitmap f = 6; + single g = 7; + double h = 8; + } + + struct NestedStructList { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + SimpleStruct d[] = 4; + INT32U e[] = 5; + OCTET_STRING f[] = 6; + INT8U g[] = 7; + } + + struct NestedStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int24u int24u = 7; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int40u int40u = 9; + attribute(writable, reportable) int48u int48u = 10; + attribute(writable, reportable) int56u int56u = 11; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int24s int24s = 15; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int40s int40s = 17; + attribute(writable, reportable) int48s int48s = 18; + attribute(writable, reportable) int56s int56s = 19; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) single floatSingle = 23; + attribute(writable, reportable) double floatDouble = 24; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(writable, reportable) char_string charString = 30; + attribute(writable, reportable) long_char_string longCharString = 31; + attribute(writable, reportable) epoch_us epochUs = 32; + attribute(writable, reportable) epoch_s epochS = 33; + attribute(writable, reportable) vendor_id vendorId = 34; + attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable, reportable) SimpleEnum enumAttr = 36; + attribute(writable, reportable) SimpleStruct structAttr = 37; + attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; + attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; + attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; + attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable, reportable) boolean timedWriteBoolean = 48; + attribute(writable, reportable) boolean nullableBoolean = 32768; + attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; + attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; + attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; + attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; + attribute(writable, reportable) int8u nullableInt8u = 32773; + attribute(writable, reportable) int16u nullableInt16u = 32774; + attribute(writable, reportable) int24u nullableInt24u = 32775; + attribute(writable, reportable) int32u nullableInt32u = 32776; + attribute(writable, reportable) int40u nullableInt40u = 32777; + attribute(writable, reportable) int48u nullableInt48u = 32778; + attribute(writable, reportable) int56u nullableInt56u = 32779; + attribute(writable, reportable) int64u nullableInt64u = 32780; + attribute(writable, reportable) int8s nullableInt8s = 32781; + attribute(writable, reportable) int16s nullableInt16s = 32782; + attribute(writable, reportable) int24s nullableInt24s = 32783; + attribute(writable, reportable) int32s nullableInt32s = 32784; + attribute(writable, reportable) int40s nullableInt40s = 32785; + attribute(writable, reportable) int48s nullableInt48s = 32786; + attribute(writable, reportable) int56s nullableInt56s = 32787; + attribute(writable, reportable) int64s nullableInt64s = 32788; + attribute(writable, reportable) enum8 nullableEnum8 = 32789; + attribute(writable, reportable) enum16 nullableEnum16 = 32790; + attribute(writable, reportable) single nullableFloatSingle = 32791; + attribute(writable, reportable) double nullableFloatDouble = 32792; + attribute(writable, reportable) octet_string nullableOctetString = 32793; + attribute(writable, reportable) char_string nullableCharString = 32798; + attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable, reportable) SimpleStruct nullableStruct = 32805; + attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SimpleStructEchoRequestRequest { + SimpleStruct arg1 = 0; + } + + request struct TestAddArgumentsRequest { + INT8U arg1 = 0; + INT8U arg2 = 1; + } + + request struct TestEmitTestEventRequestRequest { + INT8U arg1 = 0; + SimpleEnum arg2 = 1; + BOOLEAN arg3 = 2; + } + + request struct TestEnumsRequestRequest { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestListInt8UArgumentRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListInt8UReverseRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListNestedStructListArgumentRequestRequest { + NestedStructList arg1[] = 0; + } + + request struct TestListStructArgumentRequestRequest { + SimpleStruct arg1[] = 0; + } + + request struct TestNestedStructArgumentRequestRequest { + NestedStruct arg1 = 0; + } + + request struct TestNestedStructListArgumentRequestRequest { + NestedStructList arg1 = 0; + } + + request struct TestNullableOptionalRequestRequest { + optional nullable INT8U arg1 = 0; + } + + request struct TestSimpleOptionalArgumentRequestRequest { + optional BOOLEAN arg1 = 0; + } + + request struct TestStructArgumentRequestRequest { + SimpleStruct arg1 = 0; + } + + response struct SimpleStructResponse { + SimpleStruct arg1 = 0; + } + + response struct TestAddArgumentsResponse { + INT8U returnValue = 0; + } + + response struct TestEmitTestEventResponse { + INT64U value = 0; + } + + response struct TestEnumsResponse { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + response struct TestListInt8UReverseResponse { + INT8U arg1[] = 0; + } + + response struct TestNullableOptionalResponse { + BOOLEAN wasPresent = 0; + optional BOOLEAN wasNull = 1; + optional INT8U value = 2; + optional nullable INT8U originalValue = 3; + } + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + command Test(): DefaultSuccess = 0; + command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + command TestNotHandled(): DefaultSuccess = 1; + command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + command TestSpecific(): TestSpecificResponse = 2; + command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + command TimedInvokeRequest(): DefaultSuccess = 18; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThermostatUserInterfaceConfiguration = 516 { + attribute(writable, reportable) enum8 temperatureDisplayMode = 0; + attribute(writable, reportable) enum8 keypadLockout = 1; + attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command DownOrClose(): DefaultSuccess = 1; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 0 { + instantiate cluster AccessControl; + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSourceConfiguration; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster PowerSource; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; +} + +endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster Groups; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; +} + diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 16e066cd2397ae..290c774cd21191 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -8134,7 +8134,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -8281,15 +8281,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8299,7 +8314,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter new file mode 100644 index 00000000000000..53348e5d62f835 --- /dev/null +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -0,0 +1,922 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FixedLabel; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Switch; +} + diff --git a/examples/bridge-app/bridge-common/bridge-app.zap b/examples/bridge-app/bridge-common/bridge-app.zap index 5b0a5680dc403d..f35c00e0335920 100644 --- a/examples/bridge-app/bridge-common/bridge-app.zap +++ b/examples/bridge-app/bridge-common/bridge-app.zap @@ -3793,7 +3793,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3841,7 +3841,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3988,15 +3988,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -4006,7 +4021,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/bridge-app/esp32/CMakeLists.txt b/examples/bridge-app/esp32/CMakeLists.txt index dd174e3e7ec1c8..ba85ac8324d187 100644 --- a/examples/bridge-app/esp32/CMakeLists.txt +++ b/examples/bridge-app/esp32/CMakeLists.txt @@ -27,5 +27,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-bridge-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H;-DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/bridge-app/esp32/main/main.cpp b/examples/bridge-app/esp32/main/main.cpp index b80795b56c7821..5139ea438c36d8 100644 --- a/examples/bridge-app/esp32/main/main.cpp +++ b/examples/bridge-app/esp32/main/main.cpp @@ -257,8 +257,8 @@ EmberAfStatus HandleWriteOnOffAttribute(Device * dev, chip::AttributeId attribut } EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -284,8 +284,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index fa250dc4c276fb..80a0c145b6dabe 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -451,8 +451,8 @@ EmberAfStatus HandleReadSwitchAttribute(DeviceSwitch * dev, chip::AttributeId at } EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -485,8 +485,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/examples/door-lock-app/door-lock-common/door-lock-app.matter b/examples/door-lock-app/door-lock-common/door-lock-app.matter new file mode 100644 index 00000000000000..d137693236d139 --- /dev/null +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -0,0 +1,1130 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster PowerSource; +} + diff --git a/examples/ipv6only-app/esp32/CMakeLists.txt b/examples/ipv6only-app/esp32/CMakeLists.txt index 817f75e9e7da9f..db5a44c00c6ad1 100644 --- a/examples/ipv6only-app/esp32/CMakeLists.txt +++ b/examples/ipv6only-app/esp32/CMakeLists.txt @@ -26,6 +26,9 @@ set(EXTRA_COMPONENT_DIRS project(chip-ipv6only-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) include(third_party/connectedhomeip/third_party/pigweed/repo/pw_build/pigweed.cmake) diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index 3c73988719f27e..22de61188b3741 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -31,5 +31,8 @@ project(chip-lighting-app) # C++17 is required for RPC build. idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter new file mode 100644 index 00000000000000..51fed51a17869b --- /dev/null +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -0,0 +1,1417 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster ColorControl; + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; +} + +endpoint 2 { + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; +} + diff --git a/examples/lighting-app/lighting-common/lighting-app.zap b/examples/lighting-app/lighting-common/lighting-app.zap index 0fdfa137b28bc5..50788263665078 100644 --- a/examples/lighting-app/lighting-common/lighting-app.zap +++ b/examples/lighting-app/lighting-common/lighting-app.zap @@ -4957,7 +4957,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -5017,7 +5017,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5164,10 +5164,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5212,7 +5212,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -5359,15 +5359,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -5377,7 +5392,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/lighting-app/p6/src/AppTask.cpp b/examples/lighting-app/p6/src/AppTask.cpp index ddfba4aba5fa9c..f85a59158e2aa4 100644 --- a/examples/lighting-app/p6/src/AppTask.cpp +++ b/examples/lighting-app/p6/src/AppTask.cpp @@ -164,11 +164,10 @@ void AppTask::AppTaskMain(void * pvParameter) while (true) { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); - while (eventReceived == pdTRUE) + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + if (eventReceived == pdTRUE) { sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); } // Collect connectivity and configuration state from the CHIP stack. Because @@ -335,7 +334,7 @@ void AppTask::FunctionHandler(AppEvent * aEvent) // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (aEvent->ButtonEvent.Action == APP_BUTTON_PRESSED) + if (aEvent->ButtonEvent.Action == APP_BUTTON_RELEASED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { diff --git a/examples/lock-app/esp32/CMakeLists.txt b/examples/lock-app/esp32/CMakeLists.txt index 794804e12dccff..cc66333a40d22c 100644 --- a/examples/lock-app/esp32/CMakeLists.txt +++ b/examples/lock-app/esp32/CMakeLists.txt @@ -29,6 +29,9 @@ project(chip-lock-app) # C++17 is required for RPC build. idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) if (CONFIG_ENABLE_PW_RPC) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) @@ -48,4 +51,3 @@ set_target_properties(pw_build.cpp17 PROPERTIES INTERFACE_COMPILE_OPTIONS "${_ta endif(CONFIG_ENABLE_PW_RPC) flashing_script() - diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter new file mode 100644 index 00000000000000..beb8de0a6679a1 --- /dev/null +++ b/examples/lock-app/lock-common/lock-app.matter @@ -0,0 +1,826 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly) enum8 status = 0; + attribute(readonly) int8u order = 1; + attribute(readonly) char_string description = 2; + attribute(readonly) int32u wiredAssessedCurrent = 6; + attribute(readonly) enum8 batteryChargeLevel = 14; + attribute(readonly) boolean batteryReplacementNeeded = 15; + attribute(readonly) enum8 batteryReplaceability = 16; + attribute(readonly) char_string batteryReplacementDescription = 19; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster OnOff; + instantiate cluster PowerSource; +} + diff --git a/examples/lock-app/p6/src/AppTask.cpp b/examples/lock-app/p6/src/AppTask.cpp index 0729aea5f97816..94ecddb6a8365e 100644 --- a/examples/lock-app/p6/src/AppTask.cpp +++ b/examples/lock-app/p6/src/AppTask.cpp @@ -161,11 +161,10 @@ void AppTask::AppTaskMain(void * pvParameter) while (true) { - BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, pdMS_TO_TICKS(10)); - while (eventReceived == pdTRUE) + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + if (eventReceived == pdTRUE) { sAppTask.DispatchEvent(&event); - eventReceived = xQueueReceive(sAppEventQueue, &event, 0); } // Collect connectivity and configuration state from the CHIP stack. Because // the CHIP event loop is being run in a separate task, the stack must be @@ -334,7 +333,7 @@ void AppTask::FunctionHandler(AppEvent * event) // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT - if (event->ButtonEvent.Action == APP_BUTTON_PRESSED) + if (event->ButtonEvent.Action == APP_BUTTON_RELEASED) { if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == Function::kNoneSelected) { diff --git a/examples/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter new file mode 100644 index 00000000000000..e3ee6a58863a98 --- /dev/null +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -0,0 +1,321 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +client cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse { + LogsStatus status = 0; + OCTET_STRING content = 1; + epoch_s timeStamp = 2; + INT32U timeSinceBoot = 3; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable) int64u breadcrumb = 0; + attribute(readonly) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly) FabricDescriptor fabricsList[] = 1; + attribute(readonly) int8u supportedFabrics = 2; + attribute(readonly) int8u commissionedFabrics = 3; + attribute(readonly) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + + +endpoint 0 { + instantiate cluster DiagnosticLogs; + instantiate cluster DiagnosticLogs; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; +} + diff --git a/examples/ota-provider-app/esp32/CMakeLists.txt b/examples/ota-provider-app/esp32/CMakeLists.txt index 07edf22b17cb82..511d3bf006e607 100644 --- a/examples/ota-provider-app/esp32/CMakeLists.txt +++ b/examples/ota-provider-app/esp32/CMakeLists.txt @@ -29,5 +29,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-ota-provider-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter new file mode 100644 index 00000000000000..e09ed393b072f5 --- /dev/null +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -0,0 +1,367 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; +} + diff --git a/examples/ota-requestor-app/esp32/CMakeLists.txt b/examples/ota-requestor-app/esp32/CMakeLists.txt index 03408d904ae03a..5329989f0dc225 100644 --- a/examples/ota-requestor-app/esp32/CMakeLists.txt +++ b/examples/ota-requestor-app/esp32/CMakeLists.txt @@ -29,5 +29,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-ota-requestor-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter new file mode 100644 index 00000000000000..0766042f5b83fb --- /dev/null +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -0,0 +1,480 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster Basic; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OperationalCredentials; + instantiate cluster UserLabel; +} + diff --git a/examples/persistent-storage/esp32/CMakeLists.txt b/examples/persistent-storage/esp32/CMakeLists.txt index fb5f8946f15a7e..87a2d5a10342bb 100644 --- a/examples/persistent-storage/esp32/CMakeLists.txt +++ b/examples/persistent-storage/esp32/CMakeLists.txt @@ -26,5 +26,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-persistent-storage) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/pigweed-app/esp32/CMakeLists.txt b/examples/pigweed-app/esp32/CMakeLists.txt index baeb3a5240ae06..76a867fa539b4e 100644 --- a/examples/pigweed-app/esp32/CMakeLists.txt +++ b/examples/pigweed-app/esp32/CMakeLists.txt @@ -28,6 +28,9 @@ set(EXTRA_COMPONENT_DIRS project(chip-pigweed-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++17;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) get_filename_component(CHIP_ROOT ./third_party/connectedhomeip REALPATH) set(PIGWEED_ROOT "${CHIP_ROOT}/third_party/pigweed/repo") diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter new file mode 100644 index 00000000000000..2d47e74b46e946 --- /dev/null +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -0,0 +1,731 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command StepColor(StepColorRequest): DefaultSuccess = 9; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; +} + +endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; +} + diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter new file mode 100644 index 00000000000000..2d47e74b46e946 --- /dev/null +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -0,0 +1,731 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command StepColor(StepColorRequest): DefaultSuccess = 9; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster GeneralCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; +} + +endpoint 1 { + instantiate cluster Basic; + instantiate cluster ColorControl; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster Scenes; +} + diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter new file mode 100644 index 00000000000000..36ffee5ef6b96a --- /dev/null +++ b/examples/pump-app/pump-common/pump-app.matter @@ -0,0 +1,925 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster FlowMeasurement; + instantiate cluster LevelControl; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; + instantiate cluster TemperatureMeasurement; +} + diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter new file mode 100644 index 00000000000000..4cb2a32f5458f2 --- /dev/null +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -0,0 +1,973 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster FlowMeasurement; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster TemperatureMeasurement; +} + diff --git a/examples/shell/esp32/CMakeLists.txt b/examples/shell/esp32/CMakeLists.txt index a65ff36484e12e..cf30fb916714cc 100644 --- a/examples/shell/esp32/CMakeLists.txt +++ b/examples/shell/esp32/CMakeLists.txt @@ -28,5 +28,8 @@ project(chip-shell) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) -flashing_script() +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) +flashing_script() diff --git a/examples/temperature-measurement-app/esp32/CMakeLists.txt b/examples/temperature-measurement-app/esp32/CMakeLists.txt index 5e40d10a7e2fc5..3bec93f932a9f7 100644 --- a/examples/temperature-measurement-app/esp32/CMakeLists.txt +++ b/examples/temperature-measurement-app/esp32/CMakeLists.txt @@ -35,5 +35,8 @@ set(EXTRA_COMPONENT_DIRS project(chip-temperature-measurement-app) idf_build_set_property(CXX_COMPILE_OPTIONS "-std=gnu++14;-Os;-DLWIP_IPV6_SCOPES=0;-DCHIP_HAVE_CONFIG_H" APPEND) idf_build_set_property(C_COMPILE_OPTIONS "-Os;-DLWIP_IPV6_SCOPES=0" APPEND) +# For the C3, project_include.cmake sets -Wno-format, but does not clear various +# flags that depend on -Wformat +idf_build_set_property(COMPILE_OPTIONS "-Wno-format-nonliteral;-Wno-format-security" APPEND) flashing_script() diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter new file mode 100644 index 00000000000000..089ceac43d49eb --- /dev/null +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -0,0 +1,621 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster SoftwareDiagnostics = 52 { + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster TemperatureMeasurement; +} + diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter new file mode 100644 index 00000000000000..3698f8ea617aa3 --- /dev/null +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -0,0 +1,1204 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +client cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + request struct SetWeeklyScheduleRequest { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + response struct GetRelayStatusLogResponse { + INT16U timeOfDay = 0; + BITMAP16 relayStatus = 1; + INT16S localTemperature = 2; + INT8U humidityInPercentage = 3; + INT16S setpoint = 4; + INT16U unreadEntries = 5; + } + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + command ClearWeeklySchedule(): DefaultSuccess = 3; + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + command SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Identify; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Basic; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster Identify; + instantiate cluster Scenes; + instantiate cluster Thermostat; +} + diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 2c8181b6c56088..f4475cf122b75f 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -7520,7 +7520,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7670,7 +7670,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter new file mode 100644 index 00000000000000..dcd7680a42a88e --- /dev/null +++ b/examples/tv-app/tv-common/tv-app.matter @@ -0,0 +1,1849 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + response struct GetSetupPINResponse { + CHAR_STRING setupPIN = 0; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + struct ApplicationBasicApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationEP { + ApplicationLauncherApplication application = 1; + CHAR_STRING endpoint = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(writable, reportable) ApplicationEP applicationLauncherApp = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + response struct LauncherResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +server cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +client cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + struct LineupInfo { + CHAR_STRING operatorName = 1; + CHAR_STRING lineupName = 2; + CHAR_STRING postalCode = 3; + LineupInfoTypeEnum lineupInfoType = 4; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(writable, reportable) LineupInfo channelLineup = 1; + attribute(writable, reportable) ChannelInfo currentChannel = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + response struct ChangeChannelResponse { + ChannelInfo channelMatch = 0; + ErrorTypeEnum errorType = 1; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +server cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster LowPower = 1288 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +server cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +server cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + struct PlaybackPosition { + INT64U updatedAt = 1; + INT64U position = 2; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(writable, reportable) PlaybackPosition position = 3; + attribute(readonly, reportable) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + response struct PlaybackResponse { + StatusEnum status = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +client cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +client cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly) int8u currentNavigatorTarget = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster ApplicationLauncher; + instantiate cluster Channel; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster KeypadInput; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster OnOff; + instantiate cluster TargetNavigator; + instantiate cluster WakeOnLan; +} + +endpoint 2 { + instantiate cluster AudioOutput; + instantiate cluster Descriptor; + instantiate cluster LevelControl; + instantiate cluster OnOff; +} + +endpoint 3 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster MediaPlayback; +} + +endpoint 4 { + instantiate cluster ApplicationBasic; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; +} + +endpoint 5 { + instantiate cluster ApplicationBasic; + instantiate cluster Descriptor; +} + diff --git a/examples/tv-app/tv-common/tv-app.zap b/examples/tv-app/tv-common/tv-app.zap index f1d3b04f738a40..e4953135d3cbc2 100644 --- a/examples/tv-app/tv-common/tv-app.zap +++ b/examples/tv-app/tv-common/tv-app.zap @@ -8474,7 +8474,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -8669,15 +8669,30 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -8687,7 +8702,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter new file mode 100644 index 00000000000000..0a05c4a5cb976d --- /dev/null +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -0,0 +1,2524 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +client cluster AccountLogin = 1294 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +client cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +server cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +server cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Binding = 30 { + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +server cluster BridgedDeviceBasic = 57 { + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) int16u vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Leave(): DefaultSuccess = 2; + command ReachableChanged(): DefaultSuccess = 3; + command ShutDown(): DefaultSuccess = 1; + command StartUp(): DefaultSuccess = 0; +} + +client cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + struct LineupInfo { + CHAR_STRING operatorName = 1; + CHAR_STRING lineupName = 2; + CHAR_STRING postalCode = 3; + LineupInfoTypeEnum lineupInfoType = 4; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(writable, reportable) LineupInfo channelLineup = 1; + attribute(writable, reportable) ChannelInfo currentChannel = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +server cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +client cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +server cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(writable) int32u doorOpenEvents = 4; + attribute(writable) int32u doorClosedEvents = 5; + attribute(writable) int16u openPeriod = 6; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int16u numberOfWeekDaySchedulesSupportedPerUser = 20; + attribute(readonly) int16u numberOfYearDaySchedulesSupportedPerUser = 21; + attribute(readonly) int16u numberOfHolidaySchedulesSupported = 22; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(readonly) bitmap8 credentialRulesSupport = 27; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(readonly) bitmap16 defaultConfigurationRegister = 39; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable) boolean enableInsideStatusLED = 42; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(writable, reportable) int8u userCodeTemporaryDisableTime = 49; + attribute(writable) boolean requirePINforRemoteOperation = 51; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +server cluster IasZone = 1280 { + enum IasEnrollResponseCode : ENUM8 { + kSuccess = 0; + kNotSupported = 1; + kNoEnrollPermit = 2; + kTooManyZones = 3; + } + + enum IasZoneType : ENUM16 { + kStandardCie = 0; + kMotionSensor = 13; + kContactSwitch = 21; + kFireSensor = 40; + kWaterSensor = 42; + kGasSensor = 43; + kPersonalEmergencyDevice = 44; + kVibrationMovementSensor = 45; + kRemoteControl = 271; + kKeyFob = 277; + kKeypad = 541; + kStandardWarningDevice = 549; + kGlassBreakSensor = 550; + kCarbonMonoxideSensor = 551; + kSecurityRepeater = 553; + kInvalidZoneType = 65535; + } + + attribute(readonly, reportable) enum8 zoneState = 0; + attribute(readonly, reportable) enum16 zoneType = 1; + attribute(readonly, reportable) bitmap16 zoneStatus = 2; + attribute(writable, reportable) node_id iasCieAddress = 16; + attribute(readonly, reportable) int8u zoneId = 17; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ZoneEnrollRequestRequest { + IasZoneType zoneType = 0; + INT16U manufacturerCode = 1; + } + + request struct ZoneStatusChangeNotificationRequest { + IasZoneStatus zoneStatus = 0; + BITMAP8 extendedStatus = 1; + INT8U zoneId = 2; + INT16U delay = 3; + } + + response struct ZoneEnrollResponse { + IasEnrollResponseCode enrollResponseCode = 0; + INT8U zoneId = 1; + } + + command ZoneEnrollRequest(ZoneEnrollRequestRequest): ZoneEnrollResponse = 1; + command ZoneStatusChangeNotification(ZoneStatusChangeNotificationRequest): DefaultSuccess = 0; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; +} + +client cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +server cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +client cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +client cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +server cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +server cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command Test(): DefaultSuccess = 0; + command TestNotHandled(): DefaultSuccess = 1; + command TestSpecific(): TestSpecificResponse = 2; +} + +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Binding; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OperationalCredentials; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster AccountLogin; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DoorLock; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster Groups; + instantiate cluster IasZone; + instantiate cluster Identify; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster OnOff; + instantiate cluster PressureMeasurement; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster WakeOnLan; + instantiate cluster WindowCovering; +} + +endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; +} + diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap index bac7bbd71cc378..a8fcda9213be34 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.zap @@ -7289,7 +7289,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -7484,10 +7484,10 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "255", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7502,7 +7502,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -7517,7 +7517,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter new file mode 100644 index 00000000000000..c24cfbc31c2a4d --- /dev/null +++ b/examples/window-app/common/window-app.matter @@ -0,0 +1,867 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +server cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +server cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster FixedLabel = 64 { + attribute(readonly) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +server cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly) enum8 identifyType = 1; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +server cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +server cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +server cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +server cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +server cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GoToLiftPercentageRequest { + Percent liftPercentageValue = 0; + Percent100ths liftPercent100thsValue = 1; + } + + request struct GoToLiftValueRequest { + INT16U liftValue = 0; + } + + request struct GoToTiltPercentageRequest { + Percent tiltPercentageValue = 0; + Percent100ths tiltPercent100thsValue = 1; + } + + request struct GoToTiltValueRequest { + INT16U tiltValue = 0; + } + + command DownOrClose(): DefaultSuccess = 1; + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 0 { + instantiate cluster AdministratorCommissioning; + instantiate cluster Basic; + instantiate cluster Descriptor; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster LocalizationConfiguration; + instantiate cluster NetworkCommissioning; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster SoftwareDiagnostics; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WiFiNetworkDiagnostics; +} + +endpoint 1 { + instantiate cluster Descriptor; + instantiate cluster Identify; + instantiate cluster WindowCovering; +} + +endpoint 2 { + instantiate cluster Descriptor; + instantiate cluster WindowCovering; +} + diff --git a/integrations/cloudbuild/build-all.yaml b/integrations/cloudbuild/build-all.yaml index 997d486754071f..b700bd5d29229f 100644 --- a/integrations/cloudbuild/build-all.yaml +++ b/integrations/cloudbuild/build-all.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: diff --git a/integrations/cloudbuild/smoke-test.yaml b/integrations/cloudbuild/smoke-test.yaml index 6117998834a2c5..3539eefde6f257 100644 --- a/integrations/cloudbuild/smoke-test.yaml +++ b/integrations/cloudbuild/smoke-test.yaml @@ -1,5 +1,5 @@ steps: - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" env: - PW_ENVIRONMENT_ROOT=/pwenv args: @@ -12,7 +12,7 @@ steps: path: /pwenv timeout: 900s - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: ESP32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -28,7 +28,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: NRFConnect env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -45,7 +45,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: EFR32 env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -62,7 +62,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: Linux env: - PW_ENVIRONMENT_ROOT=/pwenv @@ -79,7 +79,7 @@ steps: - name: pwenv path: /pwenv - - name: "connectedhomeip/chip-build-vscode:0.5.45" + - name: "connectedhomeip/chip-build-vscode:0.5.48" id: Android env: - PW_ENVIRONMENT_ROOT=/pwenv diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index 2f710cdfa4a5cd..8e393cf968c61c 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -93,12 +93,33 @@ def runArgumentsParser(): return (zap_file, zcl_file, templates_file, output_dir) +def extractGeneratedIdl(output_dir, zap_config_path): + """Find a file Clusters.matter in the output directory and + place it along with the input zap file. + + Intent is to make the "zap content" more humanly understandable. + """ + idl_path = os.path.join(output_dir, "Clusters.matter") + if not os.path.exists(idl_path): + return + + target_path = zap_config_path.replace(".zap", ".matter") + if not target_path.endswith(".matter"): + # We expect "something.zap" and don't handle corner cases of + # multiple extensions. This is to work with existing codebase only + raise Error("Unexpected input zap file %s" % self.zap_config) + + os.rename(idl_path, target_path) + + def runGeneration(zap_file, zcl_file, templates_file, output_dir): generator_dir = getDirPath('third_party/zap/repo') os.chdir(generator_dir) subprocess.check_call(['node', './src-script/zap-generate.js', '-z', zcl_file, '-g', templates_file, '-i', zap_file, '-o', output_dir]) + extractGeneratedIdl(output_dir, zap_file) + def runClangPrettifier(templates_file, output_dir): listOfSupportedFileExtensions = [ diff --git a/scripts/tools/zap_regen_all.py b/scripts/tools/zap_regen_all.py index 99b0fafb4f6257..eb19dab5089989 100755 --- a/scripts/tools/zap_regen_all.py +++ b/scripts/tools/zap_regen_all.py @@ -25,6 +25,35 @@ os.path.join(os.path.dirname(__file__), '../..')) +class ZAPGenerateTarget: + def __init__(self, zap_config, template=None, output_dir=None): + self.script = './scripts/tools/zap/generate.py' + self.zap_config = str(zap_config) + self.template = template + + if output_dir: + # make sure we convert any os.PathLike object to string + self.output_dir = str(output_dir) + else: + self.output_dir = None + + def generate(self): + """Runs a ZAP generate command on the configured zap/template/outputs. + """ + cmd = [self.script, self.zap_config] + + if self.template: + cmd.append('-t') + cmd.append(self.template) + + if self.output_dir: + cmd.append('-o') + cmd.append(self.output_dir) + + logging.info("Generating target: %s" % " ".join(cmd)) + subprocess.check_call(cmd) + + def checkPythonVersion(): if sys.version_info[0] < 3: print('Must use Python 3. Current version is ' + @@ -55,8 +84,10 @@ def getGlobalTemplatesTargets(): if not os.path.exists(output_dir): os.makedirs(output_dir) template = 'examples/placeholder/templates/templates.json' - targets.append([str(filepath), '-o', output_dir]) - targets.append([str(filepath), '-o', output_dir, '-t', template]) + + targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) + targets.append( + ZAPGenerateTarget(filepath, output_dir=output_dir, template=template)) continue logging.info("Found example %s (via %s)" % @@ -69,13 +100,11 @@ def getGlobalTemplatesTargets(): if not os.path.exists(output_dir): os.makedirs(output_dir) - targets.append([str(filepath), '-o', output_dir]) + targets.append(ZAPGenerateTarget(filepath, output_dir=output_dir)) - targets.extend([ - [ - './src/controller/data_model/controller-clusters.zap', - '-o', - os.path.join('zzz_generated/controller-clusters/zap-generated')]]) + targets.append(ZAPGenerateTarget( + './src/controller/data_model/controller-clusters.zap', + output_dir=os.path.join('zzz_generated/controller-clusters/zap-generated'))) return targets @@ -94,12 +123,12 @@ def getSpecificTemplatesTargets(): } for template, output_dir in templates.items(): - target = [ - 'src/controller/data_model/controller-clusters.zap', '-t', template] + target = ZAPGenerateTarget( + 'src/controller/data_model/controller-clusters.zap', template=template) if output_dir is not None: if not os.path.exists(output_dir): os.makedirs(output_dir) - target.extend(['-o', output_dir]) + target.output_dir = output_dir targets.append(target) @@ -123,9 +152,7 @@ def main(): targets = getTargets() for target in targets: - exec_list = ['./scripts/tools/zap/generate.py'] + target - logging.info("Generating target: %s" % " ".join(exec_list)) - subprocess.check_call(exec_list) + target.generate() if __name__ == '__main__': diff --git a/src/app/CommandHandler.cpp b/src/app/CommandHandler.cpp index cabddbb1f8b57c..4a2b77aeb983cd 100644 --- a/src/app/CommandHandler.cpp +++ b/src/app/CommandHandler.cpp @@ -98,6 +98,8 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa ReturnErrorOnFailure(invokeRequestMessage.GetTimedRequest(&mTimedRequest)); ReturnErrorOnFailure(invokeRequestMessage.GetInvokeRequests(&invokeRequests)); + VerifyOrReturnError(mpExchangeCtx != nullptr, CHIP_ERROR_INCORRECT_STATE); + if (mTimedRequest != isTimedInvoke) { // The message thinks it should be part of a timed interaction but it's @@ -105,9 +107,7 @@ CHIP_ERROR CommandHandler::ProcessInvokeRequest(System::PacketBufferHandle && pa err = StatusResponse::Send(Protocols::InteractionModel::Status::UnsupportedAccess, mpExchangeCtx, /* aExpectResponse = */ false); - // Some unit tests call this function in an abnormal state when we don't - // even have an exchange. - if (err != CHIP_NO_ERROR && mpExchangeCtx) + if (err != CHIP_NO_ERROR) { // We have to manually close the exchange, because we called // WillSendMessage already. @@ -252,9 +252,10 @@ CHIP_ERROR CommandHandler::ProcessCommandDataIB(CommandDataIB::Parser & aCommand SuccessOrExit(err); VerifyOrExit(mpCallback->CommandExists(concretePath), err = CHIP_ERROR_INVALID_PROFILE_ID); + VerifyOrExit(mpExchangeCtx != nullptr && mpExchangeCtx->HasSessionHandle(), err = CHIP_ERROR_INCORRECT_STATE); { - Access::SubjectDescriptor subjectDescriptor; // TODO: get actual subject descriptor + Access::SubjectDescriptor subjectDescriptor = mpExchangeCtx->GetSessionHandle()->GetSubjectDescriptor(); Access::RequestPath requestPath{ .cluster = concretePath.mClusterId, .endpoint = concretePath.mEndpointId }; Access::Privilege requestPrivilege = Access::Privilege::kOperate; // TODO: get actual request privilege err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege); diff --git a/src/app/ReadHandler.h b/src/app/ReadHandler.h index df8e1c443ea366..103b20756bc41a 100644 --- a/src/app/ReadHandler.h +++ b/src/app/ReadHandler.h @@ -217,6 +217,10 @@ class ReadHandler : public Messaging::ExchangeDelegate uint16_t mMinIntervalFloorSeconds = 0; uint16_t mMaxIntervalCeilingSeconds = 0; SessionHolder mSessionHandle; + // mHoldReport is used to prevent subscription data delivery while we are + // waiting for the min reporting interval to elapse. If we have to send a + // report immediately due to an urgent event being queued, + // UnblockUrgentEventDelivery can be used to force mHoldReport to false. bool mHoldReport = false; bool mDirty = false; bool mActiveSubscription = false; @@ -226,8 +230,12 @@ class ReadHandler : public Messaging::ExchangeDelegate NodeId mInitiatorNodeId = kUndefinedNodeId; AttributePathExpandIterator mAttributePathExpandIterator = AttributePathExpandIterator(nullptr); bool mIsFabricFiltered = false; - bool mHoldSync = false; - uint32_t mLastWrittenEventsBytes = 0; + // mHoldSync is used to prevent subscription empty report delivery while we + // are waiting for the max reporting interval to elaps. When mHoldSync + // becomes false, we are allowed to send an empty report to keep the + // subscription alive on the client. + bool mHoldSync = false; + uint32_t mLastWrittenEventsBytes = 0; SubjectDescriptor mSubjectDescriptor; // The detailed encoding state for a single attribute, used by list chunking feature. AttributeValueEncoder::AttributeEncodeState mAttributeEncoderState; diff --git a/src/app/WriteClient.h b/src/app/WriteClient.h index 5be883e501bd04..e81e09d422643d 100644 --- a/src/app/WriteClient.h +++ b/src/app/WriteClient.h @@ -115,11 +115,6 @@ class WriteClient : public Messaging::ExchangeDelegate CHIP_ERROR FinishAttribute(); TLV::TLVWriter * GetAttributeDataIBTLVWriter(); - NodeId GetSourceNodeId() const - { - return mpExchangeCtx != nullptr ? mpExchangeCtx->GetSessionHandle()->AsSecureSession()->GetPeerNodeId() : kUndefinedNodeId; - } - private: friend class TestWriteInteraction; friend class InteractionModelEngine; diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 7ce355db3ee870..aae68293b1c1ed 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -270,3 +270,7 @@ void emberAfPluginColorControlServerXyTransitionEventHandler(chip::EndpointId en #ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV void emberAfPluginColorControlServerHueSatTransitionEventHandler(chip::EndpointId endpoint); #endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV + +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +void emberAfPluginLevelControlCoupledColorTempChangeCallback(chip::EndpointId endpoint); +#endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP diff --git a/src/app/clusters/ias-zone-server/ias-zone-server.cpp b/src/app/clusters/ias-zone-server/ias-zone-server.cpp index 5a219448c26dc5..77cbb555976f19 100644 --- a/src/app/clusters/ias-zone-server/ias-zone-server.cpp +++ b/src/app/clusters/ias-zone-server/ias-zone-server.cpp @@ -63,9 +63,11 @@ #include #include #include +#include #include using namespace chip; +using namespace chip::app::Clusters; using namespace chip::app::Clusters::IasZone; #define UNDEFINED_ZONE_ID 0xFF @@ -592,29 +594,10 @@ uint8_t emberAfPluginIasZoneServerGetZoneId(EndpointId endpoint) //------------------------------------------------------------------------------ static bool areZoneServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = - emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_IAS_CIE_ADDRESS_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_STATE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_TYPE_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = emberAfLocateAttributeMetadata(endpoint, ZCL_IAS_ZONE_CLUSTER_ID, ZCL_ZONE_ID_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (!emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::IasCieAddress::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneState::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneType::Id, true) || + !emberAfIsNonVolatileAttribute(endpoint, IasZone::Id, Attributes::ZoneId::Id, true)) { return false; } diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 06e7b152a31c8b..79e1ccecd3e65a 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #include @@ -59,9 +60,9 @@ #include #endif // EMBER_AF_PLUGIN_ON_OFF -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#include "app/framework/plugin/zll-level-control-server/zll-level-control-server.h" -#endif // EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER +#ifdef EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP +#include +#endif // EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #include @@ -69,23 +70,18 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::LevelControl; -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint); -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL #if (EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE == 0) #define FASTEST_TRANSITION_TIME_MS 0 #else #define FASTEST_TRANSITION_TIME_MS (MILLISECOND_TICKS_PER_SECOND / EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE) -#endif +#endif // EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER -#define MIN_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER_MAXIMUM_LEVEL -#else -#define MIN_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL -#define MAX_LEVEL EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL -#endif +#define LEVEL_CONTROL_LIGHTING_MIN_LEVEL 0x01 +#define LEVEL_CONTROL_LIGHTING_MAX_LEVEL 0xFE #define INVALID_STORED_LEVEL 0xFFFF @@ -107,10 +103,13 @@ typedef struct static EmberAfLevelControlState stateTable[EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT]; +static uint8_t minLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL; +static uint8_t maxLevel = EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL; + static EmberAfLevelControlState * getState(EndpointId endpoint); -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel); +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel); static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride); static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTimeDs, uint8_t optionMask, uint8_t optionOverride); @@ -120,12 +119,12 @@ static void setOnOffValue(EndpointId endpoint, bool onOff); static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride); -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint); #define updateCoupledColorTemp(endpoint) reallyUpdateCoupledColorTemp(endpoint) #else #define updateCoupledColorTemp(endpoint) -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP static void schedule(EndpointId endpoint, uint32_t delayMs) { @@ -143,7 +142,7 @@ static EmberAfLevelControlState * getState(EndpointId endpoint) return (ep == 0xFFFF ? NULL : &stateTable[ep]); } -#if defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) +#if !defined(IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS) && defined(EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP) static void reallyUpdateCoupledColorTemp(EndpointId endpoint) { uint8_t options; @@ -154,12 +153,15 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) return; } - if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + if (emberAfContainsAttribute(endpoint, ColorControl::Id, ColorControl::Attributes::ColorTemperature::Id, true)) { - emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + if (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_COUPLE_COLOR_TEMP_TO_LEVEL)) + { + emberAfPluginLevelControlCoupledColorTempChangeCallback(endpoint); + } } } -#endif // LEVEL...OPTIONS_ATTRIBUTE && COLOR...SERVER_TEMP +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS && EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { @@ -174,13 +176,6 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) state->elapsedTimeMs += state->eventDurationMs; -#if !defined(ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE) && defined(EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER) - if (emberAfPluginZllLevelControlServerIgnoreMoveToLevelMoveStepStop(endpoint, state->commandId)) - { - return; - } -#endif - // Read the attribute; print error message and return if it can't be read status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -200,13 +195,13 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) } else if (state->increasing) { - assert(currentLevel < MAX_LEVEL); + assert(currentLevel < maxLevel); assert(currentLevel < state->moveToLevel); currentLevel++; } else { - assert(MIN_LEVEL < currentLevel); + assert(minLevel < currentLevel); assert(state->moveToLevel < currentLevel); currentLevel--; } @@ -230,7 +225,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) { emberAfScenesClusterMakeInvalidCallback(endpoint); } -#endif +#endif // EMBER_AF_PLUGIN_SCENES // Are we at the requested level? if (currentLevel == state->moveToLevel) @@ -238,8 +233,8 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) if (state->commandId == Commands::MoveToLevelWithOnOff::Id || state->commandId == Commands::MoveWithOnOff::Id || state->commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (currentLevel != MIN_LEVEL)); - if (currentLevel == MIN_LEVEL && state->useOnLevel) + setOnOffValue(endpoint, (currentLevel != minLevel)); + if (currentLevel == minLevel && state->useOnLevel) { status = Attributes::CurrentLevel::Set(endpoint, state->onLevel); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -279,29 +274,32 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME_ATTRIBUTE - // Convert milliseconds to tenths of a second, rounding any fractional value - // up to the nearest whole value. This means: - // - // 0 ms = 0.00 ds = 0 ds - // 1 ms = 0.01 ds = 1 ds - // ... - // 100 ms = 1.00 ds = 1 ds - // 101 ms = 1.01 ds = 2 ds - // ... - // 200 ms = 2.00 ds = 2 ds - // 201 ms = 2.01 ds = 3 ds - // ... - // - // This is done to ensure that the attribute, in tenths of a second, only - // goes to zero when the remaining time in milliseconds is actually zero. - uint16_t remainingTimeDs = (remainingTimeMs + 99) / 100; - EmberStatus status = Attributes::LevelControlRemainingTime::Set(endpoint, remainingTypeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, LevelControl::Attributes::RemainingTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + // Convert milliseconds to tenths of a second, rounding any fractional value + // up to the nearest whole value. This means: + // + // 0 ms = 0.00 ds = 0 ds + // 1 ms = 0.01 ds = 1 ds + // ... + // 100 ms = 1.00 ds = 1 ds + // 101 ms = 1.01 ds = 2 ds + // ... + // 200 ms = 2.00 ds = 2 ds + // 201 ms = 2.01 ds = 3 ds + // ... + // + // This is done to ensure that the attribute, in tenths of a second, only + // goes to zero when the remaining time in milliseconds is actually zero. + uint16_t remainingTimeDs = static_cast((remainingTimeMs + 99) / 100); + EmberStatus status = LevelControl::Attributes::RemainingTime::Set(endpoint, remainingTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: writing remaining time %x", status); + } } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME } static void setOnOffValue(EndpointId endpoint, bool onOff) @@ -317,86 +315,88 @@ static void setOnOffValue(EndpointId endpoint, bool onOff) static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, uint8_t optionMask, uint8_t optionOverride) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_OPTIONS_ATTRIBUTE - // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: - // "Command execution SHALL NOT continue beyond the Options processing if - // all of these criteria are true: - // - The command is one of the ‘without On/Off’ commands: Move, Move to - // Level, Stop, or Step. - // - The On/Off cluster exists on the same endpoint as this cluster. - // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 - // (FALSE). - // - The value of the ExecuteIfOff bit is 0." - if (commandId > Commands::Stop::Id) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::Options::Id, true)) { - return true; - } + // From 3.10.2.2.8.1 of ZCL7 document 14-0127-20j-zcl-ch-3-general.docx: + // "Command execution SHALL NOT continue beyond the Options processing if + // all of these criteria are true: + // - The command is one of the ‘without On/Off’ commands: Move, Move to + // Level, Stop, or Step. + // - The On/Off cluster exists on the same endpoint as this cluster. + // - The OnOff attribute of the On/Off cluster, on this endpoint, is 0x00 + // (FALSE). + // - The value of the ExecuteIfOff bit is 0." + if (commandId > Commands::Stop::Id) + { + return true; + } - if (!emberAfContainsServer(endpoint, OnOff::Id)) - { - return true; - } + if (!emberAfContainsServer(endpoint, OnOff::Id)) + { + return true; + } - uint8_t options; - EmberAfStatus status = Attributes::Options::Get(&options); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); - // If we can't read the attribute, then we should just assume that it has its - // default value. - options = 0x00; - } + uint8_t options; + EmberAfStatus status = Attributes::Options::Get(endpoint, &options); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read Options attribute: 0x%X", status); + // If we can't read the attribute, then we should just assume that it has its + // default value. + options = 0x00; + } - bool on; - status = OnOff::Attributes::OnOff::Get(endpoint, &on); - if (status != EMBER_ZCL_STATUS_SUCCESS) - { - emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); - return true; - } - // The device is on - hence ExecuteIfOff does not matter - if (on) - { - return true; - } - // The OptionsMask & OptionsOverride fields SHALL both be present or both - // omitted in the command. A temporary Options bitmap SHALL be created from - // the Options attribute, using the OptionsMask & OptionsOverride fields, if - // present. Each bit of the temporary Options bitmap SHALL be determined as - // follows: - // Each bit in the Options attribute SHALL determine the corresponding bit in - // the temporary Options bitmap, unless the OptionsMask field is present and - // has the corresponding bit set to 1, in which case the corresponding bit in - // the OptionsOverride field SHALL determine the corresponding bit in the - // temporary Options bitmap. - // The resulting temporary Options bitmap SHALL then be processed as defined - // in section 3.10.2.2.3. - - // ---------- The following order is important in decission making ------- - // -----------more readable ---------- - // - if (optionMask == 0xFF && optionOverride == 0xFF) - { - // 0xFF are the default values passed to the command handler when - // the payload is not present - in that case there is use of option - // attribute to decide execution of the command - return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); - } - // ---------- The above is to distinguish if the payload is present or not + bool on; + status = OnOff::Attributes::OnOff::Get(endpoint, &on); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("Unable to read OnOff attribute: 0x%X", status); + return true; + } + // The device is on - hence ExecuteIfOff does not matter + if (on) + { + return true; + } + // The OptionsMask & OptionsOverride fields SHALL both be present or both + // omitted in the command. A temporary Options bitmap SHALL be created from + // the Options attribute, using the OptionsMask & OptionsOverride fields, if + // present. Each bit of the temporary Options bitmap SHALL be determined as + // follows: + // Each bit in the Options attribute SHALL determine the corresponding bit in + // the temporary Options bitmap, unless the OptionsMask field is present and + // has the corresponding bit set to 1, in which case the corresponding bit in + // the OptionsOverride field SHALL determine the corresponding bit in the + // temporary Options bitmap. + // The resulting temporary Options bitmap SHALL then be processed as defined + // in section 3.10.2.2.3. + + // ---------- The following order is important in decision making ------- + // -----------more readable ---------- + // + if (optionMask == 0xFF && optionOverride == 0xFF) + { + // 0xFF are the default values passed to the command handler when + // the payload is not present - in that case there is use of option + // attribute to decide execution of the command + return READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // ---------- The above is to distinguish if the payload is present or not - if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) - { - // Mask is present and set in the command payload, this indicates - // use the over ride as temporary option - return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + if (READBITS(optionMask, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)) + { + // Mask is present and set in the command payload, this indicates + // use the over ride as temporary option + return READBITS(optionOverride, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF); + } + // if we are here - use the option bits + return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); } - // if we are here - use the option bits - return (READBITS(options, EMBER_ZCL_LEVEL_CONTROL_OPTIONS_EXECUTE_IF_OFF)); -#else +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_OPTIONS // By default, we return true to continue supporting backwards compatibility. return true; -#endif } bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, @@ -409,7 +409,7 @@ bool emberAfLevelControlClusterMoveToLevelCallback(app::CommandHandler * command emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL %x %2x %x %x", "RX level-control:", level, transitionTime, optionMask, optionOverride); - moveToLevelHandler(Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevel::Id, level, transitionTime, optionMask, optionOverride, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -422,7 +422,7 @@ bool emberAfLevelControlClusterMoveToLevelWithOnOffCallback(app::CommandHandler auto & transitionTime = commandData.transitionTime; emberAfLevelControlClusterPrintln("%pMOVE_TO_LEVEL_WITH_ON_OFF %x %2x", "RX level-control:", level, transitionTime); - moveToLevelHandler(Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, + moveToLevelHandler(commandPath.mEndpointId, Commands::MoveToLevelWithOnOff::Id, level, transitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to the stored level return true; } @@ -496,10 +496,9 @@ bool emberAfLevelControlClusterStopWithOnOffCallback(app::CommandHandler * comma return true; } -static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t transitionTimeDs, uint8_t optionMask, - uint8_t optionOverride, uint16_t storedLevel) +static void moveToLevelHandler(EndpointId endpoint, CommandId commandId, uint8_t level, uint16_t transitionTimeDs, + uint8_t optionMask, uint8_t optionOverride, uint16_t storedLevel) { - EndpointId endpoint = emberAfCurrentEndpoint(); EmberAfLevelControlState * state = getState(endpoint); EmberAfStatus status; uint8_t currentLevel; @@ -531,13 +530,13 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // Move To Level commands cause the device to move from its current level to // the specified level at the specified rate. - if (MAX_LEVEL <= level) + if (maxLevel <= level) { - state->moveToLevel = MAX_LEVEL; + state->moveToLevel = maxLevel; } - else if (level <= MIN_LEVEL) + else if (level <= minLevel) { - state->moveToLevel = MIN_LEVEL; + state->moveToLevel = minLevel; } else { @@ -552,7 +551,7 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran { if (commandId == Commands::MoveToLevelWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -575,23 +574,30 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran // as fast as it is able. if (transitionTimeDs == 0xFFFF) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); - goto send_default_response; - } + status = Attributes::OnOffTransitionTime::Get(endpoint, &transitionTimeDs); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading on/off transition time %x", status); + goto send_default_response; + } - // Transition time comes in (or is stored, in the case of On/Off Transition - // Time) as tenths of a second, but we work in milliseconds. - state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); -#else // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - // If the Transition Time field is 0xFFFF and On/Off Transition Time, - // which is an optional attribute, is not present, the device shall move to - // its new level as fast as it is able. + // Transition time comes in (or is stored, in the case of On/Off Transition + // Time) as tenths of a second, but we work in milliseconds. + state->transitionTimeMs = (transitionTimeDs * MILLISECOND_TICKS_PER_SECOND / 10); + } + else + { + state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; + } +#else + // If the Transition Time field is 0xFFFF and On/Off Transition Time, + // which is an optional attribute, is not present, the device shall move to + // its new level as fast as it is able. state->transitionTimeMs = FASTEST_TRANSITION_TIME_MS; -#endif // ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME } else { @@ -614,12 +620,15 @@ static void moveToLevelHandler(CommandId commandId, uint8_t level, uint16_t tran schedule(endpoint, state->eventDurationMs); status = EMBER_ZCL_STATUS_SUCCESS; -#ifdef EMBER_AF_PLUGIN_ZLL_LEVEL_CONTROL_SERVER if (commandId == Commands::MoveToLevelWithOnOff::Id) { - emberAfPluginZllLevelControlServerMoveToLevelWithOnOffZllExtensions(emberAfCurrentCommand()); + uint32_t featureMap; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + OnOff::Attributes::GlobalSceneControl::Set(endpoint, true); + } } -#endif send_default_response: if (emberAfCurrentCommand()->apsFrame->clusterId == LevelControl::Id) @@ -666,13 +675,13 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { case EMBER_ZCL_MOVE_MODE_UP: state->increasing = true; - state->moveToLevel = MAX_LEVEL; - difference = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + difference = static_cast(maxLevel - currentLevel); break; case EMBER_ZCL_MOVE_MODE_DOWN: state->increasing = false; - state->moveToLevel = MIN_LEVEL; - difference = currentLevel - MIN_LEVEL; + state->moveToLevel = minLevel; + difference = static_cast(currentLevel - minLevel); break; default: status = EMBER_ZCL_STATUS_INVALID_FIELD; @@ -687,7 +696,7 @@ static void moveHandler(CommandId commandId, uint8_t moveMode, uint8_t rate, uin { if (commandId == Commands::MoveWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -779,10 +788,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { case EMBER_ZCL_STEP_MODE_UP: state->increasing = true; - if (MAX_LEVEL - currentLevel < stepSize) + if (maxLevel - currentLevel < stepSize) { - state->moveToLevel = MAX_LEVEL; - actualStepSize = static_cast(MAX_LEVEL - currentLevel); + state->moveToLevel = maxLevel; + actualStepSize = static_cast(maxLevel - currentLevel); } else { @@ -791,10 +800,10 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, break; case EMBER_ZCL_STEP_MODE_DOWN: state->increasing = false; - if (currentLevel - MIN_LEVEL < stepSize) + if (currentLevel - minLevel < stepSize) { - state->moveToLevel = MIN_LEVEL; - actualStepSize = (currentLevel - MIN_LEVEL); + state->moveToLevel = minLevel; + actualStepSize = static_cast(currentLevel - minLevel); } else { @@ -814,7 +823,7 @@ static void stepHandler(CommandId commandId, uint8_t stepMode, uint8_t stepSize, { if (commandId == Commands::StepWithOnOff::Id) { - setOnOffValue(endpoint, (state->moveToLevel != MIN_LEVEL)); + setOnOffValue(endpoint, (state->moveToLevel != minLevel)); } if (currentLevel == state->moveToLevel) { @@ -893,10 +902,10 @@ static void stopHandler(CommandId commandId, uint8_t optionMask, uint8_t optionO // Quotes are from table 3.46. void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool newValue) { + app::DataModel::Nullable resolvedLevel; uint8_t temporaryCurrentLevelCache; uint16_t currentOnOffTransitionTime; - uint8_t resolvedLevel; - uint8_t minimumLevelAllowedForTheDevice = MIN_LEVEL; + uint8_t minimumLevelAllowedForTheDevice = minLevel; EmberAfStatus status; // "Temporarily store CurrentLevel." @@ -908,34 +917,48 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new } // Read the OnLevel attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE - status = Attributes::OnLevel::Get(endpoint, &resolvedLevel); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnLevel::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; - } + status = Attributes::OnLevel::Get(endpoint, resolvedLevel); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } - if (resolvedLevel == 0xFF) + if (resolvedLevel.IsNull()) + { + // OnLevel has undefined value; fall back to CurrentLevel. + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); + } + } + else { - // OnLevel has undefined value; fall back to CurrentLevel. - resolvedLevel = temporaryCurrentLevelCache; + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); } #else - resolvedLevel = temporaryCurrentLevelCache; -#endif + resolvedLevel.SetNonNull(temporaryCurrentLevelCache); +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_LEVEL_ATTRIBUTE // Read the OnOffTransitionTime attribute. -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME_ATTRIBUTE - status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); - if (status != EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME + if (emberAfContainsAttribute(endpoint, LevelControl::Id, Attributes::OnOffTransitionTime::Id, true)) { - emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); - return; + status = Attributes::OnOffTransitionTime::Get(endpoint, ¤tOnOffTransitionTime); + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + emberAfLevelControlClusterPrintln("ERR: reading current level %x", status); + return; + } + } + else + { + currentOnOffTransitionTime = 0xFFFF; } #else currentOnOffTransitionTime = 0xFFFF; -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_ON_OFF_TRANSITION_TIME if (newValue) { @@ -950,7 +973,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // "Move CurrentLevel to OnLevel, or to the stored level if OnLevel is not // defined, over the time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, resolvedLevel, currentOnOffTransitionTime, 0xFF, 0xFF, + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, resolvedLevel.Value(), currentOnOffTransitionTime, 0xFF, 0xFF, INVALID_STORED_LEVEL); // Don't revert to stored level } else @@ -958,8 +981,8 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new // ...else if newValue is OnOff::Commands::Off::Id... // "Move CurrentLevel to the minimum level allowed for the device over the // time period OnOffTransitionTime." - moveToLevelHandler(Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, 0xFF, - temporaryCurrentLevelCache); + moveToLevelHandler(endpoint, Commands::MoveToLevel::Id, minimumLevelAllowedForTheDevice, currentOnOffTransitionTime, 0xFF, + 0xFF, temporaryCurrentLevelCache); // "If OnLevel is not defined, set the CurrentLevel to the stored level." // The emberAfLevelControlClusterServerTickCallback implementation handles @@ -969,87 +992,107 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) { -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE - // StartUp behavior relies StartUpCurrentLevel attributes being non-volatile. - if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) + // If these read only attributes are enabled we use those values as our set minLevel and maxLevel + // if get isn't possible, value stays at default + Attributes::MinLevel::Get(endpoint, &minLevel); + Attributes::MaxLevel::Get(endpoint, &maxLevel); + + uint32_t featureMap; + if (Attributes::FeatureMap::Get(endpoint, &featureMap) == EMBER_ZCL_STATUS_SUCCESS && + READBITS(featureMap, EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING)) + { + if (minLevel < LEVEL_CONTROL_LIGHTING_MIN_LEVEL) + { + minLevel = LEVEL_CONTROL_LIGHTING_MIN_LEVEL; + } + + if (maxLevel > LEVEL_CONTROL_LIGHTING_MAX_LEVEL) + { + maxLevel = LEVEL_CONTROL_LIGHTING_MAX_LEVEL; + } + } + + uint8_t currentLevel = 0; + EmberAfStatus status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + if (status == EMBER_ZCL_STATUS_SUCCESS) { - // Read the StartUpOnOff attribute and set the OnOff attribute as per - // following from zcl 7 14-0127-20i-zcl-ch-3-general.doc. - // 3.10.2.2.14 StartUpCurrentLevel Attribute - // The StartUpCurrentLevel attribute SHALL define the desired startup level - // for a device when it is supplied with power and this level SHALL be - // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel - // attribute are listed below: - // Table 3 58. Values of the StartUpCurrentLevel Attribute - // Value Action on power up - // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. - // 0x01-0xfe Set the CurrentLevel attribute to this value. - // 0xff Set the CurrentLevel attribute to its previous value. - - // Initialize startUpCurrentLevel to assume previous value for currentLevel. - uint8_t startUpCurrentLevel = STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL; - EmberAfStatus status = Attributes::StartUpCurrentLevel::Get(endpoint, &startUpCurrentLevel); - if (status == EMBER_ZCL_STATUS_SUCCESS) +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // StartUp behavior relies StartUpCurrentLevel attributes being Non Volatile. + if (areStartUpLevelControlServerAttributesNonVolatile(endpoint)) { - uint8_t currentLevel = 0; - status = Attributes::CurrentLevel::Get(endpoint, ¤tLevel); + // 1.5.14. StartUpCurrentLevel Attribute + // The StartUpCurrentLevel attribute SHALL define the desired startup level + // for a device when it is supplied with power and this level SHALL be + // reflected in the CurrentLevel attribute. The values of the StartUpCurrentLevel + // attribute are listed below: + // Table 4. Values of the StartUpCurrentLevel attribute + // Value Action on power up + // 0x00 Set the CurrentLevel attribute to the minimum value permitted on the device. + // 0x01-0xfe Set the CurrentLevel attribute to this value. + // NULL Set the CurrentLevel attribute to its previous value. + // 0xFF Work Around ZAP Can't set default value to NULL + // https://github.com/project-chip/zap/issues/354 + + app::DataModel::Nullable startUpCurrentLevel; + status = Attributes::StartUpCurrentLevel::Get(endpoint, startUpCurrentLevel); if (status == EMBER_ZCL_STATUS_SUCCESS) { - switch (startUpCurrentLevel) + if (!startUpCurrentLevel.IsNull()) { - case STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM: - currentLevel = MIN_LEVEL; - break; - case STARTUP_CURRENT_LEVEL_USE_PREVIOUS_LEVEL: - // Just fetched it. - break; - default: - // Otherwise set to specified value 0x01-0xFE. - // But, need to enforce currentLevel's min/max, right? - // Spec doesn't mention this. - if (startUpCurrentLevel < MIN_LEVEL) + if (startUpCurrentLevel.Value() == STARTUP_CURRENT_LEVEL_USE_DEVICE_MINIMUM) { - currentLevel = MIN_LEVEL; - } - else if (startUpCurrentLevel > MAX_LEVEL) - { - currentLevel = MAX_LEVEL; + currentLevel = minLevel; } else { - currentLevel = startUpCurrentLevel; + // Otherwise set to specified value 0x01-0xFE. + // But, need to enforce currentLevel's min/max, right? + // Spec doesn't mention this. + if (startUpCurrentLevel.Value() < minLevel) + { + currentLevel = minLevel; + } + else if (startUpCurrentLevel.Value() > maxLevel) + { + currentLevel = maxLevel; + } + else + { + currentLevel = startUpCurrentLevel.Value(); + } } - break; } - status = Attributes::CurrentLevel::Set(endpoint, currentLevel); + // Otherwise Set the CurrentLevel attribute to its previous value which was already fetch above + + Attributes::CurrentLevel::Set(endpoint, currentLevel); } } +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL + // In any case, we make sure that the respects min/max + if (currentLevel < minLevel) + { + Attributes::CurrentLevel::Set(endpoint, minLevel); + } + else if (currentLevel > maxLevel) + { + Attributes::CurrentLevel::Set(endpoint, maxLevel); + } } -#endif + emberAfPluginLevelControlClusterServerPostInitCallback(endpoint); } -#ifdef ZCL_USING_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL_ATTRIBUTE +#ifndef IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL static bool areStartUpLevelControlServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - metadata = - emberAfLocateAttributeMetadata(endpoint, LevelControl::Id, ZCL_START_UP_CURRENT_LEVEL_ATTRIBUTE_ID, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::CurrentLevel::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpCurrentLevel::Id, true); } - return true; + return false; } -#endif +#endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL void emberAfPluginLevelControlClusterServerPostInitCallback(EndpointId endpoint) {} diff --git a/src/app/clusters/on-off-server/on-off-server.cpp b/src/app/clusters/on-off-server/on-off-server.cpp index 5d9f9040019ce2..4c35510fdf9f72 100644 --- a/src/app/clusters/on-off-server/on-off-server.cpp +++ b/src/app/clusters/on-off-server/on-off-server.cpp @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -155,12 +156,30 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm emberAfOnOffClusterPrintln("ERR: writing on/off %x", status); return status; } + +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } +#endif } else // Set Off { emberAfOnOffClusterPrintln("Off Command - OnTime : 0"); Attributes::OnTime::Set(endpoint, 0); // Reset onTime +#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL + // If initiatedByLevelChange is false, then we assume that the level change + // ZCL stuff has not happened and we do it here + if (!initiatedByLevelChange && emberAfContainsServer(endpoint, LevelControl::Id)) + { + emberAfOnOffClusterLevelControlEffectCallback(endpoint, newValue); + } +#endif + // write the new on/off value status = Attributes::OnOff::Set(endpoint, newValue); if (status != EMBER_ZCL_STATUS_SUCCESS) @@ -194,7 +213,7 @@ EmberAfStatus OnOffServer::setOnOffValue(chip::EndpointId endpoint, uint8_t comm void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF // StartUp behavior relies on OnOff and StartUpOnOff attributes being non-volatile. if (areStartUpOnOffServerAttributesNonVolatile(endpoint)) { @@ -222,7 +241,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) { // Initialise updated value to 0 bool updatedOnOff = 0; - status = Attributes::OnOff::Get(endpoint, &udpateOnOff); + status = Attributes::OnOff::Get(endpoint, &updatedOnOff); if (status == EMBER_ZCL_STATUS_SUCCESS) { switch (startUpOnOff) @@ -247,7 +266,7 @@ void OnOffServer::initOnOffServer(chip::EndpointId endpoint) } } } -#endif +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF emberAfPluginOnOffClusterServerPostInitCallback(endpoint); } @@ -481,26 +500,17 @@ void OnOffServer::updateOnOffTimeCommand(chip::EndpointId endpoint) } } -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool OnOffServer::areStartUpOnOffServerAttributesNonVolatile(EndpointId endpoint) { - EmberAfAttributeMetadata * metadata; - - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::OnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) + if (emberAfIsNonVolatileAttribute(endpoint, OnOff::Id, Attributes::OnOff::Id, true)) { - return false; + return emberAfIsNonVolatileAttribute(endpoint, LevelControl::Id, Attributes::StartUpOnOff::Id, true); } - metadata = emberAfLocateAttributeMetadata(endpoint, OnOff::Id, Attributes::StartUpOnOff::Id, CLUSTER_MASK_SERVER); - if (!metadata->IsNonVolatile()) - { - return false; - } - - return true; + return false; } -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif // IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF /** * @brief event control object for an endpoint diff --git a/src/app/clusters/on-off-server/on-off-server.h b/src/app/clusters/on-off-server/on-off-server.h index e72eb61e858715..8e2502007f1a3c 100644 --- a/src/app/clusters/on-off-server/on-off-server.h +++ b/src/app/clusters/on-off-server/on-off-server.h @@ -62,9 +62,9 @@ class OnOffServer * Functions Definitions *********************************************************/ -#ifdef ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#ifndef IGNORE_ON_OFF_CLUSTER_START_UP_ON_OFF bool areStartUpOnOffServerAttributesNonVolatile(chip::EndpointId endpoint); -#endif // ZCL_USING_ON_OFF_CLUSTER_START_UP_ON_OFF_ATTRIBUTE +#endif EmberEventControl * getEventControl(chip::EndpointId endpoint); EmberEventControl * configureEventControl(chip::EndpointId endpoint); diff --git a/src/app/clusters/ota-provider/ota-provider.cpp b/src/app/clusters/ota-provider/ota-provider.cpp index bc5b364512fa7d..cbee7aa4ac283b 100644 --- a/src/app/clusters/ota-provider/ota-provider.cpp +++ b/src/app/clusters/ota-provider/ota-provider.cpp @@ -121,7 +121,7 @@ bool emberAfOtaSoftwareUpdateProviderClusterNotifyUpdateAppliedCallback( EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; OTAProviderDelegate * delegate = GetDelegate(endpoint); - ChipLogDetail(Zcl, "OTA Provider received NotifyUpdateUpplied"); + ChipLogDetail(Zcl, "OTA Provider received NotifyUpdateApplied"); if (SendStatusIfDelegateNull(endpoint)) { diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 1e23db274e6fb6..616e259069ecfc 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -129,7 +129,7 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse if (err != CHIP_NO_ERROR) { - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); return; } @@ -153,7 +153,7 @@ void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); break; default: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); break; } @@ -165,7 +165,7 @@ void OTARequestor::OnQueryImageFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); } @@ -198,7 +198,19 @@ void OTARequestor::OnApplyUpdateFailure(void * context, EmberAfStatus status) VerifyOrDie(requestorCore != nullptr); ChipLogDetail(SoftwareUpdate, "ApplyUpdate failure response %" PRIu8, status); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, CHIP_ERROR_BAD_REQUEST); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, CHIP_ERROR_BAD_REQUEST); + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); +} + +void OTARequestor::OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response) {} + +void OTARequestor::OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus status) +{ + OTARequestor * requestorCore = static_cast(context); + VerifyOrDie(requestorCore != nullptr); + + ChipLogDetail(SoftwareUpdate, "NotifyUpdateApplied failure response %" PRIu8, status); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, CHIP_ERROR_BAD_REQUEST); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); } @@ -287,7 +299,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send QueryImage command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, err); return; } @@ -300,7 +312,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to start download: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, err); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); return; } @@ -314,7 +326,7 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr if (err != CHIP_NO_ERROR) { ChipLogError(SoftwareUpdate, "Failed to send ApplyUpdate command: %" CHIP_ERROR_FORMAT, err.Format()); - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, err); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, err); SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); return; } @@ -322,6 +334,20 @@ void OTARequestor::OnConnected(void * context, OperationalDeviceProxy * devicePr SetUpdateStateAttribute(OTAUpdateStateEnum::kApplying); break; } + case kNotifyUpdateApplied: { + CHIP_ERROR err = requestorCore->SendNotifyUpdateAppliedRequest(*deviceProxy); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Failed to send NotifyUpdateApplied command: %" CHIP_ERROR_FORMAT, err.Format()); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kNotifying, err); + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + return; + } + + SetUpdateStateAttribute(OTAUpdateStateEnum::kIdle); + break; + } default: break; } @@ -339,13 +365,13 @@ void OTARequestor::OnConnectionFailure(void * context, PeerId peerId, CHIP_ERROR switch (requestorCore->mOnConnectedAction) { case kQueryImage: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kQuerying, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kQuerying, error); break; case kStartBDX: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, error); break; case kApplyUpdate: - requestorCore->mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kApplying, error); + requestorCore->mOtaRequestorDriver->HandleError(UpdateFailureState::kApplying, error); break; default: break; @@ -376,6 +402,11 @@ void OTARequestor::ApplyUpdate() ConnectToProvider(kApplyUpdate); } +void OTARequestor::NotifyUpdateApplied() +{ + ConnectToProvider(kNotifyUpdateApplied); +} + void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) { VerifyOrReturn(mOtaRequestorDriver != nullptr); @@ -386,7 +417,7 @@ void OTARequestor::OnDownloadStateChanged(OTADownloader::State state) mOtaRequestorDriver->UpdateDownloaded(); break; case OTADownloader::State::kIdle: - mOtaRequestorDriver->HandleError(OTAUpdateStateEnum::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); + mOtaRequestorDriver->HandleError(UpdateFailureState::kDownloading, CHIP_ERROR_CONNECTION_ABORTED); break; default: break; @@ -398,6 +429,23 @@ void OTARequestor::OnUpdateProgressChanged(uint8_t percent) OtaRequestorServerSetUpdateStateProgress(percent); } +CHIP_ERROR OTARequestor::GenerateUpdateToken() +{ + if (mUpdateToken.empty()) + { + VerifyOrReturnError(mServer != nullptr, CHIP_ERROR_INCORRECT_STATE); + + FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderFabricIndex); + VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); + + static_assert(sizeof(NodeId) == sizeof(uint64_t), "Unexpected NodeId size"); + Encoding::BigEndian::Put64(mUpdateTokenBuffer, fabricInfo->GetPeerId().GetNodeId()); + mUpdateToken = ByteSpan(mUpdateTokenBuffer, sizeof(NodeId)); + } + + return CHIP_NO_ERROR; +} + CHIP_ERROR OTARequestor::SendQueryImageRequest(OperationalDeviceProxy & deviceProxy) { constexpr OTADownloadProtocol kProtocolsSupported[] = { OTADownloadProtocol::kBDXSynchronous }; @@ -488,19 +536,7 @@ CHIP_ERROR OTARequestor::StartDownload(OperationalDeviceProxy & deviceProxy) CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceProxy) { - if (mUpdateToken.empty()) - { - // OTA Requestor shall use its node ID as the update token in case the original update - // token, received in QueryImageResponse, got lost. - VerifyOrReturnError(mServer != nullptr, CHIP_ERROR_INCORRECT_STATE); - - FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderFabricIndex); - VerifyOrReturnError(fabricInfo != nullptr, CHIP_ERROR_INCORRECT_STATE); - - static_assert(sizeof(NodeId) == sizeof(uint64_t), "Unexpected NodeId size"); - Encoding::BigEndian::Put64(mUpdateTokenBuffer, fabricInfo->GetPeerId().GetNodeId()); - mUpdateToken = ByteSpan(mUpdateTokenBuffer, sizeof(NodeId)); - } + ReturnErrorOnFailure(GenerateUpdateToken()); ApplyUpdateRequest::Type args; args.updateToken = mUpdateToken; @@ -512,4 +548,18 @@ CHIP_ERROR OTARequestor::SendApplyUpdateRequest(OperationalDeviceProxy & deviceP return cluster.InvokeCommand(args, this, OnApplyUpdateResponse, OnApplyUpdateFailure); } +CHIP_ERROR OTARequestor::SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & deviceProxy) +{ + ReturnErrorOnFailure(GenerateUpdateToken()); + + NotifyUpdateApplied::Type args; + args.updateToken = mUpdateToken; + args.softwareVersion = mUpdateVersion; + + Controller::OtaSoftwareUpdateProviderCluster cluster; + cluster.Associate(&deviceProxy, mProviderEndpointId); + + return cluster.InvokeCommand(args, this, OnNotifyUpdateAppliedResponse, OnNotifyUpdateAppliedFailure); +} + } // namespace chip diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index ee5184ffaa4d76..fc70e83fab975c 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -43,6 +43,7 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe kQueryImage = 0, kStartBDX, kApplyUpdate, + kNotifyUpdateApplied, }; OTARequestor() : mOnConnectedCallback(OnConnected, this), mOnConnectionFailureCallback(OnConnectionFailure, this) {} @@ -62,6 +63,9 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe // Send ApplyImage void ApplyUpdate() override; + // Send NotifyUpdateApplied + void NotifyUpdateApplied() override; + //////////// BDXDownloader::StateDelegate Implementation /////////////// void OnDownloadStateChanged(OTADownloader::State state) override; void OnUpdateProgressChanged(uint8_t percent) override; @@ -188,6 +192,11 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe chip::BDXDownloader * mDownloader; }; + /** + * Generate an update token using the operational node ID in case of token lost, received in QueryImageResponse + */ + CHIP_ERROR GenerateUpdateToken(); + /** * Send QueryImage request using values matching Basic cluster */ @@ -208,6 +217,11 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe */ CHIP_ERROR SendApplyUpdateRequest(OperationalDeviceProxy & deviceProxy); + /** + * Send NotifyUpdateApplied request + */ + CHIP_ERROR SendNotifyUpdateAppliedRequest(OperationalDeviceProxy & deviceProxy); + /** * Session connection callbacks */ @@ -228,6 +242,12 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe static void OnApplyUpdateResponse(void * context, const ApplyUpdateResponseDecodableType & response); static void OnApplyUpdateFailure(void * context, EmberAfStatus); + /** + * NotifyUpdateApplied callbacks + */ + static void OnNotifyUpdateAppliedResponse(void * context, const app::DataModel::NullObjectType & response); + static void OnNotifyUpdateAppliedFailure(void * context, EmberAfStatus); + OTARequestorDriver * mOtaRequestorDriver = nullptr; NodeId mProviderNodeId = kUndefinedNodeId; FabricIndex mProviderFabricIndex = kUndefinedFabricIndex; diff --git a/src/app/data-model/DecodableList.h b/src/app/data-model/DecodableList.h index 064a55a0ca6176..4ae9728929dd3a 100644 --- a/src/app/data-model/DecodableList.h +++ b/src/app/data-model/DecodableList.h @@ -32,28 +32,30 @@ namespace DataModel { * This class provides an iteratable decoder of list items within TLV payloads * such that no memory has to be provided ahead of time to store the entirety of the decoded * list contents. - * */ template class DecodableList { public: - DecodableList() - { - // Init to an empty list. - mReader.Init(nullptr, 0); - } + DecodableList() { ClearReader(); } /* * @brief * * This call stores a TLV reader positioned on the list this class is to manage. * - * Specifically, the passed-in TLV reader should be pointing into the list just after + * Specifically, the passed-in reader should be pointing into the list just after * having called `OpenContainer` on the list element. */ void SetReader(const TLV::TLVReader & reader) { mReader = reader; } + /* + * @brief + * + * This call clears the TLV reader managed by this class, so it can be reused. + */ + void ClearReader() { mReader.Init(nullptr, 0); } + class Iterator { public: @@ -61,7 +63,9 @@ class DecodableList * Initialize the iterator with a reference to a reader. * * This reader should be pointing into the list just after - * having called `OpenContainer` on the list element. + * having called `OpenContainer` on the list element, or should + * have a `kTLVType_NotSpecified` container type if there is + * no list. */ Iterator(const TLV::TLVReader & reader) { @@ -77,16 +81,20 @@ class DecodableList * If an element does exist and was successfully decoded, this * shall return true. * - * Otherwise, if the end of list is reached, this call shall return - * false. + * Otherwise, if the end of list is reached, or there was no list, + * this call shall return false. * * If an error was encountered at any point during the iteration or decode, * this shall return false as well. The caller is expected to invoke GetStatus() * to retrieve the status of the operation. - * */ bool Next() { + if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) + { + return false; + } + if (mStatus == CHIP_NO_ERROR) { mStatus = mReader.Next(); @@ -111,7 +119,6 @@ class DecodableList * * Notably, if the end-of-list was encountered in a previous call to Next, * the status returned shall be CHIP_NO_ERROR. - * */ CHIP_ERROR GetStatus() const { @@ -134,12 +141,24 @@ class DecodableList Iterator begin() const { return Iterator(mReader); } /* - * Compute the size of the list. This can fail if the TLV is malformed. If + * Compute the size of the list. This can fail if the TLV is malformed. If * this succeeds, that does not guarantee that the individual items can be * successfully decoded; consumers should check Iterator::GetStatus() when - * actually decoding them. + * actually decoding them. If there is no list then the size is considered + * to be zero. */ - CHIP_ERROR ComputeSize(size_t * size) const { return mReader.CountRemainingInContainer(size); } + CHIP_ERROR ComputeSize(size_t * size) const + { + if (mReader.GetContainerType() == TLV::kTLVType_NotSpecified) + { + *size = 0; + return CHIP_NO_ERROR; + } + else + { + return mReader.CountRemainingInContainer(size); + } + } private: TLV::TLVReader mReader; @@ -149,13 +168,10 @@ template CHIP_ERROR Decode(TLV::TLVReader & reader, DecodableList & x) { VerifyOrReturnError(reader.GetType() == TLV::kTLVType_Array, CHIP_ERROR_SCHEMA_MISMATCH); - TLV::TLVType type; - ReturnErrorOnFailure(reader.EnterContainer(type)); x.SetReader(reader); ReturnErrorOnFailure(reader.ExitContainer(type)); - return CHIP_NO_ERROR; } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index c7394bc0d74d51..2f35404a01a55e 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -112,8 +112,6 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint // handler. SetAttributePersistenceProvider(&mAttributePersister); - InitDataModelHandler(&mExchangeMgr); - #if CHIP_DEVICE_LAYER_TARGET_DARWIN err = DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init("chip.store"); SuccessOrExit(err); @@ -121,6 +119,8 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(CHIP_CONFIG_KVS_PATH); #endif + InitDataModelHandler(&mExchangeMgr); + err = mFabrics.Init(&mServerStorage); SuccessOrExit(err); diff --git a/src/app/tests/TestCommandInteraction.cpp b/src/app/tests/TestCommandInteraction.cpp index 2af13c597ce36e..67fcd195fe2c8b 100644 --- a/src/app/tests/TestCommandInteraction.cpp +++ b/src/app/tests/TestCommandInteraction.cpp @@ -542,12 +542,18 @@ void TestCommandInteraction::TestCommandHandlerWithSendSimpleStatusCode(nlTestSu void TestCommandInteraction::TestCommandHandlerWithProcessReceivedMsg(nlTestSuite * apSuite, void * apContext) { - CHIP_ERROR err = CHIP_NO_ERROR; + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; app::CommandHandler commandHandler(&mockCommandHandlerDelegate); System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); + TestExchangeDelegate delegate; + commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + GenerateInvokeRequest(apSuite, apContext, commandDatabuf, true /*aNeedCommandData*/, /* aIsTimedRequest = */ false); err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), false); + + ChipLogDetail(DataManagement, "###################################### %s", err.AsString()); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); } @@ -570,6 +576,7 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedNotExistComman void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(nlTestSuite * apSuite, void * apContext) { + TestContext & ctx = *static_cast(apContext); bool allBooleans[] = { true, false }; for (auto messageIsTimed : allBooleans) { @@ -579,19 +586,13 @@ void TestCommandInteraction::TestCommandHandlerWithProcessReceivedEmptyDataMsg(n app::CommandHandler commandHandler(&mockCommandHandlerDelegate); System::PacketBufferHandle commandDatabuf = System::PacketBufferHandle::New(System::PacketBuffer::kMaxSize); - chip::isCommandDispatched = false; + TestExchangeDelegate delegate; + commandHandler.mpExchangeCtx = ctx.NewExchangeToAlice(&delegate); + chip::isCommandDispatched = false; GenerateInvokeRequest(apSuite, apContext, commandDatabuf, false /*aNeedCommandData*/, messageIsTimed); - err = commandHandler.ProcessInvokeRequest(std::move(commandDatabuf), transactionIsTimed); - if (messageIsTimed == transactionIsTimed) - { - NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && chip::isCommandDispatched); - } - else - { - NL_TEST_ASSERT(apSuite, err != CHIP_NO_ERROR && !chip::isCommandDispatched); - } + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR && chip::isCommandDispatched == (messageIsTimed == transactionIsTimed)); } } } diff --git a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml index 111317c8d9a82b..9807cca38ece32 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_1_1.yaml @@ -23,13 +23,11 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - #issue #12190 as per spec default value is 5 but expecting 3 - label: "read the global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 - label: "Read the global attribute constraints: ClusterRevision" command: "readAttribute" @@ -49,11 +47,10 @@ tests: error: UNSUPPORTED_WRITE - label: "reads back global attribute: ClusterRevision" - disabled: true command: "readAttribute" attribute: "ClusterRevision" response: - value: 4 + value: 5 #issue #11053 disabled steps below Global attributes missing from YAML framework - label: "Read the global attribute: AttributeList" @@ -101,10 +98,9 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 - label: "Read the optional global attribute : FeatureMap" - disabled: true command: "readAttribute" attribute: "FeatureMap" response: @@ -112,7 +108,6 @@ tests: type: map32 - label: "write the default values to optional global attribute: FeatureMap" - disabled: true command: "writeAttribute" attribute: "FeatureMap" arguments: @@ -125,4 +120,4 @@ tests: command: "readAttribute" attribute: "FeatureMap" response: - value: 0 + value: 3 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml index cd5032e3dd6b6f..31a3f9ccfb2d2c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_1.yaml @@ -23,16 +23,33 @@ tests: cluster: "DelayCommands" command: "WaitForCommissionee" - - label: "Reads the CurrentLevel attribute" - command: "readAttribute" - attribute: "current level" - response: - value: 254 + # Temporary - see #13551 + - label: "Reset level to 254" + command: "MoveToLevel" + arguments: + values: + - name: "level" + value: 254 + - name: "transitionTime" + value: 0 + - name: "optionMask" + value: 1 + - name: "optionOverride" + value: 1 + + - label: "Wait 100ms" + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 100 - label: "Reads the CurrentLevel attribute" command: "readAttribute" attribute: "current level" response: + value: 254 constraints: type: uint8 @@ -151,10 +168,10 @@ tests: constraints: type: map8 + #Disabled due to issue - #13414 - label: "Reads the StartUpCurrentLevel attribute " + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 - constraints: - type: uint8 + value: null diff --git a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml index d01d462b347020..3a7f0d99c1531c 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_2_2.yaml @@ -65,13 +65,13 @@ tests: command: "writeAttribute" attribute: "on level" arguments: - value: 1 + value: 254 - label: "Reads the OnLevel attribute from the DUT" command: "readAttribute" attribute: "on level" response: - value: 1 + value: 254 constraints: type: uint8 @@ -145,11 +145,13 @@ tests: constraints: type: uint8 + #Disabled due to issue - #11670 - label: "Reads the StartUpCurrentLevel attribute from the DUT" + disabled: true command: "readAttribute" attribute: "start up current level" response: - value: 0 + value: null constraints: type: uint8 @@ -157,12 +159,12 @@ tests: command: "writeAttribute" attribute: "start up current level" arguments: - value: 1 + value: 254 - label: "reads the StartUpCurrentLevel attribute from the DUT" command: "readAttribute" attribute: "start up current level" response: - value: 1 + value: 254 constraints: type: uint8 diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 05675a800ef748..365bfed122e33d 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -39,7 +39,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move to level command" command: "MoveToLevel" @@ -120,7 +120,7 @@ tests: arguments: values: - name: "ms" - value: 10 + value: 100 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index d21a5854b10858..584862a1c14369 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -33,7 +33,7 @@ tests: command: "readAttribute" attribute: "max level" response: - value: 255 + value: 254 - label: "sends a Move up command" command: "Move" @@ -60,7 +60,7 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 255 + value: 254 - label: "reads min level attribute from DUT" command: "readAttribute" @@ -89,11 +89,14 @@ tests: - name: "ms" value: 3000 + # For lighting Device type current level minimal value is 1 - label: "reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Write default move rate attribute from DUT" command: "writeAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml index f95ec0767bb30f..6f098444592b34 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_6_1.yaml @@ -48,11 +48,14 @@ tests: - name: "ms" value: 100 + # For lighting Device type current level minimal value is 1 - label: "Reads CurrentLevel attribute from DUT" command: "readAttribute" attribute: "current level" response: - value: 0 + constraints: + minValue: 0 + maxValue: 1 - label: "Sends a move up command to DUT" command: "Move" @@ -88,7 +91,9 @@ tests: command: "readAttribute" attribute: "current level" response: - value: 2 + constraints: + minValue: 2 + maxValue: 3 - label: "Reset level to 254" command: "MoveToLevel" diff --git a/src/app/util/ContentAppPlatform.cpp b/src/app/util/ContentAppPlatform.cpp index be91bd437438ed..e0a2951e230704 100644 --- a/src/app/util/ContentAppPlatform.cpp +++ b/src/app/util/ContentAppPlatform.cpp @@ -43,8 +43,8 @@ using namespace chip::AppPlatform; #define DEVICE_VERSION_DEFAULT 1 EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); @@ -62,8 +62,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterI } EmberAfStatus emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer) + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { uint16_t endpointIndex = emberAfGetDynamicIndexFromEndpoint(endpoint); diff --git a/src/app/util/af.h b/src/app/util/af.h index 3174acfbd8925f..80e122dfb14241 100644 --- a/src/app/util/af.h +++ b/src/app/util/af.h @@ -94,14 +94,6 @@ EmberAfAttributeMetadata * emberAfLocateAttributeMetadata(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); -#ifdef DOXYGEN_SHOULD_SKIP_THIS -/** @brief Returns true if the attribute exists. */ -bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, uint8_t mask); -#else -#define emberAfContainsAttribute(endpoint, clusterId, attributeId, mask) \ - (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != NULL) -#endif - /** * @brief Returns true if endpoint contains the ZCL cluster with specified id. * diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index 03adecffaa4d58..07b6cc9714fdfa 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -548,7 +548,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, src = buffer; dst = attributeLocation; if (!emberAfAttributeWriteAccessCallback(attRecord->endpoint, attRecord->clusterId, - EMBER_AF_NULL_MANUFACTURER_CODE, am->attributeId)) + am->attributeId)) { return EMBER_ZCL_STATUS_NOT_AUTHORIZED; } @@ -563,7 +563,7 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, src = attributeLocation; dst = buffer; if (!emberAfAttributeReadAccessCallback(attRecord->endpoint, attRecord->clusterId, - EMBER_AF_NULL_MANUFACTURER_CODE, am->attributeId)) + am->attributeId)) { return EMBER_ZCL_STATUS_NOT_AUTHORIZED; } @@ -572,12 +572,10 @@ EmberAfStatus emAfReadOrWriteAttribute(EmberAfAttributeSearchRecord * attRecord, // Is the attribute externally stored? if (am->mask & ATTRIBUTE_MASK_EXTERNAL_STORAGE) { - return (write - ? emberAfExternalAttributeWriteCallback(attRecord->endpoint, attRecord->clusterId, - am, EMBER_AF_NULL_MANUFACTURER_CODE, buffer) - : emberAfExternalAttributeReadCallback(attRecord->endpoint, attRecord->clusterId, - am, EMBER_AF_NULL_MANUFACTURER_CODE, buffer, - emberAfAttributeSize(am))); + return (write ? emberAfExternalAttributeWriteCallback(attRecord->endpoint, attRecord->clusterId, + am, buffer) + : emberAfExternalAttributeReadCallback(attRecord->endpoint, attRecord->clusterId, + am, buffer, emberAfAttributeSize(am))); } else { diff --git a/src/app/util/util.cpp b/src/app/util/util.cpp index 55850c493e80ea..adb98637959ba8 100644 --- a/src/app/util/util.cpp +++ b/src/app/util/util.cpp @@ -964,6 +964,26 @@ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel) } } +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + return (emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask) != nullptr); +} + +bool emberAfIsNonVolatileAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer) +{ + uint8_t mask = asServer ? CLUSTER_MASK_SERVER : CLUSTER_MASK_CLIENT; + EmberAfAttributeMetadata * metadata = emberAfLocateAttributeMetadata(endpoint, clusterId, attributeId, mask); + + if (metadata == nullptr) + { + return false; + } + + return metadata->IsNonVolatile(); +} + chip::Messaging::ExchangeManager * chip::ExchangeManager() { return emAfExchangeMgr; diff --git a/src/app/util/util.h b/src/app/util/util.h index 0ebbc750a45c38..f85a272740ab6e 100644 --- a/src/app/util/util.h +++ b/src/app/util/util.h @@ -277,6 +277,10 @@ uint8_t emberAfGetChannelFrom8bitEncodedChanPg(uint8_t chanPg); */ uint8_t emberAfMake8bitEncodedChanPg(uint8_t page, uint8_t channel); +bool emberAfContainsAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, bool asServer); +bool emberAfIsNonVolatileAttribute(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + bool asServer); + namespace chip { chip::Messaging::ExchangeManager * ExchangeManager(); } // namespace chip diff --git a/src/app/zap-templates/app-templates.json b/src/app/zap-templates/app-templates.json index eee83bf5ab9ef7..e7b05ff21a8bc0 100644 --- a/src/app/zap-templates/app-templates.json +++ b/src/app/zap-templates/app-templates.json @@ -26,6 +26,14 @@ { "name": "im_command_handler_cluster_commands", "path": "partials/im_command_handler_cluster_commands.zapt" + }, + { + "name": "idl_structure_definition", + "path": "partials/idl/structure_definition.zapt" + }, + { + "name": "idl_structure_member", + "path": "partials/idl/structure_member.zapt" } ], "templates": [ @@ -78,6 +86,11 @@ "path": "templates/app/CHIPClusters-src.zapt", "name": "C++ ZCL API", "output": "CHIPClusters.cpp" + }, + { + "path": "templates/app/MatterIDL.zapt", + "name": "Human-readable Matter IDL", + "output": "Clusters.matter" } ] } diff --git a/src/app/zap-templates/common/ClustersHelper.js b/src/app/zap-templates/common/ClustersHelper.js index 66c5a6d3ecdefd..ecafa3eb7c3eee 100644 --- a/src/app/zap-templates/common/ClustersHelper.js +++ b/src/app/zap-templates/common/ClustersHelper.js @@ -87,12 +87,39 @@ function loadStructs(packageId) .then(structs => Promise.all(structs.map(struct => loadStructItems.call(this, struct, packageId)))); } -function loadClusters() +/** + * Loads endpoint data, specifically what endpoints are available and what clusters + * are defined within those endpoints. + */ +async function loadEndpoints() { + let result = []; + const { db, sessionId } = this.global; - return queryEndpointType.selectEndpointTypeIds(db, sessionId) - .then(endpointTypes => queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes)) - .then(clusters => clusters.filter(cluster => cluster.enabled == 1)); + + const endpoints = await queryEndpoint.selectAllEndpoints(db, sessionId); + + // Selection is one by one since existing API does not seem to provide + // linkage between cluster and what endpoint it belongs to. + // + // TODO: there should be a better way + for (const endpoint of endpoints) { + const endpointClusters + = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, [ { endpointTypeId : endpoint.endpointTypeRef } ]); + result.push({...endpoint, clusters : endpointClusters.filter(c => c.enabled == 1) }); + } + + return result; +} + +async function loadClusters() +{ + const { db, sessionId } = this.global; + + const endpointTypes = await queryEndpointType.selectEndpointTypeIds(db, sessionId); + const clusters = await queryEndpointType.selectAllClustersDetailsFromEndpointTypes(db, endpointTypes); + + return clusters.filter(cluster => cluster.enabled == 1); } function loadCommandResponse(command, packageId) @@ -477,9 +504,105 @@ function enhancedAttributes(attributes, globalAttributes, types) } const Clusters = { - ready : new Deferred() + ready : new Deferred(), + post_processing_ready : new Deferred() }; +class ClusterStructUsage { + constructor() + { + this.usedStructures = new Map(); // Structure label -> structure + this.clustersForStructure = new Map(); // Structure label -> Set(Cluster name) + this.structuresForCluster = new Map(); // Cluster name -> Set(Structure label) + } + + addUsedStructure(clusterName, structure) + { + // Record that generally this structure is used + this.usedStructures.set(structure.label, structure); + + // Record that this structure is used by a + // particular cluster name + let clusterSet = this.clustersForStructure.get(structure.label); + if (!clusterSet) { + clusterSet = new Set(); + this.clustersForStructure.set(structure.label, clusterSet); + } + clusterSet.add(clusterName); + + let structureLabelSet = this.structuresForCluster.get(clusterName); + if (!structureLabelSet) { + structureLabelSet = new Set(); + this.structuresForCluster.set(clusterName, structureLabelSet); + } + structureLabelSet.add(structure.label); + } + + /** + * Finds structures that are specific to one cluster: + * - they belong to the cluster + * - only that cluster ever uses it + */ + structuresSpecificToCluster(clusterName) + { + let clusterStructures = this.structuresForCluster.get(clusterName); + if (!clusterStructures) { + return []; + } + + return Array.from(clusterStructures) + .filter(name => this.clustersForStructure.get(name).size == 1) + .map(name => this.usedStructures.get(name)); + } + + structuresUsedByMultipleClusters() + { + return Array.from(this.usedStructures.values()).filter(s => this.clustersForStructure.get(s.label).size > 1); + } +} + +Clusters._addUsedStructureNames = async function(clusterName, startType, allKnownStructs) { + const struct = getStruct(allKnownStructs, startType.type); + if (!struct) { + return; + } + + this._cluster_structures.addUsedStructure(clusterName, struct); + + for (const item of struct.items) { + this._addUsedStructureNames(clusterName, item, allKnownStructs); + } +} + +Clusters._computeUsedStructureNames = async function(structs) { + // NOTE: this MUST be called only after attribute promise is resolved + // as iteration of `get*ByClusterName` needs that data. + for (const cluster of this._clusters) { + const attributes = await this.getAttributesByClusterName(cluster.name); + for (const attribute of attributes) { + if (attribute.isStruct) { + this._addUsedStructureNames(cluster.name, attribute, structs); + } + } + + const commands = await this.getCommandsByClusterName(cluster.name); + for (const command of commands) { + for (const argument of command.arguments) { + this._addUsedStructureNames(cluster.name, argument, structs); + } + } + + const responses = await this.getResponsesByClusterName(cluster.name); + for (const response of responses) { + for (const argument of response.arguments) { + this._addUsedStructureNames(cluster.name, argument, structs); + } + } + } + + this._used_structure_names = new Set(this._cluster_structures.usedStructures.keys()) +} + Clusters.init = async function(context) { if (this.ready.running) { @@ -498,6 +621,7 @@ Clusters.init = async function(context) { const promises = [ Promise.all(loadTypes), + loadEndpoints.call(context), loadClusters.call(context), loadCommands.call(context, packageId), loadAttributes.call(context, packageId), @@ -505,14 +629,21 @@ Clusters.init = async function(context) { loadEvents.call(context, packageId), ]; - return Promise.all(promises).then(([types, clusters, commands, attributes, globalAttributes, events]) => { - this._clusters = clusters; - this._commands = enhancedCommands(commands, types); - this._attributes = enhancedAttributes(attributes, globalAttributes, types); - this._events = enhancedEvents(events, types); + let [types, endpoints, clusters, commands, attributes, globalAttributes, events] = await Promise.all(promises); + + this._endpoints = endpoints; + this._clusters = clusters; + this._commands = enhancedCommands(commands, types); + this._attributes = enhancedAttributes(attributes, globalAttributes, types); + this._events = enhancedEvents(events, types); + this._cluster_structures = new ClusterStructUsage(); + + // data is ready, but not full post - processing + this.ready.resolve(); - return this.ready.resolve(); - }, err => this.ready.reject(err)); + await this._computeUsedStructureNames(types[3]); + + return this.post_processing_ready.resolve(); } @@ -545,11 +676,22 @@ Clusters.ensureReady = function() return this.ready; } +Clusters.ensurePostProcessingDone = function() +{ + ensureState(this.ready.running); + return this.post_processing_ready; +} + Clusters.getClusters = function() { return this.ensureReady().then(() => this._clusters); } +Clusters.getEndPoints = function() +{ + return this.ensureReady().then(() => this._endpoints); +} + Clusters.getCommands = function() { return this.ensureReady().then(() => this._commands.filter(kResponseFilter.bind(null, false))); @@ -681,6 +823,21 @@ Clusters.getServerAttributes = function(name) return this.getAttributesByClusterName(name).then(items => items.filter(kServerSideFilter)); } +Clusters.getUsedStructureNames = function() +{ + return this.ensurePostProcessingDone().then(() => this._used_structure_names); +} + +Clusters.getStructuresByClusterName = function(name) +{ + return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresSpecificToCluster(name)); +} + +Clusters.getSharedStructs = function() +{ + return this.ensurePostProcessingDone().then(() => this._cluster_structures.structuresUsedByMultipleClusters()); +} + Clusters.getServerEvents = function(name) { return this.getEventsByClusterName(name).then(items => items.filter(kServerSideFilter)); diff --git a/src/app/zap-templates/partials/idl/structure_definition.zapt b/src/app/zap-templates/partials/idl/structure_definition.zapt new file mode 100644 index 00000000000000..af6fbaea7124c0 --- /dev/null +++ b/src/app/zap-templates/partials/idl/structure_definition.zapt @@ -0,0 +1,8 @@ +{{#if struct_is_fabric_scoped}} +{{indent extraIndent~}} [fabric_scoped_by={{asUpperCamelCase struct_fabric_idx_field}}] +{{/if}} +{{indent extraIndent~}} struct {{name}} { +{{#zcl_struct_items}} + {{indent extraIndent~}} {{> idl_structure_member}} +{{/zcl_struct_items}} +{{indent extraIndent~}} } diff --git a/src/app/zap-templates/partials/idl/structure_member.zapt b/src/app/zap-templates/partials/idl/structure_member.zapt new file mode 100644 index 00000000000000..d64eeefbc98d53 --- /dev/null +++ b/src/app/zap-templates/partials/idl/structure_member.zapt @@ -0,0 +1,8 @@ +{{~#if isOptional~}} optional {{/if~}} +{{~#if isNullable~}} nullable {{/if~}} + +{{type}} {{asLowerCamelCase label~}} + +{{~#if isArray~}} + [] +{{~/if}} = {{fieldIdentifier}}; \ No newline at end of file diff --git a/src/app/zap-templates/templates/app/MatterIDL.zapt b/src/app/zap-templates/templates/app/MatterIDL.zapt new file mode 100644 index 00000000000000..1407583f775b14 --- /dev/null +++ b/src/app/zap-templates/templates/app/MatterIDL.zapt @@ -0,0 +1,89 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +{{#chip_shared_structs}} +{{>idl_structure_definition extraIndent=0}} + +{{/chip_shared_structs}} +{{!TODO: consider #chip_clusters as iteration point as well. +{{! Unsure about the differences}} +{{#all_user_clusters}} +{{side}} cluster {{asUpperCamelCase name}} = {{code}} { + {{#zcl_enums}} + enum {{asUpperCamelCase name}} : {{type}} { + {{#zcl_enum_items}} + k{{asUpperCamelCase label}} = {{value}}; + {{/zcl_enum_items}} + } + + {{/zcl_enums}} + {{#chip_cluster_specific_structs}} +{{>idl_structure_definition extraIndent=1}} + + {{/chip_cluster_specific_structs}} + {{#zcl_events}} + {{priority}} event {{asUpperCamelCase name}} = {{code}} { + {{#zcl_event_fields}} + {{>idl_structure_member label=name}} + + {{/zcl_event_fields}} + } + + {{/zcl_events}} + {{#chip_server_cluster_attributes}} + attribute( + {{~#if isWritableAttribute~}} + writable + {{~else~}} + readonly + {{~/if~}} + {{~#if isReportableAttribute~}} + , reportable + {{~/if~}} + ) {{type}} {{asLowerCamelCase name~}} + {{~#if isList~}} + [] + {{~/if}} = {{code}}; + {{/chip_server_cluster_attributes}} + {{#chip_cluster_commands}} + {{#if arguments}} + + request struct {{asUpperCamelCase name}}Request { + {{#chip_cluster_command_arguments}} + {{> idl_structure_member}} + + {{/chip_cluster_command_arguments}} + } + {{/if}} + {{/chip_cluster_commands}} + {{#chip_cluster_responses}} + + response struct {{asUpperCamelCase name}} { + {{#chip_cluster_response_arguments}} + {{> idl_structure_member}} + + {{/chip_cluster_response_arguments}} + } + {{/chip_cluster_responses}} + {{#chip_cluster_commands}} + {{#first}} + + {{/first}} + command {{asUpperCamelCase name}}( + {{~#if arguments~}} + {{asUpperCamelCase name}}Request + {{~/if~}} + ): {{asUpperCamelCase responseName}} = {{code}}; + {{/chip_cluster_commands}} +} + +{{/all_user_clusters}} + +{{#chip_endpoints}} +endpoint {{endpointId}} { + {{#chip_endpoint_clusters}} + instantiate cluster {{asUpperCamelCase name}}; + {{/chip_endpoint_clusters}} +} + +{{/chip_endpoints}} diff --git a/src/app/zap-templates/templates/app/callback-stub-src.zapt b/src/app/zap-templates/templates/app/callback-stub-src.zapt index 129caa153d22eb..d238f8c092f1be 100644 --- a/src/app/zap-templates/templates/app/callback-stub-src.zapt +++ b/src/app/zap-templates/templates/app/callback-stub-src.zapt @@ -48,15 +48,13 @@ EmberAfAttributeWritePermission __attribute__((weak)) emberAfAllowNetworkWriteAt } bool __attribute__((weak)) emberAfAttributeReadAccessCallback( - EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) + EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } bool __attribute__((weak)) emberAfAttributeWriteAccessCallback( - EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, - AttributeId attributeId) + EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -83,7 +81,7 @@ bool __attribute__((weak)) emberAfMessageSentCallback( EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback( EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; @@ -91,7 +89,7 @@ EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback( EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback( EndpointId endpoint, ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; diff --git a/src/app/zap-templates/templates/app/callback.zapt b/src/app/zap-templates/templates/app/callback.zapt index 7528d1d4130843..faddc64146d31c 100644 --- a/src/app/zap-templates/templates/app/callback.zapt +++ b/src/app/zap-templates/templates/app/callback.zapt @@ -220,16 +220,14 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip:: * This function is called whenever the Application Framework needs to check * access permission for an attribute read. */ -bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Attribute Write Access * * This function is called whenever the Application Framework needs to check * access permission for an attribute write. */ -bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Default Response * @@ -309,7 +307,7 @@ bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, uint16_t maxReadLength); /** @brief External Attribute Write @@ -353,7 +351,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, ch * attribute. */ EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); /** @brief Get Current Time diff --git a/src/app/zap-templates/templates/app/gen_config.zapt b/src/app/zap-templates/templates/app/gen_config.zapt index d6e3dfad0eddae..6a88ddc37da67a 100644 --- a/src/app/zap-templates/templates/app/gen_config.zapt +++ b/src/app/zap-templates/templates/app/gen_config.zapt @@ -43,7 +43,7 @@ {{else if (isStrEqual name "Level Control")}} {{#if (isServer side)}} // User options for {{side}} plugin {{name}} -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 {{/if}} diff --git a/src/app/zap-templates/templates/chip/helper.js b/src/app/zap-templates/templates/chip/helper.js index 49c3c3fae558ed..c7f9ea859b6a02 100644 --- a/src/app/zap-templates/templates/chip/helper.js +++ b/src/app/zap-templates/templates/chip/helper.js @@ -84,6 +84,12 @@ function getCommands(methodName) : ensureClusters(this).getServerCommands(clusterName); } +function getAttributes(methodName) +{ + const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); + return ensureClusters(this).getAttributesByClusterName(clusterName); +} + function getResponses(methodName) { const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, methodName); @@ -244,7 +250,8 @@ function chip_cluster_command_arguments(options) const commands = getCommands.call(this.parent, 'chip_cluster_commands_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, commands.then(items => items.find(filter).arguments), options); + return asBlocks.call(this, + commands.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); } /** @@ -293,7 +300,8 @@ function chip_cluster_response_arguments(options) const responses = getResponses.call(this.parent, 'chip_cluster_responses_argments'); const filter = command => command.id == commandId; - return asBlocks.call(this, responses.then(items => items.find(filter).arguments), options); + return asBlocks.call(this, + responses.then(items => items.find(filter).arguments.map((value, index) => ({...value, fieldIdentifier : index }))), options); } /** @@ -391,6 +399,39 @@ function chip_available_cluster_commands(options) return promise; } +/** + * Creates block iterator over structures belonging to the current cluster + */ +async function chip_cluster_specific_structs(options) +{ + const { clusterName, clusterSide } = checkIsInsideClusterBlock(this, 'chip_cluster_specific_structs'); + + const structs = await ensureClusters(this).getStructuresByClusterName(clusterName); + + return templateUtil.collectBlocks(structs, options, this); +} + +/** + * Creates block iterator over structures that are shared between clusters + */ +async function chip_shared_structs(options) +{ + const structs = await ensureClusters(this).getSharedStructs(); + return templateUtil.collectBlocks(structs, options, this); +} + +async function chip_endpoints(options) +{ + const endpoints = await ensureClusters(this).getEndPoints(); + return templateUtil.collectBlocks(endpoints, options, this); +} + +async function chip_endpoint_clusters(options) +{ + const clusters = this.clusters; + return templateUtil.collectBlocks(clusters, options, this); +} + /** * Checks whether a type is an enum for purposes of its chipType. That includes * both spec-defined enum types and types that we map to enum types in our code. @@ -432,5 +473,9 @@ exports.chip_server_cluster_attributes = chip_server_clust exports.chip_server_cluster_events = chip_server_cluster_events; exports.chip_server_has_list_attributes = chip_server_has_list_attributes; exports.chip_available_cluster_commands = chip_available_cluster_commands; +exports.chip_endpoints = chip_endpoints; +exports.chip_endpoint_clusters = chip_endpoint_clusters; exports.if_chip_enum = if_chip_enum; exports.if_in_global_responses = if_in_global_responses; +exports.chip_cluster_specific_structs = chip_cluster_specific_structs; +exports.chip_shared_structs = chip_shared_structs; diff --git a/src/app/zap-templates/zcl/data-model/silabs/general.xml b/src/app/zap-templates/zcl/data-model/silabs/general.xml index c645bb2ac60628..d6a6d5cfe13be3 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/general.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/general.xml @@ -391,11 +391,11 @@ limitations under the License. LEVEL_CONTROL_CLUSTER true true - + current level remaining time min level - max level + max level current frequency min frequency max frequency @@ -406,7 +406,7 @@ limitations under the License. off transition time default move rate options - start up current level + start up current level Command description for MoveToLevel @@ -556,4 +556,10 @@ limitations under the License. status flags application type + + + + + + diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index c5cab14f32868c..78daa9e8218966 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -52,8 +52,12 @@ CHIP_ERROR AutoCommissioner::SetCommissioningParameters(const CommissioningParam return CHIP_NO_ERROR; } -CommissioningStage AutoCommissioner::GetNextCommissioningStage(CommissioningStage currentStage) +CommissioningStage AutoCommissioner::GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR lastErr) { + if (lastErr != CHIP_NO_ERROR) + { + return CommissioningStage::kCleanup; + } switch (currentStage) { case CommissioningStage::kSecurePairing: @@ -138,14 +142,14 @@ void AutoCommissioner::StartCommissioning(CommissioneeDeviceProxy * proxy) void AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) { - if (report.stageCompleted == CommissioningStage::kFindOperational) { mOperationalDeviceProxy = report.OperationalNodeFoundData.operationalProxy; } - CommissioningStage nextStage = GetNextCommissioningStage(report.stageCompleted); + CommissioningStage nextStage = GetNextCommissioningStage(report.stageCompleted, err); DeviceProxy * proxy = mCommissioneeDeviceProxy; - if (nextStage == CommissioningStage::kSendComplete || nextStage == CommissioningStage::kCleanup) + if (nextStage == CommissioningStage::kSendComplete || + (nextStage == CommissioningStage::kCleanup && mOperationalDeviceProxy != nullptr)) { proxy = mOperationalDeviceProxy; } @@ -155,6 +159,7 @@ void AutoCommissioner::CommissioningStepFinished(CHIP_ERROR err, CommissioningDe ChipLogError(Controller, "Invalid device for commissioning"); return; } + mParams.SetCompletionStatus(err); mCommissioner->PerformCommissioningStep(proxy, nextStage, mParams, this); } diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 5b65674709a150..18f751dfe2f935 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -35,7 +35,7 @@ class AutoCommissioner : public CommissioningDelegate void CommissioningStepFinished(CHIP_ERROR err, CommissioningDelegate::CommissioningReport report) override; private: - CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage); + CommissioningStage GetNextCommissioningStage(CommissioningStage currentStage, CHIP_ERROR lastErr); DeviceCommissioner * mCommissioner; CommissioneeDeviceProxy * mCommissioneeDeviceProxy = nullptr; OperationalDeviceProxy * mOperationalDeviceProxy = nullptr; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index f660a40bd73ee9..792df14307744c 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1875,7 +1875,7 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio ChipLogProgress(Controller, "Rendezvous cleanup"); if (mPairingDelegate != nullptr) { - mPairingDelegate->OnCommissioningComplete(proxy->GetDeviceId(), CHIP_NO_ERROR); + mPairingDelegate->OnCommissioningComplete(proxy->GetDeviceId(), params.GetCompletionStatus()); } mCommissioningStage = CommissioningStage::kSecurePairing; break; diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 3a48eded46068b..86133b9782e248 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -91,12 +91,15 @@ class CommissioningParameters mThreadOperationalDataset.SetValue(threadOperationalDataset); return *this; } + void SetCompletionStatus(CHIP_ERROR err) { completionStatus = err; } + CHIP_ERROR GetCompletionStatus() { return completionStatus; } private: Optional mCSRNonce; ///< CSR Nonce passed by the commissioner Optional mAttestationNonce; ///< Attestation Nonce passed by the commissioner Optional mWiFiCreds; Optional mThreadOperationalDataset; + CHIP_ERROR completionStatus = CHIP_NO_ERROR; }; class CommissioningDelegate diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter new file mode 100644 index 00000000000000..4fed146169f4b1 --- /dev/null +++ b/src/controller/data_model/controller-clusters.matter @@ -0,0 +1,3381 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +struct LabelStruct { + CHAR_STRING label = 1; + CHAR_STRING value = 2; +} + +client cluster AccessControl = 31 { + enum AuthMode : ENUM8 { + kPase = 1; + kCase = 2; + kGroup = 3; + } + + enum Privilege : ENUM8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + struct AccessControlEntry { + fabric_idx fabricIndex = 0; + Privilege privilege = 1; + AuthMode authMode = 2; + nullable INT64U subjects[] = 3; + nullable Target targets[] = 4; + } + + struct Target { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + struct ExtensionEntry { + fabric_idx fabricIndex = 0; + OCTET_STRING data = 1; + } + + attribute(writable, reportable) AccessControlEntry acl[] = 0; + attribute(writable, reportable) ExtensionEntry extension[] = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster AccountLogin = 1294 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetSetupPINRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + } + + request struct LoginRequestRequest { + CHAR_STRING tempAccountIdentifier = 0; + CHAR_STRING setupPIN = 1; + } + + response struct GetSetupPINResponse { + CHAR_STRING setupPIN = 0; + } + + command GetSetupPINRequest(GetSetupPINRequestRequest): GetSetupPINResponse = 0; + command LoginRequest(LoginRequestRequest): DefaultSuccess = 2; + command LogoutRequest(): DefaultSuccess = 3; +} + +client cluster AdministratorCommissioning = 60 { + enum CommissioningWindowStatus : ENUM8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : ENUM8 { + kBusy = 1; + kPAKEParameterError = 2; + kWindowNotOpen = 3; + } + + attribute(readonly) int8u windowStatus = 0; + attribute(readonly) fabric_idx adminFabricIndex = 1; + attribute(readonly) int16u adminVendorId = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OpenBasicCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + } + + request struct OpenCommissioningWindowRequest { + INT16U commissioningTimeout = 0; + OCTET_STRING PAKEVerifier = 1; + INT16U discriminator = 2; + INT32U iterations = 3; + OCTET_STRING salt = 4; + INT16U passcodeID = 5; + } + + command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + command OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + command RevokeCommissioning(): DefaultSuccess = 2; +} + +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + struct ApplicationBasicApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) char_string vendorName = 0; + attribute(readonly, reportable) int16u vendorId = 1; + attribute(readonly, reportable) char_string applicationName = 2; + attribute(readonly, reportable) int16u productId = 3; + attribute(writable) ApplicationBasicApplication applicationApp = 4; + attribute(readonly, reportable) ApplicationStatusEnum applicationStatus = 5; + attribute(readonly, reportable) char_string applicationVersion = 6; + attribute(readonly) vendor_id allowedVendorList[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ApplicationLauncher = 1292 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct ApplicationLauncherApplication { + INT16U catalogVendorId = 1; + CHAR_STRING applicationId = 2; + } + + attribute(readonly, reportable) INT16U applicationLauncherList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct HideAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + request struct LaunchAppRequestRequest { + CHAR_STRING data = 0; + ApplicationLauncherApplication application = 1; + } + + request struct StopAppRequestRequest { + ApplicationLauncherApplication application = 0; + } + + response struct LauncherResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command HideAppRequest(HideAppRequestRequest): LauncherResponse = 2; + command LaunchAppRequest(LaunchAppRequestRequest): LauncherResponse = 0; + command StopAppRequest(StopAppRequestRequest): LauncherResponse = 1; +} + +client cluster AudioOutput = 1291 { + enum OutputTypeEnum : ENUM8 { + kHdmi = 0; + kBt = 1; + kOptical = 2; + kHeadphone = 3; + kInternal = 4; + kOther = 5; + } + + struct OutputInfo { + INT8U index = 1; + OutputTypeEnum outputType = 2; + CHAR_STRING name = 3; + } + + attribute(readonly, reportable) OutputInfo audioOutputList[] = 0; + attribute(readonly, reportable) int8u currentAudioOutput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameOutputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectOutputRequestRequest { + INT8U index = 0; + } + + command RenameOutputRequest(RenameOutputRequestRequest): DefaultSuccess = 1; + command SelectOutputRequest(SelectOutputRequestRequest): DefaultSuccess = 0; +} + +client cluster BarrierControl = 259 { + attribute(readonly, reportable) enum8 barrierMovingState = 1; + attribute(readonly, reportable) bitmap16 barrierSafetyStatus = 2; + attribute(readonly, reportable) bitmap8 barrierCapabilities = 3; + attribute(readonly, reportable) int8u barrierPosition = 10; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BarrierControlGoToPercentRequest { + INT8U percentOpen = 0; + } + + command BarrierControlGoToPercent(BarrierControlGoToPercentRequest): DefaultSuccess = 0; + command BarrierControlStop(): DefaultSuccess = 1; +} + +client cluster Basic = 40 { + critical event StartUp = 0 { + INT32U softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + attribute(readonly, reportable) int16u interactionModelVersion = 0; + attribute(readonly, reportable) char_string vendorName = 1; + attribute(readonly, reportable) vendor_id vendorID = 2; + attribute(readonly, reportable) char_string productName = 3; + attribute(readonly, reportable) int16u productID = 4; + attribute(writable, reportable) char_string nodeLabel = 5; + attribute(writable, reportable) char_string location = 6; + attribute(readonly, reportable) int16u hardwareVersion = 7; + attribute(readonly, reportable) char_string hardwareVersionString = 8; + attribute(readonly, reportable) int32u softwareVersion = 9; + attribute(readonly, reportable) char_string softwareVersionString = 10; + attribute(readonly, reportable) char_string manufacturingDate = 11; + attribute(readonly, reportable) char_string partNumber = 12; + attribute(readonly, reportable) long_char_string productURL = 13; + attribute(readonly, reportable) char_string productLabel = 14; + attribute(readonly, reportable) char_string serialNumber = 15; + attribute(writable, reportable) boolean localConfigDisabled = 16; + attribute(readonly, reportable) boolean reachable = 17; + attribute(readonly) char_string uniqueID = 18; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +client cluster BinaryInputBasic = 15 { + attribute(writable, reportable) boolean outOfService = 81; + attribute(writable, reportable) boolean presentValue = 85; + attribute(readonly, reportable) bitmap8 statusFlags = 111; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Binding = 30 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct BindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + request struct UnbindRequest { + NODE_ID nodeId = 0; + GROUP_ID groupId = 1; + ENDPOINT_NO endpointId = 2; + CLUSTER_ID clusterId = 3; + } + + command Bind(BindRequest): DefaultSuccess = 0; + command Unbind(UnbindRequest): DefaultSuccess = 1; +} + +client cluster BooleanState = 69 { + info event StateChange = 0 { + boolean stateValue = 0; + } + + attribute(readonly, reportable) boolean stateValue = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster BridgedActions = 37 { + enum ActionErrorEnum : ENUM8 { + kUnknown = 0; + kInterrupted = 1; + } + + enum ActionStateEnum : ENUM8 { + kInactive = 0; + kActive = 1; + kPaused = 2; + kDisabled = 3; + } + + enum ActionTypeEnum : ENUM8 { + kOther = 0; + kScene = 1; + kSequence = 2; + kAutomation = 3; + kException = 4; + kNotification = 5; + kAlarm = 6; + } + + enum EndpointListTypeEnum : ENUM8 { + kOther = 0; + kRoom = 1; + kZone = 2; + } + + struct ActionStruct { + INT16U actionID = 1; + CHAR_STRING name = 2; + ActionTypeEnum type = 3; + INT16U endpointListID = 4; + INT16U supportedCommands = 5; + ActionStateEnum status = 6; + } + + struct EndpointListStruct { + INT16U endpointListID = 1; + CHAR_STRING name = 2; + EndpointListTypeEnum type = 3; + ENDPOINT_NO endpoints[] = 4; + } + + info event StateChanged = 0 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + } + + info event ActionFailed = 1 { + INT16U actionID = 0; + INT32U invokeID = 1; + ActionStateEnum newState = 2; + ActionErrorEnum error = 3; + } + + attribute(readonly, reportable) ActionStruct actionList[] = 0; + attribute(readonly, reportable) EndpointListStruct endpointList[] = 1; + attribute(readonly, reportable) long_char_string setupUrl = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct DisableActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct DisableActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct EnableActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct EnableActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct InstantActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct InstantActionWithTransitionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT16U transitionTime = 2; + } + + request struct PauseActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct PauseActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct ResumeActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct StartActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + request struct StartActionWithDurationRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + INT32U duration = 2; + } + + request struct StopActionRequest { + INT16U actionID = 0; + optional INT32U invokeID = 1; + } + + command DisableAction(DisableActionRequest): DefaultSuccess = 10; + command DisableActionWithDuration(DisableActionWithDurationRequest): DefaultSuccess = 11; + command EnableAction(EnableActionRequest): DefaultSuccess = 8; + command EnableActionWithDuration(EnableActionWithDurationRequest): DefaultSuccess = 9; + command InstantAction(InstantActionRequest): DefaultSuccess = 0; + command InstantActionWithTransition(InstantActionWithTransitionRequest): DefaultSuccess = 1; + command PauseAction(PauseActionRequest): DefaultSuccess = 5; + command PauseActionWithDuration(PauseActionWithDurationRequest): DefaultSuccess = 6; + command ResumeAction(ResumeActionRequest): DefaultSuccess = 7; + command StartAction(StartActionRequest): DefaultSuccess = 2; + command StartActionWithDuration(StartActionWithDurationRequest): DefaultSuccess = 3; + command StopAction(StopActionRequest): DefaultSuccess = 4; +} + +client cluster BridgedDeviceBasic = 57 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Channel = 1284 { + enum ErrorTypeEnum : ENUM8 { + kMultipleMatches = 0; + kNoMatches = 1; + } + + enum LineupInfoTypeEnum : ENUM8 { + kMso = 0; + } + + struct ChannelInfo { + INT16U majorNumber = 1; + INT16U minorNumber = 2; + CHAR_STRING name = 3; + CHAR_STRING callSign = 4; + CHAR_STRING affiliateCallSign = 5; + } + + attribute(readonly, reportable) ChannelInfo channelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeChannelByNumberRequestRequest { + INT16U majorNumber = 0; + INT16U minorNumber = 1; + } + + request struct ChangeChannelRequestRequest { + CHAR_STRING match = 0; + } + + request struct SkipChannelRequestRequest { + INT16U count = 0; + } + + response struct ChangeChannelResponse { + ChannelInfo channelMatch = 0; + ErrorTypeEnum errorType = 1; + } + + command ChangeChannelByNumberRequest(ChangeChannelByNumberRequestRequest): DefaultSuccess = 2; + command ChangeChannelRequest(ChangeChannelRequestRequest): ChangeChannelResponse = 0; + command SkipChannelRequest(SkipChannelRequestRequest): DefaultSuccess = 3; +} + +client cluster ColorControl = 768 { + enum ColorLoopAction : ENUM8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : ENUM8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : ENUM8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : ENUM8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : ENUM8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : ENUM8 { + kUp = 1; + kDown = 3; + } + + attribute(readonly, reportable) int8u currentHue = 0; + attribute(readonly, reportable) int8u currentSaturation = 1; + attribute(readonly, reportable) int16u remainingTime = 2; + attribute(readonly, reportable) int16u currentX = 3; + attribute(readonly, reportable) int16u currentY = 4; + attribute(readonly, reportable) enum8 driftCompensation = 5; + attribute(readonly, reportable) char_string compensationText = 6; + attribute(readonly, reportable) int16u colorTemperature = 7; + attribute(readonly, reportable) enum8 colorMode = 8; + attribute(writable, reportable) bitmap8 colorControlOptions = 15; + attribute(readonly, reportable) int8u numberOfPrimaries = 16; + attribute(readonly, reportable) int16u primary1X = 17; + attribute(readonly, reportable) int16u primary1Y = 18; + attribute(readonly, reportable) int8u primary1Intensity = 19; + attribute(readonly, reportable) int16u primary2X = 21; + attribute(readonly, reportable) int16u primary2Y = 22; + attribute(readonly, reportable) int8u primary2Intensity = 23; + attribute(readonly, reportable) int16u primary3X = 25; + attribute(readonly, reportable) int16u primary3Y = 26; + attribute(readonly, reportable) int8u primary3Intensity = 27; + attribute(readonly, reportable) int16u primary4X = 32; + attribute(readonly, reportable) int16u primary4Y = 33; + attribute(readonly, reportable) int8u primary4Intensity = 34; + attribute(readonly, reportable) int16u primary5X = 36; + attribute(readonly, reportable) int16u primary5Y = 37; + attribute(readonly, reportable) int8u primary5Intensity = 38; + attribute(readonly, reportable) int16u primary6X = 40; + attribute(readonly, reportable) int16u primary6Y = 41; + attribute(readonly, reportable) int8u primary6Intensity = 42; + attribute(writable, reportable) int16u whitePointX = 48; + attribute(writable, reportable) int16u whitePointY = 49; + attribute(writable, reportable) int16u colorPointRX = 50; + attribute(writable, reportable) int16u colorPointRY = 51; + attribute(writable, reportable) int8u colorPointRIntensity = 52; + attribute(writable, reportable) int16u colorPointGX = 54; + attribute(writable, reportable) int16u colorPointGY = 55; + attribute(writable, reportable) int8u colorPointGIntensity = 56; + attribute(writable, reportable) int16u colorPointBX = 58; + attribute(writable, reportable) int16u colorPointBY = 59; + attribute(writable, reportable) int8u colorPointBIntensity = 60; + attribute(readonly, reportable) int16u enhancedCurrentHue = 16384; + attribute(readonly, reportable) enum8 enhancedColorMode = 16385; + attribute(readonly, reportable) int8u colorLoopActive = 16386; + attribute(readonly, reportable) int8u colorLoopDirection = 16387; + attribute(readonly, reportable) int16u colorLoopTime = 16388; + attribute(readonly, reportable) int16u colorLoopStartEnhancedHue = 16389; + attribute(readonly, reportable) int16u colorLoopStoredEnhancedHue = 16390; + attribute(readonly, reportable) bitmap16 colorCapabilities = 16394; + attribute(readonly, reportable) int16u colorTempPhysicalMin = 16395; + attribute(readonly, reportable) int16u colorTempPhysicalMax = 16396; + attribute(readonly, reportable) int16u coupleColorTempToLevelMinMireds = 16397; + attribute(writable, reportable) int16u startUpColorTemperatureMireds = 16400; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + INT16U time = 3; + INT16U startHue = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + INT16U enhancedHue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + INT16U enhancedHue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveColorRequest { + INT16S rateX = 0; + INT16S rateY = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + INT16U rate = 1; + INT16U colorTemperatureMinimum = 2; + INT16U colorTemperatureMaximum = 3; + BITMAP8 optionsMask = 4; + BITMAP8 optionsOverride = 5; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToColorRequest { + INT16U colorX = 0; + INT16U colorY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + INT16U colorTemperature = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct MoveToHueRequest { + INT8U hue = 0; + HueDirection direction = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + INT8U hue = 0; + INT8U saturation = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + INT8U saturation = 0; + INT16U transitionTime = 1; + BITMAP8 optionsMask = 2; + BITMAP8 optionsOverride = 3; + } + + request struct StepColorRequest { + INT16S stepX = 0; + INT16S stepY = 1; + INT16U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + INT16U stepSize = 1; + INT16U transitionTime = 2; + INT16U colorTemperatureMinimum = 3; + INT16U colorTemperatureMaximum = 4; + BITMAP8 optionsMask = 5; + BITMAP8 optionsOverride = 6; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + INT8U stepSize = 1; + INT8U transitionTime = 2; + BITMAP8 optionsMask = 3; + BITMAP8 optionsOverride = 4; + } + + request struct StopMoveStepRequest { + BITMAP8 optionsMask = 0; + BITMAP8 optionsOverride = 1; + } + + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + command StepColor(StepColorRequest): DefaultSuccess = 9; + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; + command StepHue(StepHueRequest): DefaultSuccess = 2; + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; +} + +client cluster ContentLauncher = 1290 { + enum MetricTypeEnum : ENUM8 { + kPixels = 0; + kPercentage = 1; + } + + enum ParameterEnum : ENUM8 { + kActor = 0; + kChannel = 1; + kCharacter = 2; + kDirector = 3; + kEvent = 4; + kFranchise = 5; + kGenre = 6; + kLeague = 7; + kPopularity = 8; + kProvider = 9; + kSport = 10; + kSportsTeam = 11; + kType = 12; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUrlNotAvailable = 1; + kAuthFailed = 2; + } + + struct ContentSearch { + Parameter parameterList[] = 1; + } + + struct Parameter { + ParameterEnum type = 1; + CHAR_STRING value = 2; + AdditionalInfo externalIDList[] = 3; + } + + struct AdditionalInfo { + CHAR_STRING name = 1; + CHAR_STRING value = 2; + } + + struct BrandingInformation { + CHAR_STRING providerName = 1; + StyleInformation background = 2; + StyleInformation logo = 3; + StyleInformation progressBar = 4; + StyleInformation splash = 5; + StyleInformation waterMark = 6; + } + + struct StyleInformation { + CHAR_STRING imageUrl = 1; + CHAR_STRING color = 2; + Dimension size = 3; + } + + struct Dimension { + double width = 1; + double height = 2; + MetricTypeEnum metric = 3; + } + + attribute(readonly, reportable) CHAR_STRING acceptHeaderList[] = 0; + attribute(writable, reportable) bitmap32 supportedStreamingProtocols = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct LaunchContentRequestRequest { + BOOLEAN autoPlay = 0; + CHAR_STRING data = 1; + ContentSearch search[] = 2; + } + + request struct LaunchURLRequestRequest { + CHAR_STRING contentURL = 0; + CHAR_STRING displayString = 1; + BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command LaunchContentRequest(LaunchContentRequestRequest): LaunchResponse = 0; + command LaunchURLRequest(LaunchURLRequestRequest): LaunchResponse = 1; +} + +client cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 1; + INT16U revision = 2; + } + + attribute(readonly, reportable) DeviceType deviceList[] = 0; + attribute(readonly, reportable) CLUSTER_ID serverList[] = 1; + attribute(readonly, reportable) CLUSTER_ID clientList[] = 2; + attribute(readonly, reportable) ENDPOINT_NO partsList[] = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster DiagnosticLogs = 50 { + enum LogsIntent : ENUM8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum LogsStatus : ENUM8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum LogsTransferProtocol : ENUM8 { + kResponsePayload = 0; + kBdx = 1; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + + request struct RetrieveLogsRequestRequest { + LogsIntent intent = 0; + LogsTransferProtocol requestedProtocol = 1; + OCTET_STRING transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse { + LogsStatus status = 0; + OCTET_STRING content = 1; + epoch_s timeStamp = 2; + INT32U timeSinceBoot = 3; + } + + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +client cluster DoorLock = 257 { + enum DlAlarmCode : ENUM8 { + kLockJammed = 0; + kLockFactoryReset = 1; + kLockRadioPowerCycled = 3; + kWrongCodeEntryLimit = 4; + kFrontEsceutcheonRemoved = 5; + kDoorForcedOpen = 6; + kDoorAjar = 7; + kForcedUser = 8; + } + + enum DlCredentialRule : ENUM8 { + kSingle = 0; + kDouble = 1; + kTri = 2; + } + + enum DlCredentialType : ENUM8 { + kProgrammingPIN = 0; + kPin = 1; + kRfid = 2; + kFingerprint = 3; + kFingerVein = 4; + kFace = 5; + } + + enum DlDataOperationType : ENUM8 { + kAdd = 0; + kClear = 1; + kModify = 2; + } + + enum DlDoorLockStatus : ENUM8 { + kDuplicate = 2; + kOccupied = 3; + } + + enum DlDoorState : ENUM8 { + kDoorOpen = 0; + kDoorClosed = 1; + kDoorJammed = 2; + kDoorForcedOpen = 3; + kDoorUnspecifiedError = 4; + kDoorAjar = 5; + } + + enum DlLockDataType : ENUM8 { + kUnspecified = 0; + kProgrammingCode = 1; + kUserIndex = 2; + kWeekDaySchedule = 3; + kYearDaySchedule = 4; + kHolidaySchedule = 5; + kPin = 6; + kRfid = 7; + kFingerprint = 8; + } + + enum DlLockOperationType : ENUM8 { + kLock = 0; + kUnlock = 1; + kNonAccessUserEvent = 2; + kForcedUserEvent = 3; + } + + enum DlLockState : ENUM8 { + kNotFullyLocked = 0; + kLocked = 1; + kUnlocked = 2; + } + + enum DlLockType : ENUM8 { + kDeadBolt = 0; + kMagnetic = 1; + kOther = 2; + kMortise = 3; + kRim = 4; + kLatchBolt = 5; + kCylindricalLock = 6; + kTubularLock = 7; + kInterconnectedLock = 8; + kDeadLatch = 9; + kDoorFurniture = 10; + } + + enum DlOperatingMode : ENUM8 { + kNormal = 0; + kVacation = 1; + kPrivacy = 2; + kNoRemoteLockUnlock = 3; + kPassage = 4; + } + + enum DlOperationError : ENUM8 { + kUnspecified = 0; + kInvalidCredential = 1; + kDisabledUserDenied = 2; + kRestricted = 3; + kInsufficientBattery = 4; + } + + enum DlOperationSource : ENUM8 { + kUnspecified = 0; + kManual = 1; + kProprietaryRemote = 2; + kKeypad = 3; + kAuto = 4; + kButton = 5; + kSchedule = 6; + kRemote = 7; + kRfid = 8; + kBiometric = 9; + } + + enum DlStatus : ENUM8 { + kSuccess = 0; + kFailure = 1; + kDuplicate = 2; + kOccupied = 3; + kInvalidField = 133; + kNotFound = 139; + } + + enum DlUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + } + + enum DlUserType : ENUM8 { + kUnrestrictedUser = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kProgrammingUser = 3; + kNonAccessUser = 4; + kForcedUser = 5; + kDisposableUser = 6; + kExpiringUser = 7; + kScheduleRestrictedUser = 8; + kRemoteOnlyUser = 9; + } + + enum DoorLockOperationEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kLock = 1; + kUnlock = 2; + kLockInvalidPinOrId = 3; + kLockInvalidSchedule = 4; + kUnlockInvalidPinOrId = 5; + kUnlockInvalidSchedule = 6; + kOneTouchLock = 7; + kKeyLock = 8; + kKeyUnlock = 9; + kAutoLock = 10; + kScheduleLock = 11; + kScheduleUnlock = 12; + kManualLock = 13; + kManualUnlock = 14; + } + + enum DoorLockProgrammingEventCode : ENUM8 { + kUnknownOrMfgSpecific = 0; + kMasterCodeChanged = 1; + kPinAdded = 2; + kPinDeleted = 3; + kPinChanged = 4; + kIdAdded = 5; + kIdDeleted = 6; + } + + enum DoorLockSetPinOrIdStatus : ENUM8 { + kSuccess = 0; + kGeneralFailure = 1; + kMemoryFull = 2; + kDuplicateCodeError = 3; + } + + enum DoorLockUserStatus : ENUM8 { + kAvailable = 0; + kOccupiedEnabled = 1; + kOccupiedDisabled = 3; + kNotSupported = 255; + } + + enum DoorLockUserType : ENUM8 { + kUnrestricted = 0; + kYearDayScheduleUser = 1; + kWeekDayScheduleUser = 2; + kMasterUser = 3; + kNonAccessUser = 4; + kNotSupported = 255; + } + + struct DlCredential { + DlCredentialType credentialType = 1; + INT16U credentialIndex = 2; + } + + critical event DoorLockAlarm = 0 { + DlAlarmCode alarmCode = 0; + } + + critical event DoorStateChange = 1 { + DlDoorState doorState = 0; + } + + critical event LockOperation = 2 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + nullable INT16U userIndex = 2; + nullable fabric_idx fabricIndex = 3; + nullable NODE_ID sourceNode = 4; + optional nullable DlCredential credentials[] = 5; + } + + critical event LockOperationError = 3 { + DlLockOperationType lockOperationType = 0; + DlOperationSource operationSource = 1; + DlOperationError operationError = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + optional nullable DlCredential credentials[] = 6; + } + + info event LockUserChange = 4 { + DlLockDataType lockDataType = 0; + DlDataOperationType dataOperationType = 1; + DlOperationSource operationSource = 2; + nullable INT16U userIndex = 3; + nullable fabric_idx fabricIndex = 4; + nullable NODE_ID sourceNode = 5; + nullable INT16U dataIndex = 6; + } + + attribute(readonly, reportable) DlLockState lockState = 0; + attribute(readonly, reportable) DlLockType lockType = 1; + attribute(readonly, reportable) boolean actuatorEnabled = 2; + attribute(readonly, reportable) DlDoorState doorState = 3; + attribute(readonly) int16u numberOfTotalUsersSupported = 17; + attribute(readonly) int16u numberOfPINUsersSupported = 18; + attribute(readonly) int8u maxPINCodeLength = 23; + attribute(readonly) int8u minPINCodeLength = 24; + attribute(writable, reportable) char_string language = 33; + attribute(writable, reportable) int32u autoRelockTime = 35; + attribute(writable, reportable) int8u soundVolume = 36; + attribute(writable, reportable) DlOperatingMode operatingMode = 37; + attribute(readonly) bitmap16 supportedOperatingModes = 38; + attribute(writable, reportable) boolean enableOneTouchLocking = 41; + attribute(writable, reportable) boolean enablePrivacyModeButton = 43; + attribute(writable, reportable) int8u wrongCodeEntryLimit = 48; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ClearCredentialRequest { + DlCredential credential = 0; + } + + request struct ClearUserRequest { + INT16U userIndex = 0; + } + + request struct GetCredentialStatusRequest { + DlCredential credential = 0; + } + + request struct GetUserRequest { + INT16U userIndex = 0; + } + + request struct LockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + request struct SetCredentialRequest { + DlDataOperationType operationType = 0; + DlCredential credential = 1; + LONG_OCTET_STRING credentialData = 2; + INT16U userIndex = 3; + DlUserStatus userStatus = 4; + } + + request struct SetUserRequest { + DlDataOperationType operationType = 0; + INT16U userIndex = 1; + nullable CHAR_STRING userName = 2; + nullable INT32U userUniqueId = 3; + DlUserStatus userStatus = 4; + DlUserType userType = 5; + DlCredentialRule credentialRule = 6; + } + + request struct UnlockDoorRequest { + optional OCTET_STRING pinCode = 0; + } + + response struct GetCredentialStatusResponse { + boolean credentialExists = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + response struct GetUserResponse { + INT16U userIndex = 0; + nullable CHAR_STRING userName = 1; + nullable INT32U userUniqueId = 2; + nullable DlUserStatus userStatus = 3; + nullable DlUserType userType = 4; + nullable DlCredentialRule credentialRule = 5; + nullable DlCredential credentials[] = 6; + nullable fabric_idx creatorFabricIndex = 7; + nullable fabric_idx lastModifiedFabricIndex = 8; + INT16U nextUserIndex = 9; + } + + response struct SetCredentialResponse { + DlStatus status = 0; + nullable INT16U userIndex = 1; + nullable INT16U nextCredentialIndex = 2; + } + + command ClearCredential(ClearCredentialRequest): DefaultSuccess = 38; + command ClearUser(ClearUserRequest): DefaultSuccess = 29; + command GetCredentialStatus(GetCredentialStatusRequest): GetCredentialStatusResponse = 36; + command GetUser(GetUserRequest): GetUserResponse = 27; + command LockDoor(LockDoorRequest): DefaultSuccess = 0; + command SetCredential(SetCredentialRequest): SetCredentialResponse = 34; + command SetUser(SetUserRequest): DefaultSuccess = 26; + command UnlockDoor(UnlockDoorRequest): DefaultSuccess = 1; +} + +client cluster ElectricalMeasurement = 2820 { + attribute(readonly, reportable) bitmap32 measurementType = 0; + attribute(readonly, reportable) int32s totalActivePower = 772; + attribute(readonly, reportable) int16u rmsVoltage = 1285; + attribute(readonly, reportable) int16u rmsVoltageMin = 1286; + attribute(readonly, reportable) int16u rmsVoltageMax = 1287; + attribute(readonly, reportable) int16u rmsCurrent = 1288; + attribute(readonly, reportable) int16u rmsCurrentMin = 1289; + attribute(readonly, reportable) int16u rmsCurrentMax = 1290; + attribute(readonly, reportable) int16s activePower = 1291; + attribute(readonly, reportable) int16s activePowerMin = 1292; + attribute(readonly, reportable) int16s activePowerMax = 1293; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster EthernetNetworkDiagnostics = 55 { + enum PHYRateType : ENUM8 { + k10m = 0; + k100m = 1; + k1000m = 2; + k25g = 3; + k5g = 4; + k10g = 5; + k40g = 6; + k100g = 7; + k200g = 8; + k400g = 9; + } + + attribute(readonly, reportable) enum8 PHYRate = 0; + attribute(readonly, reportable) boolean fullDuplex = 1; + attribute(readonly, reportable) int64u packetRxCount = 2; + attribute(readonly, reportable) int64u packetTxCount = 3; + attribute(readonly, reportable) int64u txErrCount = 4; + attribute(readonly, reportable) int64u collisionCount = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) boolean carrierDetect = 7; + attribute(readonly, reportable) int64u timeSinceReset = 8; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster FixedLabel = 64 { + attribute(readonly, reportable) LabelStruct labelList[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster FlowMeasurement = 1028 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster GeneralCommissioning = 48 { + enum GeneralCommissioningError : ENUM8 { + kOk = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNotCommissioning = 3; + } + + enum RegulatoryLocationType : ENUM8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfoType { + INT32U failSafeExpiryLengthMs = 1; + } + + attribute(writable, reportable) int64u breadcrumb = 0; + attribute(readonly, reportable) BasicCommissioningInfoType basicCommissioningInfoList[] = 1; + attribute(readonly) enum8 regulatoryConfig = 2; + attribute(readonly) enum8 locationCapability = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + INT16U expiryLengthSeconds = 0; + INT64U breadcrumb = 1; + INT32U timeoutMs = 2; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationType location = 0; + CHAR_STRING countryCode = 1; + INT64U breadcrumb = 2; + INT32U timeoutMs = 3; + } + + response struct ArmFailSafeResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct CommissioningCompleteResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + response struct SetRegulatoryConfigResponse { + GeneralCommissioningError errorCode = 0; + CHAR_STRING debugText = 1; + } + + command ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + command CommissioningComplete(): CommissioningCompleteResponse = 4; + command SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; +} + +client cluster GeneralDiagnostics = 51 { + enum BootReasonType : ENUM8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultType : ENUM8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceType : ENUM8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultType : ENUM8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultType : ENUM8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterfaceType { + CHAR_STRING name = 1; + BOOLEAN fabricConnected = 2; + BOOLEAN offPremiseServicesReachableIPv4 = 3; + BOOLEAN offPremiseServicesReachableIPv6 = 4; + OCTET_STRING hardwareAddress = 5; + InterfaceType type = 6; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultType current[] = 0; + HardwareFaultType previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultType current[] = 0; + RadioFaultType previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultType current[] = 0; + NetworkFaultType previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonType bootReason = 0; + } + + attribute(readonly, reportable) NetworkInterfaceType networkInterfaces[] = 0; + attribute(readonly, reportable) int16u rebootCount = 1; + attribute(readonly, reportable) int64u upTime = 2; + attribute(readonly, reportable) int32u totalOperationalHours = 3; + attribute(readonly, reportable) enum8 bootReasons = 4; + attribute(readonly, reportable) ENUM8 activeHardwareFaults[] = 5; + attribute(readonly, reportable) ENUM8 activeRadioFaults[] = 6; + attribute(readonly, reportable) ENUM8 activeNetworkFaults[] = 7; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kStandard = 0; + kLowLatency = 1; + } + + struct GroupKey { + fabric_idx fabricIndex = 0; + INT16U groupId = 1; + INT16U groupKeySetID = 2; + } + + struct GroupInfo { + INT16U fabricIndex = 0; + INT16U groupId = 1; + INT16U endpoints[] = 2; + CHAR_STRING groupName = 3; + } + + struct GroupKeySet { + INT16U groupKeySetID = 0; + GroupKeySecurityPolicy securityPolicy = 1; + OCTET_STRING epochKey0 = 2; + INT64U epochStartTime0 = 3; + OCTET_STRING epochKey1 = 4; + INT64U epochStartTime1 = 5; + OCTET_STRING epochKey2 = 6; + INT64U epochStartTime2 = 7; + } + + attribute(readonly, reportable) GroupKey groupKeyMap[] = 0; + attribute(readonly, reportable) GroupInfo groupTable[] = 1; + attribute(readonly) int16u maxGroupsPerFabric = 2; + attribute(readonly) int16u maxGroupKeysPerFabric = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetWriteRequest { + GroupKeySet groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse { + GroupKeySet groupKeySet = 0; + } + + command KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + command KeySetReadAllIndices(KeySetReadAllIndicesRequest): KeySetReadAllIndicesResponse = 4; + command KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + command KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; +} + +client cluster Groups = 4 { + attribute(readonly, reportable) bitmap8 nameSupport = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddGroupRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct AddGroupIfIdentifyingRequest { + INT16U groupId = 0; + CHAR_STRING groupName = 1; + } + + request struct GetGroupMembershipRequest { + INT16U groupList[] = 0; + } + + request struct RemoveGroupRequest { + INT16U groupId = 0; + } + + request struct ViewGroupRequest { + INT16U groupId = 0; + } + + response struct AddGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct GetGroupMembershipResponse { + INT8U capacity = 0; + INT16U groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct ViewGroupResponse { + ENUM8 status = 0; + INT16U groupId = 1; + CHAR_STRING groupName = 2; + } + + command AddGroup(AddGroupRequest): AddGroupResponse = 0; + command AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; + command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + command RemoveAllGroups(): DefaultSuccess = 4; + command RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; +} + +client cluster Identify = 3 { + enum IdentifyEffectIdentifier : ENUM8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum IdentifyEffectVariant : ENUM8 { + kDefault = 0; + } + + enum IdentifyIdentifyType : ENUM8 { + kNone = 0; + kVisibleLight = 1; + kVisibleLED = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute(writable, reportable) int16u identifyTime = 0; + attribute(readonly, reportable) enum8 identifyType = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct IdentifyRequest { + INT16U identifyTime = 0; + } + + request struct TriggerEffectRequest { + IdentifyEffectIdentifier effectIdentifier = 0; + IdentifyEffectVariant effectVariant = 1; + } + + response struct IdentifyQueryResponse { + INT16U timeout = 0; + } + + command Identify(IdentifyRequest): DefaultSuccess = 0; + command IdentifyQuery(): IdentifyQueryResponse = 1; + command TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +client cluster IlluminanceMeasurement = 1024 { + enum LightSensorType : ENUM8 { + kPhotodiode = 0; + kCmos = 1; + } + + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly, reportable) enum8 lightSensorType = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster KeypadInput = 1289 { + enum CecKeyCode : ENUM8 { + kSelect = 0; + kUp = 1; + kDown = 2; + kLeft = 3; + kRight = 4; + kRightUp = 5; + kRightDown = 6; + kLeftUp = 7; + kLeftDown = 8; + kRootMenu = 9; + kSetupMenu = 10; + kContentsMenu = 11; + kFavoriteMenu = 12; + kExit = 13; + kMediaTopMenu = 16; + kMediaContextSensitiveMenu = 17; + kNumberEntryMode = 29; + kNumber11 = 30; + kNumber12 = 31; + kNumber0OrNumber10 = 32; + kNumbers1 = 33; + kNumbers2 = 34; + kNumbers3 = 35; + kNumbers4 = 36; + kNumbers5 = 37; + kNumbers6 = 38; + kNumbers7 = 39; + kNumbers8 = 40; + kNumbers9 = 41; + kDot = 42; + kEnter = 43; + kClear = 44; + kNextFavorite = 47; + kChannelUp = 48; + kChannelDown = 49; + kPreviousChannel = 50; + kSoundSelect = 51; + kInputSelect = 52; + kDisplayInformation = 53; + kHelp = 54; + kPageUp = 55; + kPageDown = 56; + kPower = 64; + kVolumeUp = 65; + kVolumeDown = 66; + kMute = 67; + kPlay = 68; + kStop = 69; + kPause = 70; + kRecord = 71; + kRewind = 72; + kFastForward = 73; + kEject = 74; + kForward = 75; + kBackward = 76; + kStopRecord = 77; + kPauseRecord = 78; + kReserved = 79; + kAngle = 80; + kSubPicture = 81; + kVideoOnDemand = 82; + kElectronicProgramGuide = 83; + kTimerProgramming = 84; + kInitialConfiguration = 85; + kSelectBroadcastType = 86; + kSelectSoundPresentation = 87; + kPlayFunction = 96; + kPausePlayFunction = 97; + kRecordFunction = 98; + kPauseRecordFunction = 99; + kStopFunction = 100; + kMuteFunction = 101; + kRestoreVolumeFunction = 102; + kTuneFunction = 103; + kSelectMediaFunction = 104; + kSelectAvInputFunction = 105; + kSelectAudioInputFunction = 106; + kPowerToggleFunction = 107; + kPowerOffFunction = 108; + kPowerOnFunction = 109; + kF1Blue = 113; + kF2Red = 114; + kF3Green = 115; + kF4Yellow = 116; + kF5 = 117; + kData = 118; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kUnsupportedKey = 1; + kInvalidKeyInCurrentState = 2; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SendKeyRequestRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKeyRequest(SendKeyRequestRequest): SendKeyResponse = 0; +} + +client cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + attribute(readonly, reportable) int8u currentLevel = 0; + attribute(readonly, reportable) int16u remainingTime = 1; + attribute(readonly, reportable) int8u minLevel = 2; + attribute(readonly, reportable) int8u maxLevel = 3; + attribute(readonly, reportable) int16u currentFrequency = 4; + attribute(readonly, reportable) int16u minFrequency = 5; + attribute(readonly, reportable) int16u maxFrequency = 6; + attribute(writable, reportable) bitmap8 options = 15; + attribute(writable, reportable) int16u onOffTransitionTime = 16; + attribute(writable, reportable) int8u onLevel = 17; + attribute(writable, reportable) int16u onTransitionTime = 18; + attribute(writable, reportable) int16u offTransitionTime = 19; + attribute(writable, reportable) int8u defaultMoveRate = 20; + attribute(writable, reportable) int8u startUpCurrentLevel = 16384; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct MoveRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelRequest { + INT8U level = 0; + INT16U transitionTime = 1; + BITMAP8 optionMask = 2; + BITMAP8 optionOverride = 3; + } + + request struct MoveToLevelWithOnOffRequest { + INT8U level = 0; + INT16U transitionTime = 1; + } + + request struct MoveWithOnOffRequest { + MoveMode moveMode = 0; + INT8U rate = 1; + } + + request struct StepRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + BITMAP8 optionMask = 3; + BITMAP8 optionOverride = 4; + } + + request struct StepWithOnOffRequest { + StepMode stepMode = 0; + INT8U stepSize = 1; + INT16U transitionTime = 2; + } + + request struct StopRequest { + BITMAP8 optionMask = 0; + BITMAP8 optionOverride = 1; + } + + command Move(MoveRequest): DefaultSuccess = 1; + command MoveToLevel(MoveToLevelRequest): DefaultSuccess = 0; + command MoveToLevelWithOnOff(MoveToLevelWithOnOffRequest): DefaultSuccess = 4; + command MoveWithOnOff(MoveWithOnOffRequest): DefaultSuccess = 5; + command Step(StepRequest): DefaultSuccess = 2; + command StepWithOnOff(StepWithOnOffRequest): DefaultSuccess = 6; + command Stop(StopRequest): DefaultSuccess = 3; + command StopWithOnOff(): DefaultSuccess = 7; +} + +client cluster LocalizationConfiguration = 43 { + attribute(writable) char_string activeLocale = 1; + attribute(readonly) CHAR_STRING supportedLocales[] = 2; +} + +client cluster LowPower = 1288 { + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command Sleep(): DefaultSuccess = 0; +} + +client cluster MediaInput = 1287 { + enum InputTypeEnum : ENUM8 { + kInternal = 0; + kAux = 1; + kCoax = 2; + kComposite = 3; + kHdmi = 4; + kInput = 5; + kLine = 6; + kOptical = 7; + kVideo = 8; + kScart = 9; + kUsb = 10; + kOther = 11; + } + + struct InputInfo { + INT8U index = 1; + InputTypeEnum inputType = 2; + CHAR_STRING name = 3; + CHAR_STRING description = 4; + } + + attribute(readonly, reportable) InputInfo mediaInputList[] = 0; + attribute(readonly, reportable) int8u currentMediaInput = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct RenameInputRequestRequest { + INT8U index = 0; + CHAR_STRING name = 1; + } + + request struct SelectInputRequestRequest { + INT8U index = 0; + } + + command HideInputStatusRequest(): DefaultSuccess = 2; + command RenameInputRequest(RenameInputRequestRequest): DefaultSuccess = 3; + command SelectInputRequest(SelectInputRequestRequest): DefaultSuccess = 0; + command ShowInputStatusRequest(): DefaultSuccess = 1; +} + +client cluster MediaPlayback = 1286 { + enum PlaybackStateEnum : ENUM8 { + kPlaying = 0; + kPaused = 1; + kNotPlaying = 2; + kBuffering = 3; + } + + enum StatusEnum : ENUM8 { + kSuccess = 0; + kInvalidStateForCommand = 1; + kNotAllowed = 2; + kNotActive = 3; + kSpeedOutOfRange = 4; + kSeekOutOfRange = 5; + } + + attribute(readonly, reportable) PlaybackStateEnum playbackState = 0; + attribute(readonly, reportable) epoch_us startTime = 1; + attribute(readonly, reportable) int64u duration = 2; + attribute(readonly) single playbackSpeed = 4; + attribute(readonly, reportable) int64u seekRangeEnd = 5; + attribute(readonly, reportable) int64u seekRangeStart = 6; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SeekRequestRequest { + INT64U position = 0; + } + + request struct SkipBackwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + request struct SkipForwardRequestRequest { + INT64U deltaPositionMilliseconds = 0; + } + + response struct PlaybackResponse { + StatusEnum status = 0; + } + + command FastForwardRequest(): PlaybackResponse = 7; + command NextRequest(): PlaybackResponse = 5; + command PauseRequest(): PlaybackResponse = 1; + command PlayRequest(): PlaybackResponse = 0; + command PreviousRequest(): PlaybackResponse = 4; + command RewindRequest(): PlaybackResponse = 6; + command SeekRequest(SeekRequestRequest): PlaybackResponse = 11; + command SkipBackwardRequest(SkipBackwardRequestRequest): PlaybackResponse = 9; + command SkipForwardRequest(SkipForwardRequestRequest): PlaybackResponse = 8; + command StartOverRequest(): PlaybackResponse = 3; + command StopRequest(): PlaybackResponse = 2; +} + +client cluster ModeSelect = 80 { + struct ModeOptionStruct { + CHAR_STRING label = 1; + INT8U mode = 2; + INT32U semanticTag = 3; + } + + attribute(readonly, reportable) int8u currentMode = 0; + attribute(readonly, reportable) ModeOptionStruct supportedModes[] = 1; + attribute(writable, reportable) int8u onMode = 2; + attribute(readonly, reportable) int8u startUpMode = 3; + attribute(readonly, reportable) char_string description = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + INT8U newMode = 0; + } + + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; +} + +client cluster NetworkCommissioning = 49 { + enum NetworkCommissioningStatus : ENUM8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBand : ENUM8 { + k2g4 = 0; + k3g65 = 1; + k5g = 2; + k6g = 3; + k60g = 4; + } + + struct NetworkInfo { + OCTET_STRING networkID = 1; + BOOLEAN connected = 2; + } + + struct WiFiInterfaceScanResult { + BITMAP8 security = 1; + OCTET_STRING ssid = 2; + OCTET_STRING bssid = 3; + INT16U channel = 4; + WiFiBand wiFiBand = 5; + INT8S rssi = 6; + } + + struct ThreadInterfaceScanResult { + INT64U panId = 1; + INT64U extendedPanId = 2; + CHAR_STRING networkName = 3; + INT16U channel = 4; + INT8U version = 5; + INT64U extendedAddress = 6; + INT8S rssi = 7; + INT8U lqi = 8; + } + + attribute(readonly) int8u maxNetworks = 0; + attribute(readonly) NetworkInfo networks[] = 1; + attribute(readonly) int8u scanMaxTimeSeconds = 2; + attribute(readonly) int8u connectMaxTimeSeconds = 3; + attribute(writable) boolean interfaceEnabled = 4; + attribute(readonly) NetworkCommissioningStatus lastNetworkingStatus = 5; + attribute(readonly) octet_string lastNetworkID = 6; + attribute(readonly) int32u lastConnectErrorValue = 7; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddOrUpdateThreadNetworkRequest { + OCTET_STRING operationalDataset = 0; + INT64U breadcrumb = 1; + } + + request struct AddOrUpdateWiFiNetworkRequest { + OCTET_STRING ssid = 0; + OCTET_STRING credentials = 1; + INT64U breadcrumb = 2; + } + + request struct ConnectNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + OCTET_STRING networkID = 0; + INT64U breadcrumb = 1; + } + + request struct ReorderNetworkRequest { + OCTET_STRING networkID = 0; + INT8U networkIndex = 1; + INT64U breadcrumb = 2; + } + + request struct ScanNetworksRequest { + OCTET_STRING ssid = 0; + INT64U breadcrumb = 1; + } + + response struct ConnectNetworkResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + INT32S errorValue = 2; + } + + response struct NetworkConfigResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + } + + response struct ScanNetworksResponse { + NetworkCommissioningStatus networkingStatus = 0; + CHAR_STRING debugText = 1; + optional WiFiInterfaceScanResult wiFiScanResults[] = 2; + optional ThreadInterfaceScanResult threadScanResults[] = 3; + } + + command AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + command AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + command ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + command RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + command ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + command ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; +} + +client cluster OtaSoftwareUpdateProvider = 41 { + enum OTAApplyUpdateAction : ENUM8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum OTADownloadProtocol : ENUM8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHttps = 2; + kVendorSpecific = 3; + } + + enum OTAQueryStatus : ENUM8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct ApplyUpdateRequestRequest { + OCTET_STRING updateToken = 0; + INT32U newVersion = 1; + } + + request struct NotifyUpdateAppliedRequest { + OCTET_STRING updateToken = 0; + INT32U softwareVersion = 1; + } + + request struct QueryImageRequest { + vendor_id vendorId = 0; + INT16U productId = 1; + INT32U softwareVersion = 2; + OTADownloadProtocol protocolsSupported[] = 3; + optional INT16U hardwareVersion = 4; + optional CHAR_STRING location = 5; + optional BOOLEAN requestorCanConsent = 6; + optional OCTET_STRING metadataForProvider = 7; + } + + response struct ApplyUpdateResponse { + OTAApplyUpdateAction action = 0; + INT32U delayedActionTime = 1; + } + + response struct QueryImageResponse { + OTAQueryStatus status = 0; + optional INT32U delayedActionTime = 1; + optional CHAR_STRING imageURI = 2; + optional INT32U softwareVersion = 3; + optional CHAR_STRING softwareVersionString = 4; + optional OCTET_STRING updateToken = 5; + optional BOOLEAN userConsentNeeded = 6; + optional OCTET_STRING metadataForRequestor = 7; + } + + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; + command QueryImage(QueryImageRequest): QueryImageResponse = 0; +} + +client cluster OtaSoftwareUpdateRequestor = 42 { + enum OTAAnnouncementReason : ENUM8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum OTAChangeReasonEnum : ENUM8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum OTAUpdateStateEnum : ENUM8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + struct ProviderLocation { + fabric_idx fabricIndex = 0; + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + } + + info event StateTransition = 0 { + nullable OTAUpdateStateEnum previousState = 0; + OTAUpdateStateEnum newState = 1; + OTAChangeReasonEnum reason = 2; + nullable INT32U targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + INT32U softwareVersion = 0; + INT16U productID = 1; + } + + info event DownloadError = 2 { + INT32U softwareVersion = 0; + INT64U bytesDownloaded = 1; + INT8U progressPercent = 2; + nullable INT64S platformCode = 3; + } + + attribute(writable, reportable) ProviderLocation defaultOtaProviders[] = 0; + attribute(readonly, reportable) boolean updatePossible = 1; + attribute(readonly, reportable) OTAUpdateStateEnum updateState = 2; + attribute(readonly, reportable) int8u updateStateProgress = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AnnounceOtaProviderRequest { + node_id providerNodeId = 0; + vendor_id vendorId = 1; + OTAAnnouncementReason announcementReason = 2; + optional OCTET_STRING metadataForNode = 3; + endpoint_no endpoint = 4; + } + + command AnnounceOtaProvider(AnnounceOtaProviderRequest): DefaultSuccess = 0; +} + +client cluster OccupancySensing = 1030 { + attribute(readonly, reportable) bitmap8 occupancy = 0; + attribute(readonly, reportable) enum8 occupancySensorType = 1; + attribute(readonly, reportable) bitmap8 occupancySensorTypeBitmap = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OnOff = 6 { + enum OnOffDelayedAllOffEffectVariant : enum8 { + kFadeToOffIn0p8Seconds = 0; + kNoFade = 1; + k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2; + } + + enum OnOffDyingLightEffectVariant : enum8 { + k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0; + } + + enum OnOffEffectIdentifier : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + attribute(readonly, reportable) boolean onOff = 0; + attribute(readonly, reportable) boolean globalSceneControl = 16384; + attribute(writable, reportable) int16u onTime = 16385; + attribute(writable, reportable) int16u offWaitTime = 16386; + attribute(writable, reportable) enum8 startUpOnOff = 16387; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct OffWithEffectRequest { + OnOffEffectIdentifier effectId = 0; + OnOffDelayedAllOffEffectVariant effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControl onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + command Off(): DefaultSuccess = 0; + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + command On(): DefaultSuccess = 1; + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; + command Toggle(): DefaultSuccess = 2; +} + +client cluster OnOffSwitchConfiguration = 7 { + attribute(readonly, reportable) enum8 switchType = 0; + attribute(writable, reportable) enum8 switchActions = 16; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster OperationalCredentials = 62 { + enum NodeOperationalCertStatus : ENUM8 { + kSuccess = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInsufficientPrivilege = 8; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + struct FabricDescriptor { + INT8U fabricIndex = 1; + OCTET_STRING rootPublicKey = 2; + INT16U vendorId = 3; + FABRIC_ID fabricId = 4; + NODE_ID nodeId = 5; + CHAR_STRING label = 6; + } + + attribute(readonly, reportable) FabricDescriptor fabricsList[] = 1; + attribute(readonly, reportable) int8u supportedFabrics = 2; + attribute(readonly, reportable) int8u commissionedFabrics = 3; + attribute(readonly, reportable) OCTET_STRING trustedRootCertificates[] = 4; + attribute(readonly, reportable) fabric_idx currentFabricIndex = 5; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + OCTET_STRING IPKValue = 2; + NODE_ID caseAdminNode = 3; + INT16U adminVendorId = 4; + } + + request struct AddTrustedRootCertificateRequest { + OCTET_STRING rootCertificate = 0; + } + + request struct AttestationRequestRequest { + OCTET_STRING attestationNonce = 0; + } + + request struct CertificateChainRequestRequest { + INT8U certificateType = 0; + } + + request struct OpCSRRequestRequest { + OCTET_STRING CSRNonce = 0; + } + + request struct RemoveFabricRequest { + INT8U fabricIndex = 0; + } + + request struct RemoveTrustedRootCertificateRequest { + OCTET_STRING trustedRootIdentifier = 0; + } + + request struct UpdateFabricLabelRequest { + CHAR_STRING label = 0; + } + + request struct UpdateNOCRequest { + OCTET_STRING NOCValue = 0; + optional OCTET_STRING ICACValue = 1; + } + + response struct AttestationResponse { + OCTET_STRING attestationElements = 0; + OCTET_STRING signature = 1; + } + + response struct CertificateChainResponse { + OCTET_STRING certificate = 0; + } + + response struct NOCResponse { + INT8U statusCode = 0; + INT8U fabricIndex = 1; + CHAR_STRING debugText = 2; + } + + response struct OpCSRResponse { + OCTET_STRING NOCSRElements = 0; + OCTET_STRING attestationSignature = 1; + } + + command AddNOC(AddNOCRequest): NOCResponse = 6; + command AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; + command AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + command CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + command OpCSRRequest(OpCSRRequestRequest): OpCSRResponse = 4; + command RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + command RemoveTrustedRootCertificate(RemoveTrustedRootCertificateRequest): DefaultSuccess = 12; + command UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; +} + +client cluster PowerSource = 47 { + attribute(readonly, reportable) enum8 status = 0; + attribute(readonly, reportable) int8u order = 1; + attribute(readonly, reportable) char_string description = 2; + attribute(readonly, reportable) int32u batteryVoltage = 11; + attribute(readonly, reportable) int8u batteryPercentRemaining = 12; + attribute(readonly, reportable) int32u batteryTimeRemaining = 13; + attribute(readonly, reportable) enum8 batteryChargeLevel = 14; + attribute(readonly, reportable) ENUM8 activeBatteryFaults[] = 18; + attribute(readonly, reportable) enum8 batteryChargeState = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PowerSourceConfiguration = 46 { + attribute(readonly) INT8U sources[] = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster PressureMeasurement = 1027 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster PumpConfigurationAndControl = 512 { + enum PumpControlMode : ENUM8 { + kConstantSpeed = 0; + kConstantPressure = 1; + kProportionalPressure = 2; + kConstantFlow = 3; + kConstantTemperature = 5; + kAutomatic = 7; + } + + enum PumpOperationMode : ENUM8 { + kNormal = 0; + kMinimum = 1; + kMaximum = 2; + kLocal = 3; + } + + info event SupplyVoltageLow = 0 { + } + + info event SupplyVoltageHigh = 1 { + } + + info event PowerMissingPhase = 2 { + } + + info event SystemPressureLow = 3 { + } + + info event SystemPressureHigh = 4 { + } + + critical event DryRunning = 5 { + } + + info event MotorTemperatureHigh = 6 { + } + + critical event PumpMotorFatalFailure = 7 { + } + + info event ElectronicTemperatureHigh = 8 { + } + + critical event PumpBlocked = 9 { + } + + info event SensorFailure = 10 { + } + + info event ElectronicNonFatalFailure = 11 { + } + + critical event ElectronicFatalFailure = 12 { + } + + info event GeneralFault = 13 { + } + + info event Leakage = 14 { + } + + info event AirDetection = 15 { + } + + info event TurbineOperation = 16 { + } + + attribute(readonly, reportable) int16s maxPressure = 0; + attribute(readonly, reportable) int16u maxSpeed = 1; + attribute(readonly, reportable) int16u maxFlow = 2; + attribute(readonly, reportable) int16s minConstPressure = 3; + attribute(readonly, reportable) int16s maxConstPressure = 4; + attribute(readonly, reportable) int16s minCompPressure = 5; + attribute(readonly, reportable) int16s maxCompPressure = 6; + attribute(readonly, reportable) int16u minConstSpeed = 7; + attribute(readonly, reportable) int16u maxConstSpeed = 8; + attribute(readonly, reportable) int16u minConstFlow = 9; + attribute(readonly, reportable) int16u maxConstFlow = 10; + attribute(readonly, reportable) int16s minConstTemp = 11; + attribute(readonly, reportable) int16s maxConstTemp = 12; + attribute(readonly, reportable) bitmap16 pumpStatus = 16; + attribute(readonly, reportable) enum8 effectiveOperationMode = 17; + attribute(readonly, reportable) enum8 effectiveControlMode = 18; + attribute(readonly, reportable) int16s capacity = 19; + attribute(readonly, reportable) int16u speed = 20; + attribute(writable, reportable) int24u lifetimeRunningHours = 21; + attribute(readonly, reportable) int24u power = 22; + attribute(writable, reportable) int32u lifetimeEnergyConsumed = 23; + attribute(writable, reportable) enum8 operationMode = 32; + attribute(writable, reportable) enum8 controlMode = 33; + attribute(readonly, reportable) bitmap16 alarmMask = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster RelativeHumidityMeasurement = 1029 { + attribute(readonly, reportable) int16u measuredValue = 0; + attribute(readonly, reportable) int16u minMeasuredValue = 1; + attribute(readonly, reportable) int16u maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster Scenes = 5 { + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 1; + INT8U length = 2; + INT8U value = 3; + } + + attribute(readonly, reportable) int8u sceneCount = 0; + attribute(readonly, reportable) int8u currentScene = 1; + attribute(readonly, reportable) int16u currentGroup = 2; + attribute(readonly, reportable) boolean sceneValid = 3; + attribute(readonly, reportable) bitmap8 nameSupport = 4; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct AddSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + CHAR_STRING sceneName = 3; + SceneExtensionFieldSet extensionFieldSets[] = 4; + } + + request struct GetSceneMembershipRequest { + INT16U groupId = 0; + } + + request struct RecallSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + INT16U transitionTime = 2; + } + + request struct RemoveAllScenesRequest { + INT16U groupId = 0; + } + + request struct RemoveSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct StoreSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + request struct ViewSceneRequest { + INT16U groupId = 0; + INT8U sceneId = 1; + } + + response struct AddSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct GetSceneMembershipResponse { + ENUM8 status = 0; + INT8U capacity = 1; + INT16U groupId = 2; + INT8U sceneCount = 3; + INT8U sceneList[] = 4; + } + + response struct RemoveAllScenesResponse { + ENUM8 status = 0; + INT16U groupId = 1; + } + + response struct RemoveSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct StoreSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + } + + response struct ViewSceneResponse { + ENUM8 status = 0; + INT16U groupId = 1; + INT8U sceneId = 2; + INT16U transitionTime = 3; + CHAR_STRING sceneName = 4; + SceneExtensionFieldSet extensionFieldSets[] = 5; + } + + command AddScene(AddSceneRequest): AddSceneResponse = 0; + command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; + command RecallScene(RecallSceneRequest): DefaultSuccess = 5; + command RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; + command RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; + command StoreScene(StoreSceneRequest): StoreSceneResponse = 4; + command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; +} + +client cluster SoftwareDiagnostics = 52 { + struct ThreadMetrics { + INT64U id = 1; + CHAR_STRING name = 2; + INT32U stackFreeCurrent = 3; + INT32U stackFreeMinimum = 4; + INT32U stackSize = 5; + } + + info event SoftwareFault = 0 { + SoftwareFault softwareFault = 0; + } + + attribute(readonly, reportable) ThreadMetrics threadMetrics[] = 0; + attribute(readonly, reportable) int64u currentHeapFree = 1; + attribute(readonly, reportable) int64u currentHeapUsed = 2; + attribute(readonly, reportable) int64u currentHeapHighWatermark = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; +} + +client cluster Switch = 59 { + info event SwitchLatched = 0 { + INT8U newPosition = 0; + } + + info event InitialPress = 1 { + INT8U newPosition = 0; + } + + info event LongPress = 2 { + INT8U newPosition = 0; + } + + info event ShortRelease = 3 { + INT8U previousPosition = 0; + } + + info event LongRelease = 4 { + INT8U previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + INT8U newPosition = 0; + INT8U currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + INT8U newPosition = 0; + INT8U totalNumberOfPressesCounted = 1; + } + + attribute(readonly, reportable) int8u numberOfPositions = 0; + attribute(readonly, reportable) int8u currentPosition = 1; + attribute(readonly, reportable) int8u multiPressMax = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kAppNotAvailable = 1; + kSystemBusy = 2; + } + + struct TargetInfo { + INT8U identifier = 1; + CHAR_STRING name = 2; + } + + attribute(readonly, reportable) TargetInfo targetNavigatorList[] = 0; + attribute(readonly, reportable) int8u currentNavigatorTarget = 1; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct NavigateTargetRequestRequest { + INT8U target = 0; + CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + CHAR_STRING data = 1; + } + + command NavigateTargetRequest(NavigateTargetRequestRequest): NavigateTargetResponse = 0; +} + +client cluster TemperatureMeasurement = 1026 { + attribute(readonly, reportable) int16s measuredValue = 0; + attribute(readonly, reportable) int16s minMeasuredValue = 1; + attribute(readonly, reportable) int16s maxMeasuredValue = 2; + attribute(readonly, reportable) int16u tolerance = 3; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster TestCluster = 1295 { + enum SimpleEnum : ENUM8 { + kUnspecified = 0; + kValueA = 1; + kValueB = 2; + kValueC = 3; + } + + struct TestListStructOctet { + INT64U fabricIndex = 1; + OCTET_STRING operationalCert = 2; + } + + struct NullablesAndOptionalsStruct { + nullable INT16U nullableInt = 1; + optional INT16U optionalInt = 2; + optional nullable INT16U nullableOptionalInt = 3; + nullable CHAR_STRING nullableString = 4; + optional CHAR_STRING optionalString = 5; + optional nullable CHAR_STRING nullableOptionalString = 6; + nullable SimpleStruct nullableStruct = 7; + optional SimpleStruct optionalStruct = 8; + optional nullable SimpleStruct nullableOptionalStruct = 9; + nullable SimpleEnum nullableList[] = 10; + optional SimpleEnum optionalList[] = 11; + optional nullable SimpleEnum nullableOptionalList[] = 12; + } + + struct SimpleStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleEnum c = 3; + OCTET_STRING d = 4; + CHAR_STRING e = 5; + SimpleBitmap f = 6; + single g = 7; + double h = 8; + } + + struct NestedStructList { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + SimpleStruct d[] = 4; + INT32U e[] = 5; + OCTET_STRING f[] = 6; + INT8U g[] = 7; + } + + struct NestedStruct { + INT8U a = 1; + BOOLEAN b = 2; + SimpleStruct c = 3; + } + + info event TestEvent = 1 { + INT8U arg1 = 1; + SimpleEnum arg2 = 2; + BOOLEAN arg3 = 3; + SimpleStruct arg4 = 4; + SimpleStruct arg5[] = 5; + SimpleEnum arg6[] = 6; + } + + attribute(writable, reportable) boolean boolean = 0; + attribute(writable, reportable) bitmap8 bitmap8 = 1; + attribute(writable, reportable) bitmap16 bitmap16 = 2; + attribute(writable, reportable) bitmap32 bitmap32 = 3; + attribute(writable, reportable) bitmap64 bitmap64 = 4; + attribute(writable, reportable) int8u int8u = 5; + attribute(writable, reportable) int16u int16u = 6; + attribute(writable, reportable) int24u int24u = 7; + attribute(writable, reportable) int32u int32u = 8; + attribute(writable, reportable) int40u int40u = 9; + attribute(writable, reportable) int48u int48u = 10; + attribute(writable, reportable) int56u int56u = 11; + attribute(writable, reportable) int64u int64u = 12; + attribute(writable, reportable) int8s int8s = 13; + attribute(writable, reportable) int16s int16s = 14; + attribute(writable, reportable) int24s int24s = 15; + attribute(writable, reportable) int32s int32s = 16; + attribute(writable, reportable) int40s int40s = 17; + attribute(writable, reportable) int48s int48s = 18; + attribute(writable, reportable) int56s int56s = 19; + attribute(writable, reportable) int64s int64s = 20; + attribute(writable, reportable) enum8 enum8 = 21; + attribute(writable, reportable) enum16 enum16 = 22; + attribute(writable, reportable) single floatSingle = 23; + attribute(writable, reportable) double floatDouble = 24; + attribute(writable, reportable) octet_string octetString = 25; + attribute(writable, reportable) INT8U listInt8u[] = 26; + attribute(writable, reportable) OCTET_STRING listOctetString[] = 27; + attribute(writable, reportable) TestListStructOctet listStructOctetString[] = 28; + attribute(writable, reportable) long_octet_string longOctetString = 29; + attribute(writable, reportable) char_string charString = 30; + attribute(writable, reportable) long_char_string longCharString = 31; + attribute(writable, reportable) epoch_us epochUs = 32; + attribute(writable, reportable) epoch_s epochS = 33; + attribute(writable, reportable) vendor_id vendorId = 34; + attribute(writable, reportable) NullablesAndOptionalsStruct listNullablesAndOptionalsStruct[] = 35; + attribute(writable, reportable) SimpleEnum enumAttr = 36; + attribute(writable, reportable) SimpleStruct structAttr = 37; + attribute(writable, reportable) int8u rangeRestrictedInt8u = 38; + attribute(writable, reportable) int8s rangeRestrictedInt8s = 39; + attribute(writable, reportable) int16u rangeRestrictedInt16u = 40; + attribute(writable, reportable) int16s rangeRestrictedInt16s = 41; + attribute(readonly) LONG_OCTET_STRING listLongOctetString[] = 42; + attribute(writable) boolean timedWriteBoolean = 48; + attribute(writable, reportable) boolean unsupported = 255; + attribute(writable, reportable) boolean nullableBoolean = 32768; + attribute(writable, reportable) bitmap8 nullableBitmap8 = 32769; + attribute(writable, reportable) bitmap16 nullableBitmap16 = 32770; + attribute(writable, reportable) bitmap32 nullableBitmap32 = 32771; + attribute(writable, reportable) bitmap64 nullableBitmap64 = 32772; + attribute(writable, reportable) int8u nullableInt8u = 32773; + attribute(writable, reportable) int16u nullableInt16u = 32774; + attribute(writable, reportable) int24u nullableInt24u = 32775; + attribute(writable, reportable) int32u nullableInt32u = 32776; + attribute(writable, reportable) int40u nullableInt40u = 32777; + attribute(writable, reportable) int48u nullableInt48u = 32778; + attribute(writable, reportable) int56u nullableInt56u = 32779; + attribute(writable, reportable) int64u nullableInt64u = 32780; + attribute(writable, reportable) int8s nullableInt8s = 32781; + attribute(writable, reportable) int16s nullableInt16s = 32782; + attribute(writable, reportable) int24s nullableInt24s = 32783; + attribute(writable, reportable) int32s nullableInt32s = 32784; + attribute(writable, reportable) int40s nullableInt40s = 32785; + attribute(writable, reportable) int48s nullableInt48s = 32786; + attribute(writable, reportable) int56s nullableInt56s = 32787; + attribute(writable, reportable) int64s nullableInt64s = 32788; + attribute(writable, reportable) enum8 nullableEnum8 = 32789; + attribute(writable, reportable) enum16 nullableEnum16 = 32790; + attribute(writable, reportable) single nullableFloatSingle = 32791; + attribute(writable, reportable) double nullableFloatDouble = 32792; + attribute(writable, reportable) octet_string nullableOctetString = 32793; + attribute(writable, reportable) char_string nullableCharString = 32798; + attribute(writable, reportable) SimpleEnum nullableEnumAttr = 32804; + attribute(writable, reportable) SimpleStruct nullableStruct = 32805; + attribute(writable, reportable) int8u nullableRangeRestrictedInt8u = 32806; + attribute(writable, reportable) int8s nullableRangeRestrictedInt8s = 32807; + attribute(writable, reportable) int16u nullableRangeRestrictedInt16u = 32808; + attribute(writable, reportable) int16s nullableRangeRestrictedInt16s = 32809; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct SimpleStructEchoRequestRequest { + SimpleStruct arg1 = 0; + } + + request struct TestAddArgumentsRequest { + INT8U arg1 = 0; + INT8U arg2 = 1; + } + + request struct TestEmitTestEventRequestRequest { + INT8U arg1 = 0; + SimpleEnum arg2 = 1; + BOOLEAN arg3 = 2; + } + + request struct TestEnumsRequestRequest { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + request struct TestListInt8UArgumentRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListInt8UReverseRequestRequest { + INT8U arg1[] = 0; + } + + request struct TestListNestedStructListArgumentRequestRequest { + NestedStructList arg1[] = 0; + } + + request struct TestListStructArgumentRequestRequest { + SimpleStruct arg1[] = 0; + } + + request struct TestNestedStructArgumentRequestRequest { + NestedStruct arg1 = 0; + } + + request struct TestNestedStructListArgumentRequestRequest { + NestedStructList arg1 = 0; + } + + request struct TestNullableOptionalRequestRequest { + optional nullable INT8U arg1 = 0; + } + + request struct TestSimpleOptionalArgumentRequestRequest { + optional BOOLEAN arg1 = 0; + } + + request struct TestStructArgumentRequestRequest { + SimpleStruct arg1 = 0; + } + + response struct BooleanResponse { + BOOLEAN value = 0; + } + + response struct SimpleStructResponse { + SimpleStruct arg1 = 0; + } + + response struct TestAddArgumentsResponse { + INT8U returnValue = 0; + } + + response struct TestEmitTestEventResponse { + INT64U value = 0; + } + + response struct TestEnumsResponse { + vendor_id arg1 = 0; + SimpleEnum arg2 = 1; + } + + response struct TestListInt8UReverseResponse { + INT8U arg1[] = 0; + } + + response struct TestNullableOptionalResponse { + BOOLEAN wasPresent = 0; + optional BOOLEAN wasNull = 1; + optional INT8U value = 2; + optional nullable INT8U originalValue = 3; + } + + response struct TestSpecificResponse { + INT8U returnValue = 0; + } + + command SimpleStructEchoRequest(SimpleStructEchoRequestRequest): SimpleStructResponse = 17; + command Test(): DefaultSuccess = 0; + command TestAddArguments(TestAddArgumentsRequest): TestAddArgumentsResponse = 4; + command TestEmitTestEventRequest(TestEmitTestEventRequestRequest): TestEmitTestEventResponse = 20; + command TestEnumsRequest(TestEnumsRequestRequest): TestEnumsResponse = 14; + command TestListInt8UArgumentRequest(TestListInt8UArgumentRequestRequest): BooleanResponse = 10; + command TestListInt8UReverseRequest(TestListInt8UReverseRequestRequest): TestListInt8UReverseResponse = 13; + command TestListNestedStructListArgumentRequest(TestListNestedStructListArgumentRequestRequest): BooleanResponse = 12; + command TestListStructArgumentRequest(TestListStructArgumentRequestRequest): BooleanResponse = 9; + command TestNestedStructArgumentRequest(TestNestedStructArgumentRequestRequest): BooleanResponse = 8; + command TestNestedStructListArgumentRequest(TestNestedStructListArgumentRequestRequest): BooleanResponse = 11; + command TestNotHandled(): DefaultSuccess = 1; + command TestNullableOptionalRequest(TestNullableOptionalRequestRequest): TestNullableOptionalResponse = 15; + command TestSimpleOptionalArgumentRequest(TestSimpleOptionalArgumentRequestRequest): DefaultSuccess = 19; + command TestSpecific(): TestSpecificResponse = 2; + command TestStructArgumentRequest(TestStructArgumentRequestRequest): BooleanResponse = 7; + command TestUnknownCommand(): DefaultSuccess = 3; + command TimedInvokeRequest(): DefaultSuccess = 18; +} + +client cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + attribute(readonly, reportable) int16s localTemperature = 0; + attribute(readonly, reportable) int16s absMinHeatSetpointLimit = 3; + attribute(readonly, reportable) int16s absMaxHeatSetpointLimit = 4; + attribute(readonly, reportable) int16s absMinCoolSetpointLimit = 5; + attribute(readonly, reportable) int16s absMaxCoolSetpointLimit = 6; + attribute(writable, reportable) int16s occupiedCoolingSetpoint = 17; + attribute(writable, reportable) int16s occupiedHeatingSetpoint = 18; + attribute(writable, reportable) int16s minHeatSetpointLimit = 21; + attribute(writable, reportable) int16s maxHeatSetpointLimit = 22; + attribute(writable, reportable) int16s minCoolSetpointLimit = 23; + attribute(writable, reportable) int16s maxCoolSetpointLimit = 24; + attribute(writable, reportable) int8s minSetpointDeadBand = 25; + attribute(writable, reportable) enum8 controlSequenceOfOperation = 27; + attribute(writable, reportable) enum8 systemMode = 28; + attribute(readonly, reportable) enum8 startOfWeek = 32; + attribute(readonly, reportable) int8u numberOfWeeklyTransitions = 33; + attribute(readonly, reportable) int8u numberOfDailyTransitions = 34; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GetWeeklyScheduleRequest { + DayOfWeek daysToReturn = 0; + ModeForSequence modeToReturn = 1; + } + + request struct SetWeeklyScheduleRequest { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + request struct SetpointRaiseLowerRequest { + SetpointAdjustMode mode = 0; + INT8S amount = 1; + } + + response struct GetRelayStatusLogResponse { + INT16U timeOfDay = 0; + BITMAP16 relayStatus = 1; + INT16S localTemperature = 2; + INT8U humidityInPercentage = 3; + INT16S setpoint = 4; + INT16U unreadEntries = 5; + } + + response struct GetWeeklyScheduleResponse { + ENUM8 numberOfTransitionsForSequence = 0; + DayOfWeek dayOfWeekForSequence = 1; + ModeForSequence modeForSequence = 2; + INT8U payload[] = 3; + } + + command ClearWeeklySchedule(): DefaultSuccess = 3; + command GetRelayStatusLog(): GetRelayStatusLogResponse = 4; + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + command SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; +} + +client cluster ThermostatUserInterfaceConfiguration = 516 { + attribute(writable, reportable) enum8 temperatureDisplayMode = 0; + attribute(writable, reportable) enum8 keypadLockout = 1; + attribute(writable, reportable) enum8 scheduleProgrammingVisibility = 2; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster ThreadNetworkDiagnostics = 53 { + enum NetworkFault : ENUM8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRole : ENUM8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kReed = 4; + kRouter = 5; + kLeader = 6; + } + + enum ThreadConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + struct NeighborTable { + INT64U extAddress = 1; + INT32U age = 2; + INT16U rloc16 = 3; + INT32U linkFrameCounter = 4; + INT32U mleFrameCounter = 5; + INT8U lqi = 6; + INT8S averageRssi = 7; + INT8S lastRssi = 8; + INT8U frameErrorRate = 9; + INT8U messageErrorRate = 10; + BOOLEAN rxOnWhenIdle = 11; + BOOLEAN fullThreadDevice = 12; + BOOLEAN fullNetworkData = 13; + BOOLEAN isChild = 14; + } + + struct RouteTable { + INT64U extAddress = 1; + INT16U rloc16 = 2; + INT8U routerId = 3; + INT8U nextHop = 4; + INT8U pathCost = 5; + INT8U LQIIn = 6; + INT8U LQIOut = 7; + INT8U age = 8; + BOOLEAN allocated = 9; + BOOLEAN linkEstablished = 10; + } + + struct SecurityPolicy { + INT16U rotationTime = 1; + BITMAP16 flags = 2; + } + + struct OperationalDatasetComponents { + BOOLEAN activeTimestampPresent = 1; + BOOLEAN pendingTimestampPresent = 2; + BOOLEAN masterKeyPresent = 3; + BOOLEAN networkNamePresent = 4; + BOOLEAN extendedPanIdPresent = 5; + BOOLEAN meshLocalPrefixPresent = 6; + BOOLEAN delayPresent = 7; + BOOLEAN panIdPresent = 8; + BOOLEAN channelPresent = 9; + BOOLEAN pskcPresent = 10; + BOOLEAN securityPolicyPresent = 11; + BOOLEAN channelMaskPresent = 12; + } + + info event ConnectionStatus = 0 { + ThreadConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) int16u channel = 0; + attribute(readonly, reportable) enum8 routingRole = 1; + attribute(readonly, reportable) octet_string networkName = 2; + attribute(readonly, reportable) int16u panId = 3; + attribute(readonly, reportable) int64u extendedPanId = 4; + attribute(readonly, reportable) octet_string meshLocalPrefix = 5; + attribute(readonly, reportable) int64u overrunCount = 6; + attribute(readonly, reportable) NeighborTable neighborTableList[] = 7; + attribute(readonly, reportable) RouteTable routeTableList[] = 8; + attribute(readonly, reportable) int32u partitionId = 9; + attribute(readonly, reportable) int8u weighting = 10; + attribute(readonly, reportable) int8u dataVersion = 11; + attribute(readonly, reportable) int8u stableDataVersion = 12; + attribute(readonly, reportable) int8u leaderRouterId = 13; + attribute(readonly, reportable) int16u detachedRoleCount = 14; + attribute(readonly, reportable) int16u childRoleCount = 15; + attribute(readonly, reportable) int16u routerRoleCount = 16; + attribute(readonly, reportable) int16u leaderRoleCount = 17; + attribute(readonly, reportable) int16u attachAttemptCount = 18; + attribute(readonly, reportable) int16u partitionIdChangeCount = 19; + attribute(readonly, reportable) int16u betterPartitionAttachAttemptCount = 20; + attribute(readonly, reportable) int16u parentChangeCount = 21; + attribute(readonly, reportable) int32u txTotalCount = 22; + attribute(readonly, reportable) int32u txUnicastCount = 23; + attribute(readonly, reportable) int32u txBroadcastCount = 24; + attribute(readonly, reportable) int32u txAckRequestedCount = 25; + attribute(readonly, reportable) int32u txAckedCount = 26; + attribute(readonly, reportable) int32u txNoAckRequestedCount = 27; + attribute(readonly, reportable) int32u txDataCount = 28; + attribute(readonly, reportable) int32u txDataPollCount = 29; + attribute(readonly, reportable) int32u txBeaconCount = 30; + attribute(readonly, reportable) int32u txBeaconRequestCount = 31; + attribute(readonly, reportable) int32u txOtherCount = 32; + attribute(readonly, reportable) int32u txRetryCount = 33; + attribute(readonly, reportable) int32u txDirectMaxRetryExpiryCount = 34; + attribute(readonly, reportable) int32u txIndirectMaxRetryExpiryCount = 35; + attribute(readonly, reportable) int32u txErrCcaCount = 36; + attribute(readonly, reportable) int32u txErrAbortCount = 37; + attribute(readonly, reportable) int32u txErrBusyChannelCount = 38; + attribute(readonly, reportable) int32u rxTotalCount = 39; + attribute(readonly, reportable) int32u rxUnicastCount = 40; + attribute(readonly, reportable) int32u rxBroadcastCount = 41; + attribute(readonly, reportable) int32u rxDataCount = 42; + attribute(readonly, reportable) int32u rxDataPollCount = 43; + attribute(readonly, reportable) int32u rxBeaconCount = 44; + attribute(readonly, reportable) int32u rxBeaconRequestCount = 45; + attribute(readonly, reportable) int32u rxOtherCount = 46; + attribute(readonly, reportable) int32u rxAddressFilteredCount = 47; + attribute(readonly, reportable) int32u rxDestAddrFilteredCount = 48; + attribute(readonly, reportable) int32u rxDuplicatedCount = 49; + attribute(readonly, reportable) int32u rxErrNoFrameCount = 50; + attribute(readonly, reportable) int32u rxErrUnknownNeighborCount = 51; + attribute(readonly, reportable) int32u rxErrInvalidSrcAddrCount = 52; + attribute(readonly, reportable) int32u rxErrSecCount = 53; + attribute(readonly, reportable) int32u rxErrFcsCount = 54; + attribute(readonly, reportable) int32u rxErrOtherCount = 55; + attribute(readonly, reportable) int64u activeTimestamp = 56; + attribute(readonly, reportable) int64u pendingTimestamp = 57; + attribute(readonly, reportable) int32u delay = 58; + attribute(readonly, reportable) SecurityPolicy securityPolicy[] = 59; + attribute(readonly, reportable) octet_string channelMask = 60; + attribute(readonly, reportable) OperationalDatasetComponents operationalDatasetComponents[] = 61; + attribute(readonly, reportable) NetworkFault activeNetworkFaultsList[] = 62; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster UserLabel = 65 { + attribute(writable) LabelStruct labelList[] = 0; + attribute(readonly) int16u clusterRevision = 65533; +} + +client cluster WakeOnLan = 1283 { + attribute(readonly, reportable) char_string wakeOnLanMacAddress = 0; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) int16u clusterRevision = 65533; +} + +client cluster WiFiNetworkDiagnostics = 54 { + enum AssociationFailureCause : ENUM8 { + kUnknown = 0; + kAssociationFailed = 1; + kAuthenticationFailed = 2; + kSsidNotFound = 3; + } + + enum SecurityType : ENUM8 { + kUnspecified = 0; + kNone = 1; + kWep = 2; + kWpa = 3; + kWpa2 = 4; + kWpa3 = 5; + } + + enum WiFiConnectionStatus : ENUM8 { + kConnected = 0; + kNotConnected = 1; + } + + enum WiFiVersionType : ENUM8 { + k80211a = 0; + k80211b = 1; + k80211g = 2; + k80211n = 3; + k80211ac = 4; + k80211ax = 5; + } + + info event Disconnection = 0 { + INT16U reasonCode = 0; + } + + info event AssociationFailure = 1 { + AssociationFailureCause associationFailure = 0; + INT16U status = 1; + } + + info event ConnectionStatus = 2 { + WiFiConnectionStatus connectionStatus = 0; + } + + attribute(readonly, reportable) octet_string bssid = 0; + attribute(readonly, reportable) enum8 securityType = 1; + attribute(readonly, reportable) enum8 wiFiVersion = 2; + attribute(readonly, reportable) int16u channelNumber = 3; + attribute(readonly, reportable) int8s rssi = 4; + attribute(readonly, reportable) int32u beaconLostCount = 5; + attribute(readonly, reportable) int32u beaconRxCount = 6; + attribute(readonly, reportable) int32u packetMulticastRxCount = 7; + attribute(readonly, reportable) int32u packetMulticastTxCount = 8; + attribute(readonly, reportable) int32u packetUnicastRxCount = 9; + attribute(readonly, reportable) int32u packetUnicastTxCount = 10; + attribute(readonly, reportable) int64u currentMaxRate = 11; + attribute(readonly, reportable) int64u overrunCount = 12; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; +} + +client cluster WindowCovering = 258 { + attribute(readonly, reportable) enum8 type = 0; + attribute(readonly, reportable) int16u currentPositionLift = 3; + attribute(readonly, reportable) int16u currentPositionTilt = 4; + attribute(readonly, reportable) bitmap8 configStatus = 7; + attribute(readonly, reportable) Percent currentPositionLiftPercentage = 8; + attribute(readonly, reportable) Percent currentPositionTiltPercentage = 9; + attribute(readonly, reportable) bitmap8 operationalStatus = 10; + attribute(readonly, reportable) Percent100ths targetPositionLiftPercent100ths = 11; + attribute(readonly, reportable) Percent100ths targetPositionTiltPercent100ths = 12; + attribute(readonly, reportable) enum8 endProductType = 13; + attribute(readonly, reportable) Percent100ths currentPositionLiftPercent100ths = 14; + attribute(readonly, reportable) Percent100ths currentPositionTiltPercent100ths = 15; + attribute(readonly, reportable) int16u installedOpenLimitLift = 16; + attribute(readonly, reportable) int16u installedClosedLimitLift = 17; + attribute(readonly, reportable) int16u installedOpenLimitTilt = 18; + attribute(readonly, reportable) int16u installedClosedLimitTilt = 19; + attribute(writable, reportable) bitmap8 mode = 23; + attribute(readonly, reportable) bitmap16 safetyStatus = 26; + attribute(readonly) attrib_id attributeList[] = 65531; + attribute(readonly, reportable) bitmap32 featureMap = 65532; + attribute(readonly, reportable) int16u clusterRevision = 65533; + + request struct GoToLiftPercentageRequest { + Percent liftPercentageValue = 0; + Percent100ths liftPercent100thsValue = 1; + } + + request struct GoToLiftValueRequest { + INT16U liftValue = 0; + } + + request struct GoToTiltPercentageRequest { + Percent tiltPercentageValue = 0; + Percent100ths tiltPercent100thsValue = 1; + } + + request struct GoToTiltValueRequest { + INT16U tiltValue = 0; + } + + command DownOrClose(): DefaultSuccess = 1; + command GoToLiftPercentage(GoToLiftPercentageRequest): DefaultSuccess = 5; + command GoToLiftValue(GoToLiftValueRequest): DefaultSuccess = 4; + command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8; + command GoToTiltValue(GoToTiltValueRequest): DefaultSuccess = 7; + command StopMotion(): DefaultSuccess = 2; + command UpOrOpen(): DefaultSuccess = 0; +} + + +endpoint 1 { + instantiate cluster AccessControl; + instantiate cluster AccountLogin; + instantiate cluster AdministratorCommissioning; + instantiate cluster ApplicationBasic; + instantiate cluster ApplicationLauncher; + instantiate cluster AudioOutput; + instantiate cluster BarrierControl; + instantiate cluster Basic; + instantiate cluster BinaryInputBasic; + instantiate cluster Binding; + instantiate cluster BooleanState; + instantiate cluster BridgedActions; + instantiate cluster BridgedDeviceBasic; + instantiate cluster Channel; + instantiate cluster ColorControl; + instantiate cluster ContentLauncher; + instantiate cluster Descriptor; + instantiate cluster DiagnosticLogs; + instantiate cluster DoorLock; + instantiate cluster ElectricalMeasurement; + instantiate cluster EthernetNetworkDiagnostics; + instantiate cluster FixedLabel; + instantiate cluster FlowMeasurement; + instantiate cluster GeneralCommissioning; + instantiate cluster GeneralDiagnostics; + instantiate cluster GroupKeyManagement; + instantiate cluster Groups; + instantiate cluster Identify; + instantiate cluster IlluminanceMeasurement; + instantiate cluster KeypadInput; + instantiate cluster LevelControl; + instantiate cluster LocalizationConfiguration; + instantiate cluster LowPower; + instantiate cluster MediaInput; + instantiate cluster MediaPlayback; + instantiate cluster ModeSelect; + instantiate cluster NetworkCommissioning; + instantiate cluster OtaSoftwareUpdateProvider; + instantiate cluster OtaSoftwareUpdateRequestor; + instantiate cluster OccupancySensing; + instantiate cluster OnOff; + instantiate cluster OnOffSwitchConfiguration; + instantiate cluster OperationalCredentials; + instantiate cluster PowerSource; + instantiate cluster PowerSourceConfiguration; + instantiate cluster PressureMeasurement; + instantiate cluster PumpConfigurationAndControl; + instantiate cluster RelativeHumidityMeasurement; + instantiate cluster Scenes; + instantiate cluster SoftwareDiagnostics; + instantiate cluster Switch; + instantiate cluster TargetNavigator; + instantiate cluster TemperatureMeasurement; + instantiate cluster TestCluster; + instantiate cluster Thermostat; + instantiate cluster ThermostatUserInterfaceConfiguration; + instantiate cluster ThreadNetworkDiagnostics; + instantiate cluster UserLabel; + instantiate cluster WakeOnLan; + instantiate cluster WiFiNetworkDiagnostics; + instantiate cluster WindowCovering; +} + diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 0e9154291779a1..1d6753cc8be855 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -956,6 +956,21 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -965,7 +980,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1036,7 +1051,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFF", + "defaultValue": "0xFE", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1207,6 +1222,21 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, diff --git a/src/controller/java/zap-generated/CHIPCallbackTypes.h b/src/controller/java/zap-generated/CHIPCallbackTypes.h index 810ae078cd27c8..da0ba83cbce26a 100644 --- a/src/controller/java/zap-generated/CHIPCallbackTypes.h +++ b/src/controller/java/zap-generated/CHIPCallbackTypes.h @@ -581,6 +581,8 @@ typedef void (*CHIPLevelControlClusterStartUpCurrentLevelAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterAttributeListAttributeCallbackType)( void *, const chip::app::Clusters::LevelControl::Attributes::AttributeList::TypeInfo::DecodableType &); +typedef void (*CHIPLevelControlClusterFeatureMapAttributeCallbackType)( + void *, chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo::DecodableArgType); typedef void (*CHIPLevelControlClusterClusterRevisionAttributeCallbackType)( void *, chip::app::Clusters::LevelControl::Attributes::ClusterRevision::TypeInfo::DecodableArgType); diff --git a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp index 65f41fd0a28a6b..2f12f407473fb5 100644 --- a/src/controller/java/zap-generated/CHIPClusters-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClusters-JNI.cpp @@ -12847,7 +12847,12 @@ JNI_METHOD(void, LevelControlCluster, writeStartUpCurrentLevelAttribute) using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast(chip::JniReferences::GetInstance().IntegerToPrimitive(value)); + uint8_t valueValue; + if (value != nullptr) + { + valueValue = chip::JniReferences::GetInstance().IntegerToPrimitive(value); + } + cppValue = value == nullptr ? chip::app::DataModel::Nullable() : chip::app::DataModel::Nullable(valueValue); std::unique_ptr onSuccess( Platform::New(callback), Platform::Delete); @@ -12890,8 +12895,10 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jint minInterval, jint maxInterval) { chip::DeviceLayer::StackLock lock; - std::unique_ptr onSuccess( - Platform::New(callback, true), chip::Platform::Delete); + std::unique_ptr + onSuccess(Platform::New(callback, true), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -12915,7 +12922,7 @@ JNI_METHOD(void, LevelControlCluster, subscribeStartUpCurrentLevelAttribute) err = cppCluster->SubscribeAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall, static_cast(minInterval), static_cast(maxInterval), - CHIPInt8uAttributeCallback::OnSubscriptionEstablished); + CHIPLevelControlStartUpCurrentLevelAttributeCallback::OnSubscriptionEstablished); VerifyOrReturn(err == CHIP_NO_ERROR, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error subscribing to attribute", err)); diff --git a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp index 35059ef7947460..6a8542d8b23086 100644 --- a/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersRead-JNI.cpp @@ -8596,8 +8596,10 @@ JNI_METHOD(void, LevelControlCluster, readStartUpCurrentLevelAttribute) { chip::DeviceLayer::StackLock lock; using TypeInfo = chip::app::Clusters::LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - std::unique_ptr onSuccess( - chip::Platform::New(callback, false), chip::Platform::Delete); + std::unique_ptr + onSuccess(chip::Platform::New(callback, false), + chip::Platform::Delete); VerifyOrReturn(onSuccess.get() != nullptr, chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); @@ -8661,6 +8663,40 @@ JNI_METHOD(void, LevelControlCluster, readAttributeListAttribute)(JNIEnv * env, onFailure.release(); } +JNI_METHOD(void, LevelControlCluster, readFeatureMapAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) +{ + chip::DeviceLayer::StackLock lock; + using TypeInfo = chip::app::Clusters::LevelControl::Attributes::FeatureMap::TypeInfo; + std::unique_ptr onSuccess( + chip::Platform::New(callback, false), chip::Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + chip::Platform::New(callback), chip::Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + chip::Controller::LevelControlCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = + chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + err = cppCluster->ReadAttribute(onSuccess->mContext, successFn->mCall, failureFn->mCall); + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error reading attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, LevelControlCluster, readClusterRevisionAttribute)(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback) { chip::DeviceLayer::StackLock lock; diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index d601ecc1a90fc6..ac6fc45a922ed1 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -6533,6 +6533,67 @@ void CHIPLevelControlDefaultMoveRateAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPLevelControlStartUpCurrentLevelAttributeCallback::CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + return; + } + + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPLevelControlStartUpCurrentLevelAttributeCallback::~CHIPLevelControlStartUpCurrentLevelAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPLevelControlStartUpCurrentLevelAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) +{ + chip::DeviceLayer::StackUnlock unlock; + CHIP_ERROR err = CHIP_NO_ERROR; + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + jobject javaCallbackRef; + + VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); + + // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. + javaCallbackRef = cppCallback.get()->javaCallbackRef; + VerifyOrReturn(javaCallbackRef != nullptr, + ChipLogProgress(Zcl, "Early return from attribute callback since Java callback is null")); + + jmethodID javaMethod; + err = chip::JniReferences::GetInstance().FindMethod(env, javaCallbackRef, "onSuccess", "(Ljava/lang/Integer;)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + + std::string javaValueClassName = "java/lang/Integer"; + std::string javaValueCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), + value.Value(), javaValue); + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + CHIPLevelControlAttributeListAttributeCallback::CHIPLevelControlAttributeListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 63517b51228b9f..36c5da692ac87b 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -2306,6 +2306,36 @@ class CHIPLevelControlDefaultMoveRateAttributeCallback bool keepAlive; }; +class CHIPLevelControlStartUpCurrentLevelAttributeCallback + : public chip::Callback::Callback +{ +public: + CHIPLevelControlStartUpCurrentLevelAttributeCallback(jobject javaCallback, bool keepAlive = false); + + ~CHIPLevelControlStartUpCurrentLevelAttributeCallback(); + + static void maybeDestroy(CHIPLevelControlStartUpCurrentLevelAttributeCallback * callback) + { + if (!callback->keepAlive) + { + callback->Cancel(); + chip::Platform::Delete(callback); + } + } + + static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void OnSubscriptionEstablished(void * context) + { + CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( + reinterpret_cast(context)->javaCallbackRef); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Error calling onSubscriptionEstablished: %s", ErrorStr(err))); + }; + +private: + jobject javaCallbackRef; + bool keepAlive; +}; + class CHIPLevelControlAttributeListAttributeCallback : public chip::Callback::Callback { diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 685d6d85a0eb2f..8e6b06cf8870df 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -7213,6 +7213,14 @@ public interface DefaultMoveRateAttributeCallback { default void onSubscriptionEstablished() {} } + public interface StartUpCurrentLevelAttributeCallback { + void onSuccess(@Nullable Integer value); + + void onError(Exception ex); + + default void onSubscriptionEstablished() {} + } + public interface AttributeListAttributeCallback { void onSuccess(List valueList); @@ -7395,21 +7403,22 @@ public void subscribeDefaultMoveRateAttribute( subscribeDefaultMoveRateAttribute(chipClusterPtr, callback, minInterval, maxInterval); } - public void readStartUpCurrentLevelAttribute(IntegerAttributeCallback callback) { + public void readStartUpCurrentLevelAttribute(StartUpCurrentLevelAttributeCallback callback) { readStartUpCurrentLevelAttribute(chipClusterPtr, callback); } - public void writeStartUpCurrentLevelAttribute(DefaultClusterCallback callback, Integer value) { + public void writeStartUpCurrentLevelAttribute( + DefaultClusterCallback callback, @Nullable Integer value) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, null); } public void writeStartUpCurrentLevelAttribute( - DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + DefaultClusterCallback callback, @Nullable Integer value, int timedWriteTimeoutMs) { writeStartUpCurrentLevelAttribute(chipClusterPtr, callback, value, timedWriteTimeoutMs); } public void subscribeStartUpCurrentLevelAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { + StartUpCurrentLevelAttributeCallback callback, int minInterval, int maxInterval) { subscribeStartUpCurrentLevelAttribute(chipClusterPtr, callback, minInterval, maxInterval); } @@ -7417,6 +7426,10 @@ public void readAttributeListAttribute(AttributeListAttributeCallback callback) readAttributeListAttribute(chipClusterPtr, callback); } + public void readFeatureMapAttribute(LongAttributeCallback callback) { + readFeatureMapAttribute(chipClusterPtr, callback); + } + public void readClusterRevisionAttribute(IntegerAttributeCallback callback) { readClusterRevisionAttribute(chipClusterPtr, callback); } @@ -7550,20 +7563,26 @@ private native void subscribeDefaultMoveRateAttribute( int maxInterval); private native void readStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback); + long chipClusterPtr, StartUpCurrentLevelAttributeCallback callback); private native void writeStartUpCurrentLevelAttribute( long chipClusterPtr, DefaultClusterCallback callback, - Integer value, + @Nullable Integer value, @Nullable Integer timedWriteTimeoutMs); private native void subscribeStartUpCurrentLevelAttribute( - long chipClusterPtr, IntegerAttributeCallback callback, int minInterval, int maxInterval); + long chipClusterPtr, + StartUpCurrentLevelAttributeCallback callback, + int minInterval, + int maxInterval); private native void readAttributeListAttribute( long chipClusterPtr, AttributeListAttributeCallback callback); + private native void readFeatureMapAttribute( + long chipClusterPtr, LongAttributeCallback callback); + private native void readClusterRevisionAttribute( long chipClusterPtr, IntegerAttributeCallback callback); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java index 683e425cab0083..7a7e0d8cd74d98 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterReadMapping.java @@ -3301,7 +3301,8 @@ public Map> getReadAttributeMap() { (cluster, callback, commandArguments) -> { ((ChipClusters.LevelControlCluster) cluster) .readStartUpCurrentLevelAttribute( - (ChipClusters.IntegerAttributeCallback) callback); + (ChipClusters.LevelControlCluster.StartUpCurrentLevelAttributeCallback) + callback); }, () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), readLevelControlStartUpCurrentLevelCommandParams); @@ -3322,6 +3323,18 @@ public Map> getReadAttributeMap() { readLevelControlAttributeListCommandParams); readLevelControlInteractionInfo.put( "readAttributeListAttribute", readLevelControlAttributeListAttributeInteractionInfo); + Map readLevelControlFeatureMapCommandParams = + new LinkedHashMap(); + InteractionInfo readLevelControlFeatureMapAttributeInteractionInfo = + new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.LevelControlCluster) cluster) + .readFeatureMapAttribute((ChipClusters.LongAttributeCallback) callback); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readLevelControlFeatureMapCommandParams); + readLevelControlInteractionInfo.put( + "readFeatureMapAttribute", readLevelControlFeatureMapAttributeInteractionInfo); Map readLevelControlClusterRevisionCommandParams = new LinkedHashMap(); InteractionInfo readLevelControlClusterRevisionAttributeInteractionInfo = diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7249c702873c45..bfb0bfdf93a3fe 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -2496,6 +2496,11 @@ class ChipClusters: "attributeId": 0x0000FFFB, "type": "int", }, + 0x0000FFFC: { + "attributeName": "FeatureMap", + "attributeId": 0x0000FFFC, + "type": "int", + }, 0x0000FFFD: { "attributeName": "ClusterRevision", "attributeId": 0x0000FFFD, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 652f4e7e8ee5be..c10a80d81e035c 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -2761,7 +2761,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="onTransitionTime", Tag=0x00000012, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="offTransitionTime", Tag=0x00000013, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="defaultMoveRate", Tag=0x00000014, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startUpCurrentLevel", Tag=0x00004000, Type=typing.Union[None, Nullable, uint]), ClusterObjectFieldDescriptor(Label="attributeList", Tag=0x0000FFFB, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="featureMap", Tag=0x0000FFFC, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), @@ -2780,7 +2780,7 @@ def descriptor(cls) -> ClusterObjectDescriptor: onTransitionTime: 'typing.Union[None, Nullable, uint]' = None offTransitionTime: 'typing.Union[None, Nullable, uint]' = None defaultMoveRate: 'typing.Union[None, Nullable, uint]' = None - startUpCurrentLevel: 'typing.Optional[uint]' = None + startUpCurrentLevel: 'typing.Union[None, Nullable, uint]' = None attributeList: 'typing.List[uint]' = None featureMap: 'typing.Optional[uint]' = None clusterRevision: 'uint' = None @@ -3167,9 +3167,9 @@ def attribute_id(cls) -> int: @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.Optional[uint]' = None + value: 'typing.Union[None, Nullable, uint]' = None @dataclass class AttributeList(ClusterAttributeDescriptor): diff --git a/src/controller/python/test/test_scripts/base.py b/src/controller/python/test/test_scripts/base.py index ee66766ab16ab0..11fdaae5b045ec 100644 --- a/src/controller/python/test/test_scripts/base.py +++ b/src/controller/python/test/test_scripts/base.py @@ -176,29 +176,29 @@ def TestLevelControlCluster(self, nodeid: int, endpoint: int, group: int): self.logger.info( f"Sending MoveToLevel command to device {nodeid} endpoint {endpoint}") try: - commonArgs = dict(transitionTime=0, optionMask=0, optionOverride=0) + commonArgs = dict(transitionTime=0, optionMask=1, optionOverride=1) - # Move to 0 + # Move to 1 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=0), blocking=True) + endpoint, group, dict(**commonArgs, level=1), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(0) + res).assertValueEqual(1) - # Move to 255 + # Move to 254 self.devCtrl.ZCLSend("LevelControl", "MoveToLevel", nodeid, - endpoint, group, dict(**commonArgs, level=255), blocking=True) + endpoint, group, dict(**commonArgs, level=254), blocking=True) res = self.devCtrl.ZCLReadAttribute(cluster="LevelControl", attribute="CurrentLevel", nodeid=nodeid, endpoint=endpoint, groupid=group) TestResult("Read attribute LevelControl.CurrentLevel", - res).assertValueEqual(255) + res).assertValueEqual(254) return True except Exception as ex: diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index 717d51799d3ddf..906bf6724999aa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -3943,8 +3943,12 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + NSNumber * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + } return value; } case Attributes::AttributeList::Id: { @@ -3973,6 +3977,17 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader value = array_0; return value; } + case Attributes::FeatureMap::Id: { + using TypeInfo = Attributes::FeatureMap::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::ClusterRevision::Id: { using TypeInfo = Attributes::ClusterRevision::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index c44ef20fbb31b9..09c3c465d97229 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -2180,7 +2180,8 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value + completionHandler:(StatusCompletion)completionHandler; - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterval maxInterval:(uint16_t)maxInterval subscriptionEstablished: @@ -2191,6 +2192,9 @@ NS_ASSUME_NONNULL_BEGIN - (void)readAttributeAttributeListWithCompletionHandler:(void (^)( NSArray * _Nullable value, NSError * _Nullable error))completionHandler; +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler; - (void)subscribeAttributeClusterRevisionWithMinInterval:(uint16_t)minInterval diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index db4a324646ca5c..354fe085ca2132 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -9251,15 +9251,16 @@ new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( - (void)readAttributeStartUpCurrentLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPNullableInt8uAttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( self.callbackQueue, @@ -9270,7 +9271,12 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -9284,14 +9290,14 @@ - (void)subscribeAttributeStartUpCurrentLevelWithMinInterval:(uint16_t)minInterv reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.SubscribeAttribute(successFn->mContext, successFn->mCall, failureFn->mCall, - minInterval, maxInterval, CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); + minInterval, maxInterval, CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished); }, subscriptionEstablishedHandler); } @@ -9308,6 +9314,17 @@ new CHIPLevelControlAttributeListListAttributeCallbackBridge( }); } +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)( + NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h index c5cf0391eaab4b..4cc9fda6cf6978 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h @@ -521,6 +521,7 @@ NS_ASSUME_NONNULL_BEGIN - (void)writeAttributeMinFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeMaxFrequencyWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeAttributeListWithValue:(NSArray * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index bb89a0747e26ce..9fa13d75a158d3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -5334,6 +5334,24 @@ new CHIPDefaultSuccessCallbackBridge( }); } +- (void)writeAttributeFeatureMapWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler +{ + new CHIPDefaultSuccessCallbackBridge( + self.callbackQueue, + ^(id _Nullable ignored, NSError * _Nullable error) { + completionHandler(error); + }, + ^(Cancelable * success, Cancelable * failure) { + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); + }); +} + - (void)writeAttributeClusterRevisionWithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler { new CHIPDefaultSuccessCallbackBridge( diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index 463a561546abcd..bf5db54985a86d 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -10944,6 +10944,30 @@ - (void)testSendClusterTest_TC_LVL_1_1_000000_WaitForCommissionee [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"read the global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"read the global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000002_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read the global attribute constraints: ClusterRevision"]; @@ -10962,7 +10986,7 @@ - (void)testSendClusterTest_TC_LVL_1_1_000001_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute +- (void)testSendClusterTest_TC_LVL_1_1_000003_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"write the default values to mandatory global attribute: ClusterRevision"]; @@ -10985,6 +11009,71 @@ - (void)testSendClusterTest_TC_LVL_1_1_000002_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterTest_TC_LVL_1_1_000004_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"reads back global attribute: ClusterRevision"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeClusterRevisionWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"reads back global attribute: ClusterRevision Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedShortValue], 5U); + } + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000005_ReadAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Read the optional global attribute : FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the optional global attribute : FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_1_1_000006_WriteAttribute +{ + XCTestExpectation * expectation = + [self expectationWithDescription:@"write the default values to optional global attribute: FeatureMap"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + id featureMapArgument; + featureMapArgument = [NSNumber numberWithUnsignedInt:0UL]; + [cluster writeAttributeFeatureMapWithValue:featureMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"write the default values to optional global attribute: FeatureMap Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_UNSUPPORTED_WRITE); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee { @@ -10994,31 +11083,40 @@ - (void)testSendClusterTest_TC_LVL_2_1_000000_WaitForCommissionee WaitForCommissionee(expectation, queue); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000001_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000001_MoveToLevel { - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; + XCTestExpectation * expectation = [self expectationWithDescription:@"Reset level to 254"]; CHIPDevice * device = GetConnectedDevice(); dispatch_queue_t queue = dispatch_get_main_queue(); CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; XCTAssertNotNil(cluster); - [cluster readAttributeCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the CurrentLevel attribute Error: %@", err); + __auto_type * params = [[CHIPLevelControlClusterMoveToLevelParams alloc] init]; + params.level = [NSNumber numberWithUnsignedChar:254]; + params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; + params.optionMask = [NSNumber numberWithUnsignedChar:1]; + params.optionOverride = [NSNumber numberWithUnsignedChar:1]; + [cluster moveToLevelWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Reset level to 254 Error: %@", err); - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 254); - } + [expectation fulfill]; + }]; - [expectation fulfill]; - }]; + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTest_TC_LVL_2_1_000002_WaitForMs +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 100ms"]; + dispatch_queue_t queue = dispatch_get_main_queue(); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentLevel attribute"]; @@ -11032,12 +11130,17 @@ - (void)testSendClusterTest_TC_LVL_2_1_000002_ReadAttribute XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); + { + id actualValue = value; + XCTAssertEqual([actualValue unsignedCharValue], 254); + } + [expectation fulfill]; }]; [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the RemainingTime attribute"]; @@ -11061,7 +11164,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000003_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinLevel attribute"]; @@ -11085,7 +11188,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000004_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxLevel attribute"]; @@ -11104,7 +11207,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000005_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the CurrentFrequency attribute"]; @@ -11128,7 +11231,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000006_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MinFrequency attribute"]; @@ -11152,7 +11255,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000007_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the MaxFrequency attribute"]; @@ -11176,7 +11279,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000008_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnOffTransitionTime attribute"]; @@ -11200,7 +11303,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnLevel attribute "]; @@ -11219,7 +11322,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OnTransitionTime attribute "]; @@ -11238,7 +11341,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000011_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the OffTransitionTime attribute "]; @@ -11257,7 +11360,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000012_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the DefaultMoveRate attribute "]; @@ -11276,7 +11379,7 @@ - (void)testSendClusterTest_TC_LVL_2_1_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the Options attribute "]; @@ -11300,30 +11403,6 @@ - (void)testSendClusterTest_TC_LVL_2_1_000014_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_1_000015_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute "]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} - (void)testSendClusterTest_TC_LVL_2_2_000000_WaitForCommissionee { @@ -11435,7 +11514,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000005_WriteAttribute XCTAssertNotNil(cluster); id onLevelArgument; - onLevelArgument = [NSNumber numberWithUnsignedChar:1]; + onLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeOnLevelWithValue:onLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the OnLevel attribute on the DUT Error: %@", err); @@ -11464,7 +11543,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000006_ReadAttribute { id actualValue = value; XCTAssertFalse(actualValue == nil); - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11638,31 +11717,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000013_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000014_ReadAttribute -{ - XCTestExpectation * expectation = [self expectationWithDescription:@"Reads the StartUpCurrentLevel attribute from the DUT"]; - - CHIPDevice * device = GetConnectedDevice(); - dispatch_queue_t queue = dispatch_get_main_queue(); - CHIPTestLevelControl * cluster = [[CHIPTestLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; - XCTAssertNotNil(cluster); - - [cluster readAttributeStartUpCurrentLevelWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Reads the StartUpCurrentLevel attribute from the DUT Error: %@", err); - - XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], 0); - - { - id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); - } - - [expectation fulfill]; - }]; - - [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; -} -- (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000014_WriteAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"writes the StartUpCurrentLevel attribute on the DUT"]; @@ -11672,7 +11727,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute XCTAssertNotNil(cluster); id startUpCurrentLevelArgument; - startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:1]; + startUpCurrentLevelArgument = [NSNumber numberWithUnsignedChar:254]; [cluster writeAttributeStartUpCurrentLevelWithValue:startUpCurrentLevelArgument completionHandler:^(NSError * _Nullable err) { NSLog(@"writes the StartUpCurrentLevel attribute on the DUT Error: %@", err); @@ -11684,7 +11739,7 @@ - (void)testSendClusterTest_TC_LVL_2_2_000015_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute +- (void)testSendClusterTest_TC_LVL_2_2_000015_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"reads the StartUpCurrentLevel attribute from the DUT"]; @@ -11700,7 +11755,8 @@ - (void)testSendClusterTest_TC_LVL_2_2_000016_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 1); + XCTAssertFalse(actualValue == nil); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11781,7 +11837,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000003_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -11957,7 +12013,7 @@ - (void)testSendClusterTest_TC_LVL_3_1_000012_WaitForMs XCTestExpectation * expectation = [self expectationWithDescription:@"Wait 10ms"]; dispatch_queue_t queue = dispatch_get_main_queue(); - WaitForMs(expectation, queue, 10); + WaitForMs(expectation, queue, 100); [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } - (void)testSendClusterTest_TC_LVL_3_1_000013_ReadAttribute @@ -12066,7 +12122,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000002_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12123,7 +12179,7 @@ - (void)testSendClusterTest_TC_LVL_4_1_000005_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 255); + XCTAssertEqual([actualValue unsignedCharValue], 254); } [expectation fulfill]; @@ -12204,7 +12260,15 @@ - (void)testSendClusterTest_TC_LVL_4_1_000009_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12682,7 +12746,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000004_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 0); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 0); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 1); + } } [expectation fulfill]; @@ -12762,7 +12834,15 @@ - (void)testSendClusterTest_TC_LVL_6_1_000008_ReadAttribute { id actualValue = value; - XCTAssertEqual([actualValue unsignedCharValue], 2); + if (actualValue != nil) { + XCTAssertGreaterThanOrEqual([actualValue unsignedCharValue], 2); + } + } + { + id actualValue = value; + if (actualValue != nil) { + XCTAssertLessThanOrEqual([actualValue unsignedCharValue], 3); + } } [expectation fulfill]; @@ -47054,7 +47134,7 @@ - (void)testSendClusterLevelControlWriteAttributeStartUpCurrentLevelWithValue XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlWriteAttributeStartUpCurrentLevelWithValue"]; - NSNumber * _Nonnull value = @(0); + NSNumber * _Nullable value = @(0); [cluster writeAttributeStartUpCurrentLevelWithValue:value completionHandler:^(NSError * _Nullable err) { NSLog(@"LevelControl StartUpCurrentLevel Error: %@", err); @@ -47089,6 +47169,30 @@ - (void)testSendClusterLevelControlReadAttributeAttributeListWithCompletionHandl [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } +- (void)testSendClusterLevelControlReadAttributeFeatureMapWithCompletionHandler +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + XCTestExpectation * connectedExpectation = + [self expectationWithDescription:@"Wait for the commissioned device to be retrieved"]; + WaitForCommissionee(connectedExpectation, queue); + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; + + CHIPDevice * device = GetConnectedDevice(); + CHIPLevelControl * cluster = [[CHIPLevelControl alloc] initWithDevice:device endpoint:1 queue:queue]; + XCTAssertNotNil(cluster); + + XCTestExpectation * expectation = [self expectationWithDescription:@"LevelControlReadAttributeFeatureMapWithCompletionHandler"]; + + [cluster readAttributeFeatureMapWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"LevelControl FeatureMap Error: %@", err); + XCTAssertEqual(err.code, 0); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} + - (void)testSendClusterLevelControlReadAttributeClusterRevisionWithCompletionHandler { dispatch_queue_t queue = dispatch_get_main_queue(); diff --git a/src/include/platform/OTARequestorDriver.h b/src/include/platform/OTARequestorDriver.h index 5bfb7be664e645..5a2e2f152c0ead 100644 --- a/src/include/platform/OTARequestorDriver.h +++ b/src/include/platform/OTARequestorDriver.h @@ -40,6 +40,15 @@ struct UpdateDescription ByteSpan metadataForRequestor; }; +enum class UpdateFailureState +{ + kQuerying, + kDownloading, + kApplying, + kNotifying, + kAwaitingNextAction, +}; + enum class UpdateNotFoundReason { Busy, @@ -61,7 +70,7 @@ class OTARequestorDriver virtual uint16_t GetMaxDownloadBlockSize() { return 1024; } /// Called when an error occurs at any OTA requestor operation - virtual void HandleError(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, CHIP_ERROR error) = 0; + virtual void HandleError(UpdateFailureState state, CHIP_ERROR error) = 0; /// Called when the latest query found a software update virtual void UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) = 0; diff --git a/src/include/platform/OTARequestorInterface.h b/src/include/platform/OTARequestorInterface.h index b629c67fc85916..7825eb1fde35c8 100644 --- a/src/include/platform/OTARequestorInterface.h +++ b/src/include/platform/OTARequestorInterface.h @@ -64,6 +64,9 @@ class OTARequestorInterface // Send ApplyImage command virtual void ApplyUpdate() = 0; + // Send NotifyUpdateApplied command + virtual void NotifyUpdateApplied() = 0; + // Manually set OTA Provider parameters virtual void TestModeSetProviderParameters(NodeId nodeId, FabricIndex fabIndex, EndpointId endpointId) = 0; }; diff --git a/src/lib/shell/commands/Ota.cpp b/src/lib/shell/commands/Ota.cpp index 3f2067f44e860c..3d0d7ba64338c5 100644 --- a/src/lib/shell/commands/Ota.cpp +++ b/src/lib/shell/commands/Ota.cpp @@ -59,6 +59,20 @@ CHIP_ERROR ApplyImageHandler(int argc, char ** argv) return CHIP_NO_ERROR; } +CHIP_ERROR NotifyImageHandler(int argc, char ** argv) +{ + VerifyOrReturnError(GetRequestorInstance() != nullptr, CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(argc == 3, CHIP_ERROR_INVALID_ARGUMENT); + + const FabricIndex fabricIndex = static_cast(strtoul(argv[0], nullptr, 10)); + const NodeId providerNodeId = static_cast(strtoull(argv[1], nullptr, 10)); + const EndpointId providerEndpointId = static_cast(strtoul(argv[2], nullptr, 10)); + + GetRequestorInstance()->TestModeSetProviderParameters(providerNodeId, fabricIndex, providerEndpointId); + PlatformMgr().ScheduleWork([](intptr_t) { GetRequestorInstance()->NotifyUpdateApplied(); }); + return CHIP_NO_ERROR; +} + CHIP_ERROR OtaHandler(int argc, char ** argv) { if (argc == 0) @@ -85,6 +99,8 @@ void RegisterOtaCommands() { &QueryImageHandler, "query", "Query for a new image. Usage: ota query " }, { &ApplyImageHandler, "apply", "Apply the current update. Usage ota apply " }, + { &NotifyImageHandler, "notify", + "Notify the new image has been applied. Usage: ota notify " }, }; sSubShell.RegisterCommands(subCommands, ArraySize(subCommands)); diff --git a/src/platform/EFR32/OTAImageProcessorImpl.cpp b/src/platform/EFR32/OTAImageProcessorImpl.cpp index 165ccb8b8f3390..d3f2190b588e6d 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.cpp +++ b/src/platform/EFR32/OTAImageProcessorImpl.cpp @@ -30,7 +30,7 @@ namespace chip { // Define static memebers uint8_t OTAImageProcessorImpl::mSlotId; -uint16_t OTAImageProcessorImpl::mWriteOffset; +uint32_t OTAImageProcessorImpl::mWriteOffset; CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { diff --git a/src/platform/EFR32/OTAImageProcessorImpl.h b/src/platform/EFR32/OTAImageProcessorImpl.h index 6f60ea0001d8ec..c2318fc6c61525 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.h +++ b/src/platform/EFR32/OTAImageProcessorImpl.h @@ -55,7 +55,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface */ CHIP_ERROR ReleaseBlock(); - static uint16_t mWriteOffset; // End of last written block + static uint32_t mWriteOffset; // End of last written block static uint8_t mSlotId; // Bootloader storage slot MutableByteSpan mBlock; OTADownloader * mDownloader; diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 82396710972711..eb99c5597e8e8d 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -245,7 +245,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBssId(ByteSpan & BssId) { wifi_ap_record_t ap_info; esp_err_t err; - uint8_t macAddress[kMaxHardwareAddrSize]; + static uint8_t macAddress[kMaxHardwareAddrSize]; err = esp_wifi_sta_get_ap_info(&ap_info); if (err == ESP_OK) @@ -314,44 +314,37 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiRssi(int8_t & rssi) CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiBeaconLostCount(uint32_t & beaconLostCount) { - beaconLostCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiCurrentMaxRate(uint64_t & currentMaxRate) { - currentMaxRate = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastRxCount(uint32_t & packetMulticastRxCount) { - packetMulticastRxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketMulticastTxCount(uint32_t & packetMulticastTxCount) { - packetMulticastTxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastRxCount(uint32_t & packetUnicastRxCount) { - packetUnicastRxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiPacketUnicastTxCount(uint32_t & packetUnicastTxCount) { - packetUnicastTxCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::GetWiFiOverrunCount(uint64_t & overrunCount) { - overrunCount = 0; - return CHIP_NO_ERROR; + return CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE; } CHIP_ERROR DiagnosticDataProviderImpl::ResetWiFiNetworkDiagnosticsCounts() diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.h b/src/platform/ESP32/DiagnosticDataProviderImpl.h index 158cf96eae8be7..46257d5ce1a0d6 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.h +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.h @@ -30,7 +30,7 @@ namespace chip { namespace DeviceLayer { /** - * Concrete implementation of the PlatformManager singleton object for Linux platforms. + * Concrete implementation of the PlatformManager singleton object for ESP32 platforms. */ class DiagnosticDataProviderImpl : public DiagnosticDataProvider { diff --git a/src/platform/GenericOTARequestorDriver.cpp b/src/platform/GenericOTARequestorDriver.cpp index 5fcacdebe4b184..461696a0168299 100644 --- a/src/platform/GenericOTARequestorDriver.cpp +++ b/src/platform/GenericOTARequestorDriver.cpp @@ -44,7 +44,7 @@ uint16_t GenericOTARequestorDriver::GetMaxDownloadBlockSize() return 1024; } -void GenericOTARequestorDriver::HandleError(OTAUpdateStateEnum state, CHIP_ERROR error) +void GenericOTARequestorDriver::HandleError(UpdateFailureState state, CHIP_ERROR error) { // TODO: Schedule the next QueryImage } @@ -52,7 +52,7 @@ void GenericOTARequestorDriver::HandleError(OTAUpdateStateEnum state, CHIP_ERROR void GenericOTARequestorDriver::UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) { VerifyOrDie(mRequestor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnQuery, delay, + ScheduleDelayedAction(UpdateFailureState::kDownloading, delay, [](System::Layer *, void * context) { ToDriver(context)->mRequestor->DownloadUpdate(); }); } @@ -70,14 +70,14 @@ void GenericOTARequestorDriver::UpdateDownloaded() void GenericOTARequestorDriver::UpdateConfirmed(System::Clock::Seconds32 delay) { VerifyOrDie(mImageProcessor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnApply, delay, + ScheduleDelayedAction(UpdateFailureState::kApplying, delay, [](System::Layer *, void * context) { ToDriver(context)->mImageProcessor->Apply(); }); } void GenericOTARequestorDriver::UpdateSuspended(System::Clock::Seconds32 delay) { VerifyOrDie(mRequestor != nullptr); - ScheduleDelayedAction(OTAUpdateStateEnum::kDelayedOnApply, delay, + ScheduleDelayedAction(UpdateFailureState::kAwaitingNextAction, delay, [](System::Layer *, void * context) { ToDriver(context)->mRequestor->ApplyUpdate(); }); } @@ -87,7 +87,7 @@ void GenericOTARequestorDriver::UpdateDiscontinued() mImageProcessor->Abort(); } -void GenericOTARequestorDriver::ScheduleDelayedAction(OTAUpdateStateEnum state, System::Clock::Seconds32 delay, +void GenericOTARequestorDriver::ScheduleDelayedAction(UpdateFailureState state, System::Clock::Seconds32 delay, System::TimerCompleteCallback action) { CHIP_ERROR error = SystemLayer().StartTimer(std::chrono::duration_cast(delay), action, this); diff --git a/src/platform/GenericOTARequestorDriver.h b/src/platform/GenericOTARequestorDriver.h index a6533d2fe93cbe..7e9ba69abed85c 100644 --- a/src/platform/GenericOTARequestorDriver.h +++ b/src/platform/GenericOTARequestorDriver.h @@ -45,7 +45,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver bool CanConsent() override; uint16_t GetMaxDownloadBlockSize() override; - void HandleError(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, CHIP_ERROR error) override; + void HandleError(UpdateFailureState state, CHIP_ERROR error) override; void UpdateAvailable(const UpdateDescription & update, System::Clock::Seconds32 delay) override; void UpdateNotFound(UpdateNotFoundReason reason, System::Clock::Seconds32 delay) override; void UpdateDownloaded() override; @@ -54,8 +54,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver void UpdateDiscontinued() override; private: - void ScheduleDelayedAction(app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum state, System::Clock::Seconds32 delay, - System::TimerCompleteCallback action); + void ScheduleDelayedAction(UpdateFailureState state, System::Clock::Seconds32 delay, System::TimerCompleteCallback action); OTARequestorInterface * mRequestor = nullptr; OTAImageProcessorInterface * mImageProcessor = nullptr; diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 14a061484b680e..5c2fa16486ff8c 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -17,6 +17,7 @@ */ #include +#include #include "OTAImageProcessorImpl.h" @@ -42,6 +43,7 @@ CHIP_ERROR OTAImageProcessorImpl::Finalize() CHIP_ERROR OTAImageProcessorImpl::Apply() { + DeviceLayer::PlatformMgr().ScheduleWork(HandleApply, reinterpret_cast(this)); return CHIP_NO_ERROR; } @@ -121,6 +123,15 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mParams.imageFile.data()); } +void OTAImageProcessorImpl::HandleApply(intptr_t context) +{ + OTARequestorInterface * requestor = chip::GetRequestorInstance(); + if (requestor != nullptr) + { + requestor->NotifyUpdateApplied(); + } +} + void OTAImageProcessorImpl::HandleAbort(intptr_t context) { auto * imageProcessor = reinterpret_cast(context); diff --git a/src/platform/Linux/OTAImageProcessorImpl.h b/src/platform/Linux/OTAImageProcessorImpl.h index 77a13ca36e890c..c78735485a9a3b 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.h +++ b/src/platform/Linux/OTAImageProcessorImpl.h @@ -42,6 +42,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface //////////// Actual handlers for the OTAImageProcessorInterface /////////////// static void HandlePrepareDownload(intptr_t context); static void HandleFinalize(intptr_t context); + static void HandleApply(intptr_t context); static void HandleAbort(intptr_t context); static void HandleProcessBlock(intptr_t context); diff --git a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp index 603418cd252ea7..171751d58947e7 100644 --- a/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp +++ b/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread_LwIP.cpp @@ -261,8 +261,6 @@ void GenericThreadStackManagerImpl_OpenThread_LwIP::UpdateThreadInter it->Release(); } } - - err = transportMgr->MulticastGroupJoinLeave(Transport::PeerAddress::Multicast(0, 1234), true); } #endif // CHIP_SYSTEM_CONFIG_USE_OPEN_THREAD_UDP } diff --git a/src/platform/P6/BLEManagerImpl.cpp b/src/platform/P6/BLEManagerImpl.cpp index b1211857d88d81..7393472e4ef9f0 100644 --- a/src/platform/P6/BLEManagerImpl.cpp +++ b/src/platform/P6/BLEManagerImpl.cpp @@ -48,6 +48,8 @@ extern "C" { using namespace ::chip; using namespace ::chip::Ble; +#define BLE_SERVICE_DATA_SIZE 10 + namespace chip { namespace DeviceLayer { namespace Internal { @@ -787,9 +789,11 @@ void BLEManagerImpl::SetAdvertisingData(void) ChipBLEDeviceIdentificationInfo mDeviceIdInfo; uint16_t deviceDiscriminator = 0; uint8_t localDeviceNameLen; - uint8_t service_data[9]; + uint8_t service_data[BLE_SERVICE_DATA_SIZE]; uint8_t * p = service_data; + static_assert(BLE_SERVICE_DATA_SIZE == sizeof(ChipBLEDeviceIdentificationInfo) + 2, "BLE Service Data Size is incorrect"); + // Initialize the CHIP BLE Device Identification Information block that will be sent as payload // within the BLE service advertisement data. err = ConfigurationMgr().GetBLEDeviceIdentificationInfo(mDeviceIdInfo); @@ -838,6 +842,7 @@ void BLEManagerImpl::SetAdvertisingData(void) UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceVendorId[1]); UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceProductId[0]); UINT8_TO_STREAM(p, mDeviceIdInfo.DeviceProductId[1]); + UINT8_TO_STREAM(p, 0); // Additional Data Flag adv_elem[num_elem].advert_type = BTM_BLE_ADVERT_TYPE_NAME_COMPLETE; adv_elem[num_elem].len = localDeviceNameLen; diff --git a/src/platform/P6/ConnectivityManagerImpl.cpp b/src/platform/P6/ConnectivityManagerImpl.cpp index aed4bb9d679a49..6819e71a76f685 100644 --- a/src/platform/P6/ConnectivityManagerImpl.cpp +++ b/src/platform/P6/ConnectivityManagerImpl.cpp @@ -55,6 +55,11 @@ ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; ConnectivityManager::WiFiStationMode ConnectivityManagerImpl::_GetWiFiStationMode(void) { + uint32_t curWiFiMode; + mWiFiStationMode = (Internal::P6Utils::wifi_get_mode(curWiFiMode) == CHIP_NO_ERROR && + (curWiFiMode == WIFI_MODE_APSTA || curWiFiMode == WIFI_MODE_STA)) + ? kWiFiStationMode_Enabled + : kWiFiStationMode_Disabled; return mWiFiStationMode; } @@ -181,7 +186,6 @@ CHIP_ERROR ConnectivityManagerImpl::_GetAndLogWiFiStatsCounters(void) CHIP_ERROR ConnectivityManagerImpl::_Init() { CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; mLastStationConnectFailTime = System::Clock::kZero; mLastAPDemandTime = System::Clock::kZero; mWiFiStationMode = kWiFiStationMode_Disabled; @@ -208,13 +212,8 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() memcpy(wifiConfig.sta.password, CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD, min(strlen(CHIP_DEVICE_CONFIG_DEFAULT_STA_PASSWORD), sizeof(wifiConfig.sta.password))); wifiConfig.sta.security = CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY; - result = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed: %d", (int) result); - SuccessOrExit(CHIP_ERROR_INTERNAL); - } - err = CHIP_NO_ERROR; + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); + SuccessOrExit(err); } // Force AP mode off for now. err = Internal::P6Utils::SetAPMode(false); @@ -323,7 +322,6 @@ CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP() { CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t wifiConfig; - cy_rslt_t result = CY_RSLT_SUCCESS; memset(&wifiConfig.ap, 0, sizeof(wifi_config_ap_t)); snprintf((char *) wifiConfig.ap.ssid, sizeof(wifiConfig.ap.ssid), "%s-%04X-%04X", CHIP_DEVICE_CONFIG_WIFI_AP_SSID_PREFIX, @@ -336,13 +334,8 @@ CHIP_ERROR ConnectivityManagerImpl::ConfigureWiFiAP() wifiConfig.ap.ip_settings.gateway = ap_mode_ip_settings.gateway; ChipLogProgress(DeviceLayer, "Configuring WiFi AP: SSID %s, channel %u", wifiConfig.ap.ssid, wifiConfig.ap.channel); - result = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_AP, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config(WIFI_IF_AP) failed: %d", (int) result); - err = CHIP_ERROR_INTERNAL; - SuccessOrExit(err); - } + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_AP, &wifiConfig); + SuccessOrExit(err); err = Internal::P6Utils::p6_start_ap(); if (err != CHIP_NO_ERROR) @@ -478,6 +471,9 @@ void ConnectivityManagerImpl::DriveStationState() CHIP_ERROR err = CHIP_NO_ERROR; bool stationConnected; + // Refresh the current station mode by reading the configuration from storage. + GetWiFiStationMode(); + // If the station interface is NOT under application control... if (mWiFiStationMode != kWiFiStationMode_ApplicationControlled) { @@ -609,6 +605,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) event.Type = DeviceEventType::kInterfaceIpAddressChanged; event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV4_Assigned; PlatformMgr().PostEventOrDie(&event); + ChipLogProgress(DeviceLayer, "IPv4 Address Assigned : %s", ip4addr_ntoa(netif_ip4_addr(net_interface))); } // Search among the IPv6 addresses assigned to the interface for a Global Unicast // address (2000::/3) that is in the valid state. If such an address is found... @@ -622,6 +619,7 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState(void) event.Type = DeviceEventType::kInterfaceIpAddressChanged; event.InterfaceIpAddressChanged.Type = InterfaceIpChangeType::kIpV6_Assigned; PlatformMgr().PostEventOrDie(&event); + ChipLogProgress(DeviceLayer, "IPv6 Address Assigned : %s", ip6addr_ntoa(netif_ip6_addr(net_interface, i))); } } } diff --git a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp b/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp index 23c1d01f1a5f08..08f8593072584d 100644 --- a/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp +++ b/src/platform/P6/DeviceNetworkProvisioningDelegateImpl.cpp @@ -27,7 +27,6 @@ namespace DeviceLayer { CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const char * ssid, const char * passwd) { CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t rslt = CY_RSLT_SUCCESS; ChipLogProgress(NetworkProvisioning, "P6NetworkProvisioningDelegate: SSID: %s", ssid); err = ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Disabled); @@ -36,14 +35,10 @@ CHIP_ERROR DeviceNetworkProvisioningDelegateImpl::_ProvisionWiFiNetwork(const ch // Set the wifi configuration wifi_config_t wifi_config; Internal::P6Utils::populate_wifi_config_t(&wifi_config, WIFI_IF_STA, (const cy_wcm_ssid_t *) ssid, - (const cy_wcm_passphrase_t *) passwd, CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY); + (const cy_wcm_passphrase_t *) passwd, + (strlen(passwd)) ? CHIP_DEVICE_CONFIG_DEFAULT_STA_SECURITY : CY_WCM_SECURITY_OPEN); - rslt = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifi_config); - if (rslt != CY_RSLT_SUCCESS) - { - err = CHIP_ERROR_INTERNAL; - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed"); - } + err = Internal::P6Utils::p6_wifi_set_config(WIFI_IF_STA, &wifi_config); SuccessOrExit(err); err = ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); diff --git a/src/platform/P6/P6Config.cpp b/src/platform/P6/P6Config.cpp index d2ad8c7c4e6416..6cfe10aa2f7ebd 100644 --- a/src/platform/P6/P6Config.cpp +++ b/src/platform/P6/P6Config.cpp @@ -73,6 +73,10 @@ const P6Config::Key P6Config::kConfigKey_ActiveLocale = { kConfigNamespace const P6Config::Key P6Config::kConfigKey_Breadcrumb = { kConfigNamespace_ChipConfig, "breadcrumb" }; const P6Config::Key P6Config::kConfigKey_HourFormat = { kConfigNamespace_ChipConfig, "hour-format" }; const P6Config::Key P6Config::kConfigKey_CalendarType = { kConfigNamespace_ChipConfig, "calendar-type" }; +const P6Config::Key P6Config::kConfigKey_WiFiSSID = { kConfigNamespace_ChipConfig, "wifi-ssid" }; +const P6Config::Key P6Config::kConfigKey_WiFiPassword = { kConfigNamespace_ChipConfig, "wifi-password" }; +const P6Config::Key P6Config::kConfigKey_WiFiSecurity = { kConfigNamespace_ChipConfig, "wifi-security" }; +const P6Config::Key P6Config::kConfigKey_WiFiMode = { kConfigNamespace_ChipConfig, "wifimode" }; // Keys stored in the Chip-counters namespace const P6Config::Key P6Config::kCounterKey_RebootCount = { kConfigNamespace_ChipCounters, "reboot-count" }; @@ -212,9 +216,10 @@ bool P6Config::ConfigValueExists(Key key) // Clear out keys in config namespace CHIP_ERROR P6Config::FactoryResetConfig(void) { - const Key * config_keys[] = { &kConfigKey_FabricId, &kConfigKey_ServiceConfig, &kConfigKey_PairedAccountId, - &kConfigKey_ServiceId, &kConfigKey_GroupKeyIndex, &kConfigKey_LastUsedEpochKeyId, - &kConfigKey_FailSafeArmed, &kConfigKey_WiFiStationSecType }; + const Key * config_keys[] = { &kConfigKey_FabricId, &kConfigKey_ServiceConfig, &kConfigKey_PairedAccountId, + &kConfigKey_ServiceId, &kConfigKey_GroupKeyIndex, &kConfigKey_LastUsedEpochKeyId, + &kConfigKey_FailSafeArmed, &kConfigKey_WiFiStationSecType, &kConfigKey_WiFiSSID, + &kConfigKey_WiFiPassword, &kConfigKey_WiFiSecurity, &kConfigKey_WiFiMode }; for (uint32_t i = 0; i < (sizeof(config_keys) / sizeof(config_keys[0])); i++) { diff --git a/src/platform/P6/P6Config.h b/src/platform/P6/P6Config.h index 3b9cffcfe96731..b59b57f07dd951 100644 --- a/src/platform/P6/P6Config.h +++ b/src/platform/P6/P6Config.h @@ -78,6 +78,10 @@ class P6Config static const Key kConfigKey_Breadcrumb; static const Key kConfigKey_HourFormat; static const Key kConfigKey_CalendarType; + static const Key kConfigKey_WiFiSSID; + static const Key kConfigKey_WiFiPassword; + static const Key kConfigKey_WiFiSecurity; + static const Key kConfigKey_WiFiMode; // CHIP Counter keys static const Key kCounterKey_RebootCount; diff --git a/src/platform/P6/P6Utils.cpp b/src/platform/P6/P6Utils.cpp index 3e08a3e6becddc..4c38e6d89ac255 100644 --- a/src/platform/P6/P6Utils.cpp +++ b/src/platform/P6/P6Utils.cpp @@ -43,6 +43,7 @@ #include "lwip/sys.h" #include "lwip/timeouts.h" #include +#include using namespace ::chip::DeviceLayer::Internal; using chip::DeviceLayer::Internal::DeviceNetworkInfo; @@ -104,8 +105,7 @@ CHIP_ERROR P6Utils::IsAPEnabled(bool & apEnabled) bool P6Utils::IsStationProvisioned(void) { wifi_config_t stationConfig; - return (p6_wifi_get_config(WIFI_IF_STA, &stationConfig) == CY_RSLT_SUCCESS && - strlen((const char *) stationConfig.sta.ssid) != 0); + return (p6_wifi_get_config(WIFI_IF_STA, &stationConfig) == CHIP_NO_ERROR && strlen((const char *) stationConfig.sta.ssid) != 0); } CHIP_ERROR P6Utils::IsStationConnected(bool & connected) @@ -153,6 +153,7 @@ CHIP_ERROR P6Utils::EnableStationMode(void) { WiFiMode = WIFI_MODE_STA; } + wifi_set_mode(WiFiMode); return err; } @@ -202,12 +203,64 @@ const char * P6Utils::WiFiModeToStr(wifi_mode_t wifiMode) return "(unknown)"; } } -cy_rslt_t P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf) + +CHIP_ERROR P6Utils::GetWiFiSSID(char * buf, size_t bufSize) +{ + size_t num = 0; + return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf, bufSize, num); +} + +CHIP_ERROR P6Utils::StoreWiFiSSID(char * buf) { + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiSSID, buf); +} + +CHIP_ERROR P6Utils::GetWiFiPassword(char * buf, size_t bufSize) +{ + size_t num = 0; + return P6Config::ReadConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf, bufSize, num); +} + +CHIP_ERROR P6Utils::StoreWiFiPassword(char * buf) +{ + return P6Config::WriteConfigValueStr(P6Config::kConfigKey_WiFiPassword, buf); +} + +CHIP_ERROR P6Utils::GetWiFiSecurityCode(uint32_t & security) +{ + return P6Config::ReadConfigValue(P6Config::kConfigKey_WiFiSecurity, security); +} + +CHIP_ERROR P6Utils::StoreWiFiSecurityCode(uint32_t security) +{ + return P6Config::WriteConfigValue(P6Config::kConfigKey_WiFiSecurity, security); +} + +CHIP_ERROR P6Utils::wifi_get_mode(uint32_t & mode) +{ + return P6Config::ReadConfigValue(P6Config::kConfigKey_WiFiMode, mode); +} + +CHIP_ERROR P6Utils::wifi_set_mode(uint32_t mode) +{ + return P6Config::WriteConfigValue(P6Config::kConfigKey_WiFiMode, mode); +} + +CHIP_ERROR P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf) +{ + CHIP_ERROR err = CHIP_NO_ERROR; if (interface == WIFI_IF_STA) { + /* Store Wi-Fi Configurations in Storage */ + err = StoreWiFiSSID((char *) conf->sta.ssid); + SuccessOrExit(err); + + err = StoreWiFiPassword((char *) conf->sta.password); + SuccessOrExit(err); + + err = StoreWiFiSecurityCode(conf->sta.security); + SuccessOrExit(err); populate_wifi_config_t(&wifi_conf, interface, &conf->sta.ssid, &conf->sta.password, conf->sta.security); - ChipLogProgress(DeviceLayer, "STA %s : [%s] [%s] \r\n", __func__, wifi_conf.sta.ssid, wifi_conf.sta.password); } else { @@ -216,17 +269,37 @@ cy_rslt_t P6Utils::p6_wifi_set_config(wifi_interface_t interface, wifi_config_t wifi_conf.ap.ip_settings.ip_address = conf->ap.ip_settings.ip_address; wifi_conf.ap.ip_settings.netmask = conf->ap.ip_settings.netmask; wifi_conf.ap.ip_settings.gateway = conf->ap.ip_settings.gateway; - ChipLogProgress(DeviceLayer, "AP %s : [%s] [%s] channel %d\r\n", __func__, wifi_conf.ap.ssid, wifi_conf.ap.password, - wifi_conf.ap.channel); } - return CY_RSLT_SUCCESS; + +exit: + return err; } -cy_rslt_t P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf) +CHIP_ERROR P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf) { + uint32 code = 0; + CHIP_ERROR err = CHIP_NO_ERROR; if (interface == WIFI_IF_STA) { - populate_wifi_config_t(conf, interface, &wifi_conf.sta.ssid, &wifi_conf.sta.password, wifi_conf.sta.security); + if (P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiSSID) && + P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiPassword) && + P6Config::ConfigValueExists(P6Config::kConfigKey_WiFiSecurity)) + { + /* Retrieve Wi-Fi Configurations from Storage */ + err = GetWiFiSSID((char *) conf->sta.ssid, sizeof(conf->sta.ssid)); + SuccessOrExit(err); + + err = GetWiFiPassword((char *) conf->sta.password, sizeof(conf->sta.password)); + SuccessOrExit(err); + + err = GetWiFiSecurityCode(code); + SuccessOrExit(err); + conf->sta.security = static_cast(code); + } + else + { + populate_wifi_config_t(conf, interface, &wifi_conf.sta.ssid, &wifi_conf.sta.password, wifi_conf.sta.security); + } } else { @@ -235,20 +308,19 @@ cy_rslt_t P6Utils::p6_wifi_get_config(wifi_interface_t interface, wifi_config_t conf->ap.ip_settings.ip_address = wifi_conf.ap.ip_settings.ip_address; conf->ap.ip_settings.netmask = wifi_conf.ap.ip_settings.netmask; conf->ap.ip_settings.gateway = wifi_conf.ap.ip_settings.gateway; - ChipLogProgress(DeviceLayer, "AP %s [%s] [%s] channel %d\r\n", __func__, wifi_conf.ap.ssid, wifi_conf.ap.password, - wifi_conf.ap.channel); } - return CY_RSLT_SUCCESS; + +exit: + return err; } CHIP_ERROR P6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInfo, bool includeCredentials) { - CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t stationConfig; - result = p6_wifi_get_config(WIFI_IF_STA, &stationConfig); - VerifyOrExit(result == CY_RSLT_SUCCESS, err = CHIP_ERROR_INTERNAL); + err = p6_wifi_get_config(WIFI_IF_STA, &stationConfig); + SuccessOrExit(err); ChipLogProgress(DeviceLayer, "GetWiFiStationProvision"); VerifyOrExit(strlen((const char *) stationConfig.sta.ssid) != 0, err = CHIP_ERROR_INCORRECT_STATE); @@ -274,8 +346,7 @@ CHIP_ERROR P6Utils::GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInf CHIP_ERROR P6Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo & netInfo) { - CHIP_ERROR err = CHIP_NO_ERROR; - cy_rslt_t result = CY_RSLT_SUCCESS; + CHIP_ERROR err = CHIP_NO_ERROR; wifi_config_t wifiConfig; ChipLogProgress(DeviceLayer, "SetWiFiStationProvision"); char wifiSSID[kMaxWiFiSSIDLength + 1]; @@ -301,13 +372,7 @@ CHIP_ERROR P6Utils::SetWiFiStationProvision(const Internal::DeviceNetworkInfo & populate_wifi_config_t(&wifiConfig, WIFI_IF_STA, (cy_wcm_ssid_t *) wifiSSID, (cy_wcm_passphrase_t *) netInfo.WiFiKey); // Configure the P6 WiFi interface. - result = p6_wifi_set_config(WIFI_IF_STA, &wifiConfig); - if (result != CY_RSLT_SUCCESS) - { - ChipLogError(DeviceLayer, "p6_wifi_set_config() failed "); - err = CHIP_ERROR_INTERNAL; - } - SuccessOrExit(err); + ReturnLogErrorOnFailure(p6_wifi_set_config(WIFI_IF_STA, &wifiConfig)); ChipLogProgress(DeviceLayer, "WiFi station provision set (SSID: %s)", netInfo.WiFiSSID); @@ -322,7 +387,7 @@ CHIP_ERROR P6Utils::ClearWiFiStationProvision(void) ChipLogProgress(DeviceLayer, "ClearWiFiStationProvision"); // Clear the P6 WiFi station configuration. memset(&stationConfig.sta, 0, sizeof(stationConfig.sta)); - p6_wifi_set_config(WIFI_IF_STA, &stationConfig); + ReturnLogErrorOnFailure(p6_wifi_set_config(WIFI_IF_STA, &stationConfig)); return err; } @@ -355,8 +420,7 @@ CHIP_ERROR P6Utils::p6_wifi_connect(void) memcpy(&connect_param.ap_credentials.password, &stationConfig.sta.password, strlen((char *) stationConfig.sta.password)); connect_param.ap_credentials.security = stationConfig.sta.security; - ChipLogProgress(DeviceLayer, "p6_wifi_connect ssid %s pass %s sec %d \r\n", connect_param.ap_credentials.SSID, - connect_param.ap_credentials.password, connect_param.ap_credentials.security); + ChipLogProgress(DeviceLayer, "Connecting to AP : [%s] \r\n", connect_param.ap_credentials.SSID); result = cy_wcm_connect_ap(&connect_param, &ip_addr); if (result != CY_RSLT_SUCCESS) @@ -391,7 +455,7 @@ CHIP_ERROR P6Utils::p6_start_ap(void) memcpy(&ap_conf.ip_settings, &stationConfig.ap.ip_settings, sizeof(stationConfig.ap.ip_settings)); ap_conf.ap_credentials.security = stationConfig.ap.security; ap_conf.channel = stationConfig.ap.channel; - ChipLogProgress(DeviceLayer, "p6_start_ap %s %s \r\n", ap_conf.ap_credentials.SSID, ap_conf.ap_credentials.password); + ChipLogProgress(DeviceLayer, "p6_start_ap %s \r\n", ap_conf.ap_credentials.SSID); /* Start AP */ result = cy_wcm_start_ap(&ap_conf); diff --git a/src/platform/P6/P6Utils.h b/src/platform/P6/P6Utils.h index 62afdabdc411ec..411d498e211ea5 100644 --- a/src/platform/P6/P6Utils.h +++ b/src/platform/P6/P6Utils.h @@ -204,8 +204,8 @@ class P6Utils static CHIP_ERROR GetWiFiStationProvision(Internal::DeviceNetworkInfo & netInfo, bool includeCredentials); static CHIP_ERROR SetWiFiStationProvision(const Internal::DeviceNetworkInfo & netInfo); static CHIP_ERROR ClearWiFiStationProvision(void); - static cy_rslt_t p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf); - static cy_rslt_t p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf); + static CHIP_ERROR p6_wifi_get_config(wifi_interface_t interface, wifi_config_t * conf); + static CHIP_ERROR p6_wifi_set_config(wifi_interface_t interface, wifi_config_t * conf); static CHIP_ERROR p6_wifi_disconnect(void); static CHIP_ERROR p6_wifi_connect(void); static CHIP_ERROR p6_start_ap(void); @@ -218,6 +218,14 @@ class P6Utils static CHIP_ERROR ping_init(void); static void unpack_xtlv_buf(const uint8_t * tlv_buf, uint16_t buflen, wl_cnt_ver_30_t * cnt, wl_cnt_ge40mcst_v1_t * cnt_ge40); static void heap_usage(heap_info_t * heap); + static CHIP_ERROR GetWiFiSSID(char * buf, size_t bufSize); + static CHIP_ERROR StoreWiFiSSID(char * buf); + static CHIP_ERROR GetWiFiPassword(char * buf, size_t bufSize); + static CHIP_ERROR StoreWiFiPassword(char * buf); + static CHIP_ERROR GetWiFiSecurityCode(uint32_t & security); + static CHIP_ERROR StoreWiFiSecurityCode(uint32_t security); + static CHIP_ERROR wifi_get_mode(uint32_t & security); + static CHIP_ERROR wifi_set_mode(uint32_t security); }; } // namespace Internal diff --git a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp index 669aad0bc0eb0c..c987dbd3fb4752 100644 --- a/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/all-clusters-app/zap-generated/callback-stub.cpp @@ -547,14 +547,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -577,14 +575,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h index 07e7acdbbbcbf5..63edca3f85d2ce 100644 --- a/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/endpoint_config.h @@ -298,39 +298,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ /* Endpoint: 1, Cluster: Power Source (server), big-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -348,55 +353,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), big-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), big-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x00, 0x00, 0x00, 0x60, \ \ /* Endpoint: 1, Cluster: Window Covering (server), big-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), big-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), big-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0B, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), big-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), big-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -414,7 +419,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), big-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -432,24 +437,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), big-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), big-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -467,7 +472,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -483,12 +488,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), big-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -506,7 +511,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), big-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -524,67 +529,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), big-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), big-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -639,65 +644,65 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), big-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), big-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -976,39 +981,44 @@ /* 886 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 890 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 1, Cluster: Power Source (server), little-endian */ \ \ - /* 890 - BatteryVoltage, */ \ + /* 894 - BatteryVoltage, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 894 - BatteryTimeRemaining, */ \ + /* 898 - BatteryTimeRemaining, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 898 - ActiveBatteryFaults, */ \ + /* 902 - ActiveBatteryFaults, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 906 - FeatureMap, */ \ + /* 910 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 910 - Networks, */ \ + /* 914 - Networks, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 922 - LastConnectErrorValue, */ \ + /* 926 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 926 - FeatureMap, */ \ + /* 930 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ \ - /* 930 - FeatureMap, */ \ + /* 934 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 934 - label list, */ \ + /* 938 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1026,55 +1036,55 @@ \ /* Endpoint: 1, Cluster: Mode Select (server), little-endian */ \ \ - /* 1188 - Description, */ \ + /* 1192 - Description, */ \ 6, 'C', 'o', 'f', 'f', 'e', 'e', \ \ /* Endpoint: 1, Cluster: Door Lock (server), little-endian */ \ \ - /* 1195 - DoorOpenEvents, */ \ + /* 1199 - DoorOpenEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1199 - DoorClosedEvents, */ \ + /* 1203 - DoorClosedEvents, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1203 - Language, */ \ + /* 1207 - Language, */ \ 2, 'e', 'n', \ \ - /* 1206 - AutoRelockTime, */ \ + /* 1210 - AutoRelockTime, */ \ 0x60, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Window Covering (server), little-endian */ \ \ - /* 1210 - FeatureMap, */ \ + /* 1214 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (server), little-endian */ \ \ - /* 1214 - LifetimeRunningHours, */ \ + /* 1218 - LifetimeRunningHours, */ \ 0x00, 0x00, 0x00, \ \ - /* 1217 - Power, */ \ + /* 1221 - Power, */ \ 0x00, 0x00, 0x00, \ \ - /* 1220 - LifetimeEnergyConsumed, */ \ + /* 1224 - LifetimeEnergyConsumed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1224 - FeatureMap, */ \ + /* 1228 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thermostat (server), little-endian */ \ \ - /* 1228 - FeatureMap, */ \ + /* 1232 - FeatureMap, */ \ 0x0B, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: IAS Zone (server), little-endian */ \ \ - /* 1232 - IAS CIE address, */ \ + /* 1236 - IAS CIE address, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Channel (server), little-endian */ \ \ - /* 1240 - channel list, */ \ + /* 1244 - channel list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1092,7 +1102,7 @@ \ /* Endpoint: 1, Cluster: Target Navigator (server), little-endian */ \ \ - /* 1494 - target navigator list, */ \ + /* 1498 - target navigator list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1110,24 +1120,24 @@ \ /* Endpoint: 1, Cluster: Media Playback (server), little-endian */ \ \ - /* 1748 - start time, */ \ + /* 1752 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1756 - duration, */ \ + /* 1760 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1764 - playback speed, */ \ + /* 1768 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 1768 - seek range end, */ \ + /* 1772 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 1776 - seek range start, */ \ + /* 1780 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Media Input (server), little-endian */ \ \ - /* 1784 - media input list, */ \ + /* 1788 - media input list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1145,7 +1155,7 @@ \ /* Endpoint: 1, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2038 - accept header list, */ \ + /* 2042 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1161,12 +1171,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2292 - supported streaming protocols, */ \ + /* 2296 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Audio Output (server), little-endian */ \ \ - /* 2296 - audio output list, */ \ + /* 2300 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1184,7 +1194,7 @@ \ /* Endpoint: 1, Cluster: Application Launcher (server), little-endian */ \ \ - /* 2550 - application launcher list, */ \ + /* 2554 - application launcher list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1202,67 +1212,67 @@ \ /* Endpoint: 1, Cluster: Application Basic (server), little-endian */ \ \ - /* 2804 - allowed vendor list, */ \ + /* 2808 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Test Cluster (server), little-endian */ \ \ - /* 2836 - bitmap32, */ \ + /* 2840 - bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2840 - bitmap64, */ \ + /* 2844 - bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2848 - int24u, */ \ + /* 2852 - int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 2851 - int32u, */ \ + /* 2855 - int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2855 - int40u, */ \ + /* 2859 - int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2860 - int48u, */ \ + /* 2864 - int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2866 - int56u, */ \ + /* 2870 - int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2873 - int64u, */ \ + /* 2877 - int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2881 - int24s, */ \ + /* 2885 - int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 2884 - int32s, */ \ + /* 2888 - int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2888 - int40s, */ \ + /* 2892 - int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2893 - int48s, */ \ + /* 2897 - int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2899 - int56s, */ \ + /* 2903 - int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2906 - int64s, */ \ + /* 2910 - int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2914 - float_single, */ \ + /* 2918 - float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2918 - float_double, */ \ + /* 2922 - float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2926 - epoch_us, */ \ + /* 2930 - epoch_us, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2934 - epoch_s, */ \ + /* 2938 - epoch_s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2938 - list_long_octet_string, */ \ + /* 2942 - list_long_octet_string, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -1317,71 +1327,71 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3938 - nullable_bitmap32, */ \ + /* 3942 - nullable_bitmap32, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3942 - nullable_bitmap64, */ \ + /* 3946 - nullable_bitmap64, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3950 - nullable_int24u, */ \ + /* 3954 - nullable_int24u, */ \ 0x00, 0x00, 0x00, \ \ - /* 3953 - nullable_int32u, */ \ + /* 3957 - nullable_int32u, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3957 - nullable_int40u, */ \ + /* 3961 - nullable_int40u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3962 - nullable_int48u, */ \ + /* 3966 - nullable_int48u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3968 - nullable_int56u, */ \ + /* 3972 - nullable_int56u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3975 - nullable_int64u, */ \ + /* 3979 - nullable_int64u, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3983 - nullable_int24s, */ \ + /* 3987 - nullable_int24s, */ \ 0x00, 0x00, 0x00, \ \ - /* 3986 - nullable_int32s, */ \ + /* 3990 - nullable_int32s, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 3990 - nullable_int40s, */ \ + /* 3994 - nullable_int40s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3995 - nullable_int48s, */ \ + /* 3999 - nullable_int48s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4001 - nullable_int56s, */ \ + /* 4005 - nullable_int56s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4008 - nullable_int64s, */ \ + /* 4012 - nullable_int64s, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 4016 - nullable_float_single, */ \ + /* 4020 - nullable_float_single, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4020 - nullable_float_double, */ \ + /* 4024 - nullable_float_double, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server), little-endian */ \ \ - /* 4028 - measurement type, */ \ + /* 4032 - measurement type, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 4032 - total active power, */ \ + /* 4036 - total active power, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 2, Cluster: On/Off (server), little-endian */ \ \ - /* 4036 - FeatureMap, */ \ + /* 4040 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (147) +#define GENERATED_DEFAULTS_COUNT (148) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1474,7 +1484,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 614 +#define GENERATED_ATTRIBUTE_COUNT 615 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1766,7 +1776,7 @@ { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0xFE) }, /* current level */ \ { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ @@ -1781,9 +1791,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1817,25 +1830,25 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Status */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* Order */ \ { 0x0002, ZAP_TYPE(CHAR_STRING), 61, 0, ZAP_EMPTY_DEFAULT() }, /* Description */ \ - { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(890) }, /* BatteryVoltage */ \ + { 0x000B, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryVoltage */ \ { 0x000C, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryPercentRemaining */ \ - { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(894) }, /* BatteryTimeRemaining */ \ + { 0x000D, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* BatteryTimeRemaining */ \ { 0x000E, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeLevel */ \ - { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(898) }, /* ActiveBatteryFaults */ \ + { 0x0012, ZAP_TYPE(ARRAY), 8, 0, ZAP_LONG_DEFAULTS_INDEX(902) }, /* ActiveBatteryFaults */ \ { 0x001A, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BatteryChargeState */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(906) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ - { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(910) }, /* Networks */ \ + { 0x0001, ZAP_TYPE(ARRAY), 12, 0, ZAP_LONG_DEFAULTS_INDEX(914) }, /* Networks */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ScanMaxTimeSeconds */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ConnectMaxTimeSeconds */ \ { 0x0004, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* InterfaceEnabled */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x0006, ZAP_TYPE(OCTET_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ - { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(922) }, /* LastConnectErrorValue */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* FeatureMap */ \ + { 0x0007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(926) }, /* LastConnectErrorValue */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ @@ -1845,11 +1858,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(930) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(934) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(938) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: User Label (server) */ \ @@ -1866,7 +1879,7 @@ { 0x0001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(0) }, /* SupportedModes */ \ { 0x0002, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnMode */ \ { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* StartUpMode */ \ - { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1188) }, /* Description */ \ + { 0x0004, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_LONG_DEFAULTS_INDEX(1192) }, /* Description */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Door Lock (server) */ \ @@ -1874,8 +1887,8 @@ { 0x0001, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LockType */ \ { 0x0002, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_EMPTY_DEFAULT() }, /* ActuatorEnabled */ \ { 0x0003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* DoorState */ \ - { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1195) }, /* DoorOpenEvents */ \ - { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorClosedEvents */ \ + { 0x0004, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1199) }, /* DoorOpenEvents */ \ + { 0x0005, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* DoorClosedEvents */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* OpenPeriod */ \ { 0x0011, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfTotalUsersSupported */ \ { 0x0012, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(10) }, /* NumberOfPINUsersSupported */ \ @@ -1885,8 +1898,8 @@ { 0x0017, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MaxPINCodeLength */ \ { 0x0018, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(6) }, /* MinPINCodeLength */ \ { 0x001B, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* CredentialRulesSupport */ \ - { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1203) }, /* Language */ \ - { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1206) }, /* AutoRelockTime */ \ + { 0x0021, ZAP_TYPE(CHAR_STRING), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1207) }, /* Language */ \ + { 0x0023, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1210) }, /* AutoRelockTime */ \ { 0x0024, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* SoundVolume */ \ { 0x0025, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1931,7 +1944,7 @@ { 0x0017, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* Mode */ \ { 0x001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1210) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1214) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Barrier Control (server) */ \ @@ -1961,16 +1974,16 @@ { 0x0013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ { 0x0014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ { 0x0015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1214) }, /* LifetimeRunningHours */ \ - { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1217) }, /* Power */ \ + ZAP_LONG_DEFAULTS_INDEX(1218) }, /* LifetimeRunningHours */ \ + { 0x0016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(1221) }, /* Power */ \ { 0x0017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(1220) }, /* LifetimeEnergyConsumed */ \ + ZAP_LONG_DEFAULTS_INDEX(1224) }, /* LifetimeEnergyConsumed */ \ { 0x0020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* OperationMode */ \ { 0x0021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* ControlMode */ \ { 0x0022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1224) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (server) */ \ @@ -2000,7 +2013,7 @@ { 0x0020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ { 0x0021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ { 0x0022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1228) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1232) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ @@ -2121,7 +2134,7 @@ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* zone state */ \ { 0x0001, ZAP_TYPE(ENUM16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* zone type */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* zone status */ \ - { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1232) }, /* IAS CIE address */ \ + { 0x0010, ZAP_TYPE(NODE_ID), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(1236) }, /* IAS CIE address */ \ { 0x0011, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xff) }, /* Zone ID */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -2130,25 +2143,25 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Channel (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1240) }, /* channel list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1244) }, /* channel list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Target Navigator (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1494) }, /* target navigator list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1498) }, /* target navigator list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current navigator target */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1748) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1756) }, /* duration */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1764) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1776) }, /* seek range start */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1752) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1760) }, /* duration */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(1768) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1772) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(1780) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Media Input (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1784) }, /* media input list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(1788) }, /* media input list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current media input */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -2159,18 +2172,18 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2038) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2042) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2292) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2296) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2296) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2300) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2550) }, /* application launcher list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2554) }, /* application launcher list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Application Basic (server) */ \ @@ -2180,7 +2193,7 @@ { 0x0003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* product id */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2804) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2808) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Account Login (server) */ \ @@ -2190,28 +2203,28 @@ { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(false) }, /* boolean */ \ { 0x0001, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap8 */ \ { 0x0002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* bitmap16 */ \ - { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2836) }, /* bitmap32 */ \ - { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap64 */ \ + { 0x0003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2840) }, /* bitmap32 */ \ + { 0x0004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2844) }, /* bitmap64 */ \ { 0x0005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8u */ \ { 0x0006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16u */ \ - { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2848) }, /* int24u */ \ - { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2851) }, /* int32u */ \ - { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int40u */ \ - { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2860) }, /* int48u */ \ - { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2866) }, /* int56u */ \ - { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2873) }, /* int64u */ \ + { 0x0007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2852) }, /* int24u */ \ + { 0x0008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2855) }, /* int32u */ \ + { 0x0009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2859) }, /* int40u */ \ + { 0x000A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2864) }, /* int48u */ \ + { 0x000B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2870) }, /* int56u */ \ + { 0x000C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2877) }, /* int64u */ \ { 0x000D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int8s */ \ { 0x000E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* int16s */ \ - { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2881) }, /* int24s */ \ - { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2884) }, /* int32s */ \ - { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int40s */ \ - { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2893) }, /* int48s */ \ - { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2899) }, /* int56s */ \ - { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2906) }, /* int64s */ \ + { 0x000F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2885) }, /* int24s */ \ + { 0x0010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2888) }, /* int32s */ \ + { 0x0011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2892) }, /* int40s */ \ + { 0x0012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2897) }, /* int48s */ \ + { 0x0013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2903) }, /* int56s */ \ + { 0x0014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2910) }, /* int64s */ \ { 0x0015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum8 */ \ { 0x0016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* enum16 */ \ - { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2914) }, /* float_single */ \ - { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_double */ \ + { 0x0017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2918) }, /* float_single */ \ + { 0x0018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2922) }, /* float_double */ \ { 0x0019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* octet_string */ \ { 0x001A, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_int8u */ \ @@ -2224,8 +2237,8 @@ { 0x001E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* char_string */ \ { 0x001F, ZAP_TYPE(LONG_CHAR_STRING), 1002, ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* long_char_string */ \ - { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2926) }, /* epoch_us */ \ - { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2934) }, /* epoch_s */ \ + { 0x0020, ZAP_TYPE(EPOCH_US), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2930) }, /* epoch_us */ \ + { 0x0021, ZAP_TYPE(EPOCH_S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(2938) }, /* epoch_s */ \ { 0x0022, ZAP_TYPE(VENDOR_ID), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* vendor_id */ \ { 0x0023, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* list_nullables_and_optionals_struct */ \ @@ -2240,7 +2253,7 @@ ZAP_MIN_MAX_DEFAULTS_INDEX(33) }, /* range_restricted_int16u */ \ { 0x0029, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(34) }, /* range_restricted_int16s */ \ - { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2938) }, /* list_long_octet_string */ \ + { 0x002A, ZAP_TYPE(ARRAY), 1000, 0, ZAP_LONG_DEFAULTS_INDEX(2942) }, /* list_long_octet_string */ \ { 0x0030, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(MUST_USE_TIMED_WRITE), \ ZAP_EMPTY_DEFAULT() }, /* timed_write_boolean */ \ { 0x8000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2250,49 +2263,49 @@ { 0x8002, ZAP_TYPE(BITMAP16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_bitmap16 */ \ { 0x8003, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3938) }, /* nullable_bitmap32 */ \ + ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap32 */ \ { 0x8004, ZAP_TYPE(BITMAP64), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3942) }, /* nullable_bitmap64 */ \ + ZAP_LONG_DEFAULTS_INDEX(3946) }, /* nullable_bitmap64 */ \ { 0x8005, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8u */ \ { 0x8006, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16u */ \ { 0x8007, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3950) }, /* nullable_int24u */ \ + ZAP_LONG_DEFAULTS_INDEX(3954) }, /* nullable_int24u */ \ { 0x8008, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3953) }, /* nullable_int32u */ \ + ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int32u */ \ { 0x8009, ZAP_TYPE(INT40U), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3957) }, /* nullable_int40u */ \ + ZAP_LONG_DEFAULTS_INDEX(3961) }, /* nullable_int40u */ \ { 0x800A, ZAP_TYPE(INT48U), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3962) }, /* nullable_int48u */ \ + ZAP_LONG_DEFAULTS_INDEX(3966) }, /* nullable_int48u */ \ { 0x800B, ZAP_TYPE(INT56U), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3968) }, /* nullable_int56u */ \ + ZAP_LONG_DEFAULTS_INDEX(3972) }, /* nullable_int56u */ \ { 0x800C, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3975) }, /* nullable_int64u */ \ + ZAP_LONG_DEFAULTS_INDEX(3979) }, /* nullable_int64u */ \ { 0x800D, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int8s */ \ { 0x800E, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_int16s */ \ { 0x800F, ZAP_TYPE(INT24S), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3983) }, /* nullable_int24s */ \ + ZAP_LONG_DEFAULTS_INDEX(3987) }, /* nullable_int24s */ \ { 0x8010, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3986) }, /* nullable_int32s */ \ + ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int32s */ \ { 0x8011, ZAP_TYPE(INT40S), 5, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3990) }, /* nullable_int40s */ \ + ZAP_LONG_DEFAULTS_INDEX(3994) }, /* nullable_int40s */ \ { 0x8012, ZAP_TYPE(INT48S), 6, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3995) }, /* nullable_int48s */ \ + ZAP_LONG_DEFAULTS_INDEX(3999) }, /* nullable_int48s */ \ { 0x8013, ZAP_TYPE(INT56S), 7, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4001) }, /* nullable_int56s */ \ + ZAP_LONG_DEFAULTS_INDEX(4005) }, /* nullable_int56s */ \ { 0x8014, ZAP_TYPE(INT64S), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4008) }, /* nullable_int64s */ \ + ZAP_LONG_DEFAULTS_INDEX(4012) }, /* nullable_int64s */ \ { 0x8015, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum8 */ \ { 0x8016, ZAP_TYPE(ENUM16), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* nullable_enum16 */ \ { 0x8017, ZAP_TYPE(SINGLE), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4016) }, /* nullable_float_single */ \ + ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_single */ \ { 0x8018, ZAP_TYPE(DOUBLE), 8, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(4020) }, /* nullable_float_double */ \ + ZAP_LONG_DEFAULTS_INDEX(4024) }, /* nullable_float_double */ \ { 0x8019, ZAP_TYPE(OCTET_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* nullable_octet_string */ \ { 0x801E, ZAP_TYPE(CHAR_STRING), 11, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ @@ -2317,8 +2330,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ - { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4028) }, /* measurement type */ \ - { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* total active power */ \ + { 0x0000, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4032) }, /* measurement type */ \ + { 0x0304, ZAP_TYPE(INT32S), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* total active power */ \ { 0x0505, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0xffff) }, /* rms voltage */ \ { 0x0506, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage min */ \ { 0x0507, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x8000) }, /* rms voltage max */ \ @@ -2340,7 +2353,7 @@ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0) }, /* OffWaitTime */ \ { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4036) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(4040) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ @@ -2521,177 +2534,177 @@ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(210), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(225), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(226), 4, 5, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(230), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x001E, ZAP_ATTRIBUTE_INDEX(234), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001E, ZAP_ATTRIBUTE_INDEX(235), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Binding (server) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(235), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(236), 4, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (server) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(239), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(240), 2, 36, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (server) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(241), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(242), 11, 88, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Power Source (server) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(252), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(253), 10, 60, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (server) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(262), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(263), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(263), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(264), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(268), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(269), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(270), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(271), 2, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: User Label (server) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(272), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(273), 2, 3, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (server) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(274), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(275), 6, 38, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (server) */ \ { 0x0101, \ - ZAP_ATTRIBUTE_INDEX(280), \ + ZAP_ATTRIBUTE_INDEX(281), \ 28, \ 49, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayDoorLockServer }, /* Endpoint: 1, Cluster: Door Lock (server) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(308), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(309), 20, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (server) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(328), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(329), 5, 7, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (server) */ \ { \ 0x0200, \ - ZAP_ATTRIBUTE_INDEX(333), \ + ZAP_ATTRIBUTE_INDEX(334), \ 26, \ 54, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayPumpConfigurationAndControlServer \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (server) */ \ { 0x0201, \ - ZAP_ATTRIBUTE_INDEX(359), \ + ZAP_ATTRIBUTE_INDEX(360), \ 19, \ 34, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayThermostatServer }, /* Endpoint: 1, Cluster: Thermostat (server) */ \ { \ 0x0204, \ - ZAP_ATTRIBUTE_INDEX(378), \ + ZAP_ATTRIBUTE_INDEX(379), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ chipFuncArrayThermostatUserInterfaceConfigurationServer \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(382), \ + ZAP_ATTRIBUTE_INDEX(383), \ 53, \ 341, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(435), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(436), 6, 11, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (server) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(441), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(442), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (server) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(446), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(447), 4, 8, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (server) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(450), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(451), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (server) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(455), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(456), 5, 10, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(460), \ + ZAP_ATTRIBUTE_INDEX(461), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { 0x0500, \ - ZAP_ATTRIBUTE_INDEX(464), \ + ZAP_ATTRIBUTE_INDEX(465), \ 6, \ 16, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION) | \ ZAP_CLUSTER_MASK(MESSAGE_SENT_FUNCTION), \ chipFuncArrayIasZoneServer }, /* Endpoint: 1, Cluster: IAS Zone (server) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(470), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(471), 2, 35, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (server) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(472), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(473), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Channel (server) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(474), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(475), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(477), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(478), 7, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (server) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(484), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(485), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Media Input (server) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(487), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Low Power (server) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(488), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(489), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(489), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(490), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(492), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(493), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (server) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(495), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(496), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(497), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(498), 8, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(505), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(506), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Account Login (server) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(506), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(507), 78, 3285, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (server) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(584), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(585), 12, 28, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (server) */ \ { 0x0004, \ - ZAP_ATTRIBUTE_INDEX(596), \ + ZAP_ATTRIBUTE_INDEX(597), \ 2, \ 3, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayGroupsServer }, /* Endpoint: 2, Cluster: Groups (server) */ \ { 0x0006, \ - ZAP_ATTRIBUTE_INDEX(598), \ + ZAP_ATTRIBUTE_INDEX(599), \ 7, \ 13, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(605), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(606), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(610), \ + ZAP_ATTRIBUTE_INDEX(611), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -2703,7 +2716,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6226 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ + { ZAP_CLUSTER_INDEX(0), 24, 1755 }, { ZAP_CLUSTER_INDEX(24), 47, 6230 }, { ZAP_CLUSTER_INDEX(71), 4, 21 }, \ } // Largest attribute size is needed for various buffers @@ -2713,7 +2726,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (689) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (8002) +#define ATTRIBUTE_MAX_SIZE (8006) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/all-clusters-app/zap-generated/gen_config.h b/zzz_generated/all-clusters-app/zap-generated/gen_config.h index 1f00a31f29ed1b..43bf17db7efe33 100644 --- a/zzz_generated/all-clusters-app/zap-generated/gen_config.h +++ b/zzz_generated/all-clusters-app/zap-generated/gen_config.h @@ -260,7 +260,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 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 8e9bf8fad3186e..7038c647ad73de 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 @@ -3568,24 +3568,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::LevelControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + if (Traits::IsNullValue(temp)) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + value.SetNull(); + } + else + { + value.SetNonNull() = Traits::StorageToWorking(temp); } - *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } @@ -3595,6 +3598,25 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteServerAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } + + return Set(endpoint, value.Value()); +} + } // namespace StartUpCurrentLevel namespace FeatureMap { 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 1acd7c9462845c..f715ef9bcc5ec6 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 @@ -632,8 +632,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace DefaultMoveRate namespace StartUpCurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); } // namespace StartUpCurrentLevel namespace FeatureMap { diff --git a/zzz_generated/app-common/app-common/zap-generated/callback.h b/zzz_generated/app-common/app-common/zap-generated/callback.h index 9d208dd4b77cb9..84c3879ff25cca 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -15292,16 +15292,14 @@ EmberAfAttributeWritePermission emberAfAllowNetworkWriteAttributeCallback(chip:: * This function is called whenever the Application Framework needs to check * access permission for an attribute read. */ -bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeReadAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Attribute Write Access * * This function is called whenever the Application Framework needs to check * access permission for an attribute write. */ -bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, uint16_t manufacturerCode, - chip::AttributeId attributeId); +bool emberAfAttributeWriteAccessCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId); /** @brief Default Response * @@ -15381,8 +15379,8 @@ bool emberAfMessageSentCallback(const chip::MessageSendDestination & destination * application was not able to read the attribute. */ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer, uint16_t maxReadLength); + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength); /** @brief External Attribute Write * @@ -15425,8 +15423,7 @@ EmberAfStatus emberAfExternalAttributeReadCallback(chip::EndpointId endpoint, ch * attribute. */ EmberAfStatus emberAfExternalAttributeWriteCallback(chip::EndpointId endpoint, chip::ClusterId clusterId, - EmberAfAttributeMetadata * attributeMetadata, uint16_t manufacturerCode, - uint8_t * buffer); + EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer); /** @brief Get Current Time * diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index eac0efeb0fa85b..58bd22d5af126a 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -3278,6 +3278,14 @@ enum class StepMode : uint8_t using StepMode = EmberAfStepMode; #endif +// Bitmap for LevelControlFeature +enum class LevelControlFeature : uint32_t +{ + kOnOff = 0x1, + kLighting = 0x2, + kFrequency = 0x4, +}; + namespace Commands { // Forward-declarations so we can reference these later. @@ -3784,9 +3792,9 @@ struct TypeInfo namespace StartUpCurrentLevel { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpCurrentLevel::Id; } @@ -3851,7 +3859,7 @@ struct TypeInfo Attributes::OnTransitionTime::TypeInfo::DecodableType onTransitionTime; Attributes::OffTransitionTime::TypeInfo::DecodableType offTransitionTime; Attributes::DefaultMoveRate::TypeInfo::DecodableType defaultMoveRate; - Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel = static_cast(0); + Attributes::StartUpCurrentLevel::TypeInfo::DecodableType startUpCurrentLevel; Attributes::AttributeList::TypeInfo::DecodableType attributeList; Attributes::FeatureMap::TypeInfo::DecodableType featureMap = static_cast(0); Attributes::ClusterRevision::TypeInfo::DecodableType clusterRevision = static_cast(0); diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index e7e484c85776e0..46c60a79884f31 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -902,6 +902,12 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_KEYPAD_INPUT_FEATURE_NUMBER_KEYS_OFFSET (2) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS (1) #define EMBER_AF_LAMP_ALARM_MODE_LAMP_BURN_HOURS_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_ON_OFF_OFFSET (0) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING (2) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_LIGHTING_OFFSET (1) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY (4) +#define EMBER_AF_LEVEL_CONTROL_FEATURE_FREQUENCY_OFFSET (2) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW (1) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) #define EMBER_AF_MAINS_ALARM_MASK_VOLTAGE_TOO_HIGH (2) diff --git a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp index 80238761f1dba6..995ab3e7539ad5 100644 --- a/zzz_generated/bridge-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/bridge-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/bridge-app/zap-generated/endpoint_config.h b/zzz_generated/bridge-app/zap-generated/endpoint_config.h index 6b91a3e0efab7c..9adb525d614173 100644 --- a/zzz_generated/bridge-app/zap-generated/endpoint_config.h +++ b/zzz_generated/bridge-app/zap-generated/endpoint_config.h @@ -272,14 +272,19 @@ /* 611 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x03, \ \ - /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ + \ + /* Endpoint: 1, Cluster: Switch (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), big-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -545,14 +550,19 @@ /* 611 - FeatureMap, */ \ 0x03, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ \ /* 615 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Switch (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Fixed Label (server), little-endian */ \ \ - /* 619 - label list, */ \ + /* 623 - label list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -571,7 +581,7 @@ #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (74) +#define GENERATED_DEFAULTS_COUNT (75) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -604,7 +614,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 184 +#define GENERATED_ATTRIBUTE_COUNT 185 #define GENERATED_ATTRIBUTES \ { \ \ @@ -805,13 +815,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -823,9 +833,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -838,11 +851,11 @@ { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* number of positions */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* current position */ \ { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(2) }, /* multi press max */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Fixed Label (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* label list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(623) }, /* label list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ } @@ -919,18 +932,18 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(157), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(172), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(173), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { \ - 0x003B, ZAP_ATTRIBUTE_INDEX(177), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x003B, ZAP_ATTRIBUTE_INDEX(178), 5, 9, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Switch (server) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(182), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(183), 2, 256, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (server) */ \ } @@ -939,7 +952,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 291 }, \ + { ZAP_CLUSTER_INDEX(0), 15, 1031 }, { ZAP_CLUSTER_INDEX(15), 5, 295 }, \ } // Largest attribute size is needed for various buffers @@ -949,7 +962,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (246) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1322) +#define ATTRIBUTE_MAX_SIZE (1326) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/bridge-app/zap-generated/gen_config.h b/zzz_generated/bridge-app/zap-generated/gen_config.h index c996e9c9ea84ab..3bedda895a0570 100644 --- a/zzz_generated/bridge-app/zap-generated/gen_config.h +++ b/zzz_generated/bridge-app/zap-generated/gen_config.h @@ -95,7 +95,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 9ecf0953e6d6bc..2dcb480bf0b253 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -23272,6 +23272,7 @@ class ReportKeypadInputClusterRevision : public ModelCommand | * DefaultMoveRate | 0x0014 | | * StartUpCurrentLevel | 0x4000 | | * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | @@ -24573,7 +24574,7 @@ class ReadLevelControlStartUpCurrentLevel : public ModelCommand this, OnAttributeResponse, OnDefaultFailure); } - static void OnAttributeResponse(void * context, uint8_t value) + static void OnAttributeResponse(void * context, const chip::app::DataModel::Nullable & value) { OnGeneralAttributeEventResponse(context, "LevelControl.StartUpCurrentLevel response", value); } @@ -24602,7 +24603,7 @@ class WriteLevelControlStartUpCurrentLevel : public ModelCommand } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; class ReportLevelControlStartUpCurrentLevel : public ModelCommand @@ -24636,7 +24637,10 @@ class ReportLevelControlStartUpCurrentLevel : public ModelCommand return chip::System::Clock::Seconds16(mWait ? UINT16_MAX : 10); } - static void OnValueReport(void * context, uint8_t value) { LogValue("LevelControl.StartUpCurrentLevel report", 0, value); } + static void OnValueReport(void * context, const chip::app::DataModel::Nullable & value) + { + LogValue("LevelControl.StartUpCurrentLevel report", 0, value); + } private: uint16_t mMinInterval; @@ -24674,6 +24678,36 @@ class ReadLevelControlAttributeList : public ModelCommand } }; +/* + * Attribute FeatureMap + */ +class ReadLevelControlFeatureMap : public ModelCommand +{ +public: + ReadLevelControlFeatureMap() : ModelCommand("read") + { + AddArgument("attr-name", "feature-map"); + ModelCommand::AddArguments(); + } + + ~ReadLevelControlFeatureMap() {} + + CHIP_ERROR SendCommand(ChipDevice * device, uint8_t endpointId) override + { + ChipLogProgress(chipTool, "Sending cluster (0x0008) ReadAttribute on endpoint %" PRIu8, endpointId); + + chip::Controller::LevelControlCluster cluster; + cluster.Associate(device, endpointId); + return cluster.ReadAttribute(this, OnAttributeResponse, + OnDefaultFailure); + } + + static void OnAttributeResponse(void * context, uint32_t value) + { + OnGeneralAttributeEventResponse(context, "LevelControl.FeatureMap response", value); + } +}; + /* * Attribute ClusterRevision */ @@ -56758,6 +56792,7 @@ void registerClusterLevelControl(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(), // make_unique(), // make_unique(), // }; diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 34f2af8e8da1f1..40c03087c7ec0e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -17361,13 +17361,29 @@ class Test_TC_LVL_1_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Read the global attribute constraints: ClusterRevision\n"); - err = TestReadTheGlobalAttributeConstraintsClusterRevision_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : read the global attribute: ClusterRevision\n"); + err = TestReadTheGlobalAttributeClusterRevision_1(); break; case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : Read the global attribute constraints: ClusterRevision\n"); + err = TestReadTheGlobalAttributeConstraintsClusterRevision_2(); + break; + case 3: ChipLogProgress(chipTool, - " ***** Test Step 2 : write the default values to mandatory global attribute: ClusterRevision\n"); - err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2(); + " ***** Test Step 3 : write the default values to mandatory global attribute: ClusterRevision\n"); + err = TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : reads back global attribute: ClusterRevision\n"); + err = TestReadsBackGlobalAttributeClusterRevision_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : Read the optional global attribute : FeatureMap\n"); + err = TestReadTheOptionalGlobalAttributeFeatureMap_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : write the default values to optional global attribute: FeatureMap\n"); + err = TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6(); break; } @@ -17380,7 +17396,7 @@ class Test_TC_LVL_1_1 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 3; + const uint16_t mTestCount = 7; chip::Optional mCluster; chip::Optional mEndpoint; @@ -17400,7 +17416,44 @@ class Test_TC_LVL_1_1 : public TestCommand (static_cast(context))->OnFailureResponse_2(status); } - static void OnSuccessCallback_2(void * context) { (static_cast(context))->OnSuccessResponse_2(); } + static void OnSuccessCallback_2(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_2(clusterRevision); + } + + static void OnFailureCallback_3(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_3(status); + } + + static void OnSuccessCallback_3(void * context) { (static_cast(context))->OnSuccessResponse_3(); } + + static void OnFailureCallback_4(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_4(status); + } + + static void OnSuccessCallback_4(void * context, uint16_t clusterRevision) + { + (static_cast(context))->OnSuccessResponse_4(clusterRevision); + } + + static void OnFailureCallback_5(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_5(status); + } + + static void OnSuccessCallback_5(void * context, uint32_t featureMap) + { + (static_cast(context))->OnSuccessResponse_5(featureMap); + } + + static void OnFailureCallback_6(void * context, EmberAfStatus status) + { + (static_cast(context))->OnFailureResponse_6(status); + } + + static void OnSuccessCallback_6(void * context) { (static_cast(context))->OnSuccessResponse_6(); } // // Tests methods @@ -17412,7 +17465,7 @@ class Test_TC_LVL_1_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17426,12 +17479,32 @@ class Test_TC_LVL_1_1 : public TestCommand void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } void OnSuccessResponse_1(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheGlobalAttributeConstraintsClusterRevision_2() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_2, OnFailureCallback_2)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_2(uint16_t clusterRevision) { VerifyOrReturn(CheckConstraintType("clusterRevision", "", "uint16")); NextTest(); } - CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_2() + CHIP_ERROR TestWriteTheDefaultValuesToMandatoryGlobalAttributeClusterRevision_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; @@ -17441,17 +17514,78 @@ class Test_TC_LVL_1_1 : public TestCommand clusterRevisionArgument = 4U; ReturnErrorOnFailure(cluster.WriteAttribute( - clusterRevisionArgument, this, OnSuccessCallback_2, OnFailureCallback_2)); + clusterRevisionArgument, this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) + void OnFailureResponse_3(EmberAfStatus status) { VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); NextTest(); } - void OnSuccessResponse_2() { ThrowSuccessResponse(); } + void OnSuccessResponse_3() { ThrowSuccessResponse(); } + + CHIP_ERROR TestReadsBackGlobalAttributeClusterRevision_4() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_4, OnFailureCallback_4)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_4(uint16_t clusterRevision) + { + VerifyOrReturn(CheckValue("clusterRevision", clusterRevision, 5U)); + + NextTest(); + } + + CHIP_ERROR TestReadTheOptionalGlobalAttributeFeatureMap_5() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_5, OnFailureCallback_5)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } + + void OnSuccessResponse_5(uint32_t featureMap) + { + VerifyOrReturn(CheckConstraintType("featureMap", "", "map32")); + NextTest(); + } + + CHIP_ERROR TestWriteTheDefaultValuesToOptionalGlobalAttributeFeatureMap_6() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; + chip::Controller::LevelControlClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + uint32_t featureMapArgument; + featureMapArgument = 0UL; + + ReturnErrorOnFailure(cluster.WriteAttribute( + featureMapArgument, this, OnSuccessCallback_6, OnFailureCallback_6)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_6(EmberAfStatus status) + { + VerifyOrReturn(CheckValue("status", status, EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + NextTest(); + } + + void OnSuccessResponse_6() { ThrowSuccessResponse(); } }; class Test_TC_LVL_2_1 : public TestCommand @@ -17495,64 +17629,64 @@ class Test_TC_LVL_2_1 : public TestCommand err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_1(); + ChipLogProgress(chipTool, " ***** Test Step 1 : Reset level to 254\n"); + err = TestResetLevelTo254_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Reads the CurrentLevel attribute\n"); - err = TestReadsTheCurrentLevelAttribute_2(); + ChipLogProgress(chipTool, " ***** Test Step 2 : Wait 100ms\n"); + err = TestWait100ms_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the RemainingTime attribute\n"); - err = TestReadsTheRemainingTimeAttribute_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Reads the CurrentLevel attribute\n"); + err = TestReadsTheCurrentLevelAttribute_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the MinLevel attribute\n"); - err = TestReadsTheMinLevelAttribute_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Reads the RemainingTime attribute\n"); + err = TestReadsTheRemainingTimeAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MaxLevel attribute\n"); - err = TestReadsTheMaxLevelAttribute_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Reads the MinLevel attribute\n"); + err = TestReadsTheMinLevelAttribute_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the CurrentFrequency attribute\n"); - err = TestReadsTheCurrentFrequencyAttribute_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Reads the MaxLevel attribute\n"); + err = TestReadsTheMaxLevelAttribute_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the MinFrequency attribute\n"); - err = TestReadsTheMinFrequencyAttribute_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : Reads the CurrentFrequency attribute\n"); + err = TestReadsTheCurrentFrequencyAttribute_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MaxFrequency attribute\n"); - err = TestReadsTheMaxFrequencyAttribute_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Reads the MinFrequency attribute\n"); + err = TestReadsTheMinFrequencyAttribute_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the OnOffTransitionTime attribute\n"); - err = TestReadsTheOnOffTransitionTimeAttribute_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Reads the MaxFrequency attribute\n"); + err = TestReadsTheMaxFrequencyAttribute_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnLevel attribute \n"); - err = TestReadsTheOnLevelAttribute_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Reads the OnOffTransitionTime attribute\n"); + err = TestReadsTheOnOffTransitionTimeAttribute_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnTransitionTime attribute \n"); - err = TestReadsTheOnTransitionTimeAttribute_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Reads the OnLevel attribute \n"); + err = TestReadsTheOnLevelAttribute_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OffTransitionTime attribute \n"); - err = TestReadsTheOffTransitionTimeAttribute_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : Reads the OnTransitionTime attribute \n"); + err = TestReadsTheOnTransitionTimeAttribute_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the DefaultMoveRate attribute \n"); - err = TestReadsTheDefaultMoveRateAttribute_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : Reads the OffTransitionTime attribute \n"); + err = TestReadsTheOffTransitionTimeAttribute_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the Options attribute \n"); - err = TestReadsTheOptionsAttribute_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the DefaultMoveRate attribute \n"); + err = TestReadsTheDefaultMoveRateAttribute_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the StartUpCurrentLevel attribute \n"); - err = TestReadsTheStartUpCurrentLevelAttribute_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Reads the Options attribute \n"); + err = TestReadsTheOptionsAttribute_15(); break; } @@ -17570,34 +17704,14 @@ class Test_TC_LVL_2_1 : public TestCommand chip::Optional mCluster; chip::Optional mEndpoint; - static void OnFailureCallback_1(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_1(status); - } - - static void OnSuccessCallback_1(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_1(currentLevel); - } - - static void OnFailureCallback_2(void * context, EmberAfStatus status) - { - (static_cast(context))->OnFailureResponse_2(status); - } - - static void OnSuccessCallback_2(void * context, uint8_t currentLevel) - { - (static_cast(context))->OnSuccessResponse_2(currentLevel); - } - static void OnFailureCallback_3(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); } - static void OnSuccessCallback_3(void * context, uint16_t remainingTime) + static void OnSuccessCallback_3(void * context, uint8_t currentLevel) { - (static_cast(context))->OnSuccessResponse_3(remainingTime); + (static_cast(context))->OnSuccessResponse_3(currentLevel); } static void OnFailureCallback_4(void * context, EmberAfStatus status) @@ -17605,9 +17719,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_4(status); } - static void OnSuccessCallback_4(void * context, uint8_t minLevel) + static void OnSuccessCallback_4(void * context, uint16_t remainingTime) { - (static_cast(context))->OnSuccessResponse_4(minLevel); + (static_cast(context))->OnSuccessResponse_4(remainingTime); } static void OnFailureCallback_5(void * context, EmberAfStatus status) @@ -17615,9 +17729,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_5(status); } - static void OnSuccessCallback_5(void * context, uint8_t maxLevel) + static void OnSuccessCallback_5(void * context, uint8_t minLevel) { - (static_cast(context))->OnSuccessResponse_5(maxLevel); + (static_cast(context))->OnSuccessResponse_5(minLevel); } static void OnFailureCallback_6(void * context, EmberAfStatus status) @@ -17625,9 +17739,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_6(status); } - static void OnSuccessCallback_6(void * context, uint16_t currentFrequency) + static void OnSuccessCallback_6(void * context, uint8_t maxLevel) { - (static_cast(context))->OnSuccessResponse_6(currentFrequency); + (static_cast(context))->OnSuccessResponse_6(maxLevel); } static void OnFailureCallback_7(void * context, EmberAfStatus status) @@ -17635,9 +17749,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_7(status); } - static void OnSuccessCallback_7(void * context, uint16_t minFrequency) + static void OnSuccessCallback_7(void * context, uint16_t currentFrequency) { - (static_cast(context))->OnSuccessResponse_7(minFrequency); + (static_cast(context))->OnSuccessResponse_7(currentFrequency); } static void OnFailureCallback_8(void * context, EmberAfStatus status) @@ -17645,9 +17759,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_8(status); } - static void OnSuccessCallback_8(void * context, uint16_t maxFrequency) + static void OnSuccessCallback_8(void * context, uint16_t minFrequency) { - (static_cast(context))->OnSuccessResponse_8(maxFrequency); + (static_cast(context))->OnSuccessResponse_8(minFrequency); } static void OnFailureCallback_9(void * context, EmberAfStatus status) @@ -17655,9 +17769,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_9(status); } - static void OnSuccessCallback_9(void * context, uint16_t onOffTransitionTime) + static void OnSuccessCallback_9(void * context, uint16_t maxFrequency) { - (static_cast(context))->OnSuccessResponse_9(onOffTransitionTime); + (static_cast(context))->OnSuccessResponse_9(maxFrequency); } static void OnFailureCallback_10(void * context, EmberAfStatus status) @@ -17665,9 +17779,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_10(status); } - static void OnSuccessCallback_10(void * context, const chip::app::DataModel::Nullable & onLevel) + static void OnSuccessCallback_10(void * context, uint16_t onOffTransitionTime) { - (static_cast(context))->OnSuccessResponse_10(onLevel); + (static_cast(context))->OnSuccessResponse_10(onOffTransitionTime); } static void OnFailureCallback_11(void * context, EmberAfStatus status) @@ -17675,9 +17789,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_11(status); } - static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onTransitionTime) + static void OnSuccessCallback_11(void * context, const chip::app::DataModel::Nullable & onLevel) { - (static_cast(context))->OnSuccessResponse_11(onTransitionTime); + (static_cast(context))->OnSuccessResponse_11(onLevel); } static void OnFailureCallback_12(void * context, EmberAfStatus status) @@ -17685,9 +17799,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_12(status); } - static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & offTransitionTime) + static void OnSuccessCallback_12(void * context, const chip::app::DataModel::Nullable & onTransitionTime) { - (static_cast(context))->OnSuccessResponse_12(offTransitionTime); + (static_cast(context))->OnSuccessResponse_12(onTransitionTime); } static void OnFailureCallback_13(void * context, EmberAfStatus status) @@ -17695,9 +17809,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_13(status); } - static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) + static void OnSuccessCallback_13(void * context, const chip::app::DataModel::Nullable & offTransitionTime) { - (static_cast(context))->OnSuccessResponse_13(defaultMoveRate); + (static_cast(context))->OnSuccessResponse_13(offTransitionTime); } static void OnFailureCallback_14(void * context, EmberAfStatus status) @@ -17705,9 +17819,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t options) + static void OnSuccessCallback_14(void * context, const chip::app::DataModel::Nullable & defaultMoveRate) { - (static_cast(context))->OnSuccessResponse_14(options); + (static_cast(context))->OnSuccessResponse_14(defaultMoveRate); } static void OnFailureCallback_15(void * context, EmberAfStatus status) @@ -17715,9 +17829,9 @@ class Test_TC_LVL_2_1 : public TestCommand (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context, uint8_t startUpCurrentLevel) + static void OnSuccessCallback_15(void * context, uint8_t options) { - (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(options); } // @@ -17730,296 +17844,290 @@ class Test_TC_LVL_2_1 : public TestCommand return WaitForCommissionee(); } - CHIP_ERROR TestReadsTheCurrentLevelAttribute_1() + CHIP_ERROR TestResetLevelTo254_1() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_1, OnFailureCallback_1)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } + using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; - void OnSuccessResponse_1(uint8_t currentLevel) - { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); + RequestType request; + request.level = 254; + request.transitionTime = 0U; + request.optionMask = 1; + request.optionOverride = 1; - NextTest(); - } + auto success = [](void * context, const typename RequestType::ResponseType & data) { + (static_cast(context))->OnSuccessResponse_1(); + }; - CHIP_ERROR TestReadsTheCurrentLevelAttribute_2() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); + auto failure = [](void * context, EmberAfStatus status) { + (static_cast(context))->OnFailureResponse_1(status); + }; - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_2, OnFailureCallback_2)); + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_2(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_1(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_2(uint8_t currentLevel) + void OnSuccessResponse_1() { NextTest(); } + + CHIP_ERROR TestWait100ms_2() { - VerifyOrReturn(CheckConstraintType("currentLevel", "", "uint8")); - NextTest(); + SetIdentity(kIdentityAlpha); + return WaitForMs(100); } - CHIP_ERROR TestReadsTheRemainingTimeAttribute_3() + CHIP_ERROR TestReadsTheCurrentLevelAttribute_3() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_3, OnFailureCallback_3)); return CHIP_NO_ERROR; } void OnFailureResponse_3(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_3(uint16_t remainingTime) + void OnSuccessResponse_3(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } - CHIP_ERROR TestReadsTheMinLevelAttribute_4() + CHIP_ERROR TestReadsTheRemainingTimeAttribute_4() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_4, OnFailureCallback_4)); return CHIP_NO_ERROR; } void OnFailureResponse_4(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_4(uint8_t minLevel) + void OnSuccessResponse_4(uint16_t remainingTime) { - VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + VerifyOrReturn(CheckValue("remainingTime", remainingTime, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxLevelAttribute_5() + CHIP_ERROR TestReadsTheMinLevelAttribute_5() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_5, OnFailureCallback_5)); return CHIP_NO_ERROR; } void OnFailureResponse_5(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_5(uint8_t maxLevel) + void OnSuccessResponse_5(uint8_t minLevel) { - VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); + VerifyOrReturn(CheckValue("minLevel", minLevel, 0)); + NextTest(); } - CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_6() + CHIP_ERROR TestReadsTheMaxLevelAttribute_6() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_6, OnFailureCallback_6)); return CHIP_NO_ERROR; } void OnFailureResponse_6(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_6(uint16_t currentFrequency) + void OnSuccessResponse_6(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); - + VerifyOrReturn(CheckConstraintType("maxLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheMinFrequencyAttribute_7() + CHIP_ERROR TestReadsTheCurrentFrequencyAttribute_7() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_7, OnFailureCallback_7)); return CHIP_NO_ERROR; } void OnFailureResponse_7(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_7(uint16_t minFrequency) + void OnSuccessResponse_7(uint16_t currentFrequency) { - VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); + VerifyOrReturn(CheckValue("currentFrequency", currentFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheMaxFrequencyAttribute_8() + CHIP_ERROR TestReadsTheMinFrequencyAttribute_8() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_8, OnFailureCallback_8)); return CHIP_NO_ERROR; } void OnFailureResponse_8(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_8(uint16_t maxFrequency) + void OnSuccessResponse_8(uint16_t minFrequency) { - VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); + VerifyOrReturn(CheckValue("minFrequency", minFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_9() + CHIP_ERROR TestReadsTheMaxFrequencyAttribute_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } void OnFailureResponse_9(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_9(uint16_t onOffTransitionTime) + void OnSuccessResponse_9(uint16_t maxFrequency) { - VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + VerifyOrReturn(CheckValue("maxFrequency", maxFrequency, 0U)); NextTest(); } - CHIP_ERROR TestReadsTheOnLevelAttribute_10() + CHIP_ERROR TestReadsTheOnOffTransitionTimeAttribute_10() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_10, OnFailureCallback_10)); return CHIP_NO_ERROR; } void OnFailureResponse_10(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_10(const chip::app::DataModel::Nullable & onLevel) + void OnSuccessResponse_10(uint16_t onOffTransitionTime) { - VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); + VerifyOrReturn(CheckValue("onOffTransitionTime", onOffTransitionTime, 0U)); + NextTest(); } - CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_11() + CHIP_ERROR TestReadsTheOnLevelAttribute_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_11, OnFailureCallback_11)); return CHIP_NO_ERROR; } void OnFailureResponse_11(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onTransitionTime) + void OnSuccessResponse_11(const chip::app::DataModel::Nullable & onLevel) { - VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onLevel", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_12() + CHIP_ERROR TestReadsTheOnTransitionTimeAttribute_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_12, OnFailureCallback_12)); return CHIP_NO_ERROR; } void OnFailureResponse_12(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_12(const chip::app::DataModel::Nullable & offTransitionTime) + void OnSuccessResponse_12(const chip::app::DataModel::Nullable & onTransitionTime) { - VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); + VerifyOrReturn(CheckConstraintType("onTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_13() + CHIP_ERROR TestReadsTheOffTransitionTimeAttribute_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_13, OnFailureCallback_13)); return CHIP_NO_ERROR; } void OnFailureResponse_13(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_13(const chip::app::DataModel::Nullable & defaultMoveRate) + void OnSuccessResponse_13(const chip::app::DataModel::Nullable & offTransitionTime) { - VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); + VerifyOrReturn(CheckConstraintType("offTransitionTime", "", "uint16")); NextTest(); } - CHIP_ERROR TestReadsTheOptionsAttribute_14() + CHIP_ERROR TestReadsTheDefaultMoveRateAttribute_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_14(uint8_t options) + void OnSuccessResponse_14(const chip::app::DataModel::Nullable & defaultMoveRate) { - VerifyOrReturn(CheckValue("options", options, 0)); - + VerifyOrReturn(CheckConstraintType("defaultMoveRate", "", "uint8")); NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttribute_15() + CHIP_ERROR TestReadsTheOptionsAttribute_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( + ReturnErrorOnFailure(cluster.ReadAttribute( this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(uint8_t options) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); + VerifyOrReturn(CheckValue("options", options, 0)); NextTest(); } @@ -18118,16 +18226,12 @@ class Test_TC_LVL_2_2 : public TestCommand err = TestReadsTheDefaultMoveRateAttributeFromTheDut_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : writes the StartUpCurrentLevel attribute on the DUT\n"); + err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : writes the StartUpCurrentLevel attribute on the DUT\n"); - err = TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : reads the StartUpCurrentLevel attribute from the DUT\n"); - err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16(); + ChipLogProgress(chipTool, " ***** Test Step 15 : reads the StartUpCurrentLevel attribute from the DUT\n"); + err = TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15(); break; } @@ -18140,7 +18244,7 @@ class Test_TC_LVL_2_2 : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 16; chip::Optional mCluster; chip::Optional mEndpoint; @@ -18262,26 +18366,16 @@ class Test_TC_LVL_2_2 : public TestCommand (static_cast(context))->OnFailureResponse_14(status); } - static void OnSuccessCallback_14(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_14(startUpCurrentLevel); - } + static void OnSuccessCallback_14(void * context) { (static_cast(context))->OnSuccessResponse_14(); } static void OnFailureCallback_15(void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_15(status); } - static void OnSuccessCallback_15(void * context) { (static_cast(context))->OnSuccessResponse_15(); } - - static void OnFailureCallback_16(void * context, EmberAfStatus status) + static void OnSuccessCallback_15(void * context, const chip::app::DataModel::Nullable & startUpCurrentLevel) { - (static_cast(context))->OnFailureResponse_16(status); - } - - static void OnSuccessCallback_16(void * context, uint8_t startUpCurrentLevel) - { - (static_cast(context))->OnSuccessResponse_16(startUpCurrentLevel); + (static_cast(context))->OnSuccessResponse_15(startUpCurrentLevel); } // @@ -18378,7 +18472,7 @@ class Test_TC_LVL_2_2 : public TestCommand chip::app::DataModel::Nullable onLevelArgument; onLevelArgument.SetNonNull(); - onLevelArgument.Value() = 1; + onLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( onLevelArgument, this, OnSuccessCallback_5, OnFailureCallback_5)); @@ -18405,7 +18499,7 @@ class Test_TC_LVL_2_2 : public TestCommand void OnSuccessResponse_6(const chip::app::DataModel::Nullable & onLevel) { VerifyOrReturn(CheckValueNonNull("onLevel", onLevel)); - VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 1)); + VerifyOrReturn(CheckValue("onLevel.Value()", onLevel.Value(), 254)); NextTest(); } @@ -18551,60 +18645,42 @@ class Test_TC_LVL_2_2 : public TestCommand NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_14() - { - const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevices[kIdentityAlpha], endpoint); - - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_14, OnFailureCallback_14)); - return CHIP_NO_ERROR; - } - - void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - - void OnSuccessResponse_14(uint8_t startUpCurrentLevel) - { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 0)); - - NextTest(); - } - - CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_15() + CHIP_ERROR TestWritesTheStartUpCurrentLevelAttributeOnTheDut_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t startUpCurrentLevelArgument; - startUpCurrentLevelArgument = 1; + chip::app::DataModel::Nullable startUpCurrentLevelArgument; + startUpCurrentLevelArgument.SetNonNull(); + startUpCurrentLevelArgument.Value() = 254; ReturnErrorOnFailure(cluster.WriteAttribute( - startUpCurrentLevelArgument, this, OnSuccessCallback_15, OnFailureCallback_15)); + startUpCurrentLevelArgument, this, OnSuccessCallback_14, OnFailureCallback_14)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_14(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_15() { NextTest(); } + void OnSuccessResponse_14() { NextTest(); } - CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_16() + CHIP_ERROR TestReadsTheStartUpCurrentLevelAttributeFromTheDut_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; chip::Controller::LevelControlClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_16, OnFailureCallback_16)); + this, OnSuccessCallback_15, OnFailureCallback_15)); return CHIP_NO_ERROR; } - void OnFailureResponse_16(EmberAfStatus status) { ThrowFailureResponse(); } + void OnFailureResponse_15(EmberAfStatus status) { ThrowFailureResponse(); } - void OnSuccessResponse_16(uint8_t startUpCurrentLevel) + void OnSuccessResponse_15(const chip::app::DataModel::Nullable & startUpCurrentLevel) { - VerifyOrReturn(CheckValue("startUpCurrentLevel", startUpCurrentLevel, 1)); + VerifyOrReturn(CheckValueNonNull("startUpCurrentLevel", startUpCurrentLevel)); + VerifyOrReturn(CheckValue("startUpCurrentLevel.Value()", startUpCurrentLevel.Value(), 254)); NextTest(); } @@ -18861,7 +18937,7 @@ class Test_TC_LVL_3_1 : public TestCommand void OnSuccessResponse_3(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19022,7 +19098,7 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestWait10ms_12() { SetIdentity(kIdentityAlpha); - return WaitForMs(10); + return WaitForMs(100); } CHIP_ERROR TestReadsCurrentLevelAttributeFromDut_13() @@ -19321,7 +19397,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_2(uint8_t maxLevel) { - VerifyOrReturn(CheckValue("maxLevel", maxLevel, 255)); + VerifyOrReturn(CheckValue("maxLevel", maxLevel, 254)); NextTest(); } @@ -19374,7 +19450,7 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_5(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 255)); + VerifyOrReturn(CheckValue("currentLevel", currentLevel, 254)); NextTest(); } @@ -19447,8 +19523,8 @@ class Test_TC_LVL_4_1 : public TestCommand void OnSuccessResponse_9(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20170,8 +20246,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_4(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 0)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 0)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 1)); NextTest(); } @@ -20248,8 +20324,8 @@ class Test_TC_LVL_6_1 : public TestCommand void OnSuccessResponse_8(uint8_t currentLevel) { - VerifyOrReturn(CheckValue("currentLevel", currentLevel, 2)); - + VerifyOrReturn(CheckConstraintMinValue("currentLevel", currentLevel, 2)); + VerifyOrReturn(CheckConstraintMaxValue("currentLevel", currentLevel, 3)); NextTest(); } diff --git a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp index 614b3f60bbfb8e..cb7d93c74cd4c2 100644 --- a/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp +++ b/zzz_generated/controller-clusters/zap-generated/callback-stub.cpp @@ -539,14 +539,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -569,14 +567,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h index f38eedda6b7b15..d9cd693bcbd68f 100644 --- a/zzz_generated/controller-clusters/zap-generated/endpoint_config.h +++ b/zzz_generated/controller-clusters/zap-generated/endpoint_config.h @@ -27,34 +27,39 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), big-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), big-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), big-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x01, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), big-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), big-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), big-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), big-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } @@ -62,40 +67,45 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: Level Control (client), little-endian */ \ \ /* 0 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + /* Endpoint: 1, Cluster: General Commissioning (client), little-endian */ \ \ /* 4 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Network Commissioning (client), little-endian */ \ + \ + /* 8 - FeatureMap, */ \ 0x01, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client), little-endian */ \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client), little-endian */ \ \ - /* 12 - FeatureMap, */ \ + /* 16 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client), little-endian */ \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client), little-endian */ \ \ - /* 20 - FeatureMap, */ \ + /* 24 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (6) +#define GENERATED_DEFAULTS_COUNT (7) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -123,7 +133,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 64 +#define GENERATED_ATTRIBUTE_COUNT 65 #define GENERATED_ATTRIBUTES \ { \ \ @@ -143,7 +153,8 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (client) */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ @@ -178,29 +189,29 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(4) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ @@ -238,7 +249,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_LONG_DEFAULTS_INDEX(24) }, /* FeatureMap */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(CLIENT), ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Thermostat (client) */ \ @@ -329,166 +340,166 @@ 0x0007, ZAP_ATTRIBUTE_INDEX(4), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: On/off Switch Configuration (client) */ \ { \ - 0x0008, ZAP_ATTRIBUTE_INDEX(5), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0008, ZAP_ATTRIBUTE_INDEX(5), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Level Control (client) */ \ { \ - 0x000F, ZAP_ATTRIBUTE_INDEX(6), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x000F, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Binary Input (Basic) (client) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(7), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (client) */ \ - { 0x001E, ZAP_ATTRIBUTE_INDEX(8), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ + { 0x001E, ZAP_ATTRIBUTE_INDEX(9), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Binding (client) */ \ { \ - 0x001F, ZAP_ATTRIBUTE_INDEX(9), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x001F, ZAP_ATTRIBUTE_INDEX(10), 1, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Access Control (client) */ \ { \ - 0x0025, ZAP_ATTRIBUTE_INDEX(10), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0025, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Actions (client) */ \ - { 0x0028, ZAP_ATTRIBUTE_INDEX(11), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ + { 0x0028, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Basic (client) */ \ { \ - 0x0029, ZAP_ATTRIBUTE_INDEX(12), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0029, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Provider (client) */ \ { \ - 0x002A, ZAP_ATTRIBUTE_INDEX(13), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002A, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: OTA Software Update Requestor (client) */ \ { \ - 0x002B, ZAP_ATTRIBUTE_INDEX(14), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002B, ZAP_ATTRIBUTE_INDEX(15), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Localization Configuration (client) */ \ { \ - 0x002E, ZAP_ATTRIBUTE_INDEX(14), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002E, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source Configuration (client) */ \ { \ - 0x002F, ZAP_ATTRIBUTE_INDEX(15), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x002F, ZAP_ATTRIBUTE_INDEX(16), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Power Source (client) */ \ { \ - 0x0030, ZAP_ATTRIBUTE_INDEX(16), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0030, ZAP_ATTRIBUTE_INDEX(17), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Commissioning (client) */ \ { \ - 0x0031, ZAP_ATTRIBUTE_INDEX(18), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0031, ZAP_ATTRIBUTE_INDEX(19), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Network Commissioning (client) */ \ { \ - 0x0032, ZAP_ATTRIBUTE_INDEX(20), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0032, ZAP_ATTRIBUTE_INDEX(21), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Diagnostic Logs (client) */ \ { \ - 0x0033, ZAP_ATTRIBUTE_INDEX(20), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0033, ZAP_ATTRIBUTE_INDEX(21), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: General Diagnostics (client) */ \ { \ - 0x0034, ZAP_ATTRIBUTE_INDEX(21), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0034, ZAP_ATTRIBUTE_INDEX(22), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Software Diagnostics (client) */ \ { \ - 0x0035, ZAP_ATTRIBUTE_INDEX(23), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0035, ZAP_ATTRIBUTE_INDEX(24), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thread Network Diagnostics (client) */ \ { \ - 0x0036, ZAP_ATTRIBUTE_INDEX(25), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0036, ZAP_ATTRIBUTE_INDEX(26), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: WiFi Network Diagnostics (client) */ \ { \ - 0x0037, ZAP_ATTRIBUTE_INDEX(26), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0037, ZAP_ATTRIBUTE_INDEX(27), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Ethernet Network Diagnostics (client) */ \ { \ - 0x0039, ZAP_ATTRIBUTE_INDEX(28), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0039, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Bridged Device Basic (client) */ \ - { 0x003B, ZAP_ATTRIBUTE_INDEX(29), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ + { 0x003B, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL }, /* Endpoint: 1, Cluster: Switch (client) */ \ { \ - 0x003C, ZAP_ATTRIBUTE_INDEX(30), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003C, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: AdministratorCommissioning (client) */ \ { \ - 0x003E, ZAP_ATTRIBUTE_INDEX(31), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003E, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Operational Credentials (client) */ \ { \ - 0x003F, ZAP_ATTRIBUTE_INDEX(32), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x003F, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Group Key Management (client) */ \ { \ - 0x0040, ZAP_ATTRIBUTE_INDEX(33), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0040, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Fixed Label (client) */ \ { \ - 0x0041, ZAP_ATTRIBUTE_INDEX(34), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0041, ZAP_ATTRIBUTE_INDEX(35), 0, 0, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: User Label (client) */ \ { \ - 0x0045, ZAP_ATTRIBUTE_INDEX(34), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0045, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Boolean State (client) */ \ { \ - 0x0050, ZAP_ATTRIBUTE_INDEX(35), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0050, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Mode Select (client) */ \ { \ - 0x0101, ZAP_ATTRIBUTE_INDEX(36), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0101, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Door Lock (client) */ \ { \ - 0x0102, ZAP_ATTRIBUTE_INDEX(37), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0102, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Window Covering (client) */ \ { \ - 0x0103, ZAP_ATTRIBUTE_INDEX(38), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0103, ZAP_ATTRIBUTE_INDEX(39), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Barrier Control (client) */ \ { \ - 0x0200, ZAP_ATTRIBUTE_INDEX(39), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0200, ZAP_ATTRIBUTE_INDEX(40), 2, 6, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ { \ - 0x0201, ZAP_ATTRIBUTE_INDEX(41), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0201, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat (client) */ \ { \ - 0x0204, ZAP_ATTRIBUTE_INDEX(42), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0204, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Thermostat User Interface Configuration (client) */ \ { \ - 0x0300, ZAP_ATTRIBUTE_INDEX(43), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0300, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Color Control (client) */ \ { \ - 0x0400, ZAP_ATTRIBUTE_INDEX(44), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0400, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Illuminance Measurement (client) */ \ { \ - 0x0402, ZAP_ATTRIBUTE_INDEX(45), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0402, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ { \ - 0x0403, ZAP_ATTRIBUTE_INDEX(46), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0403, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ { \ - 0x0404, ZAP_ATTRIBUTE_INDEX(47), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0404, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ { \ - 0x0405, ZAP_ATTRIBUTE_INDEX(48), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0405, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Relative Humidity Measurement (client) */ \ { \ - 0x0406, ZAP_ATTRIBUTE_INDEX(49), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0406, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Occupancy Sensing (client) */ \ { \ - 0x0503, ZAP_ATTRIBUTE_INDEX(50), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0503, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Wake on LAN (client) */ \ { \ - 0x0504, ZAP_ATTRIBUTE_INDEX(51), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0504, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Channel (client) */ \ { \ - 0x0505, ZAP_ATTRIBUTE_INDEX(52), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0505, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Target Navigator (client) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(53), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Playback (client) */ \ { \ - 0x0507, ZAP_ATTRIBUTE_INDEX(54), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0507, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Media Input (client) */ \ { \ - 0x0508, ZAP_ATTRIBUTE_INDEX(55), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0508, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Low Power (client) */ \ { \ - 0x0509, ZAP_ATTRIBUTE_INDEX(56), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0509, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Keypad Input (client) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(57), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Content Launcher (client) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(58), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Audio Output (client) */ \ { \ - 0x050C, ZAP_ATTRIBUTE_INDEX(59), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050C, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Launcher (client) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(60), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Application Basic (client) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(61), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Account Login (client) */ \ { \ - 0x050F, ZAP_ATTRIBUTE_INDEX(62), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x050F, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Test Cluster (client) */ \ { \ - 0x0B04, ZAP_ATTRIBUTE_INDEX(63), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0B04, ZAP_ATTRIBUTE_INDEX(64), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 1, Cluster: Electrical Measurement (client) */ \ } @@ -497,7 +508,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 61, 138 }, \ + { ZAP_CLUSTER_INDEX(0), 61, 142 }, \ } // Largest attribute size is needed for various buffers @@ -507,7 +518,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (4) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (138) +#define ATTRIBUTE_MAX_SIZE (142) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (1) diff --git a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp index c017282ef1cbe1..4008ea8f60a45d 100644 --- a/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/door-lock-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp index 174b1ba630740f..b5882f6177bf89 100644 --- a/zzz_generated/lighting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lighting-app/zap-generated/callback-stub.cpp @@ -243,14 +243,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -273,14 +271,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/lighting-app/zap-generated/endpoint_config.h b/zzz_generated/lighting-app/zap-generated/endpoint_config.h index 3ec287cc36faa6..46a74e4fad741c 100644 --- a/zzz_generated/lighting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/lighting-app/zap-generated/endpoint_config.h @@ -276,6 +276,11 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), big-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x03, \ } #else // !BIGENDIAN_CPU @@ -531,11 +536,16 @@ \ /* 615 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 1, Cluster: Level Control (server), little-endian */ \ + \ + /* 619 - FeatureMap, */ \ + 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (73) +#define GENERATED_DEFAULTS_COUNT (74) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -577,7 +587,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 229 +#define GENERATED_ATTRIBUTE_COUNT 230 #define GENERATED_ATTRIBUTES \ { \ \ @@ -799,22 +809,23 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: On/Off (server) */ \ - { 0x0000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x0000, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ { 0x4000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ { 0x4001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ { 0x4002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ - { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ - { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + { 0x4003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* StartUpOnOff */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(615) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x01) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFE) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -826,9 +837,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(619) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -976,30 +990,30 @@ chipFuncArrayOnOffServer }, /* Endpoint: 1, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(179), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 1, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(194), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(195), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 1, Cluster: Descriptor (server) */ \ { 0x0300, \ - ZAP_ATTRIBUTE_INDEX(199), \ + ZAP_ATTRIBUTE_INDEX(200), \ 22, \ 36, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayColorControlServer }, /* Endpoint: 1, Cluster: Color Control (server) */ \ { 0x0406, \ - ZAP_ATTRIBUTE_INDEX(221), \ + ZAP_ATTRIBUTE_INDEX(222), \ 4, \ 5, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayOccupancySensingServer }, /* Endpoint: 1, Cluster: Occupancy Sensing (server) */ \ { \ - 0x0006, ZAP_ATTRIBUTE_INDEX(225), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ + 0x0006, ZAP_ATTRIBUTE_INDEX(226), 1, 2, ZAP_CLUSTER_MASK(CLIENT), NULL \ }, /* Endpoint: 2, Cluster: On/Off (client) */ \ { \ - 0x0007, ZAP_ATTRIBUTE_INDEX(226), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0007, ZAP_ATTRIBUTE_INDEX(227), 3, 4, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: On/off Switch Configuration (server) */ \ } @@ -1008,7 +1022,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 82 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ + { ZAP_CLUSTER_INDEX(0), 18, 1479 }, { ZAP_CLUSTER_INDEX(18), 6, 86 }, { ZAP_CLUSTER_INDEX(24), 2, 6 }, \ } // Largest attribute size is needed for various buffers @@ -1018,7 +1032,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (687) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (1567) +#define ATTRIBUTE_MAX_SIZE (1571) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (3) diff --git a/zzz_generated/lighting-app/zap-generated/gen_config.h b/zzz_generated/lighting-app/zap-generated/gen_config.h index e801337b0acc11..0107a4d822f95a 100644 --- a/zzz_generated/lighting-app/zap-generated/gen_config.h +++ b/zzz_generated/lighting-app/zap-generated/gen_config.h @@ -116,7 +116,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/lock-app/zap-generated/callback-stub.cpp b/zzz_generated/lock-app/zap-generated/callback-stub.cpp index 476be726134688..643af9fcee2b0e 100644 --- a/zzz_generated/lock-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/lock-app/zap-generated/callback-stub.cpp @@ -195,14 +195,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -225,14 +223,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp index b41bc5cc2758f5..b5715093bc6ba3 100644 --- a/zzz_generated/log-source-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/log-source-app/zap-generated/callback-stub.cpp @@ -83,14 +83,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -113,14 +111,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp index 66285f85447034..da2554c5273ab3 100644 --- a/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-provider-app/zap-generated/callback-stub.cpp @@ -107,14 +107,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -137,14 +135,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp index 468a654cb7820f..936be5c8a6c5e9 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/callback-stub.cpp @@ -123,14 +123,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -153,14 +151,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp index 8f969cda28131c..dee07e598ee4a3 100644 --- a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp @@ -147,14 +147,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -177,14 +175,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -84,7 +84,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp index 8f969cda28131c..dee07e598ee4a3 100644 --- a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp @@ -147,14 +147,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -177,14 +175,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index ff71d08595d15d..0072840d51d6ad 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -84,7 +84,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/pump-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-app/zap-generated/callback-stub.cpp index c7b27ef1c08073..2c9b65ab807bcd 100644 --- a/zzz_generated/pump-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-app/zap-generated/callback-stub.cpp @@ -203,14 +203,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -233,14 +231,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/pump-app/zap-generated/gen_config.h b/zzz_generated/pump-app/zap-generated/gen_config.h index f7026fcb38420f..ae1bc0f0452caf 100644 --- a/zzz_generated/pump-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-app/zap-generated/gen_config.h @@ -103,7 +103,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp index ff093a6a8b0735..7617906bec5971 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -219,14 +219,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -249,14 +247,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp index f00da99a372601..3939d48c14ea98 100644 --- a/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/temperature-measurement-app/zap-generated/callback-stub.cpp @@ -171,14 +171,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -201,14 +199,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/thermostat/zap-generated/callback-stub.cpp b/zzz_generated/thermostat/zap-generated/callback-stub.cpp index 6639804cde08ba..7f9801076b785c 100644 --- a/zzz_generated/thermostat/zap-generated/callback-stub.cpp +++ b/zzz_generated/thermostat/zap-generated/callback-stub.cpp @@ -227,14 +227,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -257,14 +255,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/tv-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-app/zap-generated/callback-stub.cpp index 020e1eb2ea2a00..2df67b3ff06734 100644 --- a/zzz_generated/tv-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-app/zap-generated/callback-stub.cpp @@ -315,14 +315,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -345,14 +343,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/tv-app/zap-generated/endpoint_config.h b/zzz_generated/tv-app/zap-generated/endpoint_config.h index 5c6861c64f3ea3..dcf9fca56f83dd 100644 --- a/zzz_generated/tv-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-app/zap-generated/endpoint_config.h @@ -404,9 +404,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), big-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x01, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), big-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -424,24 +429,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), big-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -457,18 +462,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), big-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), big-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -484,12 +489,12 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), big-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } @@ -875,9 +880,14 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ + /* Endpoint: 2, Cluster: Level Control (server), little-endian */ \ + \ + /* 2401 - FeatureMap, */ \ + 0x01, 0x00, 0x00, 0x00, \ + \ /* Endpoint: 2, Cluster: Audio Output (server), little-endian */ \ \ - /* 2401 - audio output list, */ \ + /* 2405 - audio output list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -895,24 +905,24 @@ \ /* Endpoint: 3, Cluster: Media Playback (server), little-endian */ \ \ - /* 2655 - start time, */ \ + /* 2659 - start time, */ \ 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2663 - duration, */ \ + /* 2667 - duration, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2671 - playback speed, */ \ + /* 2675 - playback speed, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 2675 - seek range end, */ \ + /* 2679 - seek range end, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2683 - seek range start, */ \ + /* 2687 - seek range start, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2691 - accept header list, */ \ + /* 2695 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -928,18 +938,18 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 2945 - supported streaming protocols, */ \ + /* 2949 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 3, Cluster: Application Basic (server), little-endian */ \ \ - /* 2949 - allowed vendor list, */ \ + /* 2953 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Content Launcher (server), little-endian */ \ \ - /* 2981 - accept header list, */ \ + /* 2985 - accept header list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ @@ -955,19 +965,19 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 3235 - supported streaming protocols, */ \ + /* 3239 - supported streaming protocols, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 4, Cluster: Application Basic (server), little-endian */ \ \ - /* 3239 - allowed vendor list, */ \ + /* 3243 - allowed vendor list, */ \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (93) +#define GENERATED_DEFAULTS_COUNT (94) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -1000,7 +1010,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 284 +#define GENERATED_ATTRIBUTE_COUNT 285 #define GENERATED_ATTRIBUTES \ { \ \ @@ -1290,13 +1300,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1308,9 +1318,12 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* FeatureMap */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Descriptor (server) */ \ { 0x0000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ @@ -1320,7 +1333,7 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 2, Cluster: Audio Output (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2401) }, /* audio output list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2405) }, /* audio output list */ \ { 0x0001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current audio output */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ @@ -1333,19 +1346,19 @@ \ /* Endpoint: 3, Cluster: Media Playback (server) */ \ { 0x0000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* playback state */ \ - { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2655) }, /* start time */ \ - { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2663) }, /* duration */ \ + { 0x0001, ZAP_TYPE(EPOCH_US), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2659) }, /* start time */ \ + { 0x0002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2667) }, /* duration */ \ { 0x0003, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_EMPTY_DEFAULT() }, /* position */ \ - { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2671) }, /* playback speed */ \ - { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* seek range end */ \ - { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2683) }, /* seek range start */ \ + { 0x0004, ZAP_TYPE(SINGLE), 4, 0, ZAP_LONG_DEFAULTS_INDEX(2675) }, /* playback speed */ \ + { 0x0005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2679) }, /* seek range end */ \ + { 0x0006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(2687) }, /* seek range start */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2691) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2695) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(2945) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(2949) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Application Basic (server) */ \ @@ -1357,7 +1370,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2949) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(2953) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 3, Cluster: Account Login (server) */ \ @@ -1371,9 +1384,9 @@ { 0xFFFD, ZAP_TYPE(INT16U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Content Launcher (server) */ \ - { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2981) }, /* accept header list */ \ + { 0x0000, ZAP_TYPE(ARRAY), 254, 0, ZAP_LONG_DEFAULTS_INDEX(2985) }, /* accept header list */ \ { 0x0001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_LONG_DEFAULTS_INDEX(3235) }, /* supported streaming protocols */ \ + ZAP_LONG_DEFAULTS_INDEX(3239) }, /* supported streaming protocols */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 4, Cluster: Application Basic (server) */ \ @@ -1385,7 +1398,7 @@ ZAP_EMPTY_DEFAULT() }, /* application app */ \ { 0x0005, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* application status */ \ { 0x0006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* application version */ \ - { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3239) }, /* allowed vendor list */ \ + { 0x0007, ZAP_TYPE(ARRAY), 32, 0, ZAP_LONG_DEFAULTS_INDEX(3243) }, /* allowed vendor list */ \ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ /* Endpoint: 5, Cluster: Descriptor (server) */ \ @@ -1533,45 +1546,45 @@ chipFuncArrayOnOffServer }, /* Endpoint: 2, Cluster: On/Off (server) */ \ { 0x0008, \ ZAP_ATTRIBUTE_INDEX(205), \ - 15, \ - 23, \ + 16, \ + 27, \ ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ chipFuncArrayLevelControlServer }, /* Endpoint: 2, Cluster: Level Control (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(220), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(221), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Descriptor (server) */ \ { \ - 0x050B, ZAP_ATTRIBUTE_INDEX(225), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050B, ZAP_ATTRIBUTE_INDEX(226), 3, 257, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 2, Cluster: Audio Output (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(228), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(229), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Descriptor (server) */ \ { \ - 0x0506, ZAP_ATTRIBUTE_INDEX(233), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x0506, ZAP_ATTRIBUTE_INDEX(234), 8, 39, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Media Playback (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(241), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(242), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(244), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(245), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Application Basic (server) */ \ { \ - 0x050E, ZAP_ATTRIBUTE_INDEX(253), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050E, ZAP_ATTRIBUTE_INDEX(254), 1, 2, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 3, Cluster: Account Login (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(254), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(255), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Descriptor (server) */ \ { \ - 0x050A, ZAP_ATTRIBUTE_INDEX(259), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050A, ZAP_ATTRIBUTE_INDEX(260), 3, 260, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Content Launcher (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(262), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(263), 9, 138, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 4, Cluster: Application Basic (server) */ \ { \ - 0x001D, ZAP_ATTRIBUTE_INDEX(271), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x001D, ZAP_ATTRIBUTE_INDEX(272), 5, 0, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Descriptor (server) */ \ { \ - 0x050D, ZAP_ATTRIBUTE_INDEX(276), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ + 0x050D, ZAP_ATTRIBUTE_INDEX(277), 8, 106, ZAP_CLUSTER_MASK(SERVER), NULL \ }, /* Endpoint: 5, Cluster: Application Basic (server) */ \ } @@ -1580,7 +1593,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 283 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 2005 }, { ZAP_CLUSTER_INDEX(23), 10, 1328 }, { ZAP_CLUSTER_INDEX(33), 4, 287 }, \ { ZAP_CLUSTER_INDEX(37), 5, 439 }, { ZAP_CLUSTER_INDEX(42), 3, 398 }, { ZAP_CLUSTER_INDEX(45), 2, 106 }, \ } @@ -1591,7 +1604,7 @@ #define ATTRIBUTE_SINGLETONS_SIZE (686) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (4559) +#define ATTRIBUTE_MAX_SIZE (4563) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (6) diff --git a/zzz_generated/tv-app/zap-generated/gen_config.h b/zzz_generated/tv-app/zap-generated/gen_config.h index 6bfc53dfb17504..0d1f199a7701fb 100644 --- a/zzz_generated/tv-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-app/zap-generated/gen_config.h @@ -167,7 +167,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp index 53e5806d7842f2..4ceb25cb3e3425 100644 --- a/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/tv-casting-app/zap-generated/callback-stub.cpp @@ -443,14 +443,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -473,14 +471,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; } diff --git a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h index 3bf6bc97daa0e7..b5df347029fb0d 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1126,13 +1126,13 @@ { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Level Control (server) */ \ - { 0x0000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ - { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ - { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ - { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ - { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ - { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ - { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ + { 0x0000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x00) }, /* current level */ \ + { 0x0001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* remaining time */ \ + { 0x0002, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* min level */ \ + { 0x0003, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0xFF) }, /* max level */ \ + { 0x0004, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current frequency */ \ + { 0x0005, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* min frequency */ \ + { 0x0006, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* max frequency */ \ { 0x000F, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* options */ \ { 0x0010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -1144,9 +1144,11 @@ { 0x0013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ ZAP_EMPTY_DEFAULT() }, /* off transition time */ \ { 0x0014, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ - { 0x4000, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_EMPTY_DEFAULT() }, /* start up current level */ \ - { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* default move rate */ \ + { 0x4000, ZAP_TYPE(INT8U), 1, \ + ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(255) }, /* start up current level */ \ + { 0xFFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Binary Input (Basic) (server) */ \ { 0x0051, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ diff --git a/zzz_generated/tv-casting-app/zap-generated/gen_config.h b/zzz_generated/tv-casting-app/zap-generated/gen_config.h index 6d1336ae44732a..db956ac807034a 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -215,7 +215,7 @@ #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL // User options for server plugin Level Control -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 255 +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL 254 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL 0 #define EMBER_AF_PLUGIN_LEVEL_CONTROL_RATE 0 diff --git a/zzz_generated/window-app/zap-generated/callback-stub.cpp b/zzz_generated/window-app/zap-generated/callback-stub.cpp index 5415ccc97ce01e..5a7ffa28d86d42 100644 --- a/zzz_generated/window-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/window-app/zap-generated/callback-stub.cpp @@ -187,14 +187,12 @@ emberAfAllowNetworkWriteAttributeCallback(EndpointId endpoint, ClusterId cluster return EMBER_ZCL_ATTRIBUTE_WRITE_PERMISSION_ALLOW_WRITE_NORMAL; // Default } -bool __attribute__((weak)) -emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeReadAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } -bool __attribute__((weak)) -emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, uint16_t manufacturerCode, AttributeId attributeId) +bool __attribute__((weak)) emberAfAttributeWriteAccessCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { return true; } @@ -217,14 +215,14 @@ bool __attribute__((weak)) emberAfMessageSentCallback(const MessageSendDestinati EmberAfStatus __attribute__((weak)) emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer, uint16_t maxReadLength) + uint8_t * buffer, uint16_t maxReadLength) { return EMBER_ZCL_STATUS_FAILURE; } EmberAfStatus __attribute__((weak)) emberAfExternalAttributeWriteCallback(EndpointId endpoint, ClusterId clusterId, EmberAfAttributeMetadata * attributeMetadata, - uint16_t manufacturerCode, uint8_t * buffer) + uint8_t * buffer) { return EMBER_ZCL_STATUS_FAILURE; }