From 99dd36a4e0111fada98b708ef092ede7637c6b63 Mon Sep 17 00:00:00 2001 From: kowsisoundhar12 <57476670+kowsisoundhar12@users.noreply.github.com> Date: Wed, 9 Mar 2022 08:58:44 +0530 Subject: [PATCH 01/43] Test added march 8 (#15957) * Added new manual scripts * Added Auto generated File Former-commit-id: 35fad7df96f09e3a52cb2c24998d159fe81895a9 --- examples/chip-tool/templates/tests/tests.js | 52 + .../chip-all-clusters-app.REMOVED.git-id | 1 + .../chip-all-clusters-app.map.REMOVED.git-id | 1 + .../chip-tool.REMOVED.git-id | 1 + .../chip-tool.map.REMOVED.git-id | 1 + .../chip-door-lock-app.REMOVED.git-id | 1 + .../chip-door-lock-app.map.REMOVED.git-id | 1 + .../chip-tv-app.REMOVED.git-id | 1 + .../chip-tv-app.map.REMOVED.git-id | 1 + .../suites/certification/Test_TC_DD_3_11.yaml | 229 ++ .../suites/certification/Test_TC_DD_3_12.yaml | 321 ++ .../suites/certification/Test_TC_DD_3_13.yaml | 224 ++ .../suites/certification/Test_TC_DD_3_14.yaml | 375 ++ .../suites/certification/Test_TC_DM_1_4.yaml | 37 + .../suites/certification/Test_TC_DM_2_4.yaml | 43 + .../suites/certification/Test_TC_DM_3_4.yaml | 29 + .../suites/certification/Test_TC_FLW_3_1.yaml | 41 + .../certification/Test_TC_GENDIAG_2_1.yaml | 40 + .../suites/certification/Test_TC_IDM_6_3.yaml | 29 + .../suites/certification/Test_TC_IDM_6_4.yaml | 74 + .../suites/certification/Test_TC_ILL_2_2.yaml | 47 + .../suites/certification/Test_TC_MC_3_13.yaml | 104 + .../suites/certification/Test_TC_MF_1_25.yaml | 59 + .../suites/certification/Test_TC_MF_1_26.yaml | 93 + .../suites/certification/Test_TC_MF_1_27.yaml | 59 + .../suites/certification/Test_TC_MF_1_28.yaml | 59 + .../suites/certification/Test_TC_MOD_2_2.yaml | 80 + .../suites/certification/Test_TC_MOD_3_1.yaml | 262 ++ .../suites/certification/Test_TC_MOD_3_2.yaml | 194 + .../suites/certification/Test_TC_MOD_3_3.yaml | 195 + .../suites/certification/Test_TC_OCC_2_3.yaml | 42 + .../suites/certification/Test_TC_OCC_2_4.yaml | 73 + .../suites/certification/Test_TC_OCC_3_1.yaml | 43 + .../suites/certification/Test_TC_OO_2_4.yaml | 127 + .../suites/certification/Test_TC_PRS_2_2.yaml | 39 + .../suites/certification/Test_TC_PRS_2_3.yaml | 60 + .../certification/Test_TC_PSCFG_3_1.yaml | 74 + .../suites/certification/Test_TC_PS_2_2.yaml | 111 + .../suites/certification/Test_TC_SU_4_1.yaml | 140 + .../suites/certification/Test_TC_SU_4_2.yaml | 44 + .../certification/Test_TC_WNCV_6_1.yaml | 144 + .../chip-tool/zap-generated/test/Commands.h | 3294 ++++++++++++++--- 42 files changed, 6318 insertions(+), 527 deletions(-) create mode 100644 objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id create mode 100644 objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id create mode 100644 src/app/tests/suites/certification/Test_TC_DD_3_11.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DD_3_12.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DD_3_13.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DD_3_14.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DM_1_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DM_2_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_DM_3_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MC_3_13.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MF_1_25.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MF_1_26.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MF_1_27.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MF_1_28.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_OO_2_4.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_PS_2_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_SU_4_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_SU_4_2.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml diff --git a/examples/chip-tool/templates/tests/tests.js b/examples/chip-tool/templates/tests/tests.js index 420313fc4da4e6..2ec09673855475 100644 --- a/examples/chip-tool/templates/tests/tests.js +++ b/examples/chip-tool/templates/tests/tests.js @@ -32,6 +32,10 @@ function getManualTests() 'Test_TC_DD_3_6', 'Test_TC_DD_3_9', 'Test_TC_DD_3_10', + 'Test_TC_DD_3_11', + 'Test_TC_DD_3_12', + 'Test_TC_DD_3_13', + 'Test_TC_DD_3_14', 'Test_TC_DD_4_1', ]; @@ -66,8 +70,11 @@ function getManualTests() const DeviceManagement = [ 'Test_TC_DM_1_2', + 'Test_TC_DM_1_4', 'Test_TC_DM_2_3', + 'Test_TC_DM_2_4', 'Test_TC_DM_3_2', + 'Test_TC_DM_3_4', ]; const DiagnosticsLogs = [ @@ -93,6 +100,7 @@ function getManualTests() const GeneralDiagnostics = [ 'Test_TC_GENDIAG_1_1', 'Test_TC_GENDIAG_1_2', + 'Test_TC_GENDIAG_2_1', ]; const Identify = [ @@ -102,6 +110,7 @@ function getManualTests() const IlluminanceMeasurement = [ 'Test_TC_ILL_2_1', + 'Test_TC_ILL_2_2', ]; const InteractionDataModel = [ @@ -117,10 +126,13 @@ function getManualTests() 'Test_TC_IDM_5_2', 'Test_TC_IDM_6_1', 'Test_TC_IDM_6_2', + 'Test_TC_IDM_6_3', + 'Test_TC_IDM_6_4', ]; const MediaControl = [ 'Test_TC_MC_3_12', + 'Test_TC_MC_3_13', 'Test_TC_MC_4_1', 'Test_TC_MC_8_2', 'Test_TC_MC_9_2', @@ -157,12 +169,20 @@ function getManualTests() 'Test_TC_MF_1_22', 'Test_TC_MF_1_23', 'Test_TC_MF_1_24', + 'Test_TC_MF_1_25', + 'Test_TC_MF_1_26', + 'Test_TC_MF_1_27', + 'Test_TC_MF_1_28', ]; const ModeSelect = [ 'Test_TC_MOD_1_1', 'Test_TC_MOD_1_2', 'Test_TC_MOD_2_1', + 'Test_TC_MOD_2_2', + 'Test_TC_MOD_3_1', + 'Test_TC_MOD_3_2', + 'Test_TC_MOD_3_3', ]; const OTASoftwareUpdate = [ @@ -178,11 +198,14 @@ function getManualTests() 'Test_TC_SU_3_2', 'Test_TC_SU_3_3', 'Test_TC_SU_3_4', + 'Test_TC_SU_4_1', + 'Test_TC_SU_4_2', ]; const PowerSourceConfiguration = [ 'Test_TC_PSCFG_1_1', 'Test_TC_PSCFG_2_1', + 'Test_TC_PSCFG_3_1', ]; const SecureChannel = [ @@ -204,6 +227,30 @@ function getManualTests() const WindowCovering = [ 'Test_TC_WNCV_2_3', + 'Test_TC_WNCV_6_1', + ]; + + const FlowMeasurement = [ + 'Test_TC_FLW_3_1', + ]; + + const OccupancySensing = [ + 'Test_TC_OCC_2_3', + 'Test_TC_OCC_2_4', + 'Test_TC_OCC_3_1', + ]; + + const OnOff = [ + 'Test_TC_OO_2_4', + ]; + + const PressureMeasurement = [ + 'Test_TC_PRS_2_2', + 'Test_TC_PRS_2_3', + ]; + + const PowerSource = [ + 'Test_TC_PS_2_2', ]; const tests = [ @@ -230,6 +277,11 @@ function getManualTests() SoftwareDiagnostics, // WiFiNetworkDiagnostics, // WindowCovering, // + FlowMeasurement, // + OccupancySensing, // + OnOff, // + PressureMeasurement, // + PowerSource, // ]; return tests.flat(1); diff --git a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id new file mode 100644 index 00000000000000..29eef41d90d348 --- /dev/null +++ b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id @@ -0,0 +1 @@ +335fcfe3b2ee9ff5ee47781735fb823fe3fbd61e \ No newline at end of file diff --git a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id new file mode 100644 index 00000000000000..44d2421e13eb14 --- /dev/null +++ b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id @@ -0,0 +1 @@ +6ea178d9396304eb8f7787f6120c3b96aa28c924 \ No newline at end of file diff --git a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id new file mode 100644 index 00000000000000..e510062f66f6e6 --- /dev/null +++ b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id @@ -0,0 +1 @@ +d8dbffe69c7902379dc077cdb72cdc2281f955ef \ No newline at end of file diff --git a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id new file mode 100644 index 00000000000000..cd48dbfcfd1f49 --- /dev/null +++ b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id @@ -0,0 +1 @@ +c6ed2046073782fadab254ac30217905494a0683 \ No newline at end of file diff --git a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id new file mode 100644 index 00000000000000..914a0482efd3b9 --- /dev/null +++ b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id @@ -0,0 +1 @@ +817b1334292877356bbc4a34c29577496fd5ce1c \ No newline at end of file diff --git a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id new file mode 100644 index 00000000000000..1d36716751dc32 --- /dev/null +++ b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id @@ -0,0 +1 @@ +a779dd26be2c2aefb538fd3f6ad8916fe656ae00 \ No newline at end of file diff --git a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id new file mode 100644 index 00000000000000..156edf0824ae88 --- /dev/null +++ b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id @@ -0,0 +1 @@ +12bb8df2c2276efbeb1a639b8009a3bd0eb4b183 \ No newline at end of file diff --git a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id new file mode 100644 index 00000000000000..cad93254760a03 --- /dev/null +++ b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id @@ -0,0 +1 @@ +cdb2a847b417200f52ebfe85905073b2009624ae \ No newline at end of file diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml new file mode 100644 index 00000000000000..fd4feb0004932a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DD_3_11.yaml @@ -0,0 +1,229 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 7.3.11. [TC-DD-3.11] Commissioning Flow - QR Code [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "Version: Use a QR code from a commissionee that has their QR code + Version bit string set to 000" + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 0 -dc 2 -dv 3840 -ps 20202021 2022-02-25 23:28:06 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-25 + 23:28:06 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J042C00KA0648G00]" + disabled: true + + - label: + "Scan the QR code from the previous step using the DUT. Follow any + manufacturer-specific steps needed for the Commissioner/Commissionee + to complete the commissioning process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:-24J042C00KA0648G00 ... [1645836234938] + [9239:26087760] CHIP: [DMG] Received Command Response Data, Endpoint=0 + Cluster=0x0000_0030 Command=0x0000_0005 [1645836234938] + [9239:26087760] CHIP: [CTL] Received CommissioningComplete response + [1645836234938] [9239:26087760] CHIP: [CTL] Rendezvous cleanup + [1645836234938] [9239:26087760] CHIP: [TOO] Device commissioning + completed with success Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... + [1645836235.102593][8174:8174] CHIP:EM: Piggybacking Ack for + MessageCounter:9602810 on exchange: 9753r + [1645836235.102654][8174:8174] CHIP:IN: Prepared secure message + 0xaaaae5bbed98 to 0x000000000001B669 (1) of type 0x9 and protocolId + (0, 1) on exchange 9753r with MessageCounter:12855769. + [1645836235.102698][8174:8174] CHIP:IN: Sending encrypted msg + 0xaaaae5bbed98 with MessageCounter:12855769 to 0x000000000001B669 (1) + at monotonic time: 25637371 msec [1645836235.102836][8174:8174] + CHIP:DMG: ICR moving to [CommandSen] [1645836235.102863][8174:8174] + CHIP:DMG: ICR moving to [AwaitingDe] [1645836235.102906][8174:8174] + CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1645836235.102932][8174:8174] CHIP:SVR: Commissioning completed + successfully" + disabled: true + + - label: + "If (PICS_DT_THREAD), Standard Commissioning Flow: Use a QR code from + a commissionee that has their Custom Flow bit set to 0 and supports + BLE for its Discovery Capability." + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 0 -dc 2 -dv 3840 -ps 20202021 2022-02-25 23:28:06 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-25 + 23:28:06 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J042C00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_THREAD), Scan the QR code from the previous step using + the DUT. Follow any steps needed for the Commissioner/Commissionee to + complete the commissioning process using BLE" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:-24J042C00KA0648G00 ... [1645836234938] + [9239:26087760] CHIP: [DMG] Received Command Response Data, Endpoint=0 + Cluster=0x0000_0030 Command=0x0000_0005 [1645836234938] + [9239:26087760] CHIP: [CTL] Received CommissioningComplete response + [1645836234938] [9239:26087760] CHIP: [CTL] Rendezvous cleanup + [1645836234938] [9239:26087760] CHIP: [TOO] Device commissioning + completed with success Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... + [1645836235.102593][8174:8174] CHIP:EM: Piggybacking Ack for + MessageCounter:9602810 on exchange: 9753r + [1645836235.102654][8174:8174] CHIP:IN: Prepared secure message + 0xaaaae5bbed98 to 0x000000000001B669 (1) of type 0x9 and protocolId + (0, 1) on exchange 9753r with MessageCounter:12855769. + [1645836235.102698][8174:8174] CHIP:IN: Sending encrypted msg + 0xaaaae5bbed98 with MessageCounter:12855769 to 0x000000000001B669 (1) + at monotonic time: 25637371 msec [1645836235.102836][8174:8174] + CHIP:DMG: ICR moving to [CommandSen] [1645836235.102863][8174:8174] + CHIP:DMG: ICR moving to [AwaitingDe] [1645836235.102906][8174:8174] + CHIP:DL: HandlePlatformSpecificBLEEvent 32784 + [1645836235.102932][8174:8174] CHIP:SVR: Commissioning completed + successfully" + disabled: true + + - label: + "Standard Commissioning Flow: Use a QR code from a commissionee that + has their Custom Flow bit set to 0 and supports IP Network for its + Discovery Capability." + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 0 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:07:29 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-26 + 03:07:29 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J0AFN00KA0648G00]" + disabled: true + + - label: + "Scan the QR code from the previous step using the DUT. Follow any + steps needed for the Commissioner/Commissionee to complete the + commissioning process using IP Network" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:-24J042C00KA0648G00 ... [1646261423084] + [53218:29382487] CHIP: [CTL] Received CommissioningComplete response + [1646261423084] [53218:29382487] CHIP: [CTL] Rendezvous cleanup + [1646261423084] [53218:29382487] CHIP: [TOO] Device commissioning + completed with success Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... + [1646261423.249620][28366:28366] CHIP:DMG: ICR moving to [AwaitingDe] + [1646261423.249687][28366:28366] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646261423.249738][28366:28366] + CHIP:SVR: Commissioning completed successfully" + disabled: true + + - label: + "User-Intent Commissioning Flow: Use a QR code from a commissionee + that has their Custom Flow bit set to 1 and supports BLE for its + Discovery Capability. Place the commissionee into commissioning mode + according to the devices specified instructions in its pairing hint." + verification: + "BLOCKED chip-all-clusters-app does not currently support User-Intent + commissioning flow chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 1 -dc 2 -dv 3840 -ps 20202021 2022-02-26 03:17:50 + matter-te-6 chip.SPL[22108] INFO Manual pairing code: [34970112332] + 2022-02-26 03:17:50 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J00ID00KA0648G00]" + disabled: true + + - label: + "Scan the QR code from the previous step using the DUT. Follow any + steps needed for the Commissioner/Commissionee to complete the + commissioning process using BLE" + verification: + "BLOCKED chip-all-clusters-app does not currently support User-Intent + commissioning flow" + disabled: true + + - label: + "User-Intent Commissioning Flow: Use a QR code from a commissionee + that has their Custom Flow bit set to 1 and supports IP Network for + its Discovery Capability. Place the commissionee into Commissioning + Mode according to the devices specified instructions in its pairing + hint." + verification: + "BLOCKED chip-all-clusters-app does not currently support User-Intent + commissioning flow" + disabled: true + + - label: + "Scan the QR code from the previous step using the DUT. Follow any + manufacturer-specific steps needed for the Commissioner/Commissionee + to complete the commissioning process using IP Network" + verification: + "BLOCKED chip-all-clusters-app does not currently support User-Intent + commissioning flow chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 1 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:19:10 + matter-te-6 chip.SPL[22108] INFO Manual pairing code: [34970112332] + 2022-02-26 03:19:10 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J06VO00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_THREAD), Custom Commissioning Flow: Use a QR code from a + commissionee that has their Custom Flow bit set to 2 and supports BLE + for its Discovery Capability. Place the commissionee into + commissioning mode according to the devices specified instructions in + the given URL." + verification: + "BLOCKED chip-all-clusters-app does not currently support Custom + Commissioning Flow chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 2 -dc 2 -dv 3840 -ps 20202021 2022-02-26 03:20:27 + matter-te-6 chip.SPL[22108] INFO Manual pairing code: + [749701123365521327694] 2022-02-26 03:20:27 matter-te-6 + chip.SPL[22108] INFO SetupQRCode: [MT:-24J0YXE00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_THREAD), Scan the QR code from the previous step using + the DUT. Follow any manufacturer-specific steps needed for the + Commissioner/Commissionee to complete the commissioning process using + BLE" + verification: + "BLOCKED chip-all-clusters-app does not currently support Custom + Commissioning Flow" + disabled: true + + - label: + "If (PICS_DT_THREAD), Custom Commissioning Flow: Use a QR code from a + commissionee that has their Custom Flow bit set to 2 and supports IP + Network for its Discovery Capability. Place the commissionee into + commissioning mode according to the devices specified instructions in + the given URL." + verification: + "BLOCKED chip-all-clusters-app does not currently support Custom + Commissioning Flow chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 2 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:22:27 + matter-te-6 chip.SPL[22108] INFO Manual pairing code: + [749701123365521327694] 2022-02-26 03:22:27 matter-te-6 + chip.SPL[22108] INFO SetupQRCode: [MT:-24J029Q00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_THREAD), Scan the QR code from the previous step using + the DUT. Follow any manufacturer-specific steps needed for the + Commissioner/Commissionee to complete the commissioning process using + IP Network" + verification: + "BLOCKED chip-all-clusters-app does not currently support Custom + Commissioning Flow" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml new file mode 100644 index 00000000000000..c39e3bce4572f5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DD_3_12.yaml @@ -0,0 +1,321 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 7.3.12. [TC-DD-3.12] Commissioning Flow - QR Code - Negative scenario [DUT - + Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Locate and scan the Commissionees QR code using DUT" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app + ...[1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "Version String: Using the QR code from Step 1, generate a new QR code + but substituting out the current Version String with an invalid + Version String (i.e. '001' or any non-zero 3-bit value)" + verification: + "chip-device-ctrl > setup-payload generate -vr 001 -vi 65521 -pi 32769 + -cf 0 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:40:59 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-26 + 03:40:59 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:.24J0AFN00KA0648G00]" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:.24J0AFN00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "VID/PID: Using the QR code from Step 1, generate a new QR code but + substituting out the current VID/PID with an invalid VID/PID (i.e. add + 1 to each of the VID and PID values so that they are different from + the valid 16-bit values)" + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65522 -pi 32770 + -cf 1 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:42:39 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-26 + 03:42:39 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:86PS06VO00KA0648G00]" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "chip-tool does not prevent commissioning because of invalid VID/PID + values. This is handled after the commissioning process. This test + step is not valid and is addressed in PR#893 DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing qrcode 1234 + MT:86PS06VO00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "If (PICS_DT_STANDARD_COMM_FLOW), Using the QR code from Step 1, + generate a new QR code using all the same Onboarding Payload + components except for the Custom Flow bit, set it to 0: Standard + Commissioning Flow" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over BLE when the discovery capability should not be advertising with + capabilites set to '0' chip-device-ctrl > setup-payload generate -vr 0 + -vi 65521 -pi 32769 -cf 0 -dc 2 -dv 3840 -ps 20202021 2022-02-26 + 03:50:13 matter-te-6 chip.SPL[22108] INFO Manual pairing code: + [34970112332] 2022-02-26 03:50:13 matter-te-6 chip.SPL[22108] INFO + SetupQRCode: [MT:-24J042C00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_STANDARD_COMM_FLOW), Scan the QR code, generated in the + previous step, using the DUT" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over BLE when the discovery capability should not be advertising with + capabilites set to '0' DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing qrcode 1234 + MT:-24J042C00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "If (PICS_DT_USER_INTENT_COMM_FLOW), Using the QR code from Step 1, + generate a new QR code using all the same Onboarding Payload + components except for the Custom Flow bit, set it to 1: User-Intent + Commissioning Flow" + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 1 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:42:39 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [34970112332] 2022-02-26 + 03:42:39 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J06VO00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_USER_INTENT_COMM_FLOW), Scan the QR code, generated in + the previous step, using the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:-24J06VO00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "If (PICS_DT_CUSTOM_COMM_FLOW), Using the QR code from Step 1, + generate a new QR code using all the same Onboarding Payload + components except for the Custom Flow bit, set it to 2: Custom + Commissioning Flow" + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 2 -dc 4 -dv 3840 -ps 20202021 2022-02-26 03:46:32 matter-te-6 + chip.SPL[22108] INFO Manual pairing code: [749701123365521327694] + 2022-02-26 03:46:32 matter-te-6 chip.SPL[22108] INFO SetupQRCode: + [MT:-24J029Q00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_CUSTOM_COMM_FLOW), Scan the QR code, generated in the + previous step, using the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 MT:-24J029Q00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "Custom Flow - Reserved: Using the QR code from Step 1, generate a new + QR code using all the same Onboarding Payload components except for + the Custom Flow bit, set it to 3: Reserved" + verification: + "NEED SUPPORT: Unable to generate invalid QR code chip-device-ctrl > + setup-payload generate -vr 0 -vi 65521 -pi 32769 -cf 3 -dc 4 -dv 3840 + -ps 20202021 2022-02-26 03:48:59 matter-te-6 chip.SPL[22108] ERROR + Invalid Custom Flow Chip Stack Error 47" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "NEED SUPPORT: Unable to generate invalid QR code in previous step" + disabled: true + + - label: + "If (PICS_DT_BLE), Using the QR code from Step 1, generate a new QR + code using all the same Onboarding Payload components except for the + Discovery Capability bit string, set it to BLE for discovery" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over BLE when the discovery capability should not be advertising with + capabilites set to '0' chip-device-ctrl > setup-payload generate -vr 0 + -vi 65521 -pi 32769 -cf 0 -dc 2 -dv 3840 -ps 20202021 2022-02-26 + 03:50:13 matter-te-6 chip.SPL[22108] INFO Manual pairing code: + [34970112332] 2022-02-26 03:50:13 matter-te-6 chip.SPL[22108] INFO + SetupQRCode: [MT:-24J042C00KA0648G00]" + disabled: true + + - label: + "If (PICS_DT_BLE), Scan the QR code, generated in the previous step, + using the DUT" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over BLE when the discovery capability should not be advertising with + capabilites set to '0' DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing qrcode 1234 + MT:-24J042C00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "If (PICS_DT_IP), Using the QR code from Step 1, generate a new QR + code using all the same Onboarding Payload components except for the + Discovery Capability bit string, set it to IP Network for discovery" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over IP when the discovery capability should not be advertising with + capabilites set to '0' chip-device-ctrl > setup-payload generate -vr 0 + -vi 65521 -pi 32769 -cf 0 -dc 4 -dv 3840 -ps 20202021 2022-02-26 + 03:58:28 matter-te-6 chip.SPL[22108] INFO Manual pairing code: + [34970112332] 2022-02-26 03:58:28 matter-te-6 chip.SPL[22108] INFO + SetupQRCode: [MT:-24J0AFN00KA0648G00]" + disabled: true + + - label: "If (PICS_DT_IP), Repeat Step 5.b" + verification: + "BLOCKED chip-all-clusters-app BUG: chip-all-clusters-app advertises + over IP when the discovery capability should not be advertising with + capabilites set to '0' DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing qrcode 1234 + MT:-24J0AFN00KA0648G00 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "Discovery Capability - Reserved: Using the QR code from Step 1, + generate a new QR code using all the same Onboarding Payload + components except for the Discovery Capability bit string, set it to + non-zeros" + verification: + "NEED SUPPORT Unable to generate fals QR codes with discovery + capability set to an invalid number (i.e. 8 or above for + chip-device-ctrl) chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 0 -dc 8 -dv 3840 -ps 20202021 2022-03-05 00:31:33 + matter-te-6 chip.SPL[394173] INFO Manual pairing code: [34970112332] + Chip Stack Error 47" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "NEED SUPPORT Unable to generate false QR codes with discovery + capability set to an invalid number (i.e. 8 or above for + chip-device-ctrl) Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "Passcode: Using the QR code from Step 1, generate a new QR code using + all the same Onboarding Payload components except for the Passcode. + For each passcode in the following list, set the Passcode component to + one of the invalid Passcodes and generate a new QR code using all the + same Onboarding Payload components and one Passcode from the list: + 00000000, 11111111, 22222222, 33333333, 44444444, 55555555, 66666666, + 77777777, 88888888, 99999999, 12345678, 87654321" + verification: + "NEED SUPPORT: Unable to generate false QR codes with chip-device-ctrl + chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 1 -dc 4 -dv 3840 -ps 00000000 2022-03-03 00:11:58 matter-te-6 + chip.SPL[22108] ERROR Failed encoding invalid payload Chip Stack Error + 47 00000000: 11111111: 22222222: 33333333: 44444444: 55555555: + 66666666: 77777777: 88888888: 99999999: 12345678: 87654321" + disabled: true + + - label: + "Scan each of the generated QR codes from the previous step using DUT" + verification: + "NEED SUPPORT: Unable to generate false QR codes with chip-device-ctrl + in previous step" + disabled: true + + - label: + "Prefix: Using the QR code from Step 1, generate a new QR code but + substituting out the current Prefix with an invalid Prefix that is not + 'MT:' (i.e. Prefix='AB:')" + verification: "AB:-24J0W2T00KA0648G00" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing qrcode 1234 AB:-24J0W2T00KA0648G00 ... [1646266501236] + [53666:29430483] CHIP: [IN] TransportMgr initialized [1646266501236] + [53666:29430485] CHIP: [DL] _OnPlatformEvent [1646266501236] + [53666:29430483] CHIP: [-] + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed at + ../../commands/common/CHIPCommand.cpp:62 [1646266501236] + [53666:29430483] CHIP: [TOO] Run command failure: + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed [1646266501243] + [53666:29430483] CHIP: [SPT] VerifyOrDie failure at + ../../third_party/connectedhomeip/src/lib/support/Pool.h:311: + Allocated() == 0 Abort trap: 6 Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "Variable length TLV: Using the QR code from Step 1, generate a new QR + code but substituting out the correct length TLV with an invalid + length TLV according to the manufacturers specifications. (i.e. if the + manufacturer specifies a TLV length=8, substitute in a TVL length=4, + or any other TLV length not equal to 8)" + verification: + "NEED SUPPORT: Unable to generate false QR codes with chip-device-ctrl" + disabled: true + + - label: "Scan the QR code, generated in the previous step, using the DUT" + verification: + "NEED SUPPORT: Unable to generate false QR codes with chip-device-ctrl + in previous step" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml new file mode 100644 index 00000000000000..4e7df5518ff176 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DD_3_13.yaml @@ -0,0 +1,224 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 7.3.13. [TC-DD-3.13] Commissioning Flow - Manual Pairing Code [DUT - + Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "If (PICS_11_MANUAL_PC), VERSION: Use an 11 digit Manual pairing code + from a commissionee that has their Manual pairing code VERSION bit + string set to 0" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT. + Follow any steps needed for the Commissioner/Commissionee to complete + the commissioning process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 34970112332 ... [1646267353060] + [53689:29437234] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646267353.273560][28656:28656] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646267353.273586][28656:28656] + CHIP:SVR: Commissioning completed successfully" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VERSION: Use a 21 digit Manual pairing code + from a commissionee that has their Manual pairing code VERSION bit + string set to 0" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT. + Follow any steps needed for the Commissioner/Commissionee to complete + the commissioning process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 34970112332 ... [1646267665776] + [53714:29441244] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646267665.929519][28709:28709] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646267665.929545][28709:28709] + CHIP:SVR: Commissioning completed successfully" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), VID_PID_PRESENT: Use an 11 digit Manual + pairing code from a commissionee that has their VID_PID_PRESENT bit + string set to 0" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT. + Follow any steps needed for the Commissioner/Commissionee to complete + the commissioning process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 34970112332 ... [1646267353060] + [53689:29437234] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646267353.273560][28656:28656] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646267353.273586][28656:28656] + CHIP:SVR: Commissioning completed successfully" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VID_PID_PRESENT: Use a 21 digit Manual + pairing code from a commissionee that has their VID_PID_PRESENT bit + string set to 1" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT. + Follow any steps needed for the Commissioner/Commissionee to complete + the commissioning process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 34970112332 ... [1646267665776] + [53714:29441244] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646267665.929519][28709:28709] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646267665.929545][28709:28709] + CHIP:SVR: Commissioning completed successfully" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VENDOR_ID and PRODUCT_ID: Use a 21 digit + Manual pairing code from a commissionee that has a valid VENDOR_ID (as + defined in section 2.5.2. 'Vendor Identifier') and PRODUCT_ID (as + defined in section 2.5.3. 'Product Identifier')" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "Provide the manual pairing code, generated in the previous step, to + the DUT in any format supported by the DUT. Follow any steps needed + for the Commissioner/Commissionee to complete the commissioning + process." + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 34970112332 ... [1646267665776] + [53714:29441244] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646267665.929519][28709:28709] CHIP:DL: + HandlePlatformSpecificBLEEvent 32784 [1646267665.929545][28709:28709] + CHIP:SVR: Commissioning completed successfully" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml new file mode 100644 index 00000000000000..7fd104ab2bb8c2 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DD_3_14.yaml @@ -0,0 +1,375 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 7.3.14. [TC-DD-3.14] Commissioning Flow - Manual Pairing Code - Negative + scenario [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "If (PICS_11_MANUAL_PC), Provide the 11 digit manual pairing code from + the Commissionee to the DUT in any format supported by DUT" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the 21 digit manual pairing code from + the Commissionee to the DUT in any format supported by DUT" + verification: + "Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1645845935.798806][8925:8925] CHIP:DL: Device Configuration: + [1645845935.798853][8925:8925] CHIP:DL: Serial Number: TEST_SN + [1645845935.798875][8925:8925] CHIP:DL: Vendor Id: 65521 (0xFFF1) + [1645845935.798904][8925:8925] CHIP:DL: Product Id: 32769 (0x8001) + [1645845935.798929][8925:8925] CHIP:DL: Hardware Version: 0 + [1645845935.798960][8925:8925] CHIP:DL: Setup Pin Code: 20202021 + [1645845935.798984][8925:8925] CHIP:DL: Setup Discriminator: 3840 + (0xF00) [1645845935.799008][8925:8925] CHIP:DL: Manufacturing Date: + (not set) [1645845935.799038][8925:8925] CHIP:DL: Device Type: 65535 + (0xFFFF) [1645845935.799106][8925:8925] CHIP:SVR: SetupQRCode: + [MT:-24J042C00KA0648G00] [1645845935.799135][8925:8925] CHIP:SVR: + Copy/paste the below URL in a browser to see the QR Code: + [1645845935.799164][8925:8925] CHIP:SVR: + https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 + [1645845935.799195][8925:8925] CHIP:SVR: Manual pairing code: + [34970112332] [1645845935.799236][8925:8925] CHIP:SVR: Long manual + pairing code: [749701123365521327694]" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), VERSION: Using the manual code from Step 1.a, + generate a new manual code but substituting out the current VERSION + with an invalid VERSION: 1" + verification: + "BLOCKED chip-device-ctrl BUG: Generated pairing code does not change + when Version String is changed from 0 to, assuming it should + chip-device-ctrl > setup-payload generate -vr 1 -vi 65521 -pi 32769 + -cf 0 -dc 2 -dv 3840 -ps 20202021 2022-03-03 01:09:59 matter-te-6 + chip.SPL[333678] INFO Manual pairing code: [34970112332] 2022-03-03 + 01:09:59 matter-te-6 chip.SPL[333678] INFO SetupQRCode: + [MT:.24J042C00KA0648G00]" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "BLOCKED chip-device-ctrl BUG: Generated pairing code does not change + when Version String is changed from 0 to, assuming it should" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VERSION: Using the manual code from Step 1.b, + generate a new manual code but substituting out the current VERSION + with an invalid VERSION: 1" + verification: "" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 10054912339 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ..." + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), VID_PID_PRESENT: Using the manual code from + Step 1.a, generate a new manual code but substituting out the current + VID_PID_PRESENT with an invalid VID_PID_PRESENT set to 1" + verification: + "NEED SUPPORT: Unable to generate this manual code with + chip-device-ctrl: does not allow the option" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "NEED SUPPORT: Unable to generate manual code in previous step" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VID_PID_PRESENT: Using the manual code from + Step 1.b, generate a new manual code but substituting out the current + VID_PID_PRESENT with an invalid VID_PID_PRESENT set to 0" + verification: + "NEED SUPPORT: Unable to generate this manual code with + chip-device-ctrl: does not allow the option" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "NEED SUPPORT: Unable to generate manual code in previous step" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), SHORT DISCRIMINATOR: Using the manual code + from Step 1.a, generate a new manual code but substituting out the + current SHORT DISCRIMINATOR string with one set to an invalid one + (i.e. Any different SHORT DISCRIMINATOR than the commissionees SHORT + DISCRIMINATOR while following section 5.1.1.5. 'Discriminator value')" + verification: + "chip-device-ctrl > setup-payload generate -vr 0 -vi 65521 -pi 32769 + -cf 0 -dc 2 -dv 1111 -ps 20202021 2022-03-03 01:56:46 matter-te-6 + chip.SPL[381013] INFO Manual pairing code: [10054912339] 2022-03-03 + 01:56:46 matter-te-6 chip.SPL[381013] INFO SetupQRCode: + [MT:-24J0MBW17K10648G00]" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 10054912339 ... [1646273075122] + [54299:29491292] CHIP: [BLE] NewConnection [1646273075150] + [54299:29491292] CHIP: [BLE] CBManagerState: ON [1646273075152] + [54299:29491293] CHIP: [BLE] CBManagerState: RESETTING [1646273076351] + [54299:29491293] CHIP: [BLE] CBManagerState: ON Illegal instruction: 4 + Device TH: ./out/all-clusters-app/chip-all-clusters-app ... DUT does + not commission the TH to the Matter network" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), SHORT DISCRIMINATOR: Using the manual code + from Step 1.b, generate a new manual code but substituting out the + current SHORT DISCRIMINATOR string with one set to an invalid one + (i.e. Any different SHORT DISCRIMINATOR than the commissionees SHORT + DISCRIMINATOR while following section 5.1.1.5. Discriminator value)" + verification: + "NEED SUPPORT: Unable to generate this manual code with + chip-device-ctrl: does not generate 21-digit codes for every input" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "NEED SUPPORT: Unable to generate manual code in previous step" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Passcode: Using the manual code from Step + 1.a, generate a new manual code using all the same Onboarding Payload + components except for the Passcode. For each Passcode in the following + list, set the Passcode component to one of the invalid Passcode and + generate a new manual code using all the same Onboarding Payload + components and one Passcode from the list: 00000000, 11111111, + 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, + 99999999, 12345678, 87654321" + verification: + "NEED SUPPORT: Unable to generate false manual codes with + chip-device-ctrl chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 1 -dc 4 -dv 3840 -ps 00000000 2022-03-03 00:11:58 + matter-te-6 chip.SPL[22108] ERROR Failed encoding invalid payload Chip + Stack Error 47 00000000: 11111111: 22222222: 33333333: 44444444: + 55555555: 66666666: 77777777: 88888888: 99999999: 12345678: 87654321" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide each of the manual pairing codes, + generated in the previous step, to the DUT in any format supported by + the DUT" + verification: + "NEED SUPPORT: Unable to generate manual code in previous step" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Passcode: Using the manual code from Step + 1.b, generate a new manual code using all the same Onboarding Payload + components except for the Passcode. For each Passcode in the following + list, set the Passcode component to one of the invalid Passcode and + generate a new manual code using all the same Onboarding Payload + components and one Passcode from the list: 00000000, 11111111, + 22222222, 33333333, 44444444, 55555555, 66666666, 77777777, 88888888, + 99999999, 12345678, 87654321" + verification: + "NEED SUPPORT: Unable to generate false manual codes with + chip-device-ctrl chip-device-ctrl > setup-payload generate -vr 0 -vi + 65521 -pi 32769 -cf 1 -dc 4 -dv 3840 -ps 00000000 2022-03-03 00:11:58 + matter-te-6 chip.SPL[22108] ERROR Failed encoding invalid payload Chip + Stack Error 47 00000000: 11111111: 22222222: 33333333: 44444444: + 55555555: 66666666: 77777777: 88888888: 99999999: 12345678: 87654321" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide each of the manual pairing codes, + generated in the previous step, to the DUT in any format supported by + the DUT" + verification: + "NEED SUPPORT: Unable to generate manual code in previous step" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), VENDOR_ID: Using the manual code from Step + 1.b, generate a new manual code using all the same Onboarding Payload + components except for the VENDOR_ID. For each VENDOR_ID in the + following list, set the VENDOR_ID component to one of the invalid Test + VENDOR_IDs and generate a new manual code using all the same + Onboarding Payload components and one Test VENDOR_ID from the list: + 0xFFF1, 0xFFF2, 0xFFF3, 0xFFF4" + verification: + "16-MacBook-Pro:connectedhomeip liam$ sudo + ./examples/chip-tool/out/debug/chip-tool payload verhoeff-generate + 74970112336552132769 [1646274552600] [54458:29507435] CHIP: [SPL] + Generating Character for: 74970112336552132769 [1646274552601] + [54458:29507435] CHIP: [SPL] Generated Char: 4 0xFFF1: + 749701123365521327694 0xFFF2: 749701123365522327692 0xFFF3: + 749701123365523327697 0xFFF4: 749701123365524327693" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide each of the manual pairing codes, + generated in the previous step, to the DUT in any format supported by + the DUT" + verification: + "NOTE: chip-tool as a commissioner is meant to support these invalid + manual pairing codes but other commissioners SHALL NOT support them + without understanding the risks. chip-tool cannot be used as a + 'negative' case example for invalid Version ID manual codes. Run each + of the invalid manual codes in the previous step with the command + listed below 'DUT Commissioner' DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing manualcode 1234 + 749701123365521327694 ... Device TH: + ./out/all-clusters-app/chip-all-clusters-app ..." + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), PRODUCT_ID: Using the manual code from Step + 1.b, generate a new manual code but substituting out the current + PRODUCT_ID with an invalid PRODUCT_ID of 0x0000(i.e. While following + section 2.5.3. Product Identifier)" + verification: + "16-MacBook-Pro:connectedhomeip liam$ sudo + ./examples/chip-tool/out/debug/chip-tool payload verhoeff-generate + 74970112336552100000 Password: [1646274432948] [54452:29506141] CHIP: + [SPL] Generating Character for: 74970112336552100000 [1646274432949] + [54452:29506141] CHIP: [SPL] Generated Char: 6 Manual Pairing code: + 749701123365521000006" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "BLOCKED chip-tool BUG: chip-tool is allowing the Product ID to be + '00000' when this should not be allowed. However, this check may not + be handled during the commissionning process. DUT Commissioner: sudo + ./examples/chip-tool/out/debug/chip-tool pairing manualcode 1234 + 749701123365521000006 ... [1646275242410] [54535:29515978] CHIP: [CTL] + Received CommissioningComplete response [1646275242410] + [54535:29515978] CHIP: [CTL] Rendezvous cleanup [1646275242410] + [54535:29515978] CHIP: [TOO] Device commissioning completed with + success Device TH: ./out/all-clusters-app/chip-all-clusters-app ... + [1646275242.549708][29139:29139] CHIP:SVR: Commissioning completed + successfully" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), CHECK_DIGIT: Using the manual code from Step + 1.a, generate a new manual code but substituting out the current + CHECK_DIGIT with an invalid CHECK_DIGIT (i.e. Any different + CHECK_DIGIT than the commissionees CHECK_DIGIT while following Table + 38. Encoding Method without Vendor and Product IDs (VID_PID_Present == + 0))" + verification: + "16-MacBook-Pro:connectedhomeip liam$ sudo + ./examples/chip-tool/out/debug/chip-tool payload verhoeff-verify + 34970112331 10 [1646275789088] [54629:29523682] CHIP: [SPL] Verifying + Manual Code: 3497011233 [1646275789088] [54629:29523682] CHIP: [SPL] + 34970112331 is INVALID at position 10 Manual Pairing code: 3497011233" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 749701123365521327693 ... [1646275837642] + [54631:29524424] CHIP: [-] + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed at + ../../commands/common/CHIPCommand.cpp:62 [1646275837642] + [54631:29524424] CHIP: [TOO] Run command failure: + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed [1646275837649] + [54631:29524424] CHIP: [SPT] VerifyOrDie failure at + ../../third_party/connectedhomeip/src/lib/support/Pool.h:311: + Allocated() == 0 Abort trap: 6 Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true + + - label: + "If (PICS_21_MANUAL_PC), Check Digit: Using the manual code from Step + 1.b, generate a new manual code but substituting out the current + CHECK_DIGIT with an invalid CHECK_DIGIT (i.e. Any different + CHECK_DIGIT than the commissionees CHECK_DIGIT while following Table + 39. Encoding Method with Vendor and Product IDs included + (VID_PID_Present == 1))" + verification: + "16-MacBook-Pro:connectedhomeip liam$ sudo + ./examples/chip-tool/out/debug/chip-tool payload verhoeff-verify + 749701123365521327693 20 [1646275504257] [54540:29518920] CHIP: [SPL] + Verifying Manual Code: 74970112336552132769 [1646275504258] + [54540:29518920] CHIP: [SPL] 749701123365521327693 is INVALID at + position 20 Manual Pairing code: 749701123365521327693" + disabled: true + + - label: + "If (PICS_11_MANUAL_PC), Provide the manual pairing code, generated in + the previous step, to the DUT in any format supported by the DUT" + verification: + "DUT Commissioner: sudo ./examples/chip-tool/out/debug/chip-tool + pairing manualcode 1234 749701123365521327693 ... [1646275557755] + [54545:29519511] CHIP: [-] + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed at + ../../commands/common/CHIPCommand.cpp:62 [1646275557755] + [54545:29519511] CHIP: [TOO] Run command failure: + ../../third_party/connectedhomeip/src/setup_payload/ManualSetupPayloadParser.cpp:49: + CHIP Error 0x00000013: Integrity check failed [1646275557761] + [54545:29519511] CHIP: [SPT] VerifyOrDie failure at + ../../third_party/connectedhomeip/src/lib/support/Pool.h:311: + Allocated() == 0 Abort trap: 6 Device TH: + ./out/all-clusters-app/chip-all-clusters-app ... DUT has not + commissioned the TH to the Matter network" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DM_1_4.yaml b/src/app/tests/suites/certification/Test_TC_DM_1_4.yaml new file mode 100644 index 00000000000000..8fe6838c62da8d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DM_1_4.yaml @@ -0,0 +1,37 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.1.4. [TC-DM-1.4] Basic Information Cluster Events [DUT - Controller] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Simulate a reboot on the TH" + verification: "./chip-tool basic read-event-by-id 0x0 1 0" + disabled: true + + - label: "Simulate a Shut down on the TH" + verification: "./chip-tool basic read-event-by-id 0x01 1 0" + disabled: true + + - label: "Simulate a reboot on the TH" + verification: "" + disabled: true + + - label: "Simulate a Factory Reset the TH" + verification: "./chip-tool basic read-event-by-id 0x0 1 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DM_2_4.yaml b/src/app/tests/suites/certification/Test_TC_DM_2_4.yaml new file mode 100644 index 00000000000000..d5a06b0eac755f --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DM_2_4.yaml @@ -0,0 +1,43 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 10.2.4. [TC-DM-2.4] Operational Credential Attributes [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission TH to DUT" + verification: "" + disabled: true + + - label: "DUT reads the NOCs attribute from TH" + verification: "./chip-tool operationalcredentials read nocs 1 0" + disabled: true + + - label: "DUT reads the Fabrics attribute from TH" + verification: "./chip-tool operationalcredentials read fabrics 1 0" + disabled: true + + - label: "DUT reads the SupportedFabrics attribute from TH" + verification: + "./chip-tool operationalcredentials read supported-fabrics 1 0" + disabled: true + + - label: "DUT reads the CommissionedFabrics attribute from TH" + verification: + "./chip-tool operationalcredentials read commissioned-fabrics 1 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DM_3_4.yaml b/src/app/tests/suites/certification/Test_TC_DM_3_4.yaml new file mode 100644 index 00000000000000..9b0a8cd0d5fae3 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_DM_3_4.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.3.4. [TC-DM-3.4] Network Commissioning Attributes [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "if (PICS_WIFI) DUT reads MaxNetworks attribute on TH" + verification: "./chip-tool networkcommissioning read max-networks 1 0" + disabled: true + + - label: "if (PICS_WIFI) DUT reads Networks attribute on TH" + verification: "./chip-tool networkcommissioning read networks 1 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml new file mode 100644 index 00000000000000..4a611085d1d0ee --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml @@ -0,0 +1,41 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.3.1. [TC-FLW-3.1] Attributes with client as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "DUT reads attribute value from TH." + verification: "./chip-tool flowmeasurement read measured-value 1 1" + disabled: true + + - label: "DUT reads attribute value from TH." + verification: "./chip-tool flowmeasurement read min-measured-value 1 1" + disabled: true + + - label: "DUT reads attribute value from TH." + verification: "./chip-tool flowmeasurement read max-measured-value 1 1" + disabled: true + + - label: "DUT reads attribute value from TH." + verification: "chip-tool flowmeasurement read tolerance 1 1" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml b/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml new file mode 100644 index 00000000000000..0d31a3c50774a6 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_GENDIAG_2_1.yaml @@ -0,0 +1,40 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.1.3. [TC-GENDIAG-2.1] Event functionality test with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH use chip-tool event read to get server event report" + verification: + "./chip-tool generaldiagnostics read-event hardware-fault-change 1 0" + disabled: true + + - label: "TH use chip-tool event read to get server event report" + verification: + "./chip-tool generaldiagnostics read-event radio-fault-change 1 0" + disabled: true + + - label: "TH use chip-tool event read to get server event report" + verification: + "./chip-tool generaldiagnostics read-event network-fault-change 1 0" + disabled: true + + - label: "TH use chip-tool event read to get server event report" + verification: "./chip-tool generaldiagnostics read-event boot-reason 1 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml new file mode 100644 index 00000000000000..679367781300e5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_3.yaml @@ -0,0 +1,29 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 19.8.3. [TC-IDM-6.3] Events Read Interaction from DUT to TH [DUT - + Controller] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "DUT sends Read Request Message to the TH for a supported event." + verification: + "In case of chip tool, here is an example command to use sudo + ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml new file mode 100644 index 00000000000000..3dff2caa30521d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_4.yaml @@ -0,0 +1,74 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 19.8.4. [TC-IDM-6.4] Events Subscribe Interaction from DUT to TH [DUT - + Controller] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "DUT sends Subscribe Request Message to the TH for a supported event." + verification: + "In case of chip tool, here is an example command to use sudo + ./chip-tool any subscribe-event-by-id 0x0033 0x01 0 100 0 1 1" + disabled: true + + - label: + "DUT sends Subscribe Request Message to the TH + TH sends Report Data + message to DUT." + verification: + "In case of chip tool, here is an example command to use sudo + ./chip-tool softwarediagnostics subscribe-by-id 0xFFFFFFFF 0 100 0 1 0" + disabled: true + + - label: + "DUT sends Subscribe Request Message to the TH and TH does not respond + with Report Data message to DUT." + verification: "" + disabled: true + + - label: + "DUT sends Subscribe Request Message to the TH + TH sends Report Data + message to DUT + DUT sends Status Response Message to the TH + TH does + not respond with Subscribe Response message to DUT." + verification: "" + disabled: true + + - label: + "With an active Event subscription from DUT to TH, TH sends Report + Data message to DUT with an inactive SubscriptionId." + verification: "" + disabled: true + + - label: + "With an active Event subscription from DUT to TH, TH sends Report + Data message to DUT after the maximum interval from the last Report + Data." + verification: "" + disabled: true + + - label: + "TH sends Subscribe Request Message to DUT with EventRequests set to a + specific event. Once the subscription is active, reboot the TH. On the + DUT, perform actions to trigger the event. (Trigger it multiple + times). TH resubscribes to the same event after bootup to the DUT." + verification: + "In case of chip tool, here is an example command to use sudo + ./chip-tool softwarediagnostics subscribe-by-id 0x0 0 100 0 1 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml new file mode 100644 index 00000000000000..1fc363a3ab78e1 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_ILL_2_2.yaml @@ -0,0 +1,47 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 69.2.2. [TC-ILL-2.2] Primary functionality with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: + "Test Harness Client reads MinMeasuredValue and MaxMeasuredValue from + Server DUT" + verification: "./chip-tool illuminancemeasurement read measured-value 1 1" + disabled: true + + - label: "Cover the sensor or darken the room" + verification: "" + disabled: true + + - label: "After a few seconds, TH reads MeasuredValue attribute from DUT" + verification: "./chip-tool illuminancemeasurement read measured-value 1 1" + disabled: true + + - label: "Expose the sensor again to light" + verification: "" + disabled: true + + - label: "After a few seconds, TH reads MeasuredValue attribute from DUT" + verification: "./chip-tool illuminancemeasurement read measured-value 1 1" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml new file mode 100644 index 00000000000000..b5445cc41979f1 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml @@ -0,0 +1,104 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 18.5.4. [TC-MC-3.13] Rename Input Verification + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "TH reads the InputList attribute from the DUT to show list of Inputs + available" + verification: + "./chip-tool mediainput read input-list 1 1 [1646140193572] + [83167:3718213] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0507 Attribute + 0x0000_0000DataVersion: 645543558 [1646140193572] [83167:3718213] + CHIP: [TOO] InputList: 2 entries [1646140193572] [83167:3718213] CHIP: + [TOO] [1]: { [1646140193572] [83167:3718213] CHIP: [TOO] Index: 1 + [1646140193573] [83167:3718213] CHIP: [TOO] InputType: 4 + [1646140193573] [83167:3718213] CHIP: [TOO] Name: HDMI [1646140193573] + [83167:3718213] CHIP: [TOO] Description: High-Definition Multimedia + Interface [1646140193573] [83167:3718213] CHIP: [TOO] } + [1646140193573] [83167:3718213] CHIP: [TOO] [2]: { [1646140193573] + [83167:3718213] CHIP: [TOO] Index: 2 [1646140193573] [83167:3718213] + CHIP: [TOO] InputType: 4 [1646140193573] [83167:3718213] CHIP: [TOO] + Name: HDMI [1646140193573] [83167:3718213] CHIP: [TOO] Description: + High-Definition Multimedia Interface [1646140193573] [83167:3718213] + CHIP: [TOO] }" + disabled: true + + - label: + "TH sends a RenameInput command to DUT to rename an input from the + list returned in step 1" + verification: + "./chip-tool mediainput rename-input 1 newname 1 1 [1646140236677] + [83197:3718807] CHIP: [EM] Received message of type 0x9 with + protocolId (0, 1) and MessageCounter:11877446 on exchange 40542i + [1646140236677] [83197:3718807] CHIP: [EM] Found matching exchange: + 40542i, Delegate: 0x7fc8b97e2670 [1646140236677] [83197:3718807] CHIP: + [EM] Rxd Ack; Removing MessageCounter:7248594 from Retrans Table on + exchange 40542i [1646140236677] [83197:3718807] CHIP: [EM] Removed + CHIP MessageCounter:7248594 from RetransTable on exchange 40542i + [1646140236677] [83197:3718807] CHIP: [DMG] ICR moving to [ResponseRe] + [1646140236677] [83197:3718807] CHIP: [DMG] InvokeResponseMessage = + [1646140236677] [83197:3718807] CHIP: [DMG] { [1646140236677] + [83197:3718807] CHIP: [DMG] suppressResponse = false, [1646140236677] + [83197:3718807] CHIP: [DMG] InvokeResponseIBs = [1646140236677] + [83197:3718807] CHIP: [DMG] [ [1646140236677] [83197:3718807] CHIP: + [DMG] InvokeResponseIB = [1646140236677] [83197:3718807] CHIP: [DMG] { + [1646140236677] [83197:3718807] CHIP: [DMG] CommandStatusIB = + [1646140236677] [83197:3718807] CHIP: [DMG] { [1646140236677] + [83197:3718807] CHIP: [DMG] CommandPathIB = [1646140236677] + [83197:3718807] CHIP: [DMG] { [1646140236677] [83197:3718807] CHIP: + [DMG] EndpointId = 0x1, [1646140236677] [83197:3718807] CHIP: [DMG] + ClusterId = 0x507, [1646140236677] [83197:3718807] CHIP: [DMG] + CommandId = 0x3, [1646140236677] [83197:3718807] CHIP: [DMG] }, + [1646140236677] [83197:3718807] CHIP: [DMG] [1646140236677] + [83197:3718807] CHIP: [DMG] StatusIB = [1646140236677] [83197:3718807] + CHIP: [DMG] { [1646140236677] [83197:3718807] CHIP: [DMG] status = + 0x0, [1646140236677] [83197:3718807] CHIP: [DMG] }, [1646140236677] + [83197:3718807] CHIP: [DMG] [1646140236677] [83197:3718807] CHIP: + [DMG] }, [1646140236677] [83197:3718807] CHIP: [DMG] [1646140236677] + [83197:3718807] CHIP: [DMG] }, [1646140236677] [83197:3718807] CHIP: + [DMG] [1646140236677] [83197:3718807] CHIP: [DMG] ], [1646140236677] + [83197:3718807] CHIP: [DMG] [1646140236677] [83197:3718807] CHIP: + [DMG] InteractionModelRevision = 1 [1646140236677] [83197:3718807] + CHIP: [DMG] }, [1646140236677] [83197:3718807] CHIP: [DMG] Received + Command Response Status for Endpoint=1 Cluster=0x0000_0507 + Command=0x0000_0003 Status=0x0" + disabled: true + + - label: + "TH reads the InputList attribute from the DUT to show list of Inputs + available" + verification: + "./chip-tool mediainput read input-list 1 1 [1646140289219] + [83463:3720087] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0507 Attribute + 0x0000_0000DataVersion: 645543558 [1646140289219] [83463:3720087] + CHIP: [TOO] InputList: 2 entries [1646140289219] [83463:3720087] CHIP: + [TOO] [1]: { [1646140289219] [83463:3720087] CHIP: [TOO] Index: 1 + [1646140289219] [83463:3720087] CHIP: [TOO] InputType: 4 + [1646140289219] [83463:3720087] CHIP: [TOO] Name: newname + [1646140289219] [83463:3720087] CHIP: [TOO] Description: + High-Definition Multimedia Interface [1646140289219] [83463:3720087] + CHIP: [TOO] } [1646140289219] [83463:3720087] CHIP: [TOO] [2]: { + [1646140289219] [83463:3720087] CHIP: [TOO] Index: 2 [1646140289219] + [83463:3720087] CHIP: [TOO] InputType: 4 [1646140289219] + [83463:3720087] CHIP: [TOO] Name: HDMI [1646140289219] [83463:3720087] + CHIP: [TOO] Description: High-Definition Multimedia Interface + [1646140289219] [83463:3720087] CHIP: [TOO] }" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_25.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_25.yaml new file mode 100644 index 00000000000000..890870bd7ddb0d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MF_1_25.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 22.1.25. [TC-MF-1.25] Open commissioning window - durations max and max+1 + [BCM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Reset DUT_CE to factory defaults" + verification: "" + disabled: true + + - label: "TH_CR1 starts a commissioning process with DUT_CE using BCM" + verification: + "1. Provision the device using 1st controller chip tool(use above + instructions) , " + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE with a value of 15 + minutes" + verification: + "On 1st controller chip tool, open commissioning window For BCM, + ./chip-tool administratorcommissioning open-basic-commissioning-window + 900 1 0" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE with a value of 901 + seconds" + verification: + "On 1st controller chip tool, open commissioning window For BCM, + ./chip-tool administratorcommissioning open-basic-commissioning-window + 901 1 0" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_26.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_26.yaml new file mode 100644 index 00000000000000..f2ba6cbbed4e04 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MF_1_26.yaml @@ -0,0 +1,93 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 22.1.26. [TC-MF-1.26] Open commissioning window - durations max and max+1 + [ECM] [DUT - Commissionee] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "PICS" + verification: "" + disabled: true + + - label: "TH_CR1 starts a commissioning process with DUT_CE using ECM" + verification: + "1. Provision the device using 1st controller chip tool(use above + instructions) , " + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE with a value of 15 + minutes" + verification: + "On 1st controller chip tool, open commissioning window Below is the + example when using chip tool as controller For ECM, ./chip-tool + pairing open-commissioning-window 1 1 100 1000 3840 + [1635925713.966786][9695:9700] CHIP:SC: Success status report + received. Session was established [1635925713.966839][9695:9700] + CHIP:IN: New secure session created for device 0x0000000000000001, key + 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow + for device ID 1 [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to + [AddingComm] [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to + [AddedComma] [1635925713.972815][9695:9700] CHIP:IN: Prepared + encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and + protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg + 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at + monotonic time: 13449459 msec [1635925713.973006][9695:9700] CHIP:DMG: + ICR moving to [CommandSen] [1635925713.973061][9695:9700] CHIP:CTL: + Manual pairing code: [35484132896] [1635925713.973120][9695:9700] + CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for + MessageCounter:1964916542 on exchange 31055i" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE with a value of 901 + seconds" + verification: + "On 1st controller chip tool, open commissioning window Below is the + example when using chip tool as controller For ECM, ./chip-tool + pairing open-commissioning-window 1 1 100 1000 3840 + [1635925713.966786][9695:9700] CHIP:SC: Success status report + received. Session was established [1635925713.966839][9695:9700] + CHIP:IN: New secure session created for device 0x0000000000000001, key + 33!! [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow + for device ID 1 [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to + [AddingComm] [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to + [AddedComma] [1635925713.972815][9695:9700] CHIP:IN: Prepared + encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and + protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg + 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at + monotonic time: 13449459 msec [1635925713.973006][9695:9700] CHIP:DMG: + ICR moving to [CommandSen] [1635925713.973061][9695:9700] CHIP:CTL: + Manual pairing code: [36217551633] [1635925713.973120][9695:9700] + CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for + MessageCounter:1964916542 on exchange 31055i" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_27.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_27.yaml new file mode 100644 index 00000000000000..9137bc99cf2c43 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MF_1_27.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 22.1.27. [TC-MF-1.27] Open commissioning window - durations max and max+1 + [BCM] [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Reset DUT_CR to factory defaults" + verification: "" + disabled: true + + - label: "DUT_CR starts a commissioning process with TH_CE using BCM" + verification: + "1. Provision the device using your DUT controller(use above + instructions) , " + disabled: true + + - label: + "DUT_CR opens a commissioning window on TH_CE with a value of 15 + minutes" + verification: + "On your DUT controller, open commissioning window using BCM, Below is + an example when using chip tool as controller ./chip-tool + administratorcommissioning open-basic-commissioning-window 900 1 0" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true + + - label: + "DUT_CR opens a commissioning window on TH_CE with a value of 901 + seconds" + verification: + "On your DUT controller, open commissioning window using BCM, Below is + an example when using chip tool as controller ./chip-tool + administratorcommissioning open-basic-commissioning-window 901 1 0" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MF_1_28.yaml b/src/app/tests/suites/certification/Test_TC_MF_1_28.yaml new file mode 100644 index 00000000000000..7a51346e8db46d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MF_1_28.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 22.1.28. [TC-MF-1.28] Open commissioning window - durations max and max+1 + [ECM] [DUT - Commissioner] + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Reset DUT_CR to factory defaults" + verification: "" + disabled: true + + - label: "DUT_CR starts a commissioning process with TH_CE using ECM" + verification: + "1. Provision the device using your DUT controller(use above + instructions) , " + disabled: true + + - label: + "DUT_CR opens a commissioning window on TH_CE with a value of 15 + minutes" + verification: + "On your DUT controller, open commissioning window using ECM Below is + the example when using chip tool as controller ./chip-tool pairing + open-commissioning-window 1 1 900 1000 3840" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true + + - label: + "DUT_CR opens a commissioning window on TH_CE with a value of 901 + seconds" + verification: + "On your DUT controller, open commissioning window using ECM Below is + the example when using chip tool as controller ./chip-tool pairing + open-commissioning-window 1 1 901 1000 3840" + disabled: true + + - label: "Wait for commissioning Window to Timeout" + verification: "Wait for commissioning Window to Timeout" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml new file mode 100644 index 00000000000000..ad982d63522247 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_2.yaml @@ -0,0 +1,80 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 78.2.2. [TC-MOD-2.2] ChangeToMode Verification (DUT as Client) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "DUT reads the SupportedModes attribute from the TH" + verification: + "./chip-tool modeselect read supported-modes 1 1 + [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries + [1645776742.669546][4661:4666] CHIP:TOO: [1]: + {[1645776742.669588][4661:4666] CHIP:TOO: Label: Black + [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 + [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669661][4661:4666] CHIP:TOO: } + [1645776742.669692][4661:4666] CHIP:TOO: [2]: { + [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino + [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 + [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669779][4661:4666] CHIP:TOO: } + [1645776742.669808][4661:4666] CHIP:TOO: [3]: { + [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso + [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 + [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669896][4661:4666] CHIP:TOO: }" + disabled: true + + - label: + "DUT sends a ChangeToMode command to the TH with a integer from the + list in step 1." + verification: "./chip-tool modeselect change-to-mode 4 1 1 + [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = + [1645778189.043924][4888:4893] CHIP:DMG: { + [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, + [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = + [1645778189.044027][4888:4893] CHIP:DMG: [ + [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = + [1645778189.044100][4888:4893] CHIP:DMG: { + [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB + =[1645778189.044171][4888:4893] CHIP:DMG: { + [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = + [1645778189.044239][4888:4893] CHIP:DMG: { + [1645778189.044277][4888:4893] CHIP:DMG: EndpointId\ + = 0x1, [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, + [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, + [1645778189.044394][4888:4893] CHIP:DMG: + },[1645778189.044435][4888:4893] CHIP:DMG: + [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = + [1645778189.044519][4888:4893] CHIP:DMG: { + [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, + [1645778189.044603][4888:4893] CHIP:DMG: + },[1645778189.044650][4888:4893] CHIP:DMG: + [1645778189.044686][4888:4893] CHIP:DMG: }, + [1645778189.044724][4888:4893] CHIP:DMG: + [1645778189.044754][4888:4893] CHIP:DMG: }, + [1645778189.044793][4888:4893] CHIP:DMG: + [1645778189.044821][4888:4893] CHIP:DMG: ], + [1645778189.044896][4888:4893] CHIP:DMG: + [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 + [1645778189.044954][4888:4893] CHIP:DMG: }, + [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 + Status=0x0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml new file mode 100644 index 00000000000000..b64a9b3d8d90cd --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml @@ -0,0 +1,262 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 78.3.1. [TC-MOD-3.1] OnMode Verification (DUT as Server) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH reads the OnMode attribute from the DUT" + verification: + "./chip-tool modeselect read on-mode 1 1 + [1645777342.720928][4783:4788] CHIP:DMG: ReportDataMessage = + [1645777342.720955][4783:4788] CHIP:DMG: { + [1645777342.720976][4783:4788] CHIP:DMG: AttributeReportIBs = + [1645777342.721011][4783:4788] CHIP:DMG: [ + [1645777342.721035][4783:4788] CHIP:DMG: AttributeReportIB = + [1645777342.721072][4783:4788] CHIP:DMG: { + [1645777342.721100][4783:4788] CHIP:DMG: AttributeDataIB = + [1645777342.721134][4783:4788] CHIP:DMG: { + [1645777342.721167][4783:4788] CHIP:DMG: DataVersion = 0xe164a618, + [1645777342.721201][4783:4788] CHIP:DMG: AttributePathIB = + [1645777342.721235][4783:4788] CHIP:DMG: { + [1645777342.721271][4783:4788] CHIP:DMG: Endpoint = 0x1, + [1645777342.721307][4783:4788] CHIP:DMG: Cluster = 0x50, + [1645777342.721344][4783:4788] CHIP:DMG: Attribute = 0x0000_0002, + [1645777342.721378][4783:4788] CHIP:DMG: } + [1645777342.721415][4783:4788] CHIP:DMG: + [1645777342.721452][4783:4788] CHIP:DMG: Data = 0, + [1645777342.721488][4783:4788] CHIP:DMG: }, + [1645777342.721525][4783:4788] CHIP:DMG: + [1645777342.721555][4783:4788] CHIP:DMG: }, + [1645777342.721590][4783:4788] CHIP:DMG: + [1645777342.721615][4783:4788] CHIP:DMG: ], + [1645777342.721648][4783:4788] CHIP:DMG: + [1645777342.721672][4783:4788] CHIP:DMG: SuppressResponse = true, + [1645777342.721698][4783:4788] CHIP:DMG: InteractionModelRevision = 1 + [1645777342.721723][4783:4788] CHIP:DMG: } + [1645777342.721860][4783:4788] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0002DataVersion: 3781469720 + [1645777342.721929][4783:4788] CHIP:TOO: OnMode: 0" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645777371.981905][4789:4794] CHIP:DMG: ReportDataMessage = + [1645777371.981941][4789:4794] CHIP:DMG: { + [1645777371.981974][4789:4794] CHIP:DMG: AttributeReportIBs = + [1645777371.982015][4789:4794] CHIP:DMG: [ + [1645777371.982046][4789:4794] CHIP:DMG: AttributeReportIB = + [1645777371.982092][4789:4794] CHIP:DMG: { + [1645777371.982128][4789:4794] CHIP:DMG: AttributeDataIB = + [1645777371.982174][4789:4794] CHIP:DMG: { + [1645777371.982218][4789:4794] CHIP:DMG: DataVersion = 0xe164a618, + [1645777371.982267][4789:4794] CHIP:DMG: AttributePathIB = + [1645777371.982310][4789:4794] CHIP:DMG: { + [1645777371.982363][4789:4794] CHIP:DMG: Endpoint = 0x1, + [1645777371.982419][4789:4794] CHIP:DMG: Cluster = 0x50, + [1645777371.982468][4789:4794] CHIP:DMG: Attribute = 0x0000_0000, + [1645777371.982512][4789:4794] CHIP:DMG: } + [1645777371.982566][4789:4794] CHIP:DMG: + [1645777371.982612][4789:4794] CHIP:DMG: Data = 4, + [1645777371.982655][4789:4794] CHIP:DMG: }, + [1645777371.982698][4789:4794] CHIP:DMG: + [1645777371.982734][4789:4794] CHIP:DMG: }, + [1645777371.982775][4789:4794] CHIP:DMG: + [1645777371.982809][4789:4794] CHIP:DMG: ], + [1645777371.982849][4789:4794] CHIP:DMG: + [1645777371.982882][4789:4794] CHIP:DMG: SuppressResponse = true, + [1645777371.982914][4789:4794] CHIP:DMG: InteractionModelRevision = 1 + [1645777371.982945][4789:4794] CHIP:DMG: } + [1645777371.983122][4789:4794] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469720 + [1645777371.983204][4789:4794] CHIP:TOO: CurrentMode: 4" + disabled: true + + - label: + "If the OnMode and CurrentMode attributes have the same value, proceed + to step 2c, Otherwise proceed to step 3a." + verification: "" + disabled: true + + - label: "DUT reads the SupportedModes attribute from the TH" + verification: + "./chip-tool modeselect read supported-modes 1 1 + [1645776884.203383][4698:4703] CHIP:TOO: SupportedModes: 3 entries + [1645776884.203448][4698:4703] CHIP:TOO: [1]: { + [1645776884.203473][4698:4703] CHIP:TOO: Label: Black + [1645776884.203497][4698:4703] CHIP:TOO: Mode: 0 + [1645776884.203520][4698:4703] CHIP:TOO: SemanticTag: 0 + [1645776884.203544][4698:4703] CHIP:TOO: } + [1645776884.203574][4698:4703] CHIP:TOO: [2]: { + [1645776884.203597][4698:4703] CHIP:TOO: Label: Cappuccino + [1645776884.203619][4698:4703] CHIP:TOO: Mode: 4 + [1645776884.203641][4698:4703] CHIP:TOO: SemanticTag: 0 + [1645776884.203663][4698:4703] CHIP:TOO: } + [1645776884.203691][4698:4703] CHIP:TOO: [3]: { + [1645776884.203714][4698:4703] CHIP:TOO: Label: Espresso + [1645776884.203735][4698:4703] CHIP:TOO: Mode: 7 + [1645776884.203757][4698:4703] CHIP:TOO: SemanticTag: 0 + [1645776884.203779][4698:4703] CHIP:TOO: }" + disabled: true + + - label: + "Select a value from the list in step 2c with a different value than + the StartUpMode value read in step 1. TH sends a ChangeToMode command + to the TH with the selected value." + verification: + "./chip-tool modeselect change-to-mode 7 1 1 + [1645777419.710445][4798:4803] CHIP:DMG: InvokeResponseMessage = + [1645777419.710472][4798:4803] CHIP:DMG: { + [1645777419.710504][4798:4803] CHIP:DMG: suppressResponse = false, + [1645777419.710536][4798:4803] CHIP:DMG: InvokeResponseIBs = + [1645777419.710577][4798:4803] CHIP:DMG: [ + [1645777419.710607][4798:4803] CHIP:DMG: InvokeResponseIB = + [1645777419.710649][4798:4803] CHIP:DMG: { + [1645777419.710678][4798:4803] CHIP:DMG: CommandStatusIB = + [1645777419.710714][4798:4803] CHIP:DMG: { + [1645777419.710751][4798:4803] CHIP:DMG: CommandPathIB = + [1645777419.710790][4798:4803] CHIP:DMG: { + [1645777419.710838][4798:4803] CHIP:DMG: EndpointId = 0x1, + [1645777419.710881][4798:4803] CHIP:DMG: ClusterId = 0x50, + [1645777419.710916][4798:4803] CHIP:DMG: CommandId = 0x0, + [1645777419.710963][4798:4803] CHIP:DMG: }, + [1645777419.711009][4798:4803] CHIP:DMG: + [1645777419.711046][4798:4803] CHIP:DMG: StatusIB = + [1645777419.711090][4798:4803] CHIP:DMG: { + [1645777419.711133][4798:4803] CHIP:DMG: status = 0x0, + [1645777419.711172][4798:4803] CHIP:DMG: }, + [1645777419.711218][4798:4803] CHIP:DMG: + [1645777419.711260][4798:4803] CHIP:DMG: }, + [1645777419.711307][4798:4803] CHIP:DMG: + [1645777419.711340][4798:4803] CHIP:DMG: }, + [1645777419.711378][4798:4803] CHIP:DMG: + [1645777419.711406][4798:4803] CHIP:DMG: ], + [1645777419.711443][4798:4803] CHIP:DMG: + [1645777419.711472][4798:4803] CHIP:DMG: InteractionModelRevision = 1 + [1645777419.711499][4798:4803] CHIP:DMG: }, + [1645777419.711572][4798:4803] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 + Status=0x0" + disabled: true + + - label: "TH reads sends an Off command to the DUT" + verification: + "./chip-tool onoff off 1 1 [1645777463.883758][4807:4812] CHIP:DMG: + InvokeResponseMessage = [1645777463.883789][4807:4812] CHIP:DMG: { + [1645777463.883818][4807:4812] CHIP:DMG: suppressResponse = false, + [1645777463.883852][4807:4812] CHIP:DMG: InvokeResponseIBs = + [1645777463.883894][4807:4812] CHIP:DMG: [ + [1645777463.883924][4807:4812] CHIP:DMG: InvokeResponseIB = + [1645777463.883972][4807:4812] CHIP:DMG: { + [1645777463.884006][4807:4812] CHIP:DMG: CommandStatusIB = + [1645777463.884042][4807:4812] CHIP:DMG: { + [1645777463.884113][4807:4812] CHIP:DMG: CommandPathIB = + [1645777463.884160][4807:4812] CHIP:DMG: { + [1645777463.884231][4807:4812] CHIP:DMG: EndpointId = 0x1, + [1645777463.884300][4807:4812] CHIP:DMG: ClusterId = 0x6, + [1645777463.884335][4807:4812] CHIP:DMG: CommandId = 0x0, + [1645777463.884411][4807:4812] CHIP:DMG: }, + [1645777463.884460][4807:4812] CHIP:DMG: + [1645777463.884490][4807:4812] CHIP:DMG: StatusIB = + [1645777463.884554][4807:4812] CHIP:DMG: { + [1645777463.884591][4807:4812] CHIP:DMG: status = 0x0, + [1645777463.884658][4807:4812] CHIP:DMG: }, + [1645777463.884692][4807:4812] CHIP:DMG: + [1645777463.884745][4807:4812] CHIP:DMG: }, + [1645777463.884788][4807:4812] CHIP:DMG: + [1645777463.884816][4807:4812] CHIP:DMG: }, + [1645777463.885035][4807:4812] CHIP:DMG: + [1645777463.885106][4807:4812] CHIP:DMG: ], + [1645777463.885165][4807:4812] CHIP:DMG: + [1645777463.885206][4807:4812] CHIP:DMG: InteractionModelRevision = 1 + [1645777463.885239][4807:4812] CHIP:DMG: }, + [1645777463.885341][4807:4812] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000 + Status=0x0" + disabled: true + + - label: "TH reads sends an On command to the DUT" + verification: + "./chip-tool onoff on 1 1 [1645777484.676451][4813:4818] CHIP:DMG: + InvokeResponseMessage = [1645777484.676481][4813:4818] CHIP:DMG: { + [1645777484.676509][4813:4818] CHIP:DMG: suppressResponse = false, + [1645777484.676536][4813:4818] CHIP:DMG: InvokeResponseIBs = + [1645777484.676569][4813:4818] CHIP:DMG: [ + [1645777484.676596][4813:4818] CHIP:DMG: InvokeResponseIB = + [1645777484.676640][4813:4818] CHIP:DMG: { + [1645777484.676671][4813:4818] CHIP:DMG: CommandStatusIB = + [1645777484.676710][4813:4818] CHIP:DMG: { + [1645777484.676746][4813:4818] CHIP:DMG: CommandPathIB = + [1645777484.676785][4813:4818] CHIP:DMG: { + [1645777484.676859][4813:4818] CHIP:DMG: EndpointId = 0x1, + [1645777484.676906][4813:4818] CHIP:DMG: ClusterId = 0x6, + [1645777484.676947][4813:4818] CHIP:DMG: CommandId = 0x1, + [1645777484.676986][4813:4818] CHIP:DMG: }, + [1645777484.677026][4813:4818] CHIP:DMG: + [1645777484.677055][4813:4818] CHIP:DMG: StatusIB = + [1645777484.677084][4813:4818] CHIP:DMG: { + [1645777484.677111][4813:4818] CHIP:DMG: status = 0x0, + [1645777484.677151][4813:4818] CHIP:DMG: }, + [1645777484.677184][4813:4818] CHIP:DMG: + [1645777484.677219][4813:4818] CHIP:DMG: }, + [1645777484.677253][4813:4818] CHIP:DMG: + [1645777484.677283][4813:4818] CHIP:DMG: }, + [1645777484.677319][4813:4818] CHIP:DMG: + [1645777484.677344][4813:4818] CHIP:DMG: ], + [1645777484.677377][4813:4818] CHIP:DMG: + [1645777484.677403][4813:4818] CHIP:DMG: InteractionModelRevision = 1 + [1645777484.677427][4813:4818] CHIP:DMG: }, + [1645777484.677492][4813:4818] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 + Status=0x0" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645777734.855000][4848:4853] CHIP:DMG: ReportDataMessage = + [1645777734.855043][4848:4853] CHIP:DMG: { + [1645777734.855071][4848:4853] CHIP:DMG: AttributeReportIBs = + [1645777734.855109][4848:4853] CHIP:DMG: [ + [1645777734.855138][4848:4853] CHIP:DMG: AttributeReportIB = + [1645777734.855179][4848:4853] CHIP:DMG: { + [1645777734.855209][4848:4853] CHIP:DMG: AttributeDataIB = + [1645777734.855247][4848:4853] CHIP:DMG: { + [1645777734.855288][4848:4853] CHIP:DMG: DataVersion = 0xe164a619, + [1645777734.855326][4848:4853] CHIP:DMG: AttributePathIB = + [1645777734.855366][4848:4853] CHIP:DMG: { + [1645777734.855406][4848:4853] CHIP:DMG: Endpoint = 0x1, + [1645777734.855449][4848:4853] CHIP:DMG: Cluster = 0x50, + [1645777734.855491][4848:4853] CHIP:DMG: Attribute = 0x0000_0000, + [1645777734.855569][4848:4853] CHIP:DMG: } + [1645777734.855606][4848:4853] CHIP:DMG: + [1645777734.855639][4848:4853] CHIP:DMG: Data = 0, + [1645777734.855696][4848:4853] CHIP:DMG: }, + [1645777734.855744][4848:4853] CHIP:DMG: + [1645777734.855775][4848:4853] CHIP:DMG: }, + [1645777734.855811][4848:4853] CHIP:DMG: + [1645777734.855840][4848:4853] CHIP:DMG: ], + [1645777734.855876][4848:4853] CHIP:DMG: + [1645777734.855920][4848:4853] CHIP:DMG: SuppressResponse = true, + [1645777734.855968][4848:4853] CHIP:DMG: InteractionModelRevision = 1 + [1645777734.855993][4848:4853] CHIP:DMG: } + [1645777734.856233][4848:4853] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645777734.856345][4848:4853] CHIP:TOO: CurrentMode: 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml new file mode 100644 index 00000000000000..348f7428daf44a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml @@ -0,0 +1,194 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 78.3.2. [TC-MOD-3.2] StartUpMode Verification (DUT as Server) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH reads the StartUpMode attribute from the DUT" + verification: + "./chip-tool modeselect read start-up-mode 1 1 + [1645777708.405861][4841:4846] CHIP:DMG: ReportDataMessage = + [1645777708.405890][4841:4846] CHIP:DMG: { + [1645777708.405912][4841:4846] CHIP:DMG: AttributeReportIBs = + [1645777708.405946][4841:4846] CHIP:DMG: [ + [1645777708.405970][4841:4846] CHIP:DMG: AttributeReportIB = + [1645777708.406025][4841:4846] CHIP:DMG: { + [1645777708.406075][4841:4846] CHIP:DMG: AttributeDataIB = + [1645777708.406119][4841:4846] CHIP:DMG: { + [1645777708.406166][4841:4846] CHIP:DMG: DataVersion = 0xe164a619, + [1645777708.406211][4841:4846] CHIP:DMG: AttributePathIB = + [1645777708.406245][4841:4846] CHIP:DMG: { + [1645777708.406282][4841:4846] CHIP:DMG: Endpoint = 0x1, + [1645777708.406319][4841:4846] CHIP:DMG: Cluster = 0x50, + [1645777708.406356][4841:4846] CHIP:DMG: Attribute = 0x0000_0003, + [1645777708.406392][4841:4846] CHIP:DMG: } + [1645777708.406429][4841:4846] CHIP:DMG: + [1645777708.406464][4841:4846] CHIP:DMG: Data = 0, + [1645777708.406499][4841:4846] CHIP:DMG: }, + [1645777708.406535][4841:4846] CHIP:DMG: + [1645777708.406563][4841:4846] CHIP:DMG: }, + [1645777708.406595][4841:4846] CHIP:DMG: + [1645777708.406620][4841:4846] CHIP:DMG: ], + [1645777708.406650][4841:4846] CHIP:DMG: + [1645777708.406674][4841:4846] CHIP:DMG: SuppressResponse = true, + [1645777708.406700][4841:4846] CHIP:DMG: InteractionModelRevision = 1 + [1645777708.406725][4841:4846] CHIP:DMG: } + [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 + [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = + [1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG: + [1645778146.170988][4876:4881] CHIP:DMG: Data = 7, + [1645778146.171026][4876:4881] CHIP:DMG: }, + [1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7" + disabled: true + + - label: + "If the StartUpMode and CurrentMode attributes have the same value, + proceed to step 2c, Otherwise proceed to step 3a." + verification: "" + disabled: true + + - label: "DUT reads the SupportedModes attribute from the TH" + verification: + "./chip-tool modeselect read supported-modes 1 1 + [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries + [1645776742.669546][4661:4666] CHIP:TOO: [1]: { + [1645776742.669588][4661:4666] CHIP:TOO: Label: Black + [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 + [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669661][4661:4666] CHIP:TOO: } + [1645776742.669692][4661:4666] CHIP:TOO: [2]: { + [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino + [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 + [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669779][4661:4666] CHIP:TOO: } + [1645776742.669808][4661:4666] CHIP:TOO: [3]: { + [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso + [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 + [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669896][4661:4666] CHIP:TOO: }" + disabled: true + + - label: + "Select a value from the list in step 2c with a different value than + the StartUpMode value read in step 1. TH sends a ChangeToMode command + to the TH with the selected value." + verification: + "./chip-tool modeselect change-to-mode 4 1 1 + [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = + [1645778189.043924][4888:4893] CHIP:DMG: { + [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = false, + [1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = + [1645778189.044027][4888:4893] CHIP:DMG: [ + [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = + [1645778189.044100][4888:4893] CHIP:DMG: { + [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = + [1645778189.044171][4888:4893] CHIP:DMG: { + [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = + [1645778189.044239][4888:4893] CHIP:DMG: { + [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, + [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, + [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, + [1645778189.044394][4888:4893] CHIP:DMG: }, + [1645778189.044435][4888:4893] CHIP:DMG: + [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = + [1645778189.044519][4888:4893] CHIP:DMG: { + [1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, + [1645778189.044603][4888:4893] CHIP:DMG: }, + [1645778189.044650][4888:4893] CHIP:DMG: + [1645778189.044686][4888:4893] CHIP:DMG: }, + [1645778189.044724][4888:4893] CHIP:DMG: + [1645778189.044754][4888:4893] CHIP:DMG: }, + [1645778189.044793][4888:4893] CHIP:DMG: + [1645778189.044821][4888:4893] CHIP:DMG: ], + [1645778189.044896][4888:4893] CHIP:DMG: + [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 + [1645778189.044954][4888:4893] CHIP:DMG: }, + [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 + Status=0x0" + disabled: true + + - label: "Physically power cycle the device." + verification: "" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = + [1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG: + [1645778146.170988][4876:4881] CHIP:DMG: Data = 0, + [1645778146.171026][4876:4881] CHIP:DMG: }, + [1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml new file mode 100644 index 00000000000000..ced116b522b691 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -0,0 +1,195 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 78.3.3. [TC-MOD-3.3] OTA Mode Verification (DUT as Server) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "TH reads the StartUpMode attribute from the DUT" + verification: + "./chip-tool modeselect read start-up-mode 1 1 + [1645778279.692171][4898:4903] CHIP:DMG: ReportDataMessage + =[1645778279.692198][4898:4903] CHIP:DMG: { + [1645778279.692219][4898:4903] CHIP:DMG: AttributeReportIBs = + [1645778279.692254][4898:4903] CHIP:DMG: [ + [1645778279.692278][4898:4903] CHIP:DMG: AttributeReportIB = + [1645778279.692309][4898:4903] CHIP:DMG: { + [1645778279.692336][4898:4903] CHIP:DMG: AttributeDataIB + =[1645778279.692368][4898:4903] CHIP:DMG: { + [1645778279.692403][4898:4903] CHIP:DMG: DataVersion = 0xe164a61a, + [1645778279.692429][4898:4903] CHIP:DMG: AttributePathIB = + [1645778279.692462][4898:4903] CHIP:DMG: { + [1645778279.692494][4898:4903] CHIP:DMG: Endpoint = 0x1, + [1645778279.692533][4898:4903] CHIP:DMG: Cluster = 0x50, + [1645778279.692570][4898:4903] CHIP:DMG: Attribute = 0x0000_0003, + [1645778279.692601][4898:4903] CHIP:DMG: } + [1645778279.692635][4898:4903] CHIP:DMG: + [1645778279.692671][4898:4903] CHIP:DMG: Data = 0, + [1645778279.692703][4898:4903] CHIP:DMG: + },[1645778279.692737][4898:4903] CHIP:DMG: + [1645778279.692764][4898:4903] CHIP:DMG: }, + [1645778279.692795][4898:4903] CHIP:DMG: + [1645778279.692818][4898:4903] CHIP:DMG: ], + [1645778279.692872][4898:4903] CHIP:DMG: + [1645778279.692897][4898:4903] CHIP:DMG: SuppressResponse = true, + [1645778279.692921][4898:4903] CHIP:DMG: InteractionModelRevision = 1 + [1645778279.692944][4898:4903] CHIP:DMG: } + [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 + [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage + =[1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG:[1645778146.170988][4876:4881] + CHIP:DMG: Data = 7, [1645778146.171026][4876:4881] CHIP:DMG: + },[1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7" + disabled: true + + - label: + "If the StartUpMode and CurrentMode attributes have the same value, + proceed to step 2c, Otherwise proceed to step 3a." + verification: "" + disabled: true + + - label: "DUT reads the SupportedModes attribute from the TH" + verification: + "./chip-tool modeselect read supported-modes 1 1 + [1645776742.667057][4661:4666] CHIP:TOO: SupportedModes: 3 entries + [1645776742.669546][4661:4666] CHIP:TOO: [1]: + {[1645776742.669588][4661:4666] CHIP:TOO: Label: Black + [1645776742.669613][4661:4666] CHIP:TOO: Mode: 0 + [1645776742.669636][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669661][4661:4666] CHIP:TOO: } + [1645776742.669692][4661:4666] CHIP:TOO: [2]: { + [1645776742.669715][4661:4666] CHIP:TOO: Label: Cappuccino + [1645776742.669737][4661:4666] CHIP:TOO: Mode: 4 + [1645776742.669757][4661:4666] CHIP:TOO: SemanticTag: + 0[1645776742.669779][4661:4666] CHIP:TOO: } + [1645776742.669808][4661:4666] CHIP:TOO: [3]: { + [1645776742.669831][4661:4666] CHIP:TOO: Label: Espresso + [1645776742.669853][4661:4666] CHIP:TOO: Mode: 7 + [1645776742.669874][4661:4666] CHIP:TOO: SemanticTag: 0 + [1645776742.669896][4661:4666] CHIP:TOO: }" + disabled: true + + - label: + "Select a value from the list in step 2c with a different value than + the StartUpMode value read in step 1. TH sends a ChangeToMode command + to the TH with the selected value." + verification: + "./chip-tool modeselect change-to-mode 4 1 1 + [1645778189.043893][4888:4893] CHIP:DMG: InvokeResponseMessage = + [1645778189.043924][4888:4893] CHIP:DMG: { + [1645778189.043953][4888:4893] CHIP:DMG: suppressResponse = + false,[1645778189.043986][4888:4893] CHIP:DMG: InvokeResponseIBs = + [1645778189.044027][4888:4893] CHIP:DMG: [ + [1645778189.044056][4888:4893] CHIP:DMG: InvokeResponseIB = + [1645778189.044100][4888:4893] CHIP:DMG: { + [1645778189.044132][4888:4893] CHIP:DMG: CommandStatusIB = + [1645778189.044171][4888:4893] CHIP:DMG: { + [1645778189.044203][4888:4893] CHIP:DMG: CommandPathIB = + [1645778189.044239][4888:4893] CHIP:DMG: { + [1645778189.044277][4888:4893] CHIP:DMG: EndpointId = 0x1, + [1645778189.044319][4888:4893] CHIP:DMG: ClusterId = 0x50, + [1645778189.044361][4888:4893] CHIP:DMG: CommandId = 0x0, + [1645778189.044394][4888:4893] CHIP:DMG: + },[1645778189.044435][4888:4893] CHIP:DMG: + [1645778189.044472][4888:4893] CHIP:DMG: StatusIB = + [1645778189.044519][4888:4893] CHIP:DMG: + {[1645778189.044558][4888:4893] CHIP:DMG: status = 0x0, + [1645778189.044603][4888:4893] CHIP:DMG: }, + [1645778189.044650][4888:4893] CHIP:DMG: + [1645778189.044686][4888:4893] CHIP:DMG: }, + [1645778189.044724][4888:4893] CHIP:DMG: + [1645778189.044754][4888:4893] CHIP:DMG: }, + [1645778189.044793][4888:4893] CHIP:DMG: + [1645778189.044821][4888:4893] CHIP:DMG: ], + [1645778189.044896][4888:4893] CHIP:DMG: + [1645778189.044925][4888:4893] CHIP:DMG: InteractionModelRevision = 1 + [1645778189.044954][4888:4893] CHIP:DMG: }, + [1645778189.045030][4888:4893] CHIP:DMG: Received Command Response + Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 + Status=0x0" + disabled: true + + - label: + "Perform an OTA update on the device that requires a reboot. Allow for + the DUT to update and fully reboot." + verification: "" + disabled: true + + - label: "TH reads the CurrentMode attribute from the DUT" + verification: + "./chip-tool modeselect read current-mode 1 1 + [1645778146.170365][4876:4881] CHIP:DMG: ReportDataMessage = + [1645778146.170407][4876:4881] CHIP:DMG: { + [1645778146.170431][4876:4881] CHIP:DMG: AttributeReportIBs = + [1645778146.170482][4876:4881] CHIP:DMG: [ + [1645778146.170527][4876:4881] CHIP:DMG: AttributeReportIB = + [1645778146.170565][4876:4881] CHIP:DMG: { + [1645778146.170593][4876:4881] CHIP:DMG: AttributeDataIB = + [1645778146.170629][4876:4881] CHIP:DMG: { + [1645778146.170664][4876:4881] CHIP:DMG: DataVersion = 0xe164a619, + [1645778146.170697][4876:4881] CHIP:DMG: AttributePathIB = + [1645778146.170733][4876:4881] CHIP:DMG: { + [1645778146.170776][4876:4881] CHIP:DMG: Endpoint = 0x1, + [1645778146.170815][4876:4881] CHIP:DMG: Cluster = 0x50, + [1645778146.170852][4876:4881] CHIP:DMG: Attribute = 0x0000_0000, + [1645778146.170888][4876:4881] CHIP:DMG: } + [1645778146.170925][4876:4881] CHIP:DMG: + [1645778146.170988][4876:4881] CHIP:DMG: Data = 4, + [1645778146.171026][4876:4881] CHIP:DMG: }, + [1645778146.171060][4876:4881] CHIP:DMG: + [1645778146.171090][4876:4881] CHIP:DMG: }, + [1645778146.171129][4876:4881] CHIP:DMG: + [1645778146.171154][4876:4881] CHIP:DMG: ], + [1645778146.171196][4876:4881] CHIP:DMG: + [1645778146.171235][4876:4881] CHIP:DMG: SuppressResponse = true, + [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 + [1645778146.171290][4876:4881] CHIP:DMG: } + [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml new file mode 100644 index 00000000000000..9f44b2b1b5bc0d --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml @@ -0,0 +1,42 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 3.2.3. [TC-OCC-2.3] OccupancySensorTypeBitmap and OccupancySensorType + interdependency with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH reads OccupancySensorType attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy-sensor-type 1 1 Endpoint: + 1 Cluster: 0x0000_0406 Attribute 0x0000_0001DataVersion: 289401399 + [1646129490.492433][2997:3002] CHIP:TOO: occupancy sensor type: 0" + disabled: true + + - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 + Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002DataVersion: + 289401399 [1646129577.158531][3007:3013] CHIP:TOO: occupancy sensor + type bitmap: 1" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml new file mode 100644 index 00000000000000..d94989873fcd3e --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4.yaml @@ -0,0 +1,73 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 3.2.4. [TC-OCC-2.4] OccupancySensorTypeBitmap and OccupancySensorType + interdependency with client as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH reads OccupancySensorType attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy-sensor-type 1 1 + [1646207157.076863][2190:2190] CHIP:IM: Received Read request + [1646207157.076920][2190:2190] CHIP:DMG: ReadRequestMessage = + [1646207157.076949][2190:2190] CHIP:DMG: { + [1646207157.076974][2190:2190] CHIP:DMG: AttributePathIBs = + [1646207157.077003][2190:2190] CHIP:DMG: [ + [1646207157.077029][2190:2190] CHIP:DMG: AttributePathIB = + [1646207157.077074][2190:2190] CHIP:DMG: { + [1646207157.077125][2190:2190] CHIP:DMG: Endpoint = 0x1, + [1646207157.077165][2190:2190] CHIP:DMG: Cluster = 0x406, + [1646207157.077202][2190:2190] CHIP:DMG: Attribute = + 0x0000_0001,[1646207157.077239][2190:2190] CHIP:DMG: } + [1646207157.077271][2190:2190] CHIP:DMG: + [1646207157.077299][2190:2190] CHIP:DMG: ], + [1646207157.077329][2190:2190] CHIP:DMG: + [1646207157.077358][2190:2190] CHIP:DMG: isFabricFiltered = false, + [1646207157.077393][2190:2190] CHIP:DMG: InteractionModelRevision = 1 + [1646207157.077417][2190:2190] CHIP:DMG: }, + [1646207157.077486][2190:2190] CHIP:DMG: IM RH moving to + [GeneratingReports]" + disabled: true + + - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 + [1646207177.525045][2190:2190] CHIP:IM: Received Read request + [1646207177.525107][2190:2190] CHIP:DMG: ReadRequestMessage = + [1646207177.525139][2190:2190] CHIP:DMG: { + [1646207177.525165][2190:2190] CHIP:DMG: AttributePathIBs = + [1646207177.525202][2190:2190] CHIP:DMG: [ + [1646207177.525232][2190:2190] CHIP:DMG: AttributePathIB = + [1646207177.525268][2190:2190] CHIP:DMG: { + [1646207177.525304][2190:2190] CHIP:DMG: Endpoint = 0x1, + [1646207177.525346][2190:2190] CHIP:DMG: Cluster = 0x406, + [1646207177.525385][2190:2190] CHIP:DMG: Attribute = 0x0000_0002, + [1646207177.525425][2190:2190] CHIP:DMG: } + [1646207177.525461][2190:2190] CHIP:DMG: + [1646207177.525494][2190:2190] CHIP:DMG: ], + [1646207177.525529][2190:2190] CHIP:DMG: + [1646207177.525561][2190:2190] CHIP:DMG: isFabricFiltered = false, + [1646207177.525591][2190:2190] CHIP:DMG: InteractionModelRevision = 1 + [1646207177.525619][2190:2190] CHIP:DMG: }," + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml new file mode 100644 index 00000000000000..0dca88fa6d3763 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml @@ -0,0 +1,43 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.2.5. [TC-OCC-3.1] Primary functionality with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH reads Occupancy attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy 1 1 Endpoint: 1 Cluster: + 0x0000_0406 Attribute 0x0000_0000DataVersion: 289401399 + [1646130536.783615][3045:3050] CHIP:TOO: occupancy: 0" + disabled: true + + - label: "Operate on DUT to change the occupancy status" + verification: "" + disabled: true + + - label: "after a few seconds, TH reads Occupancy attribute from DUT" + verification: + "./chip-tool occupancysensing read occupancy 1 1 Endpoint: 1 Cluster: + 0x0000_0406 Attribute 0x0000_0000DataVersion: 289401399 + [1646130536.783615][3045:3050] CHIP:TOO: occupancy: 1" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml new file mode 100644 index 00000000000000..e6800a37aa61af --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OO_2_4.yaml @@ -0,0 +1,127 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.2.4. [TC-OO-2.4] Startup functionality with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH sends On command to DUT" + verification: "./chip-tool onoff on 1 1 StatusIB = { status = 0x00, }," + disabled: true + + - label: "TH writes a value of 0 to StartUpOnOff attribute of DUT" + verification: + "./chip-tool onoff write start-up-on-off 0 1 1 StatusIB = { status = + 0x00, }," + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: FALSE" + disabled: true + + - label: "TH writes a value of 1 to StartUpOnOff attribute of DUT" + verification: + "./chip-tool onoff write start-up-on-off 1 1 1 StatusIB = { status = + 0x00, }," + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: TRUE" + disabled: true + + - label: "TH writes a value of 2 to StartUpOnOff attribute of DUT" + verification: + "./chip-tool onoff write start-up-on-off 2 1 1 StatusIB = { status = + 0x00, }," + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: FALSE" + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: TRUE" + disabled: true + + - label: "TH writes NULL to StartUpOnOff attribute of DUT" + verification: "(how to perform this in chip-tool?)" + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: TRUE" + disabled: true + + - label: "TH sends Off command to DUT" + verification: "./chip-tool onoff off 1 1 StatusIB = { status = 0x00, }," + disabled: true + + - label: "Power off DUT" + verification: "" + disabled: true + + - label: "Power on DUT" + verification: "" + disabled: true + + - label: "TH reads the OnOff attribute from the DUT" + verification: "./chip-tool onoff read on-off 1 1 OnOff: FALSE" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml new file mode 100644 index 00000000000000..c5a645414d99d5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_2.yaml @@ -0,0 +1,39 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.2.2. [TC-PRS-2.2] Primary functionality with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH reads MeasuredValue attribute from DUT" + verification: + "./chip-tool pressuremeasurement read measured-value 1 1 Verify + response: cluster id: 0x0403 Attribute: 0" + disabled: true + + - label: "Operate on device to change the pressure significantly" + verification: "" + disabled: true + + - label: "after a few seconds, TH reads MeasuredValue attribute from DUT" + verification: "" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml new file mode 100644 index 00000000000000..e4a207fd336707 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml @@ -0,0 +1,60 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.2.3. [TC-PRS-2.3] Secondary functionality with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "TH reads Tolerance attribute from DUT" + verification: "./chip-tool pressuremeasurement read tolerance 1 1" + disabled: true + + - label: "TH reads MeasuredValue attribute from DUT" + verification: + "./chip-tool pressuremeasurement read measured-value 1 1 + [1646049376.457970][12096:12101] CHIP:DMG: SuppressResponse = true, + [1646049376.458003][12096:12101] CHIP:DMG: InteractionModelRevision = + 1 [1646049376.458033][12096:12101] CHIP:DMG: } + [1646049376.458206][12096:12101] CHIP:TOO: Endpoint: 1 Cluster: + 0x0000_0403 Attribute 0x0000_0000 DataVersion: 781236764 + [1646049376.458395][12096:12101] CHIP:TOO: MeasuredValue: 0" + disabled: true + + - label: "TH reads MeasuredValue attribute from DUT" + verification: "" + disabled: true + + - label: "TH reads Scale attribute from DUT" + verification: "./chip-tool pressuremeasurement read scale 1 1" + disabled: true + + - label: "TH reads ScaledValue attribute from DUT" + verification: "./chip-tool pressuremeasurement read scaled-value 1 1" + disabled: true + + - label: "TH reads ScaledTolerance attribute from DUT" + verification: "./chip-tool pressuremeasurement read scaled-tolerance 1 1" + disabled: true + + - label: "TH reads ScaledValue attribute from DUT" + verification: "./chip-tool pressuremeasurement read scaled-value 1 1" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml new file mode 100644 index 00000000000000..e806657108b09c --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml @@ -0,0 +1,74 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 63.3.1. [TC-PSCFG-3.1] Attributes with client as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "DUT reads all supported mandatory attributes from TH once at a time + in a manufacturer specific order" + verification: + "On TestHarnes (all-cluster-app) a received read of the Sources + attribute (id 0) looks like this: [1646159106.338144][33190:33190] + CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and + MessageCounter:15430892 on exchange 55596r + [1646159106.338186][33190:33190] CHIP:EM: Handling via exchange: + 55596r, Delegate: 0xaaaace1730c8 [1646159106.338646][33190:33190] + CHIP:IM: Received Read request [1646159106.338735][33190:33190] + CHIP:DMG: ReadRequestMessage = [1646159106.338767][33190:33190] + CHIP:DMG: { [1646159106.338788][33190:33190] CHIP:DMG: + AttributePathIBs = [1646159106.338815][33190:33190] CHIP:DMG: [ + [1646159106.338838][33190:33190] CHIP:DMG: AttributePathIB = + [1646159106.338870][33190:33190] CHIP:DMG: { + [1646159106.338899][33190:33190] CHIP:DMG: Endpoint = 0x0, + [1646159106.338935][33190:33190] CHIP:DMG: Cluster = 0x2e, + [1646159106.338969][33190:33190] CHIP:DMG: Attribute = 0x0000_0000, + [1646159106.339001][33190:33190] CHIP:DMG: } + [1646159106.339031][33190:33190] CHIP:DMG: + [1646159106.339058][33190:33190] CHIP:DMG: ], + [1646159106.339085][33190:33190] CHIP:DMG: + [1646159106.339111][33190:33190] CHIP:DMG: isFabricFiltered = false, + [1646159106.339138][33190:33190] CHIP:DMG: InteractionModelRevision = + 1 [1646159106.339160][33190:33190] CHIP:DMG: }, + [1646159106.339244][33190:33190] CHIP:DMG: IM RH moving to + [GeneratingReports] [1646159106.340134][33190:33190] CHIP:DMG: + Cluster 2e, Attribute 0 is dirty + [1646159106.340201][33190:33190] CHIP:DMG: Reading attribute: + Cluster=0x0000_002E Endpoint=0 AttributeId=0x0000_0000 (expanded=0) + [1646159106.340234][33190:33190] CHIP:DMG: AccessControl: checking f=1 + a=c s=0x000000000001B669 t= c=0x0000_002E e=0 p=v" + disabled: true + + - label: + "DUT reads all supported optional attributes from TH once at a time in + a manufacturer specific order" + verification: "see above" + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH once at a time in a manufacturer specific order" + verification: "No writable attributes" + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH once at a time in a manufacturer specific order" + verification: "No writable attributes" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml new file mode 100644 index 00000000000000..9f8ba834bd16c1 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml @@ -0,0 +1,111 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 60.2.2. [TC-PS-2.2] Event reporting with server as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Commission DUT to TH" + verification: "" + disabled: true + + - label: "Bring the DUT into a state without any wired faults." + verification: "" + disabled: true + + - label: "TH reads the ActiveWiredFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-wired-faults 12345 1" + disabled: true + + - label: "Set up subscription to WiredFaultChange event" + verification: + "./apps/chip-tool powersource subscribe-event-by-id 0 120 3600 1 54321 + 1" + disabled: true + + - label: "Bring the DUT into a wired fault state." + verification: "" + disabled: true + + - label: "TH reads the ActiveWiredFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-wired-faults 12345 1" + disabled: true + + - label: "Bring the DUT back into a clean state." + verification: "" + disabled: true + + - label: "Bring the DUT into a state without any battery faults." + verification: "" + disabled: true + + - label: "TH reads the ActiveBatFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-battery-faults 12345 1" + disabled: true + + - label: "Set up subscription to BatFaultChange event" + verification: + "./apps/chip-tool powersource subscribe-event-by-id 1 120 3600 1 54321 + 1" + disabled: true + + - label: "Bring the DUT into a battery fault state." + verification: "" + disabled: true + + - label: "TH reads the ActiveBatFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-battery-faults 12345 1" + disabled: true + + - label: "Bring the DUT back into a clean state." + verification: "" + disabled: true + + - label: "Bring the DUT into a state without any charge faults." + verification: "" + disabled: true + + - label: "TH reads the ActiveBatChargeFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-battery-charge-faults 12345 + 1" + disabled: true + + - label: "Set up subscription to BatChargeFaultChange event" + verification: + "./apps/chip-tool powersource subscribe-event-by-id 2 120 3600 1 54321 + 1" + disabled: true + + - label: "Bring the DUT into a charge fault state." + verification: "" + disabled: true + + - label: "TH reads the ActiveBatChargeFaults attribute from the DUT" + verification: + "./apps/chip-tool powersource read active-battery-charge-faults 12345 + 1" + disabled: true + + - label: "Bring the DUT back into a clean state." + verification: "" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml new file mode 100644 index 00000000000000..e25a2f46f032d5 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SU_4_1.yaml @@ -0,0 +1,140 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.14.1. [TC-SU-4.1] Tests for verifying cluster attributes on OTA-R(DUT) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "TH sends a read request to read the UpdatePossible attribute from the + DUT." + verification: + "chip-tool otasoftwareupdaterequestor read update-possible + 0x1234567890 0 where 0x1234567890 is OTA Requestor node ID Verify on + the chip-tool logs [1645822694702] [22599:21229305] CHIP: [DMG] + ReportDataMessage = [1645822694702] [22599:21229305] CHIP: [DMG] { + [1645822694702] [22599:21229305] CHIP: [DMG] AttributeReportIBs = + [1645822694702] [22599:21229305] CHIP: [DMG] [ [1645822694702] + [22599:21229305] CHIP: [DMG] AttributeReportIB = [1645822694702] + [22599:21229305] CHIP: [DMG] { [1645822694702] [22599:21229305] CHIP: + [DMG] AttributeDataIB = [1645822694702] [22599:21229305] CHIP: [DMG] { + [1645822694702] [22599:21229305] CHIP: [DMG] DataVersion = 0x3873a963, + [1645822694702] [22599:21229305] CHIP: [DMG] AttributePathIB = + [1645822694702] [22599:21229305] CHIP: [DMG] { [1645822694702] + [22599:21229305] CHIP: [DMG] Endpoint = 0x0, [1645822694702] + [22599:21229305] CHIP: [DMG] Cluster = 0x2a, [1645822694702] + [22599:21229305] CHIP: [DMG] Attribute = 0x0000_0001, [1645822694702] + [22599:21229305] CHIP: [DMG] } [1645822694702] [22599:21229305] CHIP: + [DMG] [1645822694702] [22599:21229305] CHIP: [DMG] Data = true, + [1645822694702] [22599:21229305] CHIP: [DMG] }, [1645822694702] + [22599:21229305] CHIP: [DMG] [1645822694702] [22599:21229305] CHIP: + [DMG] }, [1645822694702] [22599:21229305] CHIP: [DMG] [1645822694702] + [22599:21229305] CHIP: [DMG] ], [1645822694702] [22599:21229305] CHIP: + [DMG] [1645822694702] [22599:21229305] CHIP: [DMG] SuppressResponse = + true, [1645822694702] [22599:21229305] CHIP: [DMG] + InteractionModelRevision = 1 [1645822694702] [22599:21229305] CHIP: + [DMG] }" + disabled: true + + - label: + "TH sends a read request to read the UpdateState attribute from the + DUT" + verification: + "chip-tool otasoftwareupdaterequestor read update-state 0x1234567890 0 + where 0x1234567890 is OTA Requestor node ID Verify that the value is + set to one of the valid attribute values based on the current update + state on the chip-tool logs [1645822907230] [22642:21232581] CHIP: + [DMG] ReportDataMessage = [1645822907230] [22642:21232581] CHIP: [DMG] + { [1645822907230] [22642:21232581] CHIP: [DMG] AttributeReportIBs = + [1645822907230] [22642:21232581] CHIP: [DMG] [ [1645822907230] + [22642:21232581] CHIP: [DMG] AttributeReportIB = [1645822907230] + [22642:21232581] CHIP: [DMG] { [1645822907230] [22642:21232581] CHIP: + [DMG] AttributeDataIB = [1645822907230] [22642:21232581] CHIP: [DMG] { + [1645822907230] [22642:21232581] CHIP: [DMG] DataVersion = 0x3873a963, + [1645822907230] [22642:21232581] CHIP: [DMG] AttributePathIB = + [1645822907230] [22642:21232581] CHIP: [DMG] { [1645822907230] + [22642:21232581] CHIP: [DMG] Endpoint = 0x0, [1645822907230] + [22642:21232581] CHIP: [DMG] Cluster = 0x2a, [1645822907230] + [22642:21232581] CHIP: [DMG] Attribute = 0x0000_0002, [1645822907230] + [22642:21232581] CHIP: [DMG] } [1645822907230] [22642:21232581] CHIP: + [DMG] [1645822907230] [22642:21232581] CHIP: [DMG] Data = 1, + [1645822907230] [22642:21232581] CHIP: [DMG] }, [1645822907230] + [22642:21232581] CHIP: [DMG] [1645822907230] [22642:21232581] CHIP: + [DMG] }, [1645822907230] [22642:21232581] CHIP: [DMG] [1645822907230] + [22642:21232581] CHIP: [DMG] ], [1645822907230] [22642:21232581] CHIP: + [DMG] [1645822907230] [22642:21232581] CHIP: [DMG] SuppressResponse = + true, [1645822907230] [22642:21232581] CHIP: [DMG] + InteractionModelRevision = 1 [1645822907230] [22642:21232581] CHIP: + [DMG] }" + disabled: true + + - label: + "DUT should start initiating the Software update process. While the + DUT is downloading the image, TH sends a read request to read the + UpdateStateProgress attribute from the DUT" + verification: + "chip-tool otasoftwareupdaterequestor read update-state-progress + 0x1234567890 0 where 0x1234567890 is OTA Requestor node ID Verify that + the field value is null if no ongoing update on the chip-tool logs + [1645823750592] [22938:21245247] CHIP: [DMG] ReportDataMessage = + [1645823750592] [22938:21245247] CHIP: [DMG] { [1645823750592] + [22938:21245247] CHIP: [DMG] AttributeReportIBs = [1645823750592] + [22938:21245247] CHIP: [DMG] [ [1645823750592] [22938:21245247] CHIP: + [DMG] AttributeReportIB = [1645823750592] [22938:21245247] CHIP: [DMG] + { [1645823750592] [22938:21245247] CHIP: [DMG] AttributeDataIB = + [1645823750592] [22938:21245247] CHIP: [DMG] { [1645823750592] + [22938:21245247] CHIP: [DMG] DataVersion = 0x3873a963, [1645823750592] + [22938:21245247] CHIP: [DMG] AttributePathIB = [1645823750592] + [22938:21245247] CHIP: [DMG] { [1645823750592] [22938:21245247] CHIP: + [DMG] Endpoint = 0x0, [1645823750592] [22938:21245247] CHIP: [DMG] + Cluster = 0x2a, [1645823750592] [22938:21245247] CHIP: [DMG] Attribute + = 0x0000_0003, [1645823750592] [22938:21245247] CHIP: [DMG] } + [1645823750592] [22938:21245247] CHIP: [DMG] [1645823750592] + [22938:21245247] CHIP: [DMG] Data = NULL [1645823750592] + [22938:21245247] CHIP: [DMG] }, [1645823750592] [22938:21245247] CHIP: + [DMG] [1645823750592] [22938:21245247] CHIP: [DMG] }, [1645823750592] + [22938:21245247] CHIP: [DMG] [1645823750592] [22938:21245247] CHIP: + [DMG] ], [1645823750592] [22938:21245247] CHIP: [DMG] [1645823750592] + [22938:21245247] CHIP: [DMG] SuppressResponse = true, [1645823750592] + [22938:21245247] CHIP: [DMG] InteractionModelRevision = 1 + [1645823750592] [22938:21245247] CHIP: [DMG] } Verify that the field + value is anything between 1 to 100 for an ongoing update on the + chip-tool logs [1645823829292] [22944:21246546] CHIP: [DMG] + ReportDataMessage = [1645823829292] [22944:21246546] CHIP: [DMG] { + [1645823829292] [22944:21246546] CHIP: [DMG] AttributeReportIBs = + [1645823829292] [22944:21246546] CHIP: [DMG] [ [1645823829292] + [22944:21246546] CHIP: [DMG] AttributeReportIB = [1645823829292] + [22944:21246546] CHIP: [DMG] { [1645823829292] [22944:21246546] CHIP: + [DMG] AttributeDataIB = [1645823829292] [22944:21246546] CHIP: [DMG] { + [1645823829292] [22944:21246546] CHIP: [DMG] DataVersion = 0x3873a966, + [1645823829292] [22944:21246546] CHIP: [DMG] AttributePathIB = + [1645823829292] [22944:21246546] CHIP: [DMG] { [1645823829292] + [22944:21246546] CHIP: [DMG] Endpoint = 0x0, [1645823829292] + [22944:21246546] CHIP: [DMG] Cluster = 0x2a, [1645823829292] + [22944:21246546] CHIP: [DMG] Attribute = 0x0000_0003, [1645823829292] + [22944:21246546] CHIP: [DMG] } [1645823829292] [22944:21246546] CHIP: + [DMG] [1645823829292] [22944:21246546] CHIP: [DMG] Data = 20, + [1645823829292] [22944:21246546] CHIP: [DMG] }, [1645823829292] + [22944:21246546] CHIP: [DMG] [1645823829292] [22944:21246546] CHIP: + [DMG] }, [1645823829292] [22944:21246546] CHIP: [DMG] [1645823829292] + [22944:21246546] CHIP: [DMG] ], [1645823829292] [22944:21246546] CHIP: + [DMG] [1645823829292] [22944:21246546] CHIP: [DMG] SuppressResponse = + true, [1645823829292] [22944:21246546] CHIP: [DMG] + InteractionModelRevision = 1 [1645823829292] [22944:21246546] CHIP: + [DMG] }" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml b/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml new file mode 100644 index 00000000000000..9987d176806153 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SU_4_2.yaml @@ -0,0 +1,44 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + 31.15.1. [TC-SU-4.2] Tests for verifying cluster attributes from Admin(DUT) + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: + "DUT sends a read request to read the UpdatePossible attribute from + the TH." + verification: + "Verify that the OTA Requestor App responds to the read command" + disabled: true + + - label: + "DUT sends a read request to read the UpdateState attribute from the + TH." + verification: + "Verify that the OTA Requestor App responds to the read command" + disabled: true + + - label: + "TH should start initiating the Software update process. While the TH + is downloading the image, DUT sends a read request to read the + UpdateStateProgress attribute from the TH." + verification: + "Verify that the OTA Requestor App responds to the read command" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml b/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml new file mode 100644 index 00000000000000..d262c4ea96f431 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_WNCV_6_1.yaml @@ -0,0 +1,144 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 3.4.7. [TC-WNCV-6.1] Basic Commands Verification with client as DUT + +config: + nodeId: 0x12344321 + cluster: "Basic" + endpoint: 0 + +tests: + - label: "Check UpOrOpen command" + verification: "" + disabled: true + + - label: "DUT sends UpOrOpen command to TH" + verification: + "On TestHarnes (all-cluster-app) a received up-or-open for + WindowCovering looks like this [1646243704.407225][352796:352796] + CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and + MessageCounter:10452706 on exchange 27302r + [1646243704.407277][352796:352796] CHIP:EM: Handling via exchange: + 27302r, Delegate: 0x560eb84d5500 [1646243704.407350][352796:352796] + CHIP:DMG: InvokeRequestMessage = [1646243704.407411][352796:352796] + CHIP:DMG: { [1646243704.407439][352796:352796] CHIP:DMG: + suppressResponse = false, [1646243704.407503][352796:352796] CHIP:DMG: + timedRequest = false, [1646243704.407529][352796:352796] CHIP:DMG: + InvokeRequests = [1646243704.407565][352796:352796] CHIP:DMG: [ + [1646243704.407591][352796:352796] CHIP:DMG: CommandDataIB = + [1646243704.407632][352796:352796] CHIP:DMG: { + [1646243704.407690][352796:352796] CHIP:DMG: CommandPathIB = + [1646243704.407721][352796:352796] CHIP:DMG: { + [1646243704.407807][352796:352796] CHIP:DMG: EndpointId = 0x1, + [1646243704.407835][352796:352796] CHIP:DMG: ClusterId = 0x102, + [1646243704.407899][352796:352796] CHIP:DMG: CommandId = 0x0, + [1646243704.407926][352796:352796] CHIP:DMG: }, + [1646243704.407970][352796:352796] CHIP:DMG: + [1646243704.407997][352796:352796] CHIP:DMG: CommandData = + [1646243704.408030][352796:352796] CHIP:DMG: { + [1646243704.408058][352796:352796] CHIP:DMG: }, + [1646243704.408100][352796:352796] CHIP:DMG: }, + [1646243704.408128][352796:352796] CHIP:DMG: + [1646243704.408154][352796:352796] CHIP:DMG: ], + [1646243704.408356][352796:352796] CHIP:DMG: + [1646243704.408406][352796:352796] CHIP:DMG: InteractionModelRevision + = 1 [1646243704.408447][352796:352796] CHIP:DMG: }, + [1646243704.408561][352796:352796] CHIP:DMG: AccessControl: checking + f=1 a=c s=0x000000000001B669 t= c=0x0000_0102 e=1 p=o + [1646243704.408618][352796:352796] CHIP:DMG: Received command for + Endpoint=1 Cluster=0x0000_0102 Command=0x0000_0000" + disabled: true + + - label: "Check DownOrClose command" + verification: "" + disabled: true + + - label: "DUT sends DownOrClose command to TH" + verification: + "On TestHarnes (all-cluster-app) a received down-or-close for + WindowCovering looks like this [1646243773.438732][352796:352796] + CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and + MessageCounter:8564771 on exchange 6526r + [1646243773.438764][352796:352796] CHIP:EM: Handling via exchange: + 6526r, Delegate: 0x560eb84d5500 [1646243773.438871][352796:352796] + CHIP:DMG: InvokeRequestMessage = [1646243773.439801][352796:352796] + CHIP:DMG: { [1646243773.439829][352796:352796] CHIP:DMG: + suppressResponse = false, [1646243773.439876][352796:352796] CHIP:DMG: + timedRequest = false, [1646243773.439922][352796:352796] CHIP:DMG: + InvokeRequests = [1646243773.440036][352796:352796] CHIP:DMG: [ + [1646243773.440077][352796:352796] CHIP:DMG: CommandDataIB = + [1646243773.440128][352796:352796] CHIP:DMG: { + [1646243773.440176][352796:352796] CHIP:DMG: CommandPathIB = + [1646243773.440224][352796:352796] CHIP:DMG: { + [1646243773.440271][352796:352796] CHIP:DMG: EndpointId = 0x1, + [1646243773.440351][352796:352796] CHIP:DMG: ClusterId = 0x102, + [1646243773.440385][352796:352796] CHIP:DMG: CommandId = 0x1, + [1646243773.440445][352796:352796] CHIP:DMG: }, + [1646243773.440498][352796:352796] CHIP:DMG: + [1646243773.440560][352796:352796] CHIP:DMG: CommandData = + [1646243773.440613][352796:352796] CHIP:DMG: { + [1646243773.440898][352796:352796] CHIP:DMG: }, + [1646243773.440927][352796:352796] CHIP:DMG: }, + [1646243773.440999][352796:352796] CHIP:DMG: + [1646243773.441032][352796:352796] CHIP:DMG: ], + [1646243773.441061][352796:352796] CHIP:DMG: + [1646243773.441132][352796:352796] CHIP:DMG: InteractionModelRevision + = 1 [1646243773.441183][352796:352796] CHIP:DMG: }, + [1646243773.441262][352796:352796] CHIP:DMG: AccessControl: checking + f=1 a=c s=0x000000000001B669 t= c=0x0000_0102 e=1 p=o + [1646243773.441302][352796:352796] CHIP:DMG: Received command for + Endpoint=1 Cluster=0x0000_0102 Command=0x0000_0001" + disabled: true + + - label: "Check StopMotion command" + verification: "" + disabled: true + + - label: "DUT sends a StopMotion command to TH" + verification: + "On TestHarnes (all-cluster-app) a received stop-motion for + WindowCovering looks like this 1646243464.420695][352796:352796] + CHIP:EM: Received message of type 0x8 with protocolId (0, 1) and + MessageCounter:3710998 on exchange 7151r + [1646243464.420725][352796:352796] CHIP:EM: Handling via exchange: + 7151r, Delegate: 0x560eb84d5500 [1646243464.420779][352796:352796] + CHIP:DMG: InvokeRequestMessage = [1646243464.420820][352796:352796] + CHIP:DMG: { [1646243464.420845][352796:352796] CHIP:DMG: + suppressResponse = false, [1646243464.420885][352796:352796] CHIP:DMG: + timedRequest = false, [1646243464.420910][352796:352796] CHIP:DMG: + InvokeRequests = [1646243464.420952][352796:352796] CHIP:DMG: [ + [1646243464.420991][352796:352796] CHIP:DMG: CommandDataIB = + [1646243464.421045][352796:352796] CHIP:DMG: { + [1646243464.421072][352796:352796] CHIP:DMG: CommandPathIB = + [1646243464.421104][352796:352796] CHIP:DMG: { + [1646243464.421173][352796:352796] CHIP:DMG: EndpointId = 0x1, + [1646243464.421214][352796:352796] CHIP:DMG: ClusterId = 0x102, + [1646243464.421256][352796:352796] CHIP:DMG: CommandId = 0x2, + [1646243464.421308][352796:352796] CHIP:DMG: }, + [1646243464.421337][352796:352796] CHIP:DMG: + [1646243464.421368][352796:352796] CHIP:DMG: CommandData = + [1646243464.421393][352796:352796] CHIP:DMG: { + [1646243464.421436][352796:352796] CHIP:DMG: }, + [1646243464.421461][352796:352796] CHIP:DMG: }, + [1646243464.421500][352796:352796] CHIP:DMG: + [1646243464.421540][352796:352796] CHIP:DMG: ], + [1646243464.421567][352796:352796] CHIP:DMG: + [1646243464.421609][352796:352796] CHIP:DMG: InteractionModelRevision + = 1 [1646243464.421634][352796:352796] CHIP:DMG: }, + [1646243464.421668][352796:352796] CHIP:DMG: AccessControl: checking + f=1 a=c s=0x000000000001B669 t= c=0x0000_0102 e=1 p=o + [1646243464.421717][352796:352796] CHIP:DMG: Received command for + Endpoint=1 Cluster=0x0000_0102 Command=0x0000_0002" + disabled: true diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 6b88ef52f34272..622e648d6c6c4a 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -228,6 +228,10 @@ class ManualTestList : public Command printf("Test_TC_DD_3_6\n"); printf("Test_TC_DD_3_9\n"); printf("Test_TC_DD_3_10\n"); + printf("Test_TC_DD_3_11\n"); + printf("Test_TC_DD_3_12\n"); + printf("Test_TC_DD_3_13\n"); + printf("Test_TC_DD_3_14\n"); printf("Test_TC_DD_4_1\n"); printf("TestGroupDemoCommand\n"); printf("TestGroupDemoConfig\n"); @@ -247,8 +251,11 @@ class ManualTestList : public Command printf("Test_TC_BRAC_2_1\n"); printf("Test_TC_BRAC_2_2\n"); printf("Test_TC_DM_1_2\n"); + printf("Test_TC_DM_1_4\n"); printf("Test_TC_DM_2_3\n"); + printf("Test_TC_DM_2_4\n"); printf("Test_TC_DM_3_2\n"); + printf("Test_TC_DM_3_4\n"); printf("Test_TC_DIAG_LOG_1_1\n"); printf("Test_TC_DIAG_LOG_1_2\n"); printf("Test_TC_DIAG_LOG_1_3\n"); @@ -259,9 +266,11 @@ class ManualTestList : public Command printf("Test_TC_GC_1_3\n"); printf("Test_TC_GENDIAG_1_1\n"); printf("Test_TC_GENDIAG_1_2\n"); + printf("Test_TC_GENDIAG_2_1\n"); printf("Test_TC_I_2_2\n"); printf("Test_TC_I_2_3\n"); printf("Test_TC_ILL_2_1\n"); + printf("Test_TC_ILL_2_2\n"); printf("Test_TC_IDM_1_1\n"); printf("Test_TC_IDM_1_2\n"); printf("Test_TC_IDM_2_1\n"); @@ -274,7 +283,10 @@ class ManualTestList : public Command printf("Test_TC_IDM_5_2\n"); printf("Test_TC_IDM_6_1\n"); printf("Test_TC_IDM_6_2\n"); + printf("Test_TC_IDM_6_3\n"); + printf("Test_TC_IDM_6_4\n"); printf("Test_TC_MC_3_12\n"); + printf("Test_TC_MC_3_13\n"); printf("Test_TC_MC_4_1\n"); printf("Test_TC_MC_8_2\n"); printf("Test_TC_MC_9_2\n"); @@ -308,9 +320,17 @@ class ManualTestList : public Command printf("Test_TC_MF_1_22\n"); printf("Test_TC_MF_1_23\n"); printf("Test_TC_MF_1_24\n"); + printf("Test_TC_MF_1_25\n"); + printf("Test_TC_MF_1_26\n"); + printf("Test_TC_MF_1_27\n"); + printf("Test_TC_MF_1_28\n"); printf("Test_TC_MOD_1_1\n"); printf("Test_TC_MOD_1_2\n"); printf("Test_TC_MOD_2_1\n"); + printf("Test_TC_MOD_2_2\n"); + printf("Test_TC_MOD_3_1\n"); + printf("Test_TC_MOD_3_2\n"); + printf("Test_TC_MOD_3_3\n"); printf("Test_TC_SU_1_1\n"); printf("Test_TC_SU_2_1\n"); printf("Test_TC_SU_2_2\n"); @@ -323,8 +343,11 @@ class ManualTestList : public Command printf("Test_TC_SU_3_2\n"); printf("Test_TC_SU_3_3\n"); printf("Test_TC_SU_3_4\n"); + printf("Test_TC_SU_4_1\n"); + printf("Test_TC_SU_4_2\n"); printf("Test_TC_PSCFG_1_1\n"); printf("Test_TC_PSCFG_2_1\n"); + printf("Test_TC_PSCFG_3_1\n"); printf("Test_TC_SC_4_5\n"); printf("Test_TC_SC_4_6\n"); printf("Test_TC_SC_4_7\n"); @@ -334,6 +357,15 @@ class ManualTestList : public Command printf("Test_TC_WIFIDIAG_1_2\n"); printf("Test_TC_WIFIDIAG_2_1\n"); printf("Test_TC_WNCV_2_3\n"); + printf("Test_TC_WNCV_6_1\n"); + printf("Test_TC_FLW_3_1\n"); + printf("Test_TC_OCC_2_3\n"); + printf("Test_TC_OCC_2_4\n"); + printf("Test_TC_OCC_3_1\n"); + printf("Test_TC_OO_2_4\n"); + printf("Test_TC_PRS_2_2\n"); + printf("Test_TC_PRS_2_3\n"); + printf("Test_TC_PS_2_2\n"); return CHIP_NO_ERROR; } @@ -105189,6 +105221,278 @@ class Test_TC_DD_3_10Suite : public TestCommand // }; +class Test_TC_DD_3_11Suite : public TestCommand +{ +public: + Test_TC_DD_3_11Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DD_3_11", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DD_3_11Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_3_11\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_3_11\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_DD_3_12Suite : public TestCommand +{ +public: + Test_TC_DD_3_12Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DD_3_12", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DD_3_12Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_3_12\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_3_12\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_DD_3_13Suite : public TestCommand +{ +public: + Test_TC_DD_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DD_3_13", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DD_3_13Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_3_13\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_3_13\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_DD_3_14Suite : public TestCommand +{ +public: + Test_TC_DD_3_14Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DD_3_14", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DD_3_14Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DD_3_14\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DD_3_14\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + class Test_TC_DD_4_1Suite : public TestCommand { public: @@ -107294,11 +107598,11 @@ class Test_TC_DM_1_2Suite : public TestCommand // }; -class Test_TC_DM_2_3Suite : public TestCommand +class Test_TC_DM_1_4Suite : public TestCommand { public: - Test_TC_DM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DM_2_3", credsIssuerConfig), mTestIndex(0) + Test_TC_DM_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DM_1_4", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107306,7 +107610,7 @@ class Test_TC_DM_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_2_3Suite() {} + ~Test_TC_DM_1_4Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107315,12 +107619,12 @@ class Test_TC_DM_2_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_1_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_1_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107369,11 +107673,11 @@ class Test_TC_DM_2_3Suite : public TestCommand // }; -class Test_TC_DM_3_2Suite : public TestCommand +class Test_TC_DM_2_3Suite : public TestCommand { public: - Test_TC_DM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DM_3_2", credsIssuerConfig), mTestIndex(0) + Test_TC_DM_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DM_2_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107381,7 +107685,7 @@ class Test_TC_DM_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DM_3_2Suite() {} + ~Test_TC_DM_2_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107390,12 +107694,12 @@ class Test_TC_DM_3_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107417,9 +107721,72 @@ class Test_TC_DM_3_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_DM_2_4Suite : public TestCommand +{ +public: + Test_TC_DM_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DM_2_4", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DM_2_4Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_2_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_2_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } private: @@ -107429,7 +107796,6 @@ class Test_TC_DM_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -107444,19 +107810,18 @@ class Test_TC_DM_3_2Suite : public TestCommand // }; -class Test_TC_DIAG_LOG_1_1Suite : public TestCommand +class Test_TC_DM_3_2Suite : public TestCommand { public: - Test_TC_DIAG_LOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_LOG_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_DM_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DM_3_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_LOG_1_1Suite() {} + ~Test_TC_DM_3_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107465,12 +107830,80 @@ class Test_TC_DIAG_LOG_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_3_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_DM_3_4Suite : public TestCommand +{ +public: + Test_TC_DM_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DM_3_4", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_DM_3_4Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DM_3_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DM_3_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107519,11 +107952,11 @@ class Test_TC_DIAG_LOG_1_1Suite : public TestCommand // }; -class Test_TC_DIAG_LOG_1_2Suite : public TestCommand +class Test_TC_DIAG_LOG_1_1Suite : public TestCommand { public: - Test_TC_DIAG_LOG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_LOG_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_DIAG_LOG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_LOG_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107531,7 +107964,7 @@ class Test_TC_DIAG_LOG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_LOG_1_2Suite() {} + ~Test_TC_DIAG_LOG_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107540,12 +107973,12 @@ class Test_TC_DIAG_LOG_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107594,11 +108027,11 @@ class Test_TC_DIAG_LOG_1_2Suite : public TestCommand // }; -class Test_TC_DIAG_LOG_1_3Suite : public TestCommand +class Test_TC_DIAG_LOG_1_2Suite : public TestCommand { public: - Test_TC_DIAG_LOG_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DIAG_LOG_1_3", credsIssuerConfig), mTestIndex(0) + Test_TC_DIAG_LOG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_LOG_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107606,7 +108039,7 @@ class Test_TC_DIAG_LOG_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DIAG_LOG_1_3Suite() {} + ~Test_TC_DIAG_LOG_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107615,12 +108048,12 @@ class Test_TC_DIAG_LOG_1_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107669,11 +108102,11 @@ class Test_TC_DIAG_LOG_1_3Suite : public TestCommand // }; -class Test_TC_DESC_1_1Suite : public TestCommand +class Test_TC_DIAG_LOG_1_3Suite : public TestCommand { public: - Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DESC_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_DIAG_LOG_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DIAG_LOG_1_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107681,7 +108114,7 @@ class Test_TC_DESC_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DESC_1_1Suite() {} + ~Test_TC_DIAG_LOG_1_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107690,12 +108123,12 @@ class Test_TC_DESC_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DIAG_LOG_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DIAG_LOG_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107744,11 +108177,11 @@ class Test_TC_DESC_1_1Suite : public TestCommand // }; -class Test_TC_ETHDIAG_1_2Suite : public TestCommand +class Test_TC_DESC_1_1Suite : public TestCommand { public: - Test_TC_ETHDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ETHDIAG_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_DESC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DESC_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107756,7 +108189,7 @@ class Test_TC_ETHDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ETHDIAG_1_2Suite() {} + ~Test_TC_DESC_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107765,12 +108198,12 @@ class Test_TC_ETHDIAG_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ETHDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_DESC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ETHDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_DESC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107819,11 +108252,11 @@ class Test_TC_ETHDIAG_1_2Suite : public TestCommand // }; -class Test_TC_GC_1_1Suite : public TestCommand +class Test_TC_ETHDIAG_1_2Suite : public TestCommand { public: - Test_TC_GC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GC_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_ETHDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_ETHDIAG_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107831,7 +108264,7 @@ class Test_TC_GC_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GC_1_1Suite() {} + ~Test_TC_ETHDIAG_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107840,12 +108273,12 @@ class Test_TC_GC_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ETHDIAG_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ETHDIAG_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107894,11 +108327,11 @@ class Test_TC_GC_1_1Suite : public TestCommand // }; -class Test_TC_GC_1_2Suite : public TestCommand +class Test_TC_GC_1_1Suite : public TestCommand { public: - Test_TC_GC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GC_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_GC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GC_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107906,7 +108339,7 @@ class Test_TC_GC_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GC_1_2Suite() {} + ~Test_TC_GC_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107915,12 +108348,12 @@ class Test_TC_GC_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -107969,11 +108402,11 @@ class Test_TC_GC_1_2Suite : public TestCommand // }; -class Test_TC_GC_1_3Suite : public TestCommand +class Test_TC_GC_1_2Suite : public TestCommand { public: - Test_TC_GC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GC_1_3", credsIssuerConfig), mTestIndex(0) + Test_TC_GC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GC_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -107981,7 +108414,7 @@ class Test_TC_GC_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GC_1_3Suite() {} + ~Test_TC_GC_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -107990,12 +108423,12 @@ class Test_TC_GC_1_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -108044,11 +108477,11 @@ class Test_TC_GC_1_3Suite : public TestCommand // }; -class Test_TC_GENDIAG_1_1Suite : public TestCommand +class Test_TC_GC_1_3Suite : public TestCommand { public: - Test_TC_GENDIAG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_GC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GC_1_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -108056,7 +108489,7 @@ class Test_TC_GENDIAG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_1Suite() {} + ~Test_TC_GC_1_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -108065,12 +108498,12 @@ class Test_TC_GENDIAG_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GENDIAG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GC_1_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GENDIAG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GC_1_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -108119,11 +108552,11 @@ class Test_TC_GENDIAG_1_1Suite : public TestCommand // }; -class Test_TC_GENDIAG_1_2Suite : public TestCommand +class Test_TC_GENDIAG_1_1Suite : public TestCommand { public: - Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_GENDIAG_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_GENDIAG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GENDIAG_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -108131,7 +108564,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_GENDIAG_1_2Suite() {} + ~Test_TC_GENDIAG_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -108140,12 +108573,12 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_GENDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GENDIAG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GENDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GENDIAG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -108194,19 +108627,18 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand // }; -class Test_TC_I_2_2Suite : public TestCommand +class Test_TC_GENDIAG_1_2Suite : public TestCommand { public: - Test_TC_I_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_I_2_2", credsIssuerConfig), mTestIndex(0) + Test_TC_GENDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GENDIAG_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_I_2_2Suite() {} + ~Test_TC_GENDIAG_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -108215,12 +108647,12 @@ class Test_TC_I_2_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GENDIAG_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GENDIAG_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -108242,9 +108674,140 @@ class Test_TC_I_2_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_GENDIAG_2_1Suite : public TestCommand +{ +public: + Test_TC_GENDIAG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_GENDIAG_2_1", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_GENDIAG_2_1Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_GENDIAG_2_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_GENDIAG_2_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_I_2_2Suite : public TestCommand +{ +public: + Test_TC_I_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_I_2_2", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_I_2_2Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_I_2_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_I_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } private: @@ -108254,7 +108817,6 @@ class Test_TC_I_2_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108278,7 +108840,6 @@ class Test_TC_I_2_3Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_I_2_3Suite() {} @@ -108317,11 +108878,6 @@ class Test_TC_I_2_3Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108329,7 +108885,6 @@ class Test_TC_I_2_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108353,7 +108908,6 @@ class Test_TC_ILL_2_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_ILL_2_1Suite() {} @@ -108392,9 +108946,72 @@ class Test_TC_ILL_2_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_ILL_2_2Suite : public TestCommand +{ +public: + Test_TC_ILL_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_ILL_2_2", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_ILL_2_2Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_ILL_2_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ILL_2_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } private: @@ -108404,7 +109021,6 @@ class Test_TC_ILL_2_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108428,7 +109044,6 @@ class Test_TC_IDM_1_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_1_1Suite() {} @@ -108467,11 +109082,6 @@ class Test_TC_IDM_1_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108479,7 +109089,6 @@ class Test_TC_IDM_1_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108503,7 +109112,6 @@ class Test_TC_IDM_1_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_1_2Suite() {} @@ -108542,11 +109150,6 @@ class Test_TC_IDM_1_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108554,7 +109157,6 @@ class Test_TC_IDM_1_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108578,7 +109180,6 @@ class Test_TC_IDM_2_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_2_1Suite() {} @@ -108617,11 +109218,6 @@ class Test_TC_IDM_2_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108629,7 +109225,6 @@ class Test_TC_IDM_2_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108653,7 +109248,6 @@ class Test_TC_IDM_2_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_2_2Suite() {} @@ -108692,11 +109286,6 @@ class Test_TC_IDM_2_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108704,7 +109293,6 @@ class Test_TC_IDM_2_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108728,7 +109316,6 @@ class Test_TC_IDM_3_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_3_1Suite() {} @@ -108767,11 +109354,6 @@ class Test_TC_IDM_3_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108779,7 +109361,6 @@ class Test_TC_IDM_3_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108803,7 +109384,6 @@ class Test_TC_IDM_3_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_3_2Suite() {} @@ -108842,11 +109422,6 @@ class Test_TC_IDM_3_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108854,7 +109429,6 @@ class Test_TC_IDM_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108878,7 +109452,6 @@ class Test_TC_IDM_4_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_4_1Suite() {} @@ -108917,11 +109490,6 @@ class Test_TC_IDM_4_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108929,7 +109497,6 @@ class Test_TC_IDM_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108953,7 +109520,6 @@ class Test_TC_IDM_4_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_4_2Suite() {} @@ -108992,11 +109558,6 @@ class Test_TC_IDM_4_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109004,7 +109565,6 @@ class Test_TC_IDM_4_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109028,7 +109588,6 @@ class Test_TC_IDM_5_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_5_1Suite() {} @@ -109067,11 +109626,6 @@ class Test_TC_IDM_5_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109079,7 +109633,6 @@ class Test_TC_IDM_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109103,7 +109656,6 @@ class Test_TC_IDM_5_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_5_2Suite() {} @@ -109142,11 +109694,6 @@ class Test_TC_IDM_5_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109154,7 +109701,6 @@ class Test_TC_IDM_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109178,7 +109724,6 @@ class Test_TC_IDM_6_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_1Suite() {} @@ -109217,11 +109762,6 @@ class Test_TC_IDM_6_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109229,7 +109769,6 @@ class Test_TC_IDM_6_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109253,7 +109792,6 @@ class Test_TC_IDM_6_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_2Suite() {} @@ -109292,9 +109830,140 @@ class Test_TC_IDM_6_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_IDM_6_3Suite : public TestCommand +{ +public: + Test_TC_IDM_6_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_IDM_6_3", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_IDM_6_3Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_IDM_6_3\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_IDM_6_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_IDM_6_4Suite : public TestCommand +{ +public: + Test_TC_IDM_6_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_IDM_6_4", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_IDM_6_4Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_IDM_6_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_IDM_6_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } private: @@ -109304,7 +109973,6 @@ class Test_TC_IDM_6_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109328,7 +109996,6 @@ class Test_TC_MC_3_12Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_3_12Suite() {} @@ -109367,9 +110034,72 @@ class Test_TC_MC_3_12Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MC_3_13Suite : public TestCommand +{ +public: + Test_TC_MC_3_13Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MC_3_13", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + } + + ~Test_TC_MC_3_13Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_3_13\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_3_13\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } } private: @@ -109379,7 +110109,6 @@ class Test_TC_MC_3_12Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109403,7 +110132,6 @@ class Test_TC_MC_4_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_4_1Suite() {} @@ -109442,11 +110170,6 @@ class Test_TC_MC_4_1Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109454,7 +110177,6 @@ class Test_TC_MC_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109478,7 +110200,6 @@ class Test_TC_MC_8_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_8_2Suite() {} @@ -109517,11 +110238,6 @@ class Test_TC_MC_8_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109529,7 +110245,6 @@ class Test_TC_MC_8_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109553,7 +110268,6 @@ class Test_TC_MC_9_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_9_2Suite() {} @@ -109592,11 +110306,6 @@ class Test_TC_MC_9_2Suite : public TestCommand } } - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109604,7 +110313,6 @@ class Test_TC_MC_9_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109769,11 +110477,1511 @@ class Test_TC_MC_10_2Suite : public TestCommand // }; -class Test_TC_MC_10_3Suite : public TestCommand +class Test_TC_MC_10_3Suite : public TestCommand +{ +public: + Test_TC_MC_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MC_10_3", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_10_3Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_3\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MC_10_4Suite : public TestCommand +{ +public: + Test_TC_MC_10_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MC_10_4", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_10_4Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MC_10_5Suite : public TestCommand +{ +public: + Test_TC_MC_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MC_10_5", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_10_5Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_5\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MC_10_6Suite : public TestCommand +{ +public: + Test_TC_MC_10_6Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MC_10_6", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MC_10_6Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_6\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_1Suite : public TestCommand +{ +public: + Test_TC_MF_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_1", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_1Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_1\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_2Suite : public TestCommand +{ +public: + Test_TC_MF_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_2", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_2Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_2\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_3Suite : public TestCommand +{ +public: + Test_TC_MF_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_3", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_3Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_4Suite : public TestCommand +{ +public: + Test_TC_MF_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_4", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_4Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_5Suite : public TestCommand +{ +public: + Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_5", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_5Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_6Suite : public TestCommand +{ +public: + Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_6", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_6Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_6\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_6\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_7Suite : public TestCommand +{ +public: + Test_TC_MF_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_7", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_7Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_7\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_7\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_8Suite : public TestCommand +{ +public: + Test_TC_MF_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_8", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_8Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_8\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_8\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_9Suite : public TestCommand +{ +public: + Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_9", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_9Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_9\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_9\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_10Suite : public TestCommand +{ +public: + Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_10", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_10Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_10\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_10\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_11Suite : public TestCommand +{ +public: + Test_TC_MF_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_11", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_11Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_11\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_11\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_12Suite : public TestCommand +{ +public: + Test_TC_MF_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_12", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_12Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_12\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_12\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_13Suite : public TestCommand +{ +public: + Test_TC_MF_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_13", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_13Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_13\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_13\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_14Suite : public TestCommand +{ +public: + Test_TC_MF_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_14", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_14Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_14\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_14\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_15Suite : public TestCommand +{ +public: + Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_15", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_15Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_15\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_15\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_16Suite : public TestCommand +{ +public: + Test_TC_MF_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_16", credsIssuerConfig), mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MF_1_16Suite() {} + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + + if (0 == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_16\n"); + } + + if (mTestCount == mTestIndex) + { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_16\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) + { + } + + if (CHIP_NO_ERROR != err) + { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 0; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override + { + bool isExpectedDnssdResult = false; + + VerifyOrReturn(isExpectedDnssdResult, Exit("An unexpected dnssd result has been received")); + NextTest(); + } + + // + // Tests methods + // +}; + +class Test_TC_MF_1_17Suite : public TestCommand { public: - Test_TC_MC_10_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MC_10_3", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_17", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -109781,7 +111989,7 @@ class Test_TC_MC_10_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_3Suite() {} + ~Test_TC_MF_1_17Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -109790,12 +111998,12 @@ class Test_TC_MC_10_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_17\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_17\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -109844,11 +112052,11 @@ class Test_TC_MC_10_3Suite : public TestCommand // }; -class Test_TC_MC_10_4Suite : public TestCommand +class Test_TC_MF_1_18Suite : public TestCommand { public: - Test_TC_MC_10_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MC_10_4", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_18", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -109856,7 +112064,7 @@ class Test_TC_MC_10_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_4Suite() {} + ~Test_TC_MF_1_18Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -109865,12 +112073,12 @@ class Test_TC_MC_10_4Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_18\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_18\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -109919,11 +112127,11 @@ class Test_TC_MC_10_4Suite : public TestCommand // }; -class Test_TC_MC_10_5Suite : public TestCommand +class Test_TC_MF_1_19Suite : public TestCommand { public: - Test_TC_MC_10_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MC_10_5", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_19", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -109931,7 +112139,7 @@ class Test_TC_MC_10_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_5Suite() {} + ~Test_TC_MF_1_19Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -109940,12 +112148,12 @@ class Test_TC_MC_10_5Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_19\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_19\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -109994,11 +112202,11 @@ class Test_TC_MC_10_5Suite : public TestCommand // }; -class Test_TC_MC_10_6Suite : public TestCommand +class Test_TC_MF_1_20Suite : public TestCommand { public: - Test_TC_MC_10_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MC_10_6", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_20", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110006,7 +112214,7 @@ class Test_TC_MC_10_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MC_10_6Suite() {} + ~Test_TC_MF_1_20Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110015,12 +112223,12 @@ class Test_TC_MC_10_6Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MC_10_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_20\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MC_10_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_20\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110069,11 +112277,11 @@ class Test_TC_MC_10_6Suite : public TestCommand // }; -class Test_TC_MF_1_1Suite : public TestCommand +class Test_TC_MF_1_21Suite : public TestCommand { public: - Test_TC_MF_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_21", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110081,7 +112289,7 @@ class Test_TC_MF_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_1Suite() {} + ~Test_TC_MF_1_21Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110090,12 +112298,12 @@ class Test_TC_MF_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_21\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_21\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110144,11 +112352,11 @@ class Test_TC_MF_1_1Suite : public TestCommand // }; -class Test_TC_MF_1_2Suite : public TestCommand +class Test_TC_MF_1_22Suite : public TestCommand { public: - Test_TC_MF_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_22", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110156,7 +112364,7 @@ class Test_TC_MF_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_2Suite() {} + ~Test_TC_MF_1_22Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110165,12 +112373,12 @@ class Test_TC_MF_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_22\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_22\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110219,11 +112427,11 @@ class Test_TC_MF_1_2Suite : public TestCommand // }; -class Test_TC_MF_1_3Suite : public TestCommand +class Test_TC_MF_1_23Suite : public TestCommand { public: - Test_TC_MF_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_3", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_23", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110231,7 +112439,7 @@ class Test_TC_MF_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_3Suite() {} + ~Test_TC_MF_1_23Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110240,12 +112448,12 @@ class Test_TC_MF_1_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_23\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_23\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110294,11 +112502,11 @@ class Test_TC_MF_1_3Suite : public TestCommand // }; -class Test_TC_MF_1_4Suite : public TestCommand +class Test_TC_MF_1_24Suite : public TestCommand { public: - Test_TC_MF_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_4", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_24", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110306,7 +112514,7 @@ class Test_TC_MF_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_4Suite() {} + ~Test_TC_MF_1_24Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110315,12 +112523,12 @@ class Test_TC_MF_1_4Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_24\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_24\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110369,11 +112577,11 @@ class Test_TC_MF_1_4Suite : public TestCommand // }; -class Test_TC_MF_1_5Suite : public TestCommand +class Test_TC_MF_1_25Suite : public TestCommand { public: - Test_TC_MF_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_5", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_25Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_25", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110381,7 +112589,7 @@ class Test_TC_MF_1_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_5Suite() {} + ~Test_TC_MF_1_25Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110390,12 +112598,12 @@ class Test_TC_MF_1_5Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_25\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_25\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110444,11 +112652,11 @@ class Test_TC_MF_1_5Suite : public TestCommand // }; -class Test_TC_MF_1_6Suite : public TestCommand +class Test_TC_MF_1_26Suite : public TestCommand { public: - Test_TC_MF_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_6", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_26Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_26", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110456,7 +112664,7 @@ class Test_TC_MF_1_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_6Suite() {} + ~Test_TC_MF_1_26Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110465,12 +112673,12 @@ class Test_TC_MF_1_6Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_26\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_26\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110519,11 +112727,11 @@ class Test_TC_MF_1_6Suite : public TestCommand // }; -class Test_TC_MF_1_7Suite : public TestCommand +class Test_TC_MF_1_27Suite : public TestCommand { public: - Test_TC_MF_1_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_7", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_27Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_27", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110531,7 +112739,7 @@ class Test_TC_MF_1_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_7Suite() {} + ~Test_TC_MF_1_27Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110540,12 +112748,12 @@ class Test_TC_MF_1_7Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_27\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_27\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110594,11 +112802,11 @@ class Test_TC_MF_1_7Suite : public TestCommand // }; -class Test_TC_MF_1_8Suite : public TestCommand +class Test_TC_MF_1_28Suite : public TestCommand { public: - Test_TC_MF_1_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_8", credsIssuerConfig), mTestIndex(0) + Test_TC_MF_1_28Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MF_1_28", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110606,7 +112814,7 @@ class Test_TC_MF_1_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_8Suite() {} + ~Test_TC_MF_1_28Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110615,12 +112823,12 @@ class Test_TC_MF_1_8Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_28\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_28\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110669,11 +112877,11 @@ class Test_TC_MF_1_8Suite : public TestCommand // }; -class Test_TC_MF_1_9Suite : public TestCommand +class Test_TC_MOD_1_1Suite : public TestCommand { public: - Test_TC_MF_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_9", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110681,7 +112889,7 @@ class Test_TC_MF_1_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_9Suite() {} + ~Test_TC_MOD_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110690,12 +112898,12 @@ class Test_TC_MF_1_9Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110744,11 +112952,11 @@ class Test_TC_MF_1_9Suite : public TestCommand // }; -class Test_TC_MF_1_10Suite : public TestCommand +class Test_TC_MOD_1_2Suite : public TestCommand { public: - Test_TC_MF_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_10", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110756,7 +112964,7 @@ class Test_TC_MF_1_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_10Suite() {} + ~Test_TC_MOD_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110765,12 +112973,12 @@ class Test_TC_MF_1_10Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_10\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_10\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110819,11 +113027,11 @@ class Test_TC_MF_1_10Suite : public TestCommand // }; -class Test_TC_MF_1_11Suite : public TestCommand +class Test_TC_MOD_2_1Suite : public TestCommand { public: - Test_TC_MF_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_11", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_2_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110831,7 +113039,7 @@ class Test_TC_MF_1_11Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_11Suite() {} + ~Test_TC_MOD_2_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110840,12 +113048,12 @@ class Test_TC_MF_1_11Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_11\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_11\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110894,11 +113102,11 @@ class Test_TC_MF_1_11Suite : public TestCommand // }; -class Test_TC_MF_1_12Suite : public TestCommand +class Test_TC_MOD_2_2Suite : public TestCommand { public: - Test_TC_MF_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_12", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_2_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110906,7 +113114,7 @@ class Test_TC_MF_1_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_12Suite() {} + ~Test_TC_MOD_2_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110915,12 +113123,12 @@ class Test_TC_MF_1_12Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_12\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_12\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -110969,11 +113177,11 @@ class Test_TC_MF_1_12Suite : public TestCommand // }; -class Test_TC_MF_1_13Suite : public TestCommand +class Test_TC_MOD_3_1Suite : public TestCommand { public: - Test_TC_MF_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_13", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_3_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -110981,7 +113189,7 @@ class Test_TC_MF_1_13Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_13Suite() {} + ~Test_TC_MOD_3_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -110990,12 +113198,12 @@ class Test_TC_MF_1_13Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_13\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_13\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111044,11 +113252,11 @@ class Test_TC_MF_1_13Suite : public TestCommand // }; -class Test_TC_MF_1_14Suite : public TestCommand +class Test_TC_MOD_3_2Suite : public TestCommand { public: - Test_TC_MF_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_14", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_3_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111056,7 +113264,7 @@ class Test_TC_MF_1_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_14Suite() {} + ~Test_TC_MOD_3_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111065,12 +113273,12 @@ class Test_TC_MF_1_14Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_14\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_14\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_3_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111119,11 +113327,11 @@ class Test_TC_MF_1_14Suite : public TestCommand // }; -class Test_TC_MF_1_15Suite : public TestCommand +class Test_TC_MOD_3_3Suite : public TestCommand { public: - Test_TC_MF_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_15", credsIssuerConfig), mTestIndex(0) + Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_MOD_3_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111131,7 +113339,7 @@ class Test_TC_MF_1_15Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_15Suite() {} + ~Test_TC_MOD_3_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111140,12 +113348,12 @@ class Test_TC_MF_1_15Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_15\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_15\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111194,11 +113402,11 @@ class Test_TC_MF_1_15Suite : public TestCommand // }; -class Test_TC_MF_1_16Suite : public TestCommand +class Test_TC_SU_1_1Suite : public TestCommand { public: - Test_TC_MF_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_16", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111206,7 +113414,7 @@ class Test_TC_MF_1_16Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_16Suite() {} + ~Test_TC_SU_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111215,12 +113423,12 @@ class Test_TC_MF_1_16Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_16\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_16\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111269,11 +113477,11 @@ class Test_TC_MF_1_16Suite : public TestCommand // }; -class Test_TC_MF_1_17Suite : public TestCommand +class Test_TC_SU_2_1Suite : public TestCommand { public: - Test_TC_MF_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_17", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111281,7 +113489,7 @@ class Test_TC_MF_1_17Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_17Suite() {} + ~Test_TC_SU_2_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111290,12 +113498,12 @@ class Test_TC_MF_1_17Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_17\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_17\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111344,11 +113552,11 @@ class Test_TC_MF_1_17Suite : public TestCommand // }; -class Test_TC_MF_1_18Suite : public TestCommand +class Test_TC_SU_2_2Suite : public TestCommand { public: - Test_TC_MF_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_18", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111356,7 +113564,7 @@ class Test_TC_MF_1_18Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_18Suite() {} + ~Test_TC_SU_2_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111365,12 +113573,12 @@ class Test_TC_MF_1_18Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_18\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_18\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111419,11 +113627,11 @@ class Test_TC_MF_1_18Suite : public TestCommand // }; -class Test_TC_MF_1_19Suite : public TestCommand +class Test_TC_SU_2_3Suite : public TestCommand { public: - Test_TC_MF_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_19", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111431,7 +113639,7 @@ class Test_TC_MF_1_19Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_19Suite() {} + ~Test_TC_SU_2_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111440,12 +113648,12 @@ class Test_TC_MF_1_19Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_19\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_19\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111494,11 +113702,11 @@ class Test_TC_MF_1_19Suite : public TestCommand // }; -class Test_TC_MF_1_20Suite : public TestCommand +class Test_TC_SU_2_4Suite : public TestCommand { public: - Test_TC_MF_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_20", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_4", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111506,7 +113714,7 @@ class Test_TC_MF_1_20Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_20Suite() {} + ~Test_TC_SU_2_4Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111515,12 +113723,12 @@ class Test_TC_MF_1_20Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_20\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_20\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111569,11 +113777,11 @@ class Test_TC_MF_1_20Suite : public TestCommand // }; -class Test_TC_MF_1_21Suite : public TestCommand +class Test_TC_SU_2_5Suite : public TestCommand { public: - Test_TC_MF_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_21", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_5", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111581,7 +113789,7 @@ class Test_TC_MF_1_21Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_21Suite() {} + ~Test_TC_SU_2_5Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111590,12 +113798,12 @@ class Test_TC_MF_1_21Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_21\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_21\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111644,11 +113852,11 @@ class Test_TC_MF_1_21Suite : public TestCommand // }; -class Test_TC_MF_1_22Suite : public TestCommand +class Test_TC_SU_2_6Suite : public TestCommand { public: - Test_TC_MF_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_22", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_6", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111656,7 +113864,7 @@ class Test_TC_MF_1_22Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_22Suite() {} + ~Test_TC_SU_2_6Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111665,12 +113873,12 @@ class Test_TC_MF_1_22Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_22\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_22\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111719,11 +113927,11 @@ class Test_TC_MF_1_22Suite : public TestCommand // }; -class Test_TC_MF_1_23Suite : public TestCommand +class Test_TC_SU_2_7Suite : public TestCommand { public: - Test_TC_MF_1_23Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_23", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_2_7", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111731,7 +113939,7 @@ class Test_TC_MF_1_23Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_23Suite() {} + ~Test_TC_SU_2_7Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111740,12 +113948,12 @@ class Test_TC_MF_1_23Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_23\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_23\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111794,11 +114002,11 @@ class Test_TC_MF_1_23Suite : public TestCommand // }; -class Test_TC_MF_1_24Suite : public TestCommand +class Test_TC_SU_3_1Suite : public TestCommand { public: - Test_TC_MF_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MF_1_24", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_3_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111806,7 +114014,7 @@ class Test_TC_MF_1_24Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MF_1_24Suite() {} + ~Test_TC_SU_3_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111815,12 +114023,12 @@ class Test_TC_MF_1_24Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MF_1_24\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MF_1_24\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111869,11 +114077,11 @@ class Test_TC_MF_1_24Suite : public TestCommand // }; -class Test_TC_MOD_1_1Suite : public TestCommand +class Test_TC_SU_3_2Suite : public TestCommand { public: - Test_TC_MOD_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MOD_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_3_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111881,7 +114089,7 @@ class Test_TC_MOD_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_1Suite() {} + ~Test_TC_SU_3_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111890,12 +114098,12 @@ class Test_TC_MOD_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -111944,11 +114152,11 @@ class Test_TC_MOD_1_1Suite : public TestCommand // }; -class Test_TC_MOD_1_2Suite : public TestCommand +class Test_TC_SU_3_3Suite : public TestCommand { public: - Test_TC_MOD_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MOD_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_3_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -111956,7 +114164,7 @@ class Test_TC_MOD_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_1_2Suite() {} + ~Test_TC_SU_3_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -111965,12 +114173,12 @@ class Test_TC_MOD_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112019,11 +114227,11 @@ class Test_TC_MOD_1_2Suite : public TestCommand // }; -class Test_TC_MOD_2_1Suite : public TestCommand +class Test_TC_SU_3_4Suite : public TestCommand { public: - Test_TC_MOD_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_MOD_2_1", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_3_4", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112031,7 +114239,7 @@ class Test_TC_MOD_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_2_1Suite() {} + ~Test_TC_SU_3_4Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112040,12 +114248,12 @@ class Test_TC_MOD_2_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MOD_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MOD_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112094,11 +114302,11 @@ class Test_TC_MOD_2_1Suite : public TestCommand // }; -class Test_TC_SU_1_1Suite : public TestCommand +class Test_TC_SU_4_1Suite : public TestCommand { public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_4_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112106,7 +114314,7 @@ class Test_TC_SU_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_1_1Suite() {} + ~Test_TC_SU_4_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112115,12 +114323,12 @@ class Test_TC_SU_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_4_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_4_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112169,11 +114377,11 @@ class Test_TC_SU_1_1Suite : public TestCommand // }; -class Test_TC_SU_2_1Suite : public TestCommand +class Test_TC_SU_4_2Suite : public TestCommand { public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_1", credsIssuerConfig), mTestIndex(0) + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SU_4_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112181,7 +114389,7 @@ class Test_TC_SU_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_1Suite() {} + ~Test_TC_SU_4_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112190,12 +114398,12 @@ class Test_TC_SU_2_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_4_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_4_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112244,11 +114452,11 @@ class Test_TC_SU_2_1Suite : public TestCommand // }; -class Test_TC_SU_2_2Suite : public TestCommand +class Test_TC_PSCFG_1_1Suite : public TestCommand { public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_2", credsIssuerConfig), mTestIndex(0) + Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PSCFG_1_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112256,7 +114464,7 @@ class Test_TC_SU_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_2Suite() {} + ~Test_TC_PSCFG_1_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112265,12 +114473,12 @@ class Test_TC_SU_2_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_1_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_1_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112319,11 +114527,11 @@ class Test_TC_SU_2_2Suite : public TestCommand // }; -class Test_TC_SU_2_3Suite : public TestCommand +class Test_TC_PSCFG_2_1Suite : public TestCommand { public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_3", credsIssuerConfig), mTestIndex(0) + Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PSCFG_2_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112331,7 +114539,7 @@ class Test_TC_SU_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_3Suite() {} + ~Test_TC_PSCFG_2_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112340,12 +114548,12 @@ class Test_TC_SU_2_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112394,11 +114602,11 @@ class Test_TC_SU_2_3Suite : public TestCommand // }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_PSCFG_3_1Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_4", credsIssuerConfig), mTestIndex(0) + Test_TC_PSCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PSCFG_3_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112406,7 +114614,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_PSCFG_3_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112415,12 +114623,12 @@ class Test_TC_SU_2_4Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112469,11 +114677,11 @@ class Test_TC_SU_2_4Suite : public TestCommand // }; -class Test_TC_SU_2_5Suite : public TestCommand +class Test_TC_SC_4_5Suite : public TestCommand { public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_5", credsIssuerConfig), mTestIndex(0) + Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SC_4_5", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112481,7 +114689,7 @@ class Test_TC_SU_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_5Suite() {} + ~Test_TC_SC_4_5Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112490,12 +114698,12 @@ class Test_TC_SU_2_5Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_5\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_5\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112544,11 +114752,11 @@ class Test_TC_SU_2_5Suite : public TestCommand // }; -class Test_TC_SU_2_6Suite : public TestCommand +class Test_TC_SC_4_6Suite : public TestCommand { public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_6", credsIssuerConfig), mTestIndex(0) + Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SC_4_6", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112556,7 +114764,7 @@ class Test_TC_SU_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_6Suite() {} + ~Test_TC_SC_4_6Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112565,12 +114773,12 @@ class Test_TC_SU_2_6Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_6\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_6\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112619,11 +114827,11 @@ class Test_TC_SU_2_6Suite : public TestCommand // }; -class Test_TC_SU_2_7Suite : public TestCommand +class Test_TC_SC_4_7Suite : public TestCommand { public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_2_7", credsIssuerConfig), mTestIndex(0) + Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SC_4_7", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112631,7 +114839,7 @@ class Test_TC_SU_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_7Suite() {} + ~Test_TC_SC_4_7Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112640,12 +114848,12 @@ class Test_TC_SU_2_7Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_2_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_7\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_2_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_7\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112694,11 +114902,11 @@ class Test_TC_SU_2_7Suite : public TestCommand // }; -class Test_TC_SU_3_1Suite : public TestCommand +class Test_TC_SC_4_8Suite : public TestCommand { public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_3_1", credsIssuerConfig), mTestIndex(0) + Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SC_4_8", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112706,7 +114914,7 @@ class Test_TC_SU_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_1Suite() {} + ~Test_TC_SC_4_8Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112715,12 +114923,12 @@ class Test_TC_SU_3_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_8\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_8\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112769,11 +114977,11 @@ class Test_TC_SU_3_1Suite : public TestCommand // }; -class Test_TC_SU_3_2Suite : public TestCommand +class Test_TC_SC_4_9Suite : public TestCommand { public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_3_2", credsIssuerConfig), mTestIndex(0) + Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SC_4_9", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112781,7 +114989,7 @@ class Test_TC_SU_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_2Suite() {} + ~Test_TC_SC_4_9Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112790,12 +114998,12 @@ class Test_TC_SU_3_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_9\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_9\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112844,11 +115052,11 @@ class Test_TC_SU_3_2Suite : public TestCommand // }; -class Test_TC_SU_3_3Suite : public TestCommand +class Test_TC_SWDIAG_1_2Suite : public TestCommand { public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_3_3", credsIssuerConfig), mTestIndex(0) + Test_TC_SWDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_SWDIAG_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112856,7 +115064,7 @@ class Test_TC_SU_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_3Suite() {} + ~Test_TC_SWDIAG_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112865,12 +115073,12 @@ class Test_TC_SU_3_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112919,11 +115127,11 @@ class Test_TC_SU_3_3Suite : public TestCommand // }; -class Test_TC_SU_3_4Suite : public TestCommand +class Test_TC_WIFIDIAG_1_2Suite : public TestCommand { public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SU_3_4", credsIssuerConfig), mTestIndex(0) + Test_TC_WIFIDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_WIFIDIAG_1_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -112931,7 +115139,7 @@ class Test_TC_SU_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_4Suite() {} + ~Test_TC_WIFIDIAG_1_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -112940,12 +115148,12 @@ class Test_TC_SU_3_4Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SU_3_4\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_1_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SU_3_4\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_1_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -112994,11 +115202,11 @@ class Test_TC_SU_3_4Suite : public TestCommand // }; -class Test_TC_PSCFG_1_1Suite : public TestCommand +class Test_TC_WIFIDIAG_2_1Suite : public TestCommand { public: - Test_TC_PSCFG_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PSCFG_1_1", credsIssuerConfig), mTestIndex(0) + Test_TC_WIFIDIAG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_WIFIDIAG_2_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113006,7 +115214,7 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_1_1Suite() {} + ~Test_TC_WIFIDIAG_2_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113015,12 +115223,12 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_2_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_1_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_2_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113069,11 +115277,11 @@ class Test_TC_PSCFG_1_1Suite : public TestCommand // }; -class Test_TC_PSCFG_2_1Suite : public TestCommand +class Test_TC_WNCV_2_3Suite : public TestCommand { public: - Test_TC_PSCFG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_PSCFG_2_1", credsIssuerConfig), mTestIndex(0) + Test_TC_WNCV_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_WNCV_2_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113081,7 +115289,7 @@ class Test_TC_PSCFG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_2_1Suite() {} + ~Test_TC_WNCV_2_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113090,12 +115298,12 @@ class Test_TC_PSCFG_2_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_PSCFG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PSCFG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113144,11 +115352,11 @@ class Test_TC_PSCFG_2_1Suite : public TestCommand // }; -class Test_TC_SC_4_5Suite : public TestCommand +class Test_TC_WNCV_6_1Suite : public TestCommand { public: - Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SC_4_5", credsIssuerConfig), mTestIndex(0) + Test_TC_WNCV_6_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_WNCV_6_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113156,7 +115364,7 @@ class Test_TC_SC_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_5Suite() {} + ~Test_TC_WNCV_6_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113165,12 +115373,12 @@ class Test_TC_SC_4_5Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_5\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_6_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_5\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_6_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113219,11 +115427,11 @@ class Test_TC_SC_4_5Suite : public TestCommand // }; -class Test_TC_SC_4_6Suite : public TestCommand +class Test_TC_FLW_3_1Suite : public TestCommand { public: - Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SC_4_6", credsIssuerConfig), mTestIndex(0) + Test_TC_FLW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_FLW_3_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113231,7 +115439,7 @@ class Test_TC_SC_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_6Suite() {} + ~Test_TC_FLW_3_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113240,12 +115448,12 @@ class Test_TC_SC_4_6Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_6\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_FLW_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_6\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_FLW_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113294,11 +115502,11 @@ class Test_TC_SC_4_6Suite : public TestCommand // }; -class Test_TC_SC_4_7Suite : public TestCommand +class Test_TC_OCC_2_3Suite : public TestCommand { public: - Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SC_4_7", credsIssuerConfig), mTestIndex(0) + Test_TC_OCC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OCC_2_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113306,7 +115514,7 @@ class Test_TC_SC_4_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_7Suite() {} + ~Test_TC_OCC_2_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113315,12 +115523,12 @@ class Test_TC_SC_4_7Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_7\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_7\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113369,11 +115577,11 @@ class Test_TC_SC_4_7Suite : public TestCommand // }; -class Test_TC_SC_4_8Suite : public TestCommand +class Test_TC_OCC_2_4Suite : public TestCommand { public: - Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SC_4_8", credsIssuerConfig), mTestIndex(0) + Test_TC_OCC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OCC_2_4", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113381,7 +115589,7 @@ class Test_TC_SC_4_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_8Suite() {} + ~Test_TC_OCC_2_4Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113390,12 +115598,12 @@ class Test_TC_SC_4_8Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_8\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_8\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113444,11 +115652,11 @@ class Test_TC_SC_4_8Suite : public TestCommand // }; -class Test_TC_SC_4_9Suite : public TestCommand +class Test_TC_OCC_3_1Suite : public TestCommand { public: - Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SC_4_9", credsIssuerConfig), mTestIndex(0) + Test_TC_OCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OCC_3_1", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113456,7 +115664,7 @@ class Test_TC_SC_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_9Suite() {} + ~Test_TC_OCC_3_1Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113465,12 +115673,12 @@ class Test_TC_SC_4_9Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_4_9\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OCC_3_1\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_4_9\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OCC_3_1\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113519,11 +115727,11 @@ class Test_TC_SC_4_9Suite : public TestCommand // }; -class Test_TC_SWDIAG_1_2Suite : public TestCommand +class Test_TC_OO_2_4Suite : public TestCommand { public: - Test_TC_SWDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_SWDIAG_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_OO_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_OO_2_4", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113531,7 +115739,7 @@ class Test_TC_SWDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SWDIAG_1_2Suite() {} + ~Test_TC_OO_2_4Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113540,12 +115748,12 @@ class Test_TC_SWDIAG_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_SWDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_OO_2_4\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SWDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_OO_2_4\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113594,11 +115802,11 @@ class Test_TC_SWDIAG_1_2Suite : public TestCommand // }; -class Test_TC_WIFIDIAG_1_2Suite : public TestCommand +class Test_TC_PRS_2_2Suite : public TestCommand { public: - Test_TC_WIFIDIAG_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WIFIDIAG_1_2", credsIssuerConfig), mTestIndex(0) + Test_TC_PRS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PRS_2_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113606,7 +115814,7 @@ class Test_TC_WIFIDIAG_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WIFIDIAG_1_2Suite() {} + ~Test_TC_PRS_2_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113615,12 +115823,12 @@ class Test_TC_WIFIDIAG_1_2Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_1_2\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113669,11 +115877,11 @@ class Test_TC_WIFIDIAG_1_2Suite : public TestCommand // }; -class Test_TC_WIFIDIAG_2_1Suite : public TestCommand +class Test_TC_PRS_2_3Suite : public TestCommand { public: - Test_TC_WIFIDIAG_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WIFIDIAG_2_1", credsIssuerConfig), mTestIndex(0) + Test_TC_PRS_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PRS_2_3", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113681,7 +115889,7 @@ class Test_TC_WIFIDIAG_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WIFIDIAG_2_1Suite() {} + ~Test_TC_PRS_2_3Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113690,12 +115898,12 @@ class Test_TC_WIFIDIAG_2_1Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WIFIDIAG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PRS_2_3\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WIFIDIAG_2_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PRS_2_3\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -113744,11 +115952,11 @@ class Test_TC_WIFIDIAG_2_1Suite : public TestCommand // }; -class Test_TC_WNCV_2_3Suite : public TestCommand +class Test_TC_PS_2_2Suite : public TestCommand { public: - Test_TC_WNCV_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WNCV_2_3", credsIssuerConfig), mTestIndex(0) + Test_TC_PS_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_PS_2_2", credsIssuerConfig), mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -113756,7 +115964,7 @@ class Test_TC_WNCV_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_WNCV_2_3Suite() {} + ~Test_TC_PS_2_2Suite() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -113765,12 +115973,12 @@ class Test_TC_WNCV_2_3Suite : public TestCommand if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WNCV_2_3\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_PS_2_2\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WNCV_2_3\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_PS_2_2\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -114010,6 +116218,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114029,8 +116241,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114041,9 +116256,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114056,7 +116273,10 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114090,9 +116310,17 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114105,8 +116333,11 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -114116,6 +116347,15 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), }; commands.Register(clusterName, clusterCommands); From 31cf572b3b818cd55aacae1bda2537af62454f0c Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Tue, 8 Mar 2022 21:55:42 -0800 Subject: [PATCH 02/43] [OTA] Fix OTARequestorDriverImpl inclusion (#15981) Former-commit-id: d5f4b0b25119980c0ae1c368dfbeac8f4f0dd2ec --- config/mbed/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index 9272c948dfe6db..cb9c9127d5fa71 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -456,6 +456,7 @@ endif(CONFIG_CHIP_PW_RPC) if (CONFIG_CHIP_OTA_REQUESTOR) target_include_directories(${APP_TARGET} PRIVATE + ${CHIP_ROOT}/examples/platform/mbed/ota/ ${CHIP_ROOT}/src/app/clusters/ota-requestor ${CHIP_ROOT}/src/platform ${CHIP_ROOT}/src/platform/mbed From 81037ad187e05f9dbc9a2dd9ca2efedef872f145 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Mar 2022 03:34:26 -0500 Subject: [PATCH 03/43] Regen to fix CI failures (#15990) Former-commit-id: 9bee828b52e401c4f6f1eea76df1af5d6732beb1 --- .../zap-generated/test/Commands.h | 130 +++++++++- .../chip-tool/zap-generated/test/Commands.h | 224 ++++++++++++++++++ 2 files changed, 345 insertions(+), 9 deletions(-) diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 5eb1bd9e2e6c3b..6611ee287ae9c1 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -56130,12 +56130,24 @@ class TestBinding : public TestCommandBridge { err = TestWriteInvalidBindingTable_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Write binding table\n"); - err = TestWriteBindingTable_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Write binding table (endpoint 1)\n"); + err = TestWriteBindingTableEndpoint1_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Read binding table\n"); - err = TestReadBindingTable_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Read binding table (endpoint 1)\n"); + err = TestReadBindingTableEndpoint1_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : Write binding table (endpoint 0)\n"); + err = TestWriteBindingTableEndpoint0_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : Read binding table (endpoint 0)\n"); + err = TestReadBindingTableEndpoint0_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : Verify endpoint 1 not changed\n"); + err = TestVerifyEndpoint1NotChanged_8(); break; } @@ -56152,7 +56164,7 @@ class TestBinding : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 9; chip::Optional mNodeId; chip::Optional mCluster; @@ -56245,7 +56257,7 @@ class TestBinding : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWriteBindingTable_4() + CHIP_ERROR TestWriteBindingTableEndpoint1_4() { CHIPDevice * device = GetConnectedDevice(); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -56273,7 +56285,7 @@ class TestBinding : public TestCommandBridge { } [cluster writeAttributeBindingWithValue:bindingArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"Write binding table Error: %@", err); + NSLog(@"Write binding table (endpoint 1) Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); @@ -56283,7 +56295,107 @@ class TestBinding : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadBindingTable_5() + CHIP_ERROR TestReadBindingTableEndpoint1_5() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 1) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(3))); + VerifyOrReturn( + CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue("Group", ((CHIPBindingClusterTargetStruct *) actualValue[0]).group, 1U)); + VerifyOrReturn( + CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[1]).fabricIndex, 1)); + VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[1]).node, 1ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[1]).endpoint, 1U)); + VerifyOrReturn( + CheckValue("Cluster", ((CHIPBindingClusterTargetStruct *) actualValue[1]).cluster, 6UL)); + VerifyOrReturn( + CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[2]).fabricIndex, 1)); + VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[2]).node, 2ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[2]).endpoint, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestWriteBindingTableEndpoint0_6() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id bindingArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPBindingClusterTargetStruct alloc] init]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:0]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).node = [NSNumber numberWithUnsignedLongLong:3ULL]; + ((CHIPBindingClusterTargetStruct *) temp_0[0]).endpoint = [NSNumber numberWithUnsignedShort:1U]; + + bindingArgument = temp_0; + } + [cluster writeAttributeBindingWithValue:bindingArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write binding table (endpoint 0) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadBindingTableEndpoint0_7() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:0 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + CHIPReadParams * params = [[CHIPReadParams alloc] init]; + params.fabricFiltered = [NSNumber numberWithBool:true]; + [cluster + readAttributeBindingWithParams:params + completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read binding table (endpoint 0) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("Binding", [actualValue count], static_cast(1))); + VerifyOrReturn( + CheckValue("FabricIndex", ((CHIPBindingClusterTargetStruct *) actualValue[0]).fabricIndex, 1)); + VerifyOrReturn(CheckValue("Node", ((CHIPBindingClusterTargetStruct *) actualValue[0]).node, 3ULL)); + VerifyOrReturn( + CheckValue("Endpoint", ((CHIPBindingClusterTargetStruct *) actualValue[0]).endpoint, 1U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestVerifyEndpoint1NotChanged_8() { CHIPDevice * device = GetConnectedDevice(); CHIPTestBinding * cluster = [[CHIPTestBinding alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -56294,7 +56406,7 @@ class TestBinding : public TestCommandBridge { [cluster readAttributeBindingWithParams:params completionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read binding table Error: %@", err); + NSLog(@"Verify endpoint 1 not changed Error: %@", err); VerifyOrReturn(CheckValue("status", err, 0)); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 622e648d6c6c4a..021a9f8bb6627e 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -105230,6 +105230,7 @@ class Test_TC_DD_3_11Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DD_3_11Suite() {} @@ -105268,6 +105269,11 @@ class Test_TC_DD_3_11Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -105275,6 +105281,7 @@ class Test_TC_DD_3_11Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -105298,6 +105305,7 @@ class Test_TC_DD_3_12Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DD_3_12Suite() {} @@ -105336,6 +105344,11 @@ class Test_TC_DD_3_12Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -105343,6 +105356,7 @@ class Test_TC_DD_3_12Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -105366,6 +105380,7 @@ class Test_TC_DD_3_13Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DD_3_13Suite() {} @@ -105404,6 +105419,11 @@ class Test_TC_DD_3_13Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -105411,6 +105431,7 @@ class Test_TC_DD_3_13Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -105434,6 +105455,7 @@ class Test_TC_DD_3_14Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DD_3_14Suite() {} @@ -105472,6 +105494,11 @@ class Test_TC_DD_3_14Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -105479,6 +105506,7 @@ class Test_TC_DD_3_14Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -107721,6 +107749,11 @@ class Test_TC_DM_2_3Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -107728,6 +107761,7 @@ class Test_TC_DM_2_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -107751,6 +107785,7 @@ class Test_TC_DM_2_4Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DM_2_4Suite() {} @@ -107789,6 +107824,11 @@ class Test_TC_DM_2_4Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -107796,6 +107836,7 @@ class Test_TC_DM_2_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -107819,6 +107860,7 @@ class Test_TC_DM_3_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DM_3_2Suite() {} @@ -107857,6 +107899,11 @@ class Test_TC_DM_3_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -107864,6 +107911,7 @@ class Test_TC_DM_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -107887,6 +107935,7 @@ class Test_TC_DM_3_4Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_DM_3_4Suite() {} @@ -108636,6 +108685,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_GENDIAG_1_2Suite() {} @@ -108674,6 +108724,11 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108681,6 +108736,7 @@ class Test_TC_GENDIAG_1_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108704,6 +108760,7 @@ class Test_TC_GENDIAG_2_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_GENDIAG_2_1Suite() {} @@ -108742,6 +108799,11 @@ class Test_TC_GENDIAG_2_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108749,6 +108811,7 @@ class Test_TC_GENDIAG_2_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108772,6 +108835,7 @@ class Test_TC_I_2_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_I_2_2Suite() {} @@ -108810,6 +108874,11 @@ class Test_TC_I_2_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108817,6 +108886,7 @@ class Test_TC_I_2_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108840,6 +108910,7 @@ class Test_TC_I_2_3Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_I_2_3Suite() {} @@ -108878,6 +108949,11 @@ class Test_TC_I_2_3Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108885,6 +108961,7 @@ class Test_TC_I_2_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108908,6 +108985,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_ILL_2_1Suite() {} @@ -108946,6 +109024,11 @@ class Test_TC_ILL_2_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -108953,6 +109036,7 @@ class Test_TC_ILL_2_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -108976,6 +109060,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_ILL_2_2Suite() {} @@ -109014,6 +109099,11 @@ class Test_TC_ILL_2_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109021,6 +109111,7 @@ class Test_TC_ILL_2_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109044,6 +109135,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_1_1Suite() {} @@ -109082,6 +109174,11 @@ class Test_TC_IDM_1_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109089,6 +109186,7 @@ class Test_TC_IDM_1_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109112,6 +109210,7 @@ class Test_TC_IDM_1_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_1_2Suite() {} @@ -109150,6 +109249,11 @@ class Test_TC_IDM_1_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109157,6 +109261,7 @@ class Test_TC_IDM_1_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109180,6 +109285,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_2_1Suite() {} @@ -109218,6 +109324,11 @@ class Test_TC_IDM_2_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109225,6 +109336,7 @@ class Test_TC_IDM_2_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109248,6 +109360,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_2_2Suite() {} @@ -109286,6 +109399,11 @@ class Test_TC_IDM_2_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109293,6 +109411,7 @@ class Test_TC_IDM_2_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109316,6 +109435,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_3_1Suite() {} @@ -109354,6 +109474,11 @@ class Test_TC_IDM_3_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109361,6 +109486,7 @@ class Test_TC_IDM_3_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109384,6 +109510,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_3_2Suite() {} @@ -109422,6 +109549,11 @@ class Test_TC_IDM_3_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109429,6 +109561,7 @@ class Test_TC_IDM_3_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109452,6 +109585,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_4_1Suite() {} @@ -109490,6 +109624,11 @@ class Test_TC_IDM_4_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109497,6 +109636,7 @@ class Test_TC_IDM_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109520,6 +109660,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_4_2Suite() {} @@ -109558,6 +109699,11 @@ class Test_TC_IDM_4_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109565,6 +109711,7 @@ class Test_TC_IDM_4_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109588,6 +109735,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_5_1Suite() {} @@ -109626,6 +109774,11 @@ class Test_TC_IDM_5_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109633,6 +109786,7 @@ class Test_TC_IDM_5_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109656,6 +109810,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_5_2Suite() {} @@ -109694,6 +109849,11 @@ class Test_TC_IDM_5_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109701,6 +109861,7 @@ class Test_TC_IDM_5_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109724,6 +109885,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_1Suite() {} @@ -109762,6 +109924,11 @@ class Test_TC_IDM_6_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109769,6 +109936,7 @@ class Test_TC_IDM_6_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109792,6 +109960,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_2Suite() {} @@ -109830,6 +109999,11 @@ class Test_TC_IDM_6_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109837,6 +110011,7 @@ class Test_TC_IDM_6_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109860,6 +110035,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_3Suite() {} @@ -109898,6 +110074,11 @@ class Test_TC_IDM_6_3Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109905,6 +110086,7 @@ class Test_TC_IDM_6_3Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109928,6 +110110,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_IDM_6_4Suite() {} @@ -109966,6 +110149,11 @@ class Test_TC_IDM_6_4Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -109973,6 +110161,7 @@ class Test_TC_IDM_6_4Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -109996,6 +110185,7 @@ class Test_TC_MC_3_12Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_3_12Suite() {} @@ -110034,6 +110224,11 @@ class Test_TC_MC_3_12Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -110041,6 +110236,7 @@ class Test_TC_MC_3_12Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -110064,6 +110260,7 @@ class Test_TC_MC_3_13Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_3_13Suite() {} @@ -110102,6 +110299,11 @@ class Test_TC_MC_3_13Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -110109,6 +110311,7 @@ class Test_TC_MC_3_13Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -110132,6 +110335,7 @@ class Test_TC_MC_4_1Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_4_1Suite() {} @@ -110170,6 +110374,11 @@ class Test_TC_MC_4_1Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -110177,6 +110386,7 @@ class Test_TC_MC_4_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -110200,6 +110410,7 @@ class Test_TC_MC_8_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_8_2Suite() {} @@ -110238,6 +110449,11 @@ class Test_TC_MC_8_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -110245,6 +110461,7 @@ class Test_TC_MC_8_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { @@ -110268,6 +110485,7 @@ class Test_TC_MC_9_2Suite : public TestCommand AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } ~Test_TC_MC_9_2Suite() {} @@ -110306,6 +110524,11 @@ class Test_TC_MC_9_2Suite : public TestCommand } } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + private: std::atomic_uint16_t mTestIndex; const uint16_t mTestCount = 0; @@ -110313,6 +110536,7 @@ class Test_TC_MC_9_2Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mTimeout; void OnDiscoveryCommandsResults(const DiscoveryCommandResult & value) override { From aa17b2fd98151d57c7f1aa48acced2d10cb5e9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Wed, 9 Mar 2022 14:13:29 +0100 Subject: [PATCH 04/43] [ota] Store Default OTA Providers in flash (#15970) * [ota] Store Default OTA Providers in flash Store Default OTA Providers in flash each time the attribute is modified and load it back on the application startup. * Restyled by clang-format * Fix build and reduce flash usage Co-authored-by: Restyled.io Former-commit-id: b942392d8699efabb77d83a506bd302b1f9c4fac --- config/mbed/CMakeLists.txt | 1 + .../all-clusters-app/ameba/chip_main.cmake | 1 + .../ameba/main/chipinterface.cpp | 6 +++- examples/all-clusters-app/esp32/main/main.cpp | 5 ++- .../nrfconnect/CMakeLists.txt | 5 +-- .../nrfconnect/main/AppTask.cpp | 3 +- .../nrfconnect/main/include/AppTask.h | 2 ++ examples/lighting-app/ameba/chip_main.cmake | 1 + .../lighting-app/ameba/main/chipinterface.cpp | 6 +++- examples/lighting-app/esp32/main/main.cpp | 5 ++- .../lighting-app/nrfconnect/CMakeLists.txt | 5 +-- .../lighting-app/nrfconnect/main/AppTask.cpp | 5 ++- .../nxp/k32w/k32w0/main/AppTask.cpp | 7 ++-- .../lock-app/cc13x2x7_26x2x7/main/AppTask.cpp | 5 ++- examples/lock-app/nrfconnect/main/AppTask.cpp | 5 ++- .../ota-requestor-app/ameba/chip_main.cmake | 1 + .../ameba/main/chipinterface.cpp | 6 +++- examples/ota-requestor-app/cyw30739/args.gni | 3 ++ .../ota-requestor-app/cyw30739/src/main.cpp | 5 ++- .../ota-requestor-app/efr32/src/AppTask.cpp | 5 ++- .../ota-requestor-app/esp32/main/main.cpp | 5 ++- examples/ota-requestor-app/linux/main.cpp | 5 ++- examples/ota-requestor-app/p6/src/AppTask.cpp | 5 ++- examples/platform/efr32/OTAConfig.cpp | 4 ++- examples/platform/efr32/OTAConfig.h | 1 + examples/platform/mbed/util/DFUManager.cpp | 3 +- .../platform/mbed/util/include/DFUManager.h | 1 + examples/platform/qpg/ota/ota.cpp | 5 ++- .../pump-app/cc13x2x7_26x2x7/main/AppTask.cpp | 5 ++- examples/pump-app/nrfconnect/main/AppTask.cpp | 5 ++- .../nrfconnect/main/AppTask.cpp | 5 ++- src/app/chip_data_model.gni | 3 ++ .../DefaultOTARequestorStorage.cpp | 35 +++++++++++-------- .../DefaultOTARequestorStorage.h | 1 + .../clusters/ota-requestor/OTARequestor.cpp | 19 ++++------ src/app/clusters/ota-requestor/OTARequestor.h | 18 +++++----- .../ota-requestor/OTARequestorInterface.h | 17 ++++----- src/lib/support/DefaultStorageKeyAllocator.h | 6 ++-- 38 files changed, 146 insertions(+), 79 deletions(-) diff --git a/config/mbed/CMakeLists.txt b/config/mbed/CMakeLists.txt index cb9c9127d5fa71..8a90c376cf858f 100644 --- a/config/mbed/CMakeLists.txt +++ b/config/mbed/CMakeLists.txt @@ -466,6 +466,7 @@ if (CONFIG_CHIP_OTA_REQUESTOR) target_sources(${APP_TARGET} PRIVATE ${CHIP_ROOT}/examples/platform/mbed/ota/OTARequestorDriverImpl.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${CHIP_ROOT}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${CHIP_ROOT}/src/platform/mbed/OTAImageProcessorImpl.cpp diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index a854cb0503573f..ed0270f13e9012 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -118,6 +118,7 @@ list( #OTARequestor ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 715f20280195c4..48e285b03d986a 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -39,6 +39,7 @@ #include #if CONFIG_ENABLE_OTA_REQUESTOR +#include "app/clusters/ota-requestor/DefaultOTARequestorStorage.h" #include #include #include @@ -91,6 +92,7 @@ static DeviceCallbacks EchoCallbacks; #if CONFIG_ENABLE_OTA_REQUESTOR OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; AmebaOTAImageProcessor gImageProcessor; @@ -115,8 +117,10 @@ static void InitOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + // Set server instance used for session establishment - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index 020abc509e06b5..b720dd44517bc1 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -38,6 +38,7 @@ #include #include +#include #include #include #include @@ -77,6 +78,7 @@ namespace { #if CONFIG_ENABLE_OTA_REQUESTOR OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -127,7 +129,8 @@ static void InitOTARequestor(void) { #if CONFIG_ENABLE_OTA_REQUESTOR SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&Server::GetInstance(), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 913eb279c218c1..8d51e9c7e8fd27 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -71,10 +71,7 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/bridged-actions-stub.cpp ${GEN_DIR}/all-clusters-app/zap-generated/callback-stub.cpp ${GEN_DIR}/all-clusters-app/zap-generated/IMClusterCommandHandler.cpp - ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp) + ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) chip_configure_data_model(app diff --git a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp index 48a3dc14252710..3db133026cabeb 100644 --- a/examples/all-clusters-app/nrfconnect/main/AppTask.cpp +++ b/examples/all-clusters-app/nrfconnect/main/AppTask.cpp @@ -149,7 +149,8 @@ void AppTask::InitOTARequestor() mOTAImageProcessor.SetOTADownloader(&mBDXDownloader); mBDXDownloader.SetImageProcessorDelegate(&mOTAImageProcessor); mOTARequestorDriver.Init(&mOTARequestor, &mOTAImageProcessor); - mOTARequestor.Init(&chip::Server::GetInstance(), &mOTARequestorDriver, &mBDXDownloader); + mOTARequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + mOTARequestor.Init(chip::Server::GetInstance(), mOTARequestorStorage, mOTARequestorDriver, mBDXDownloader); chip::SetRequestorInstance(&mOTARequestor); #endif } diff --git a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h index a5a89f6e24718a..b05a7d30ff3d3d 100644 --- a/examples/all-clusters-app/nrfconnect/main/include/AppTask.h +++ b/examples/all-clusters-app/nrfconnect/main/include/AppTask.h @@ -21,6 +21,7 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include #include #include @@ -73,6 +74,7 @@ class AppTask bool mHaveBLEConnections{ false }; #if CONFIG_CHIP_OTA_REQUESTOR + chip::DefaultOTARequestorStorage mOTARequestorStorage; chip::DeviceLayer::GenericOTARequestorDriver mOTARequestorDriver; chip::DeviceLayer::OTAImageProcessorImpl mOTAImageProcessor; chip::BDXDownloader mBDXDownloader; diff --git a/examples/lighting-app/ameba/chip_main.cmake b/examples/lighting-app/ameba/chip_main.cmake index 5f77187194252a..209e05f1199b77 100755 --- a/examples/lighting-app/ameba/chip_main.cmake +++ b/examples/lighting-app/ameba/chip_main.cmake @@ -16,6 +16,7 @@ list( #OTARequestor ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index f882c659a98e1e..96fd9c5887efaf 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -42,6 +42,7 @@ #include #if CONFIG_ENABLE_OTA_REQUESTOR +#include "app/clusters/ota-requestor/DefaultOTARequestorStorage.h" #include #include #include @@ -76,6 +77,7 @@ static DeviceCallbacks EchoCallbacks; #if CONFIG_ENABLE_OTA_REQUESTOR OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; AmebaOTAImageProcessor gImageProcessor; @@ -100,8 +102,10 @@ static void InitOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + // Set server instance used for session establishment - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. diff --git a/examples/lighting-app/esp32/main/main.cpp b/examples/lighting-app/esp32/main/main.cpp index 670a739d4c7ac0..8b854ce7953bef 100644 --- a/examples/lighting-app/esp32/main/main.cpp +++ b/examples/lighting-app/esp32/main/main.cpp @@ -28,6 +28,7 @@ #include "shell_extension/launch.h" #include #include +#include #include #include #include @@ -44,6 +45,7 @@ using namespace ::chip::DeviceLayer; #if CONFIG_ENABLE_OTA_REQUESTOR OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -64,7 +66,8 @@ static void InitOTARequestor(void) { #if CONFIG_ENABLE_OTA_REQUESTOR SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&Server::GetInstance(), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/lighting-app/nrfconnect/CMakeLists.txt b/examples/lighting-app/nrfconnect/CMakeLists.txt index dd55b415cfb741..4755a2b9ec961b 100644 --- a/examples/lighting-app/nrfconnect/CMakeLists.txt +++ b/examples/lighting-app/nrfconnect/CMakeLists.txt @@ -92,10 +92,7 @@ target_sources(app PRIVATE ${GEN_DIR}/lighting-app/zap-generated/callback-stub.cpp ${GEN_DIR}/lighting-app/zap-generated/IMClusterCommandHandler.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp - ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/OTARequestor.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp - ${CHIP_ROOT}/src/app/clusters/ota-requestor/BDXDownloader.cpp) + ${NRFCONNECT_COMMON}/util/ThreadUtil.cpp) chip_configure_data_model(app INCLUDE_SERVER diff --git a/examples/lighting-app/nrfconnect/main/AppTask.cpp b/examples/lighting-app/nrfconnect/main/AppTask.cpp index f7e49ffd19552e..c8df2ab10cdd21 100644 --- a/examples/lighting-app/nrfconnect/main/AppTask.cpp +++ b/examples/lighting-app/nrfconnect/main/AppTask.cpp @@ -41,6 +41,7 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include #include #include @@ -85,6 +86,7 @@ bool sIsThreadEnabled = false; bool sHaveBLEConnections = false; #if CONFIG_CHIP_OTA_REQUESTOR +DefaultOTARequestorStorage sRequestorStorage; GenericOTARequestorDriver sOTARequestorDriver; OTAImageProcessorImpl sOTAImageProcessor; chip::BDXDownloader sBDXDownloader; @@ -203,7 +205,8 @@ void AppTask::InitOTARequestor() sOTAImageProcessor.SetOTADownloader(&sBDXDownloader); sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor); sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor); - sOTARequestor.Init(&chip::Server::GetInstance(), &sOTARequestorDriver, &sBDXDownloader); + sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + sOTARequestor.Init(Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader); chip::SetRequestorInstance(&sOTARequestor); #endif } diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index 9f81e8d6ff2901..646144671c8713 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -37,6 +37,7 @@ #include "OTAImageProcessorImpl.h" #include "OtaSupport.h" #include +#include #include #include @@ -85,7 +86,8 @@ AppTask AppTask::sAppTask; /* OTA related variables */ static OTARequestor gRequestorCore; -DeviceLayer::GenericOTARequestorDriver gRequestorUser; +static DefaultOTARequestorStorage gRequestorStorage; +static DeviceLayer::GenericOTARequestorDriver gRequestorUser; static BDXDownloader gDownloader; static OTAImageProcessorImpl gImageProcessor; @@ -121,7 +123,8 @@ CHIP_ERROR AppTask::Init() // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at diff --git a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp index 33efe151742ac8..86a07ef44f50f8 100644 --- a/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/lock-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -63,6 +64,7 @@ static Button_Handle sAppRightHandle; AppTask AppTask::sAppTask; static OTARequestor sRequestorCore; +static DefaultOTARequestorStorage sRequestorStorage; static GenericOTARequestorDriver sRequestorUser; static BDXDownloader sDownloader; static OTAImageProcessorImpl sImageProcessor; @@ -72,7 +74,8 @@ void InitializeOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects SetRequestorInstance(&sRequestorCore); - sRequestorCore.Init(&Server::GetInstance(), &sRequestorUser, &sDownloader); + sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + sRequestorCore.Init(Server::GetInstance(), sRequestorStorage, sRequestorUser, sDownloader); sImageProcessor.SetOTADownloader(&sDownloader); sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); diff --git a/examples/lock-app/nrfconnect/main/AppTask.cpp b/examples/lock-app/nrfconnect/main/AppTask.cpp index a66a4051dda9a7..09919a72fad01f 100644 --- a/examples/lock-app/nrfconnect/main/AppTask.cpp +++ b/examples/lock-app/nrfconnect/main/AppTask.cpp @@ -37,6 +37,7 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include #include #include @@ -74,6 +75,7 @@ bool sIsThreadEnabled = false; bool sHaveBLEConnections = false; #if CONFIG_CHIP_OTA_REQUESTOR +DefaultOTARequestorStorage sRequestorStorage; GenericOTARequestorDriver sOTARequestorDriver; OTAImageProcessorImpl sOTAImageProcessor; chip::BDXDownloader sBDXDownloader; @@ -184,7 +186,8 @@ void AppTask::InitOTARequestor() sOTAImageProcessor.SetOTADownloader(&sBDXDownloader); sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor); sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor); - sOTARequestor.Init(&chip::Server::GetInstance(), &sOTARequestorDriver, &sBDXDownloader); + sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + sOTARequestor.Init(Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader); chip::SetRequestorInstance(&sOTARequestor); #endif } diff --git a/examples/ota-requestor-app/ameba/chip_main.cmake b/examples/ota-requestor-app/ameba/chip_main.cmake index d167230c3f7b22..e1d593035988fb 100644 --- a/examples/ota-requestor-app/ameba/chip_main.cmake +++ b/examples/ota-requestor-app/ameba/chip_main.cmake @@ -24,6 +24,7 @@ list( ${chip_dir}/src/app/clusters/ota-requestor/BDXDownloader.cpp ${chip_dir}/src/app/clusters/ota-requestor/OTARequestor.cpp + ${chip_dir}/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp ${chip_dir}/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp ${chip_dir}/src/app/clusters/ota-requestor/ota-requestor-server.cpp ) diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index d87f326ae7005c..679937ef2ff481 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -78,6 +79,7 @@ void NetWorkCommissioningInstInit() static DeviceCallbacks EchoCallbacks; OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; AmebaOTAImageProcessor gImageProcessor; @@ -100,8 +102,10 @@ static void InitOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + // Set server instance used for session establishment - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. diff --git a/examples/ota-requestor-app/cyw30739/args.gni b/examples/ota-requestor-app/cyw30739/args.gni index 5906f2e476dc00..3a0f8dfe66d36f 100644 --- a/examples/ota-requestor-app/cyw30739/args.gni +++ b/examples/ota-requestor-app/cyw30739/args.gni @@ -19,6 +19,9 @@ cyw30739_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_openthread_ftd = true +# Disable progress logging to fit in flash +chip_progress_logging = false + declare_args() { chip_enable_ota_requestor = true } diff --git a/examples/ota-requestor-app/cyw30739/src/main.cpp b/examples/ota-requestor-app/cyw30739/src/main.cpp index 508b9e8a6430e9..b775fbc350bf7d 100644 --- a/examples/ota-requestor-app/cyw30739/src/main.cpp +++ b/examples/ota-requestor-app/cyw30739/src/main.cpp @@ -18,6 +18,7 @@ */ #include #include +#include #include #include #include @@ -42,6 +43,7 @@ using namespace chip::Shell; static void InitApp(intptr_t args); OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; DeviceLayer::GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -129,7 +131,8 @@ void InitApp(intptr_t args) // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); gImageProcessor.SetOTADownloader(&gDownloader); diff --git a/examples/ota-requestor-app/efr32/src/AppTask.cpp b/examples/ota-requestor-app/efr32/src/AppTask.cpp index b06f742526eaf3..a6f9dc56c6f705 100644 --- a/examples/ota-requestor-app/efr32/src/AppTask.cpp +++ b/examples/ota-requestor-app/efr32/src/AppTask.cpp @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -98,6 +99,7 @@ using namespace ::chip::DeviceLayer; // Global OTA objects OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; DeviceLayer::GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -535,7 +537,8 @@ void AppTask::InitOTARequestor() // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/ota-requestor-app/esp32/main/main.cpp b/examples/ota-requestor-app/esp32/main/main.cpp index c587ec4bf22c14..93ce8c929f95ca 100644 --- a/examples/ota-requestor-app/esp32/main/main.cpp +++ b/examples/ota-requestor-app/esp32/main/main.cpp @@ -30,6 +30,7 @@ #include "nvs_flash.h" #include #include +#include #include #include #include @@ -53,6 +54,7 @@ const char * TAG = "ota-requester-app"; static DeviceCallbacks EchoCallbacks; OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -70,7 +72,8 @@ static void InitServer(intptr_t context) sWiFiNetworkCommissioningInstance.Init(); SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 25817e7b978e4c..0de41918de1e23 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -18,6 +18,7 @@ #include "AppMain.h" #include +#include #include #include #include @@ -48,6 +49,7 @@ using namespace chip::Messaging; using namespace chip::app::Clusters::OtaSoftwareUpdateProvider::Commands; OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; DeviceLayer::ExtendedOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -99,7 +101,8 @@ static void InitOTARequestor(void) // Periodic query timeout must be set prior to requestor being initialized gRequestorUser.SetPeriodicQueryTimeout(gPeriodicQueryTimeoutSec); - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at diff --git a/examples/ota-requestor-app/p6/src/AppTask.cpp b/examples/ota-requestor-app/p6/src/AppTask.cpp index 537973c12593d2..2631a843160081 100644 --- a/examples/ota-requestor-app/p6/src/AppTask.cpp +++ b/examples/ota-requestor-app/p6/src/AppTask.cpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -94,6 +95,7 @@ StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; StaticTask_t appTaskStruct; OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -180,7 +182,8 @@ CHIP_ERROR AppTask::Init() ConfigurationMgr().LogDeviceConfig(); SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/platform/efr32/OTAConfig.cpp b/examples/platform/efr32/OTAConfig.cpp index 6584cde832ea39..068ff810bcc47e 100644 --- a/examples/platform/efr32/OTAConfig.cpp +++ b/examples/platform/efr32/OTAConfig.cpp @@ -62,6 +62,7 @@ __attribute__((used)) ApplicationProperties_t sl_app_properties = { // Global OTA objects chip::OTARequestor gRequestorCore; +chip::DefaultOTARequestorStorage gRequestorStorage; chip::DeviceLayer::GenericOTARequestorDriver gRequestorUser; chip::BDXDownloader gDownloader; chip::OTAImageProcessorImpl gImageProcessor; @@ -71,7 +72,8 @@ void OTAConfig::Init() // Initialize and interconnect the Requestor and Image Processor objects -- START SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&(chip::Server::GetInstance()), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/platform/efr32/OTAConfig.h b/examples/platform/efr32/OTAConfig.h index 65932ec498100e..12f82882b2e5a3 100644 --- a/examples/platform/efr32/OTAConfig.h +++ b/examples/platform/efr32/OTAConfig.h @@ -19,6 +19,7 @@ #pragma once #include +#include #include #include #include diff --git a/examples/platform/mbed/util/DFUManager.cpp b/examples/platform/mbed/util/DFUManager.cpp index a26b7f1f47d320..64a6726b497af7 100644 --- a/examples/platform/mbed/util/DFUManager.cpp +++ b/examples/platform/mbed/util/DFUManager.cpp @@ -56,7 +56,8 @@ CHIP_ERROR DFUManager::Init(chip::Callback::Callback * onUpda #ifdef CHIP_OTA_REQUESTOR SetRequestorInstance(&mRequestorCore); - mRequestorCore.Init(&(chip::Server::GetInstance()), &mRequestorDriver, &mDownloader); + mRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + mRequestorCore.Init(chip::Server::GetInstance(), mRequestorStorage, mRequestorDriver, mDownloader); mImageProcessor.SetOTADownloader(&mDownloader); mDownloader.SetImageProcessorDelegate(&mImageProcessor); mRequestorDriver.Init(&mRequestorCore, &mImageProcessor, &mOnOtaUpdateAvailableCallback, &mOnOtaUpdateApplyCallback); diff --git a/examples/platform/mbed/util/include/DFUManager.h b/examples/platform/mbed/util/include/DFUManager.h index aed8b29bb9e7da..5833c59739e39e 100644 --- a/examples/platform/mbed/util/include/DFUManager.h +++ b/examples/platform/mbed/util/include/DFUManager.h @@ -54,6 +54,7 @@ class DFUManager #ifdef CHIP_OTA_REQUESTOR chip::OTARequestor mRequestorCore; + chip::DefaultOTARequestorStorage mRequestorStorage; chip::DeviceLayer::OTARequestorDriverImpl mRequestorDriver; chip::BDXDownloader mDownloader; chip::OTAImageProcessorImpl mImageProcessor; diff --git a/examples/platform/qpg/ota/ota.cpp b/examples/platform/qpg/ota/ota.cpp index eef6412ad22d6e..ec21de168950f7 100644 --- a/examples/platform/qpg/ota/ota.cpp +++ b/examples/platform/qpg/ota/ota.cpp @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -40,6 +41,7 @@ using namespace chip::DeviceLayer; *****************************************************************************/ OTARequestor gRequestorCore; +DefaultOTARequestorStorage gRequestorStorage; GenericOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; @@ -53,7 +55,8 @@ void InitializeOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects SetRequestorInstance(&gRequestorCore); - gRequestorCore.Init(&Server::GetInstance(), &gRequestorUser, &gDownloader); + gRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gImageProcessor.SetOTADownloader(&gDownloader); gDownloader.SetImageProcessorDelegate(&gImageProcessor); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); diff --git a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp index cdcf5a4920cbe0..f576fafcaa8bd1 100644 --- a/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -33,6 +33,7 @@ #if defined(CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) #include +#include #include #include #include @@ -76,6 +77,7 @@ AppTask AppTask::sAppTask; #if defined(CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) static OTARequestor sRequestorCore; +static DefaultOTARequestorStorage sRequestorStorage; static GenericOTARequestorDriver sRequestorUser; static BDXDownloader sDownloader; static OTAImageProcessorImpl sImageProcessor; @@ -85,7 +87,8 @@ void InitializeOTARequestor(void) // Initialize and interconnect the Requestor and Image Processor objects SetRequestorInstance(&sRequestorCore); - sRequestorCore.Init(&Server::GetInstance(), &sRequestorUser, &sDownloader); + sRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + sRequestorCore.Init(chip::Server::GetInstance(), sRequestorStorage, sRequestorUser, sDownloader); sImageProcessor.SetOTADownloader(&sDownloader); sDownloader.SetImageProcessorDelegate(&sImageProcessor); sRequestorUser.Init(&sRequestorCore, &sImageProcessor); diff --git a/examples/pump-app/nrfconnect/main/AppTask.cpp b/examples/pump-app/nrfconnect/main/AppTask.cpp index 4ac4e27f810788..109daba8afddb0 100644 --- a/examples/pump-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-app/nrfconnect/main/AppTask.cpp @@ -38,6 +38,7 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include #include #include @@ -77,6 +78,7 @@ bool sIsThreadEnabled = false; bool sHaveBLEConnections = false; #if CONFIG_CHIP_OTA_REQUESTOR +DefaultOTARequestorStorage sRequestorStorage; GenericOTARequestorDriver sOTARequestorDriver; OTAImageProcessorImpl sOTAImageProcessor; chip::BDXDownloader sBDXDownloader; @@ -181,7 +183,8 @@ void AppTask::InitOTARequestor() sOTAImageProcessor.SetOTADownloader(&sBDXDownloader); sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor); sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor); - sOTARequestor.Init(&chip::Server::GetInstance(), &sOTARequestorDriver, &sBDXDownloader); + sRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + sOTARequestor.Init(chip::Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader); chip::SetRequestorInstance(&sOTARequestor); #endif } diff --git a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp index 1ebea80904674b..8898f065036add 100644 --- a/examples/pump-controller-app/nrfconnect/main/AppTask.cpp +++ b/examples/pump-controller-app/nrfconnect/main/AppTask.cpp @@ -38,6 +38,7 @@ #if CONFIG_CHIP_OTA_REQUESTOR #include +#include #include #include #include @@ -74,6 +75,7 @@ bool sIsThreadEnabled = false; bool sHaveBLEConnections = false; #if CONFIG_CHIP_OTA_REQUESTOR +DefaultOTARequestorStorage sRequestorStorage; GenericOTARequestorDriver sOTARequestorDriver; OTAImageProcessorImpl sOTAImageProcessor; chip::BDXDownloader sBDXDownloader; @@ -178,7 +180,8 @@ void AppTask::InitOTARequestor() sOTAImageProcessor.SetOTADownloader(&sBDXDownloader); sBDXDownloader.SetImageProcessorDelegate(&sOTAImageProcessor); sOTARequestorDriver.Init(&sOTARequestor, &sOTAImageProcessor); - sOTARequestor.Init(&chip::Server::GetInstance(), &sOTARequestorDriver, &sBDXDownloader); + sRequestorStorage.Init(chip::Server::GetInstance().GetPersistentStorage()); + sOTARequestor.Init(chip::Server::GetInstance(), sRequestorStorage, sOTARequestorDriver, sBDXDownloader); chip::SetRequestorInstance(&sOTARequestor); #endif } diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 23ef447d0ee194..1940af021400df 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -131,10 +131,13 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/${cluster}-server.cpp", "${_app_root}/clusters/${cluster}/BDXDownloader.cpp", "${_app_root}/clusters/${cluster}/BDXDownloader.h", + "${_app_root}/clusters/${cluster}/DefaultOTARequestorStorage.cpp", + "${_app_root}/clusters/${cluster}/DefaultOTARequestorStorage.h", "${_app_root}/clusters/${cluster}/DefaultOTARequestorUserConsentProvider.h", "${_app_root}/clusters/${cluster}/ExtendedOTARequestorDriver.cpp", "${_app_root}/clusters/${cluster}/GenericOTARequestorDriver.cpp", "${_app_root}/clusters/${cluster}/OTARequestor.cpp", + "${_app_root}/clusters/${cluster}/OTARequestorStorage.h", ] } else if (cluster == "bindings") { sources += [ diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp b/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp index 985cae72963e29..e16a10f0300350 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.cpp @@ -55,21 +55,21 @@ CHIP_ERROR DefaultOTARequestorStorage::StoreDefaultProviders(const ProviderLocat ReturnErrorOnFailure(writer.EndContainer(outerType)); - return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator().OTADefaultProviders(), buffer, + return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator::OTADefaultProviders(), buffer, static_cast(writer.GetLengthWritten())); } CHIP_ERROR DefaultOTARequestorStorage::LoadDefaultProviders(ProviderLocationList & providers) { uint8_t buffer[kProviderListMaxSerializedSize]; - uint16_t size = sizeof(buffer); + MutableByteSpan bufferSpan(buffer); - ReturnErrorOnFailure(mPersistentStorage->SyncGetKeyValue(DefaultStorageKeyAllocator().OTADefaultProviders(), buffer, size)); + ReturnErrorOnFailure(Load(DefaultStorageKeyAllocator::OTADefaultProviders(), bufferSpan)); TLV::TLVReader reader; TLV::TLVType outerType; - reader.Init(buffer, size); + reader.Init(bufferSpan.data(), bufferSpan.size()); ReturnErrorOnFailure(reader.Next(TLV::TLVType::kTLVType_Array, TLV::AnonymousTag())); ReturnErrorOnFailure(reader.EnterContainer(outerType)); @@ -93,25 +93,25 @@ CHIP_ERROR DefaultOTARequestorStorage::StoreCurrentProviderLocation(const Provid writer.Init(buffer); ReturnErrorOnFailure(provider.EncodeForRead(writer, TLV::AnonymousTag(), provider.fabricIndex)); - return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator().OTACurrentProvider(), buffer, + return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator::OTACurrentProvider(), buffer, static_cast(writer.GetLengthWritten())); } CHIP_ERROR DefaultOTARequestorStorage::ClearCurrentProviderLocation() { - return mPersistentStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator().OTACurrentProvider()); + return mPersistentStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator::OTACurrentProvider()); } CHIP_ERROR DefaultOTARequestorStorage::LoadCurrentProviderLocation(ProviderLocationType & provider) { uint8_t buffer[kProviderMaxSerializedSize]; - uint16_t size = sizeof(buffer); + MutableByteSpan bufferSpan(buffer); - ReturnErrorOnFailure(mPersistentStorage->SyncGetKeyValue(DefaultStorageKeyAllocator().OTACurrentProvider(), buffer, size)); + ReturnErrorOnFailure(Load(DefaultStorageKeyAllocator::OTACurrentProvider(), bufferSpan)); TLV::TLVReader reader; - reader.Init(buffer, size); + reader.Init(bufferSpan.data(), bufferSpan.size()); ReturnErrorOnFailure(reader.Next(TLV::AnonymousTag())); ReturnErrorOnFailure(provider.Decode(reader)); @@ -120,22 +120,27 @@ CHIP_ERROR DefaultOTARequestorStorage::LoadCurrentProviderLocation(ProviderLocat CHIP_ERROR DefaultOTARequestorStorage::StoreUpdateToken(ByteSpan updateToken) { - return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator().OTAUpdateToken(), updateToken.data(), + return mPersistentStorage->SyncSetKeyValue(DefaultStorageKeyAllocator::OTAUpdateToken(), updateToken.data(), static_cast(updateToken.size())); } CHIP_ERROR DefaultOTARequestorStorage::ClearUpdateToken() { - return mPersistentStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator().OTAUpdateToken()); + return mPersistentStorage->SyncDeleteKeyValue(DefaultStorageKeyAllocator::OTAUpdateToken()); } CHIP_ERROR DefaultOTARequestorStorage::LoadUpdateToken(MutableByteSpan & updateToken) { - uint16_t size = static_cast(updateToken.size()); - CHIP_ERROR error = mPersistentStorage->SyncGetKeyValue(DefaultStorageKeyAllocator().OTAUpdateToken(), updateToken.data(), size); + return Load(DefaultStorageKeyAllocator::OTAUpdateToken(), updateToken); +} + +CHIP_ERROR DefaultOTARequestorStorage::Load(const char * key, MutableByteSpan & buffer) +{ + uint16_t size = static_cast(buffer.size()); + ReturnErrorOnFailure(mPersistentStorage->SyncGetKeyValue(key, buffer.data(), size)); - updateToken.reduce_size(size); - return error; + buffer = MutableByteSpan(buffer.data(), size); + return CHIP_NO_ERROR; } } // namespace chip diff --git a/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.h b/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.h index 4c5f39042e287d..a9f973de43c726 100644 --- a/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.h +++ b/src/app/clusters/ota-requestor/DefaultOTARequestorStorage.h @@ -41,6 +41,7 @@ class DefaultOTARequestorStorage : public OTARequestorStorage CHIP_ERROR LoadUpdateToken(MutableByteSpan & updateToken) override; private: + CHIP_ERROR Load(const char * key, MutableByteSpan & buffer); PersistentStorageDelegate * mPersistentStorage = nullptr; }; diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 956699fb215487..4aca7370301df9 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -484,18 +484,13 @@ void OTARequestor::NotifyUpdateApplied(uint32_t version) CHIP_ERROR OTARequestor::ClearDefaultOtaProviderList(FabricIndex fabricIndex) { - // Remove all entries for the fabric index indicated - auto iterator = mDefaultOtaProviderList.Begin(); - while (iterator.Next()) - { - ProviderLocation::Type pl = iterator.GetValue(); - if (pl.GetFabricIndex() == fabricIndex) - { - mDefaultOtaProviderList.Delete(pl); - } - } + CHIP_ERROR error = mDefaultOtaProviderList.Delete(fabricIndex); - return CHIP_NO_ERROR; + // Ignore the error if no entry for the associated fabric index has been found. + ReturnErrorCodeIf(error == CHIP_ERROR_NOT_FOUND, CHIP_NO_ERROR); + ReturnErrorOnFailure(error); + + return mStorage->StoreDefaultProviders(mDefaultOtaProviderList); } CHIP_ERROR OTARequestor::AddDefaultOtaProvider(const ProviderLocation::Type & providerLocation) @@ -514,7 +509,7 @@ CHIP_ERROR OTARequestor::AddDefaultOtaProvider(const ProviderLocation::Type & pr ReturnErrorOnFailure(mDefaultOtaProviderList.Add(providerLocation)); - return CHIP_NO_ERROR; + return mStorage->StoreDefaultProviders(mDefaultOtaProviderList); } void OTARequestor::OnDownloadStateChanged(OTADownloader::State state, OTAChangeReasonEnum reason) diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index 5052f13f31c762..374fb6112b9d0d 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -30,6 +30,7 @@ #include "BDXDownloader.h" #include "OTARequestorDriver.h" #include "OTARequestorInterface.h" +#include "OTARequestorStorage.h" namespace chip { @@ -106,21 +107,21 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe * - Set the OTA requestor driver instance used to communicate download progress and errors * - Set the BDX downloader instance used for initiating BDX downloads */ - CHIP_ERROR Init(Server * server, OTARequestorDriver * driver, BDXDownloader * downloader) + CHIP_ERROR Init(Server & server, OTARequestorStorage & storage, OTARequestorDriver & driver, BDXDownloader & downloader) { - mServer = server; - mCASESessionManager = server->GetCASESessionManager(); - mOtaRequestorDriver = driver; - mBdxDownloader = downloader; + mServer = &server; + mCASESessionManager = server.GetCASESessionManager(); + mStorage = &storage; + mOtaRequestorDriver = &driver; + mBdxDownloader = &downloader; uint32_t version; ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(version)); mCurrentVersion = version; + storage.LoadDefaultProviders(mDefaultOtaProviderList); OtaRequestorServerSetUpdateState(mCurrentUpdateState); - app::DataModel::Nullable percent; - percent.SetNull(); - OtaRequestorServerSetUpdateStateProgress(percent); + OtaRequestorServerSetUpdateStateProgress(app::DataModel::NullNullable); // This results in the initial periodic timer kicking off RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); @@ -293,6 +294,7 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe */ static void OnCommissioningCompleteRequestor(const DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + OTARequestorStorage * mStorage = nullptr; OTARequestorDriver * mOtaRequestorDriver = nullptr; CASESessionManager * mCASESessionManager = nullptr; OnConnectedAction mOnConnectedAction = kQueryImage; diff --git a/src/app/clusters/ota-requestor/OTARequestorInterface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h index 99d08ac60cbc3d..82a319e81551fd 100644 --- a/src/app/clusters/ota-requestor/OTARequestorInterface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -114,22 +114,17 @@ class ProviderLocationList } /** - * Delete a provider location from the list if found + * Delete a provider location for the given fabric index. */ - CHIP_ERROR Delete(const app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & providerLocation) + CHIP_ERROR Delete(FabricIndex fabricIndex) { for (size_t i = 0; i < mMaxSize; i++) { - if (mList[i].HasValue()) + if (mList[i].HasValue() && mList[i].Value().GetFabricIndex() == fabricIndex) { - const app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & pl = mList[i].Value(); - if ((pl.GetFabricIndex() == providerLocation.GetFabricIndex()) && - (pl.providerNodeID == providerLocation.providerNodeID) && (pl.endpoint == providerLocation.endpoint)) - { - mList[i].ClearValue(); - mListSize--; - return CHIP_NO_ERROR; - } + mList[i].ClearValue(); + mListSize--; + return CHIP_NO_ERROR; } } diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 79d6279b763330..865fb26aecbcab 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -72,9 +72,9 @@ class DefaultStorageKeyAllocator const char * BindingTable() { return Format("bt"); } const char * BindingTableEntry(uint8_t index) { return Format("bt/%x", index); } - const char * OTADefaultProviders() { return "o/dp"; } - const char * OTACurrentProvider() { return "o/pl"; } - const char * OTAUpdateToken() { return "o/ut"; } + static const char * OTADefaultProviders() { return "o/dp"; } + static const char * OTACurrentProvider() { return "o/cp"; } + static const char * OTAUpdateToken() { return "o/ut"; } private: static const size_t kKeyLengthMax = 32; From f3b5ce5cd84232cadf0c68a285ec67588a45f48e Mon Sep 17 00:00:00 2001 From: Harsha Rajendran Date: Wed, 9 Mar 2022 10:05:00 -0500 Subject: [PATCH 05/43] The Linux platform KVS init should ignore multiple init calls (#15963) --- src/platform/Linux/CHIPLinuxStorage.cpp | 9 +++++++++ src/platform/Linux/CHIPLinuxStorage.h | 1 + 2 files changed, 10 insertions(+) diff --git a/src/platform/Linux/CHIPLinuxStorage.cpp b/src/platform/Linux/CHIPLinuxStorage.cpp index 045cf972fa589b..81c6423d2f5314 100644 --- a/src/platform/Linux/CHIPLinuxStorage.cpp +++ b/src/platform/Linux/CHIPLinuxStorage.cpp @@ -53,6 +53,13 @@ CHIP_ERROR ChipLinuxStorage::Init(const char * configFile) { CHIP_ERROR retval = CHIP_NO_ERROR; + ChipLogDetail(DeviceLayer, "ChipLinuxStorage::Init: Using KVS config file: %s", configFile); + if (mInitialized) + { + ChipLogError(DeviceLayer, "ChipLinuxStorage::Init: Attempt to re-initialize with KVS config file: %s", configFile); + return CHIP_NO_ERROR; + } + mConfigPath.assign(configFile); retval = ChipLinuxStorageIni::Init(); @@ -76,6 +83,8 @@ CHIP_ERROR ChipLinuxStorage::Init(const char * configFile) retval = ChipLinuxStorageIni::AddConfig(mConfigPath); } + mInitialized = true; + return retval; } diff --git a/src/platform/Linux/CHIPLinuxStorage.h b/src/platform/Linux/CHIPLinuxStorage.h index e79282a4d0a4d5..76b48bb09c9380 100644 --- a/src/platform/Linux/CHIPLinuxStorage.h +++ b/src/platform/Linux/CHIPLinuxStorage.h @@ -88,6 +88,7 @@ class ChipLinuxStorage : private ChipLinuxStorageIni std::mutex mLock; bool mDirty; std::string mConfigPath; + bool mInitialized = false; }; } // namespace Internal From b146c9562e05d278018879ded2e677c34d6848ca Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Mar 2022 10:13:27 -0500 Subject: [PATCH 06/43] Add Darwin error mapping for CHIP_ERROR_TIMEOUT. (#15980) --- src/darwin/Framework/CHIP/CHIPError.h | 1 + src/darwin/Framework/CHIP/CHIPError.mm | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/darwin/Framework/CHIP/CHIPError.h b/src/darwin/Framework/CHIP/CHIPError.h index ca57cbaa4f3e5e..4f4240e2772839 100644 --- a/src/darwin/Framework/CHIP/CHIPError.h +++ b/src/darwin/Framework/CHIP/CHIPError.h @@ -49,6 +49,7 @@ typedef NS_ERROR_ENUM(CHIPErrorDomain, CHIPErrorCode){ CHIPErrorCodeInvalidState = 6, CHIPErrorCodeWrongAddressType = 7, CHIPErrorCodeIntegrityCheckFailed = 8, + CHIPErrorCodeTimeout = 9, }; // clang-format on diff --git a/src/darwin/Framework/CHIP/CHIPError.mm b/src/darwin/Framework/CHIP/CHIPError.mm index dab3461adde32d..8e79348eb9637d 100644 --- a/src/darwin/Framework/CHIP/CHIPError.mm +++ b/src/darwin/Framework/CHIP/CHIPError.mm @@ -77,6 +77,12 @@ + (NSError *)errorForCHIPErrorCode:(CHIP_ERROR)errorCode userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Integrity check failed.", nil) }]; } + if (errorCode == CHIP_ERROR_TIMEOUT) { + return [NSError errorWithDomain:CHIPErrorDomain + code:CHIPErrorCodeTimeout + userInfo:@{ NSLocalizedDescriptionKey : NSLocalizedString(@"Transaction timed out.", nil) }]; + } + return [NSError errorWithDomain:CHIPErrorDomain code:CHIPErrorCodeGeneralError userInfo:@{ @@ -237,6 +243,8 @@ + (CHIP_ERROR)errorToCHIPErrorCode:(NSError * _Nullable)error return CHIP_ERROR_INCORRECT_STATE; case CHIPErrorCodeIntegrityCheckFailed: return CHIP_ERROR_INTEGRITY_CHECK_FAILED; + case CHIPErrorCodeTimeout: + return CHIP_ERROR_TIMEOUT; default: return CHIP_ERROR_INTERNAL; } From b6e4b58d30bdd4a9ea9d07cfbe6f74f8adc02b47 Mon Sep 17 00:00:00 2001 From: Jean-Francois Penven <67962328+jepenven-silabs@users.noreply.github.com> Date: Wed, 9 Mar 2022 11:49:43 -0500 Subject: [PATCH 07/43] Fix fabric removal logic in group counter (#15977) * Fix fabric removal logic in group counter --- src/transport/GroupPeerMessageCounter.cpp | 2 + .../tests/TestGroupMessageCounter.cpp | 62 +++++++++---------- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/src/transport/GroupPeerMessageCounter.cpp b/src/transport/GroupPeerMessageCounter.cpp index 51ad13a47c6554..d44a20da84a91a 100644 --- a/src/transport/GroupPeerMessageCounter.cpp +++ b/src/transport/GroupPeerMessageCounter.cpp @@ -238,6 +238,8 @@ void GroupPeerTable::RemoveAndCompactFabric(uint32_t tableIndex) return; } mGroupFabrics[tableIndex].mFabricIndex = kUndefinedFabricIndex; + new (&mGroupFabrics[tableIndex]) GroupFabric(); + // To maintain logic integrity Fabric array cannot have empty slot in between data // Find the last non empty element for (uint32_t i = CHIP_CONFIG_MAX_FABRICS - 1; i > tableIndex; i--) diff --git a/src/transport/tests/TestGroupMessageCounter.cpp b/src/transport/tests/TestGroupMessageCounter.cpp index 6ec7b4d66f86af..fb9b032f6c6edc 100644 --- a/src/transport/tests/TestGroupMessageCounter.cpp +++ b/src/transport/tests/TestGroupMessageCounter.cpp @@ -348,24 +348,35 @@ void ReorderPeerRemovalTest(nlTestSuite * inSuite, void * inContext) NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetNodeIdAt(1, 0, false) == 9); } -// Disabled for devices with fabric count lower than 12 -#if CHIP_CONFIG_MAX_FABRICS > 12 void ReorderFabricRemovalTest(nlTestSuite * inSuite, void * inContext) { CHIP_ERROR err = CHIP_NO_ERROR; chip::Transport::PeerMessageCounter * counter = nullptr; TestGroupPeerTable mGroupPeerMsgCounter; - err = mGroupPeerMsgCounter.FindOrAddPeer(1, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(2, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(3, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(4, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(5, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(6, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(7, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(8, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(9, 1, false, counter); + for (uint8_t i = 0; i < CHIP_CONFIG_MAX_FABRICS; i++) + { + err = mGroupPeerMsgCounter.FindOrAddPeer(static_cast(i + 1), 1, false, counter); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + } + + // Try removing last Fabric first + err = counter->VerifyOrTrustFirstGroup(1234); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + counter->CommitGroup(1234); + + err = mGroupPeerMsgCounter.FabricRemoved(CHIP_CONFIG_MAX_FABRICS); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(CHIP_CONFIG_MAX_FABRICS - 1) == kUndefinedFabricIndex); + + err = mGroupPeerMsgCounter.FindOrAddPeer(CHIP_CONFIG_MAX_FABRICS, 1, false, counter); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + + // Verify that the counter was indeed cleared + err = counter->VerifyOrTrustFirstGroup(1234); + NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); + // Set a counter that will be moved around err = counter->VerifyOrTrustFirstGroup(5656); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); counter->CommitGroup(5656); @@ -373,36 +384,21 @@ void ReorderFabricRemovalTest(nlTestSuite * inSuite, void * inContext) err = counter->VerifyOrTrustFirstGroup(4756); NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); - err = mGroupPeerMsgCounter.FindOrAddPeer(10, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(11, 1, false, counter); - err = mGroupPeerMsgCounter.FindOrAddPeer(12, 1, false, counter); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, counter != nullptr); - + // Per Spec CHIP_CONFIG_MAX_FABRICS can only be as low as 4 err = mGroupPeerMsgCounter.RemovePeer(3, 1, false); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(2) == 12); - err = mGroupPeerMsgCounter.RemovePeer(8, 1, false); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(7) == 11); - err = mGroupPeerMsgCounter.RemovePeer(11, 1, false); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(7) == 10); - err = mGroupPeerMsgCounter.RemovePeer(1, 1, false); - NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - - NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(0) == 9); - err = mGroupPeerMsgCounter.RemovePeer(10, 1, false); + NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(2) == CHIP_CONFIG_MAX_FABRICS); + err = mGroupPeerMsgCounter.RemovePeer(2, 1, false); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); - NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(7) == 0); + NL_TEST_ASSERT(inSuite, mGroupPeerMsgCounter.GetFabricIndexAt(1) == CHIP_CONFIG_MAX_FABRICS - 1); // Validate that counter value were moved around correctly - err = mGroupPeerMsgCounter.FindOrAddPeer(9, 1, false, counter); + err = mGroupPeerMsgCounter.FindOrAddPeer(CHIP_CONFIG_MAX_FABRICS, 1, false, counter); NL_TEST_ASSERT(inSuite, err == CHIP_NO_ERROR); err = counter->VerifyOrTrustFirstGroup(4756); NL_TEST_ASSERT(inSuite, err != CHIP_NO_ERROR); } -#endif // CHIP_CONFIG_MAX_FABRICS > 12 + void GroupMessageCounterTest(nlTestSuite * inSuite, void * inContext) { @@ -471,9 +467,7 @@ const nlTest sTests[] = NL_TEST_DEF("Counter Rollover", CounterCommitRolloverTest), NL_TEST_DEF("Counter Trust first", CounterTrustFirstTest), NL_TEST_DEF("Reorder Peer removal", ReorderPeerRemovalTest), - #if CHIP_CONFIG_MAX_FABRICS > 12 NL_TEST_DEF("Reorder Fabric Removal", ReorderFabricRemovalTest), - #endif // CHIP_CONFIG_MAX_FABRICS > 12 NL_TEST_DEF("Group Message Counter", GroupMessageCounterTest), NL_TEST_SENTINEL() }; From 9f7dc8181d733da91e951b78d65864e39f9c3f15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Wed, 9 Mar 2022 17:52:14 +0100 Subject: [PATCH 08/43] Fix mbed build on master (#16010) * Revert "CI split between master (full) and PR (smoke) for MbedOS (#15587)" This reverts commit bfa2e6b71513f2f49ab4dc21a9389c9d575befc6. * Skip mbed build steps depending on modified paths * Fix build --- .../{full-mbed.yaml => examples-mbed.yaml} | 25 +++++- .github/workflows/smoketest-mbed.yaml | 82 ------------------- .../platform/mbed/util/include/DFUManager.h | 1 + 3 files changed, 22 insertions(+), 86 deletions(-) rename .github/workflows/{full-mbed.yaml => examples-mbed.yaml} (83%) delete mode 100644 .github/workflows/smoketest-mbed.yaml diff --git a/.github/workflows/full-mbed.yaml b/.github/workflows/examples-mbed.yaml similarity index 83% rename from .github/workflows/full-mbed.yaml rename to .github/workflows/examples-mbed.yaml index d6b723d69f7a1d..27a5a8f34fe54f 100644 --- a/.github/workflows/full-mbed.yaml +++ b/.github/workflows/examples-mbed.yaml @@ -12,22 +12,24 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: Full builds - Mbed OS +name: Build example - Mbed OS on: push: + pull_request: workflow_dispatch: concurrency: - group: full-${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} + group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} cancel-in-progress: true jobs: mbedos: - name: Run + name: Mbed OS examples building timeout-minutes: 200 env: + BUILD_TYPE: mbedos APP_PROFILE: release APP_TARGET: CY8CPROTO_062_4343W @@ -50,6 +52,16 @@ jobs: attempt_limit: 3 attempt_delay: 2000 + - name: Detect changed paths + uses: dorny/paths-filter@v2 + id: changed_paths + with: + filters: | + mbed: + - '**/mbed/**' + pigweedapp: + - 'examples/pigweed-app/mbed/**' + - name: Set up environment for size reports if: ${{ !env.ACT }} env: @@ -79,6 +91,7 @@ jobs: /tmp/bloat_reports/ - name: Build lighting-app example + if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=lighting-app -b=$APP_TARGET -p=$APP_PROFILE @@ -88,6 +101,7 @@ jobs: /tmp/bloat_reports/ - name: Build pigweed-app example + if: github.event_name == 'push' || steps.changed_paths.outputs.pigweedapp == 'true' timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=pigweed-app -b=$APP_TARGET -p=$APP_PROFILE @@ -97,6 +111,7 @@ jobs: /tmp/bloat_reports/ - name: Build all-clusters-app example + if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=all-clusters-app -b=$APP_TARGET -p=$APP_PROFILE @@ -106,6 +121,7 @@ jobs: /tmp/bloat_reports/ - name: Build shell example + if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=shell -b=$APP_TARGET -p=$APP_PROFILE @@ -115,6 +131,7 @@ jobs: /tmp/bloat_reports/ - name: Build ota-requestor-app example + if: github.event_name == 'push' || steps.changed_paths.outputs.mbed == 'true' timeout-minutes: 20 run: | scripts/examples/mbed_example.sh -a=ota-requestor-app -b=$APP_TARGET -p=$APP_PROFILE @@ -122,7 +139,7 @@ jobs: mbed $APP_TARGET+$APP_PROFILE shell \ examples/ota-requestor-app/mbed/build-CY8CPROTO_062_4343W/release/chip-mbed-ota-requestor-app-example.elf \ /tmp/bloat_reports/ - + - name: Build unit tests # Temporarily disable build due to running out of flash space if: false diff --git a/.github/workflows/smoketest-mbed.yaml b/.github/workflows/smoketest-mbed.yaml deleted file mode 100644 index 70f359e0f1a869..00000000000000 --- a/.github/workflows/smoketest-mbed.yaml +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Smoke test - Mbed OS - -on: - pull_request: - workflow_dispatch: - -concurrency: - group: smoke-${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }} - cancel-in-progress: true - -jobs: - mbedos: - name: Smoke Run - MbedOS - timeout-minutes: 30 - runs-on: ubuntu-latest - if: github.actor != 'restyled-io[bot]' - - container: - image: connectedhomeip/chip-build-mbed-os:0.5.56 - volumes: - - "/tmp/bloat_reports:/tmp/bloat_reports" - - steps: - - uses: Wandalen/wretry.action@v1.0.11 - name: Checkout - with: - action: actions/checkout@v3 - with: | - submodules: true - token: ${{ github.token }} - attempt_limit: 3 - attempt_delay: 2000 - - - name: Set up environment for size reports - if: ${{ !env.ACT }} - env: - GH_CONTEXT: ${{ toJson(github) }} - run: scripts/tools/memory/gh_sizes_environment.py "${GH_CONTEXT}" - - - name: Bootstrap - timeout-minutes: 10 - run: scripts/build/gn_bootstrap.sh - - - name: Uploading bootstrap logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} && ${{ !env.ACT }} - with: - name: bootstrap-logs - path: | - .environment/gn_out/.ninja_log - .environment/pigweed-venv/*.log - - - name: Build lock-app example - timeout-minutes: 20 - run: | - scripts/examples/mbed_example.sh -a=lock-app -b=CY8CPROTO_062_4343W -p=release - .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ - mbed CY8CPROTO_062_4343W+release lock-app \ - examples/lock-app/mbed/build-CY8CPROTO_062_4343W/release/chip-mbed-lock-app-example.elf \ - /tmp/bloat_reports/ - - - name: Uploading Size Reports - uses: actions/upload-artifact@v2 - if: ${{ !env.ACT }} - with: - name: Size,Mbed-Examples,${{ env.GH_EVENT_PR }},${{ env.GH_EVENT_HASH }},${{ env.GH_EVENT_PARENT }},${{ github.event_name }} - path: | - /tmp/bloat_reports/ diff --git a/examples/platform/mbed/util/include/DFUManager.h b/examples/platform/mbed/util/include/DFUManager.h index 5833c59739e39e..07a8d6b64f8501 100644 --- a/examples/platform/mbed/util/include/DFUManager.h +++ b/examples/platform/mbed/util/include/DFUManager.h @@ -28,6 +28,7 @@ #ifdef CHIP_OTA_REQUESTOR #include +#include #include #include #include From e95d68010c5bca28c5e38ccbd8ffc6b451243527 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 9 Mar 2022 11:59:04 -0500 Subject: [PATCH 09/43] Remove erroenously committed bins (#16016) --- .../chip-all-clusters-app.REMOVED.git-id | 1 - .../chip-all-clusters-app.map.REMOVED.git-id | 1 - .../linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id | 1 - .../linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id | 1 - .../chip-door-lock-app.REMOVED.git-id | 1 - .../chip-door-lock-app.map.REMOVED.git-id | 1 - .../linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id | 1 - .../linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id | 1 - 8 files changed, 8 deletions(-) delete mode 100644 objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id delete mode 100644 objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id diff --git a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id deleted file mode 100644 index 29eef41d90d348..00000000000000 --- a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -335fcfe3b2ee9ff5ee47781735fb823fe3fbd61e \ No newline at end of file diff --git a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id b/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id deleted file mode 100644 index 44d2421e13eb14..00000000000000 --- a/objdir-clone/linux-x64-all-clusters-no-ble-tsan-test-group/chip-all-clusters-app.map.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -6ea178d9396304eb8f7787f6120c3b96aa28c924 \ No newline at end of file diff --git a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id deleted file mode 100644 index e510062f66f6e6..00000000000000 --- a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d8dbffe69c7902379dc077cdb72cdc2281f955ef \ No newline at end of file diff --git a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id b/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id deleted file mode 100644 index cd48dbfcfd1f49..00000000000000 --- a/objdir-clone/linux-x64-chip-tool-no-ble-tsan/chip-tool.map.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -c6ed2046073782fadab254ac30217905494a0683 \ No newline at end of file diff --git a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id deleted file mode 100644 index 914a0482efd3b9..00000000000000 --- a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -817b1334292877356bbc4a34c29577496fd5ce1c \ No newline at end of file diff --git a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id b/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id deleted file mode 100644 index 1d36716751dc32..00000000000000 --- a/objdir-clone/linux-x64-door-lock-no-ble-tsan/chip-door-lock-app.map.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -a779dd26be2c2aefb538fd3f6ad8916fe656ae00 \ No newline at end of file diff --git a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id deleted file mode 100644 index 156edf0824ae88..00000000000000 --- a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -12bb8df2c2276efbeb1a639b8009a3bd0eb4b183 \ No newline at end of file diff --git a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id b/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id deleted file mode 100644 index cad93254760a03..00000000000000 --- a/objdir-clone/linux-x64-tv-app-no-ble-tsan/chip-tv-app.map.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -cdb2a847b417200f52ebfe85905073b2009624ae \ No newline at end of file From 4349e22c5384185a21b5aadbf864436c1947ce5a Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Wed, 9 Mar 2022 09:24:28 -0800 Subject: [PATCH 10/43] [OTA] Tear down CASE session during a timeout error (#15939) --- .../clusters/ota-requestor/OTARequestor.cpp | 36 ++++++++++++++++++- src/app/clusters/ota-requestor/OTARequestor.h | 7 +++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index 4aca7370301df9..d70298bdf6abc1 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -184,7 +184,14 @@ void OTARequestor::OnQueryImageFailure(void * context, CHIP_ERROR error) OTARequestor * requestorCore = static_cast(context); VerifyOrDie(requestorCore != nullptr); - ChipLogDetail(SoftwareUpdate, "QueryImage failure response %" CHIP_ERROR_FORMAT, error.Format()); + ChipLogError(SoftwareUpdate, "Received QueryImage failure response: %" CHIP_ERROR_FORMAT, error.Format()); + + if (error == CHIP_ERROR_TIMEOUT) + { + ChipLogError(SoftwareUpdate, "CASE session may be invalid, tear down session"); + requestorCore->DisconnectFromProvider(); + } + requestorCore->RecordErrorUpdateState(UpdateFailureState::kQuerying, error); } @@ -305,6 +312,33 @@ void OTARequestor::ConnectToProvider(OnConnectedAction onConnectedAction) } } +void OTARequestor::DisconnectFromProvider() +{ + if (mServer == nullptr) + { + ChipLogError(SoftwareUpdate, "Server not set"); + RecordErrorUpdateState(UpdateFailureState::kUnknown, CHIP_ERROR_INCORRECT_STATE); + return; + } + + if (!mProviderLocation.HasValue()) + { + ChipLogError(SoftwareUpdate, "Provider location not set"); + RecordErrorUpdateState(UpdateFailureState::kUnknown, CHIP_ERROR_INCORRECT_STATE); + return; + } + + FabricInfo * fabricInfo = mServer->GetFabricTable().FindFabricWithIndex(mProviderLocation.Value().fabricIndex); + if (fabricInfo == nullptr) + { + ChipLogError(SoftwareUpdate, "Cannot find fabric"); + RecordErrorUpdateState(UpdateFailureState::kUnknown, CHIP_ERROR_INCORRECT_STATE); + return; + } + + mCASESessionManager->ReleaseSession(fabricInfo->GetPeerIdForNode(mProviderLocation.Value().providerNodeID)); +} + // Requestor is directed to cancel image update in progress. All the Requestor state is // cleared, UpdateState is reset to Idle void OTARequestor::CancelImageUpdate() diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index 374fb6112b9d0d..b5de8b40b0c55b 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -242,12 +242,17 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe }; /** - * Called to establish a session to mProviderLocation. + * Called to establish a session to provider indicated by mProviderLocation * * @param onConnectedAction The action to take once session to provider has been established */ void ConnectToProvider(OnConnectedAction onConnectedAction); + /** + * Called to tear down a session to provider indicated by mProviderLocation + */ + void DisconnectFromProvider(); + /** * Start download of the software image returned in QueryImageResponse */ From 8a075156b23db53506da03473995c951e9f4daf3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 9 Mar 2022 13:20:56 -0500 Subject: [PATCH 11/43] Enable operational advertising (and CASE server) in Darwin framework. (#15951) Operational advertising and a CASE server is needed for at least two things: 1. Subscriptions, so the other side can establish a CASE session if there isn't one already. 2. OTA provider server implementation. Chances are, things using the framework will want at leasts one of these things, so we just enable unconditionally when bringing up the Matter stack. --- src/darwin/Framework/CHIP/CHIPDeviceController.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 4e420e8426e215..1a20c8c5eb7757 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -183,6 +183,7 @@ - (BOOL)startup:(_Nullable id)storageDelegate if (_listenPort) { params.listenPort = _listenPort; } + params.enableServerInteractions = true; // Initialize device attestation verifier // TODO: Replace testingRootStore with a AttestationTrustStore that has the necessary official PAA roots available From cd44f9bcff8e8318336fe1f828a9a0b7cd92e0f0 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Wed, 9 Mar 2022 10:36:31 -0800 Subject: [PATCH 12/43] Fix urgent event support (#15884) Add python event urgency test support --- src/app/ClusterInfo.h | 1 + src/app/EventLogging.h | 9 +- src/app/EventLoggingTypes.h | 14 +-- src/app/EventManagement.cpp | 5 +- src/app/EventPathParams.h | 5 +- src/app/MessageDef/EventPathIB.cpp | 4 + src/app/ReadHandler.cpp | 7 ++ src/app/clusters/basic/basic.cpp | 4 +- .../general-diagnostics-server.cpp | 8 +- src/app/reporting/Engine.cpp | 23 ++-- src/app/reporting/Engine.h | 3 +- src/app/tests/TestReadInteraction.cpp | 110 ++++++++++++++++-- src/controller/CHIPCluster.h | 16 +-- src/controller/ReadInteraction.h | 10 +- src/controller/python/chip/ChipDeviceCtrl.py | 45 ++++--- .../python/chip/clusters/Attribute.py | 42 ++++--- .../python/chip/clusters/attribute.cpp | 3 +- .../python/chip/interaction_model/delegate.py | 2 + .../test/test_scripts/cluster_objects.py | 11 +- 19 files changed, 214 insertions(+), 108 deletions(-) diff --git a/src/app/ClusterInfo.h b/src/app/ClusterInfo.h index e8fdc95bf9fc73..2e3e0ddeab3ab1 100644 --- a/src/app/ClusterInfo.h +++ b/src/app/ClusterInfo.h @@ -103,6 +103,7 @@ struct ClusterInfo ListIndex mListIndex = kInvalidListIndex; // uint16 EndpointId mEndpointId = kInvalidEndpointId; // uint16 Optional mDataVersion; // uint32 + bool mIsUrgentEvent = false; // uint8 }; } // namespace app } // namespace chip diff --git a/src/app/EventLogging.h b/src/app/EventLogging.h index 9580dcb40a57f4..9d5d56d362d2d2 100644 --- a/src/app/EventLogging.h +++ b/src/app/EventLogging.h @@ -57,21 +57,18 @@ class EventLogger : public EventLoggingDelegate * LogEvent has 2 variant, one for fabric-scoped events and one for non-fabric-scoped events. * @param[in] aEventData The event cluster object * @param[in] aEndpoint The current cluster's Endpoint Id - * @param[in] aUrgent The EventOption Type, kUrgent or kNotUrgent * @param[out] aEventNumber The event Number if the event was written to the * log, 0 otherwise. The Event number is expected to monotonically increase. * * @return CHIP_ERROR CHIP Error Code */ template ::value, bool> = true> -CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aEventNumber, - EventOptions::Type aUrgent = EventOptions::Type::kNotUrgent) +CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aEventNumber) { EventLogger eventData(aEventData); ConcreteEventPath path(aEndpoint, aEventData.GetClusterId(), aEventData.GetEventId()); EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); EventOptions eventOptions; - eventOptions.mUrgent = aUrgent; eventOptions.mPath = path; eventOptions.mPriority = aEventData.GetPriorityLevel(); eventOptions.mFabricIndex = aEventData.GetFabricIndex(); @@ -88,14 +85,12 @@ CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aE } template ::value, bool> = true> -CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aEventNumber, - EventOptions::Type aUrgent = EventOptions::Type::kNotUrgent) +CHIP_ERROR LogEvent(const T & aEventData, EndpointId aEndpoint, EventNumber & aEventNumber) { EventLogger eventData(aEventData); ConcreteEventPath path(aEndpoint, aEventData.GetClusterId(), aEventData.GetEventId()); EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); EventOptions eventOptions; - eventOptions.mUrgent = aUrgent; eventOptions.mPath = path; eventOptions.mPriority = aEventData.GetPriorityLevel(); return logMgmt.LogEvent(&eventData, eventOptions, aEventNumber); diff --git a/src/app/EventLoggingTypes.h b/src/app/EventLoggingTypes.h index d685113d852080..28a891af821e5a 100644 --- a/src/app/EventLoggingTypes.h +++ b/src/app/EventLoggingTypes.h @@ -127,21 +127,11 @@ struct Timestamp class EventOptions { public: - enum class Type - { - kUrgent = 0, - kNotUrgent, - }; - EventOptions() : mPriority(PriorityLevel::Invalid), mUrgent(Type::kNotUrgent) {} - EventOptions(Timestamp aTimestamp) : mTimestamp(aTimestamp), mPriority(PriorityLevel::Invalid), mUrgent(Type::kNotUrgent) {} - - EventOptions(Timestamp aTimestamp, Type aUrgent) : mTimestamp(aTimestamp), mPriority(PriorityLevel::Invalid), mUrgent(aUrgent) - {} + EventOptions() : mPriority(PriorityLevel::Invalid) {} + EventOptions(Timestamp aTimestamp) : mTimestamp(aTimestamp), mPriority(PriorityLevel::Invalid) {} ConcreteEventPath mPath; Timestamp mTimestamp; PriorityLevel mPriority = PriorityLevel::Invalid; - Type mUrgent = Type::kNotUrgent; /**< A flag denoting if the event is time sensitive. When kUrgent is set, it causes - the event log to be flushed. */ // kUndefinedFabricIndex 0 means not fabric associated at all FabricIndex mFabricIndex = kUndefinedFabricIndex; }; diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index dd5eceadcc4b07..a48d790f01d631 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -319,7 +319,6 @@ CHIP_ERROR EventManagement::ConstructEvent(EventLoadOutContext * apContext, Even eventPathBuilder.Endpoint(apOptions->mPath.mEndpointId) .Cluster(apOptions->mPath.mClusterId) .Event(apOptions->mPath.mEventId) - .IsUrgent(apOptions->mUrgent == EventOptions::Type::kUrgent) .EndOfEventPathIB(); ReturnErrorOnFailure(eventPathBuilder.GetError()); eventDataIBBuilder.EventNumber(apContext->mCurrentEventNumber).Priority(chip::to_underlying(apContext->mPriority)); @@ -476,7 +475,6 @@ CHIP_ERROR EventManagement::LogEventPrivate(EventLoggingDelegate * apDelegate, c // Create all event specific data // Timestamp; encoded as a delta time - opts.mUrgent = aEventOptions.mUrgent; opts.mPath = aEventOptions.mPath; opts.mFabricIndex = aEventOptions.mFabricIndex; @@ -533,8 +531,7 @@ CHIP_ERROR EventManagement::LogEventPrivate(EventLoggingDelegate * apDelegate, c opts.mTimestamp.mType == Timestamp::Type::kSystem ? "Sys" : "Epoch", ChipLogValueX64(opts.mTimestamp.mValue)); #endif // CHIP_CONFIG_EVENT_LOGGING_VERBOSE_DEBUG_LOGS - err = InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleEventDelivery(opts.mPath, opts.mUrgent, - mBytesWritten); + err = InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleEventDelivery(opts.mPath, mBytesWritten); } return err; diff --git a/src/app/EventPathParams.h b/src/app/EventPathParams.h index 7a3675a372bd41..0516874cf41535 100644 --- a/src/app/EventPathParams.h +++ b/src/app/EventPathParams.h @@ -26,8 +26,8 @@ namespace chip { namespace app { struct EventPathParams { - EventPathParams(EndpointId aEndpointId, ClusterId aClusterId, EventId aEventId) : - mEndpointId(aEndpointId), mClusterId(aClusterId), mEventId(aEventId) + EventPathParams(EndpointId aEndpointId, ClusterId aClusterId, EventId aEventId, bool aUrgentEvent = false) : + mEndpointId(aEndpointId), mClusterId(aClusterId), mEventId(aEventId), mIsUrgentEvent(aUrgentEvent) {} EventPathParams() {} bool IsSamePath(const EventPathParams & other) const @@ -47,6 +47,7 @@ struct EventPathParams EndpointId mEndpointId = kInvalidEndpointId; ClusterId mClusterId = kInvalidClusterId; EventId mEventId = kInvalidEventId; + bool mIsUrgentEvent = false; }; } // namespace app } // namespace chip diff --git a/src/app/MessageDef/EventPathIB.cpp b/src/app/MessageDef/EventPathIB.cpp index 486c9ceddf652f..ca151011f4443e 100644 --- a/src/app/MessageDef/EventPathIB.cpp +++ b/src/app/MessageDef/EventPathIB.cpp @@ -242,6 +242,10 @@ CHIP_ERROR EventPathIB::Builder::Encode(const EventPathParams & aEventPathParams Event(aEventPathParams.mEventId); } + if (aEventPathParams.mIsUrgentEvent) + { + IsUrgent(aEventPathParams.mIsUrgentEvent); + } EndOfEventPathIB(); return GetError(); } diff --git a/src/app/ReadHandler.cpp b/src/app/ReadHandler.cpp index 0b116af762c9cc..952d360046c11d 100644 --- a/src/app/ReadHandler.cpp +++ b/src/app/ReadHandler.cpp @@ -515,6 +515,13 @@ CHIP_ERROR ReadHandler::ProcessEventPaths(EventPathIBs::Parser & aEventPathsPars } ReturnErrorOnFailure(err); + err = path.GetIsUrgent(&(clusterInfo.mIsUrgentEvent)); + if (CHIP_END_OF_TLV == err) + { + err = CHIP_NO_ERROR; + } + ReturnErrorOnFailure(err); + ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->PushFront(mpEventClusterInfoList, clusterInfo)); } diff --git a/src/app/clusters/basic/basic.cpp b/src/app/clusters/basic/basic.cpp index 77633b4f418e39..130a1442c0e853 100644 --- a/src/app/clusters/basic/basic.cpp +++ b/src/app/clusters/basic/basic.cpp @@ -340,7 +340,7 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate Events::StartUp::Type event{ softwareVersion }; EventNumber eventNumber; - CHIP_ERROR err = LogEvent(event, endpoint, eventNumber, EventOptions::Type::kUrgent); + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); if (CHIP_NO_ERROR != err) { ChipLogError(Zcl, "PlatformMgrDelegate: Failed to record StartUp event: %" CHIP_ERROR_FORMAT, err.Format()); @@ -359,7 +359,7 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate Events::ShutDown::Type event; EventNumber eventNumber; - CHIP_ERROR err = LogEvent(event, endpoint, eventNumber, EventOptions::Type::kUrgent); + CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); if (CHIP_NO_ERROR != err) { ChipLogError(Zcl, "PlatformMgrDelegate: Failed to record ShutDown event: %" CHIP_ERROR_FORMAT, err.Format()); diff --git a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp index 0a14cbf53e5055..834f855b69d7b0 100644 --- a/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp +++ b/src/app/clusters/general-diagnostics-server/general-diagnostics-server.cpp @@ -206,7 +206,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega Events::BootReason::Type event{ static_cast(bootReason) }; EventNumber eventNumber; - CHIP_ERROR err = LogEvent(event, 0, eventNumber, EventOptions::Type::kUrgent); + CHIP_ERROR err = LogEvent(event, 0, eventNumber); if (CHIP_NO_ERROR != err) { ChipLogError(Zcl, "GeneralDiagnosticsDelegate: Failed to record BootReason event: %" CHIP_ERROR_FORMAT, err.Format()); @@ -233,7 +233,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega reinterpret_cast(previous.data()), previous.size()); Events::HardwareFaultChange::Type event{ currentList, previousList }; - if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber, EventOptions::Type::kUrgent)) + if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber)) { ChipLogError(Zcl, "GeneralDiagnosticsDelegate: Failed to record HardwareFault event"); } @@ -259,7 +259,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega DataModel::List(reinterpret_cast(previous.data()), previous.size()); Events::RadioFaultChange::Type event{ currentList, previousList }; - if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber, EventOptions::Type::kUrgent)) + if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber)) { ChipLogError(Zcl, "GeneralDiagnosticsDelegate: Failed to record RadioFault event"); } @@ -285,7 +285,7 @@ class GeneralDiagnosticsDelegate : public DeviceLayer::ConnectivityManagerDelega reinterpret_cast(previous.data()), previous.size()); Events::NetworkFaultChange::Type event{ currentList, previousList }; - if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber, EventOptions::Type::kUrgent)) + if (CHIP_NO_ERROR != LogEvent(event, endpointId, eventNumber)) { ChipLogError(Zcl, "GeneralDiagnosticsDelegate: Failed to record NetworkFault event"); } diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index ac35a882cabc2d..1e4f7eb9942404 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -735,18 +735,21 @@ CHIP_ERROR Engine::ScheduleBufferPressureEventDelivery(uint32_t aBytesWritten) return CHIP_NO_ERROR; } -CHIP_ERROR Engine::ScheduleUrgentEventDelivery(ConcreteEventPath & aPath) +CHIP_ERROR Engine::ScheduleEventDelivery(ConcreteEventPath & aPath, uint32_t aBytesWritten) { - InteractionModelEngine::GetInstance()->mReadHandlers.ForEachActiveObject([&aPath](ReadHandler * handler) { + bool isUrgentEvent = false; + InteractionModelEngine::GetInstance()->mReadHandlers.ForEachActiveObject([&aPath, &isUrgentEvent](ReadHandler * handler) { if (handler->IsType(ReadHandler::InteractionType::Read)) { return Loop::Continue; } - for (auto clusterInfo = handler->GetEventClusterInfolist(); clusterInfo != nullptr; clusterInfo = clusterInfo->mpNext) + for (auto * interestedPath = handler->GetEventClusterInfolist(); interestedPath != nullptr; + interestedPath = interestedPath->mpNext) { - if (clusterInfo->IsEventPathSupersetOf(aPath)) + if (interestedPath->IsEventPathSupersetOf(aPath) && interestedPath->mIsUrgentEvent) { + isUrgentEvent = true; handler->UnblockUrgentEventDelivery(); break; } @@ -755,18 +758,14 @@ CHIP_ERROR Engine::ScheduleUrgentEventDelivery(ConcreteEventPath & aPath) return Loop::Continue; }); - return ScheduleRun(); -} - -CHIP_ERROR Engine::ScheduleEventDelivery(ConcreteEventPath & aPath, EventOptions::Type aUrgent, uint32_t aBytesWritten) -{ - if (aUrgent != EventOptions::Type::kUrgent) + if (isUrgentEvent) { - return ScheduleBufferPressureEventDelivery(aBytesWritten); + ChipLogDetail(DataManagement, "urgent event schedule run"); + return ScheduleRun(); } else { - return ScheduleUrgentEventDelivery(aPath); + return ScheduleBufferPressureEventDelivery(aBytesWritten); } return CHIP_NO_ERROR; } diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h index c74cc26d881ad6..c29f100d0e5ac2 100644 --- a/src/app/reporting/Engine.h +++ b/src/app/reporting/Engine.h @@ -94,7 +94,7 @@ class Engine * Schedule the event delivery * */ - CHIP_ERROR ScheduleEventDelivery(ConcreteEventPath & aPath, EventOptions::Type aUrgent, uint32_t aBytesWritten); + CHIP_ERROR ScheduleEventDelivery(ConcreteEventPath & aPath, uint32_t aBytesWritten); /* * Resets the tracker that tracks the currently serviced read handler. @@ -164,7 +164,6 @@ class Engine */ static void Run(System::Layer * aSystemLayer, void * apAppState); - CHIP_ERROR ScheduleUrgentEventDelivery(ConcreteEventPath & aPath); CHIP_ERROR ScheduleBufferPressureEventDelivery(uint32_t aBytesWritten); void GetMinEventLogPosition(uint32_t & aMinLogPosition); diff --git a/src/app/tests/TestReadInteraction.cpp b/src/app/tests/TestReadInteraction.cpp index fc3ccd00366714..186fa251843b05 100644 --- a/src/app/tests/TestReadInteraction.cpp +++ b/src/app/tests/TestReadInteraction.cpp @@ -116,7 +116,7 @@ class TestEventGenerator : public chip::app::EventLoggingDelegate int32_t mStatus; }; -void GenerateEvents(nlTestSuite * apSuite, void * apContext, bool aIsUrgent = false) +void GenerateEvents(nlTestSuite * apSuite, void * apContext) { CHIP_ERROR err = CHIP_NO_ERROR; chip::EventNumber eid1, eid2; @@ -128,11 +128,9 @@ void GenerateEvents(nlTestSuite * apSuite, void * apContext, bool aIsUrgent = fa options2.mPath = { kTestEndpointId, kTestClusterId, kTestEventIdCritical }; options2.mPriority = chip::app::PriorityLevel::Critical; TestEventGenerator testEventGenerator; - if (aIsUrgent) - { - options2.mUrgent = chip::app::EventOptions::Type::kUrgent; - } chip::app::EventManagement & logMgmt = chip::app::EventManagement::GetInstance(); + + ChipLogDetail(DataManagement, "Generating Events"); testEventGenerator.SetStatus(0); err = logMgmt.LogEvent(&testEventGenerator, options1, eid1); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); @@ -294,6 +292,7 @@ class TestReadInteraction static void TestReadChunking(nlTestSuite * apSuite, void * apContext); static void TestSetDirtyBetweenChunks(nlTestSuite * apSuite, void * apContext); static void TestSubscribeRoundtrip(nlTestSuite * apSuite, void * apContext); + static void TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite, void * apContext); static void TestSubscribeWildcard(nlTestSuite * apSuite, void * apContext); static void TestSubscribeEarlyShutdown(nlTestSuite * apSuite, void * apContext); static void TestSubscribeInvalidAttributePathRoundtrip(nlTestSuite * apSuite, void * apContext); @@ -1506,9 +1505,9 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); - - delegate.mGotReport = false; - err = readClient.SendRequest(readPrepareParams); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; + delegate.mGotReport = false; + err = readClient.SendRequest(readPrepareParams); NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); @@ -1522,7 +1521,7 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); - GenerateEvents(apSuite, apContext, true /*aIsUrgent*/); + GenerateEvents(apSuite, apContext); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mHoldReport == false); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mDirty == true); chip::app::ClusterInfo dirtyPath1; @@ -1636,6 +1635,89 @@ void TestReadInteraction::TestSubscribeRoundtrip(nlTestSuite * apSuite, void * a NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); } +void TestReadInteraction::TestSubscribeUrgentWildcardEvent(nlTestSuite * apSuite, void * apContext) +{ + TestContext & ctx = *static_cast(apContext); + CHIP_ERROR err = CHIP_NO_ERROR; + + Messaging::ReliableMessageMgr * rm = ctx.GetExchangeManager().GetReliableMessageMgr(); + // Shouldn't have anything in the retransmit table when starting the test. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + MockInteractionModelApp delegate; + auto * engine = chip::app::InteractionModelEngine::GetInstance(); + err = engine->Init(&ctx.GetExchangeManager()); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + NL_TEST_ASSERT(apSuite, !delegate.mGotEventResponse); + + ReadPrepareParams readPrepareParams(ctx.GetSessionBobToAlice()); + chip::app::EventPathParams eventPathParams[2]; + readPrepareParams.mpEventPathParamsList = eventPathParams; + readPrepareParams.mpEventPathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams.mpEventPathParamsList[0].mClusterId = kTestClusterId; + + readPrepareParams.mpEventPathParamsList[1].mEndpointId = kTestEndpointId; + readPrepareParams.mpEventPathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpEventPathParamsList[1].mEventId = kTestEventIdCritical; + + readPrepareParams.mEventPathParamsListSize = 2; + + chip::app::AttributePathParams attributePathParams[2]; + readPrepareParams.mpAttributePathParamsList = attributePathParams; + readPrepareParams.mpAttributePathParamsList[0].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[0].mClusterId = kTestClusterId; + readPrepareParams.mpAttributePathParamsList[0].mAttributeId = 1; + + readPrepareParams.mpAttributePathParamsList[1].mEndpointId = kTestEndpointId; + readPrepareParams.mpAttributePathParamsList[1].mClusterId = kTestClusterId; + readPrepareParams.mpAttributePathParamsList[1].mAttributeId = 2; + + readPrepareParams.mAttributePathParamsListSize = 2; + + readPrepareParams.mMinIntervalFloorSeconds = 2; + readPrepareParams.mMaxIntervalCeilingSeconds = 5; + printf("\nSend first subscribe request message with wildcard urgent event to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); + + delegate.mNumAttributeResponse = 0; + readPrepareParams.mKeepSubscriptions = false; + + { + app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, + chip::app::ReadClient::InteractionType::Subscribe); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; + delegate.mGotReport = false; + err = readClient.SendRequest(readPrepareParams); + NL_TEST_ASSERT(apSuite, err == CHIP_NO_ERROR); + + ctx.DrainAndServiceIO(); + + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers() == 1); + NL_TEST_ASSERT(apSuite, engine->ActiveHandlerAt(0) != nullptr); + delegate.mpReadHandler = engine->ActiveHandlerAt(0); + + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + NL_TEST_ASSERT(apSuite, delegate.mGotReport); + NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); + + GenerateEvents(apSuite, apContext); + NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mHoldReport == false); + NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mDirty == true); + delegate.mGotEventResponse = false; + delegate.mGotReport = false; + ctx.DrainAndServiceIO(); + NL_TEST_ASSERT(apSuite, delegate.mGotEventResponse); + } + + // By now we should have closed all exchanges and sent all pending acks, so + // there should be no queued-up things in the retransmit table. + NL_TEST_ASSERT(apSuite, rm->TestGetCountRetransTable() == 0); + + NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadClients() == 0); + engine->Shutdown(); + NL_TEST_ASSERT(apSuite, ctx.GetExchangeManager().GetNumActiveExchanges() == 0); +} + void TestReadInteraction::TestSubscribeWildcard(nlTestSuite * apSuite, void * apContext) { TestContext & ctx = *static_cast(apContext); @@ -1982,6 +2064,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); @@ -1998,7 +2081,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripStatusReportTimeout(nlTestSu NL_TEST_ASSERT(apSuite, delegate.mNumAttributeResponse == 2); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); - GenerateEvents(apSuite, apContext, true /*aIsUrgent*/); + GenerateEvents(apSuite, apContext); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mHoldReport == false); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mDirty == true); chip::app::ClusterInfo dirtyPath1; @@ -2301,6 +2384,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); @@ -2316,7 +2400,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkStatusReportTimeout(nlT NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); - GenerateEvents(apSuite, apContext, true /*aIsUrgent*/); + GenerateEvents(apSuite, apContext); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mHoldReport == false); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mDirty == true); chip::app::ClusterInfo dirtyPath1; @@ -2397,6 +2481,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui { app::ReadClient readClient(chip::app::InteractionModelEngine::GetInstance(), &ctx.GetExchangeManager(), delegate, chip::app::ReadClient::InteractionType::Subscribe); + readPrepareParams.mpEventPathParamsList[0].mIsUrgentEvent = true; printf("\nSend first subscribe request message to Node: %" PRIu64 "\n", chip::kTestDeviceNodeId); delegate.mGotReport = false; err = readClient.SendRequest(readPrepareParams); @@ -2412,7 +2497,7 @@ void TestReadInteraction::TestPostSubscribeRoundtripChunkReportTimeout(nlTestSui NL_TEST_ASSERT(apSuite, delegate.mGotReport); NL_TEST_ASSERT(apSuite, engine->GetNumActiveReadHandlers(ReadHandler::InteractionType::Subscribe) == 1); - GenerateEvents(apSuite, apContext, true /*aIsUrgent*/); + GenerateEvents(apSuite, apContext); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mHoldReport == false); NL_TEST_ASSERT(apSuite, delegate.mpReadHandler->mDirty == true); chip::app::ClusterInfo dirtyPath1; @@ -2479,6 +2564,7 @@ const nlTest sTests[] = NL_TEST_DEF("TestReadHandlerInvalidAttributePath", chip::app::TestReadInteraction::TestReadHandlerInvalidAttributePath), NL_TEST_DEF("TestProcessSubscribeRequest", chip::app::TestReadInteraction::TestProcessSubscribeRequest), NL_TEST_DEF("TestSubscribeRoundtrip", chip::app::TestReadInteraction::TestSubscribeRoundtrip), + NL_TEST_DEF("TestSubscribeUrgentWildcardEvent", chip::app::TestReadInteraction::TestSubscribeUrgentWildcardEvent), NL_TEST_DEF("TestSubscribeWildcard", chip::app::TestReadInteraction::TestSubscribeWildcard), NL_TEST_DEF("TestSubscribeEarlyShutdown", chip::app::TestReadInteraction::TestSubscribeEarlyShutdown), NL_TEST_DEF("TestSubscribeInvalidAttributePathRoundtrip", chip::app::TestReadInteraction::TestSubscribeInvalidAttributePathRoundtrip), diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 2dcf6a6c1a2d23..42706a1f9576e1 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -306,10 +306,11 @@ class DLL_EXPORT ClusterBase } template - CHIP_ERROR - SubscribeEvent(void * context, ReadResponseSuccessCallback reportCb, ReadResponseFailureCallback failureCb, - uint16_t minIntervalFloorSeconds, uint16_t maxIntervalCeilingSeconds, - SubscriptionEstablishedCallback subscriptionEstablishedCb = nullptr, bool aKeepPreviousSubscriptions = false) + CHIP_ERROR SubscribeEvent(void * context, ReadResponseSuccessCallback reportCb, + ReadResponseFailureCallback failureCb, uint16_t minIntervalFloorSeconds, + uint16_t maxIntervalCeilingSeconds, + SubscriptionEstablishedCallback subscriptionEstablishedCb = nullptr, + bool aKeepPreviousSubscriptions = false, bool aIsUrgentEvent = false) { VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); @@ -334,9 +335,10 @@ class DLL_EXPORT ClusterBase } }; - return Controller::SubscribeEvent( - mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, onReportCb, onFailureCb, - minIntervalFloorSeconds, maxIntervalCeilingSeconds, onSubscriptionEstablishedCb, aKeepPreviousSubscriptions); + return Controller::SubscribeEvent(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), + mEndpoint, onReportCb, onFailureCb, minIntervalFloorSeconds, + maxIntervalCeilingSeconds, onSubscriptionEstablishedCb, + aKeepPreviousSubscriptions, aIsUrgentEvent); } protected: diff --git a/src/controller/ReadInteraction.h b/src/controller/ReadInteraction.h index 12cb72b05c8fda..aec8717ab07311 100644 --- a/src/controller/ReadInteraction.h +++ b/src/controller/ReadInteraction.h @@ -196,14 +196,14 @@ struct ReportEventParams : public app::ReadPrepareParams template CHIP_ERROR ReportEvent(Messaging::ExchangeManager * apExchangeMgr, EndpointId endpointId, - ReportEventParams && readParams) + ReportEventParams && readParams, bool aIsUrgentEvent) { ClusterId clusterId = DecodableEventType::GetClusterId(); EventId eventId = DecodableEventType::GetEventId(); app::InteractionModelEngine * engine = app::InteractionModelEngine::GetInstance(); CHIP_ERROR err = CHIP_NO_ERROR; - auto readPaths = Platform::MakeUnique(endpointId, clusterId, eventId); + auto readPaths = Platform::MakeUnique(endpointId, clusterId, eventId, aIsUrgentEvent); VerifyOrReturnError(readPaths != nullptr, CHIP_ERROR_NO_MEMORY); readParams.mpEventPathParamsList = readPaths.get(); @@ -262,7 +262,7 @@ CHIP_ERROR ReadEvent(Messaging::ExchangeManager * exchangeMgr, const SessionHand detail::ReportEventParams params(sessionHandle); params.mOnReportCb = onSuccessCb; params.mOnErrorCb = onErrorCb; - return detail::ReportEvent(exchangeMgr, endpointId, std::move(params)); + return detail::ReportEvent(exchangeMgr, endpointId, std::move(params), false /*aIsUrgentEvent*/); } /** @@ -276,7 +276,7 @@ CHIP_ERROR SubscribeEvent(Messaging::ExchangeManager * exchangeMgr, const Sessio uint16_t minIntervalFloorSeconds, uint16_t maxIntervalCeilingSeconds, typename TypedReadEventCallback::OnSubscriptionEstablishedCallbackType onSubscriptionEstablishedCb = nullptr, - bool keepPreviousSubscriptions = false) + bool keepPreviousSubscriptions = false, bool aIsUrgentEvent = false) { detail::ReportEventParams params(sessionHandle); params.mOnReportCb = onReportCb; @@ -286,7 +286,7 @@ CHIP_ERROR SubscribeEvent(Messaging::ExchangeManager * exchangeMgr, const Sessio params.mMaxIntervalCeilingSeconds = maxIntervalCeilingSeconds; params.mKeepSubscriptions = keepPreviousSubscriptions; params.mReportType = app::ReadClient::InteractionType::Subscribe; - return detail::ReportEvent(exchangeMgr, endpointId, std::move(params)); + return detail::ReportEvent(exchangeMgr, endpointId, std::move(params), aIsUrgentEvent); } } // namespace Controller diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 96fbcd8e2bea63..02dd28c50b5a41 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -651,27 +651,28 @@ async def ReadAttribute(self, nodeid: int, attributes: typing.List[typing.Union[ async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[ None, # Empty tuple, all wildcard - typing.Tuple[int], # Endpoint + typing.Tuple[str, int], # all wildcard with urgency set + typing.Tuple[int, int], # Endpoint, # Wildcard endpoint, Cluster id present - typing.Tuple[typing.Type[ClusterObjects.Cluster]], + typing.Tuple[typing.Type[ClusterObjects.Cluster], int], # Wildcard endpoint, Cluster + Event present - typing.Tuple[typing.Type[ClusterObjects.ClusterEvent]], + typing.Tuple[typing.Type[ClusterObjects.ClusterEvent], int], # Wildcard event id - typing.Tuple[int, typing.Type[ClusterObjects.Cluster]], + typing.Tuple[int, typing.Type[ClusterObjects.Cluster], int], # Concrete path - typing.Tuple[int, typing.Type[ClusterObjects.ClusterEvent]] + typing.Tuple[int, typing.Type[ClusterObjects.ClusterEvent], int] ]], reportInterval: typing.Tuple[int, int] = None): ''' Read a list of events from a target node nodeId: Target's Node ID events: A list of tuples of varying types depending on the type of read being requested: - (endpoint, Clusters.ClusterA.EventA): Endpoint = specific, Cluster = specific, Event = specific - (endpoint, Clusters.ClusterA): Endpoint = specific, Cluster = specific, Event = * - (Clusters.ClusterA.EventA): Endpoint = *, Cluster = specific, Event = specific - endpoint: Endpoint = specific, Cluster = *, Event = * - Clusters.ClusterA: Endpoint = *, Cluster = specific, Event = * - '*' or (): Endpoint = *, Cluster = *, Event = * + (endpoint, Clusters.ClusterA.EventA, urgent): Endpoint = specific, Cluster = specific, Event = specific, Urgent = True/False + (endpoint, Clusters.ClusterA, urgent): Endpoint = specific, Cluster = specific, Event = *, Urgent = True/False + (Clusters.ClusterA.EventA, urgent): Endpoint = *, Cluster = specific, Event = specific, Urgent = True/False + endpoint: Endpoint = specific, Cluster = *, Event = *, Urgent = True/False + Clusters.ClusterA: Endpoint = *, Cluster = specific, Event = *, Urgent = True/False + '*' or (): Endpoint = *, Cluster = *, Event = *, Urgent = True/False The cluster and events specified above are to be selected from the generated cluster objects. @@ -694,6 +695,7 @@ async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[ endpoint = None cluster = None event = None + urgent = False if v in [('*'), ()]: # Wildcard pass @@ -708,16 +710,21 @@ async def ReadEvent(self, nodeid: int, events: typing.List[typing.Union[ else: raise ValueError("Unsupported Event Path") else: - # endpoint + (cluster) event / endpoint + cluster - endpoint = v[0] - if issubclass(v[1], ClusterObjects.Cluster): - cluster = v[1] - elif issubclass(v[1], ClusterAttribute.ClusterEvent): - event = v[1] + if v[0] == '*': + urgent = v[-1] + pass else: - raise ValueError("Unsupported Attribute Path") + # endpoint + (cluster) event / endpoint + cluster + endpoint = v[0] + if issubclass(v[1], ClusterObjects.Cluster): + cluster = v[1] + elif issubclass(v[1], ClusterAttribute.ClusterEvent): + event = v[1] + else: + raise ValueError("Unsupported Attribute Path") + urgent = v[-1] eves.append(ClusterAttribute.EventPath( - EndpointId=endpoint, Cluster=cluster, Event=event)) + EndpointId=endpoint, Cluster=cluster, Event=event, Urgent=urgent)) res = self._ChipStack.Call( lambda: ClusterAttribute.ReadEvents(future, eventLoop, device, self, eves, ClusterAttribute.SubscriptionParameters(reportInterval[0], reportInterval[1]) if reportInterval else None)) if res != 0: diff --git a/src/controller/python/chip/clusters/Attribute.py b/src/controller/python/chip/clusters/Attribute.py index f5e5212abc58b8..e2bbb695e14d37 100644 --- a/src/controller/python/chip/clusters/Attribute.py +++ b/src/controller/python/chip/clusters/Attribute.py @@ -167,8 +167,9 @@ class EventPath: EndpointId: int = None ClusterId: int = None EventId: int = None + Urgent: int = None - def __init__(self, EndpointId: int = None, Cluster=None, Event=None, ClusterId=None, EventId=None): + def __init__(self, EndpointId: int = None, Cluster=None, Event=None, ClusterId=None, EventId=None, Urgent=None): self.EndpointId = EndpointId if Cluster is not None: # Wildcard read for a specific cluster @@ -186,9 +187,10 @@ def __init__(self, EndpointId: int = None, Cluster=None, Event=None, ClusterId=N return self.ClusterId = ClusterId self.EventId = EventId + self.Urgent = Urgent def __str__(self) -> str: - return f"{self.EndpointId}/{self.ClusterId}/{self.EventId}" + return f"{self.EndpointId}/{self.ClusterId}/{self.EventId}/{self.Urgent}" def __hash__(self): return str(self).__hash__() @@ -202,22 +204,24 @@ class AttributePathWithListIndex(AttributePath): @dataclass class EventHeader: EndpointId: int = None - Event: ClusterEvent = None + ClusterId: int = None + EventId: int = None EventNumber: int = None Priority: EventPriority = None Timestamp: int = None TimestampType: EventTimestampType = None - def __init__(self, EndpointId: int = None, Event=None, EventNumber=None, Priority=None, Timestamp=None, TimestampType=None): + def __init__(self, EndpointId: int = None, ClusterId: int = None, EventId: int = None, EventNumber=None, Priority=None, Timestamp=None, TimestampType=None): self.EndpointId = EndpointId - self.Event = Event + self.ClusterId = ClusterId + self.EventId = EventId self.EventNumber = EventNumber self.Priority = Priority self.Timestamp = Timestamp - self.Timestamp = TimestampType + self.TimestampType = TimestampType def __str__(self) -> str: - return f"{self.EndpointId}/{self.Event.cluster_id}/{self.Event.event_id}/{self.EventNumber}/{self.Priority}/{self.Timestamp}/{self.TimestampType}" + return f"{self.EndpointId}/{self.ClusterId}/{self.EventId}/{self.EventNumber}/{self.Priority}/{self.Timestamp}/{self.TimestampType}" @dataclass @@ -742,7 +746,7 @@ def handleDone(self): None, py_object, c_uint32, c_uint16, c_uint32, c_uint32, c_uint8, c_void_p, c_size_t) _OnSubscriptionEstablishedCallbackFunct = CFUNCTYPE(None, py_object, c_uint64) _OnReadEventDataCallbackFunct = CFUNCTYPE( - None, py_object, c_uint16, c_uint32, c_uint32, c_uint32, c_uint8, c_uint64, c_uint8, c_void_p, c_size_t, c_uint8) + None, py_object, c_uint16, c_uint32, c_uint32, c_uint64, c_uint8, c_uint64, c_uint8, c_void_p, c_size_t, c_uint8) _OnReadErrorCallbackFunct = CFUNCTYPE( None, py_object, c_uint32) _OnReadDoneCallbackFunct = CFUNCTYPE( @@ -761,11 +765,11 @@ def _OnReadAttributeDataCallback(closure, dataVersion: int, endpoint: int, clust @_OnReadEventDataCallbackFunct -def _OnReadEventDataCallback(closure, endpoint: int, cluster: int, event: int, number: int, priority: int, timestamp: int, timestampType: int, data, len, status): +def _OnReadEventDataCallback(closure, endpoint: int, cluster: int, event: c_uint64, number: int, priority: int, timestamp: int, timestampType: int, data, len, status): dataBytes = ctypes.string_at(data, len) path = EventPath(ClusterId=cluster, EventId=event) closure.handleEventData(EventHeader( - EndpointId=endpoint, EventNumber=number, Priority=EventPriority(priority), Timestamp=timestamp, TimestampType=EventTimestampType(timestampType)), path, dataBytes[:], status) + EndpointId=endpoint, ClusterId=cluster, EventId=event, EventNumber=number, Priority=EventPriority(priority), Timestamp=timestamp, TimestampType=EventTimestampType(timestampType)), path, dataBytes[:], status) @_OnSubscriptionEstablishedCallbackFunct @@ -940,15 +944,19 @@ def ReadEvents(future: Future, eventLoop, device, devCtrl, events: List[EventPat future, eventLoop, devCtrl, TransactionType.READ_EVENTS, False) readargs = [] - for attr in events: + for event in events: path = chip.interaction_model.EventPathIBstruct.parse( b'\xff' * chip.interaction_model.EventPathIBstruct.sizeof()) - if attr.EndpointId is not None: - path.EndpointId = attr.EndpointId - if attr.ClusterId is not None: - path.ClusterId = attr.ClusterId - if attr.EventId is not None: - path.EventId = attr.EventId + if event.EndpointId is not None: + path.EndpointId = event.EndpointId + if event.ClusterId is not None: + path.ClusterId = event.ClusterId + if event.EventId is not None: + path.EventId = event.EventId + if event.Urgent is not None and subscriptionParameters is not None: + path.Urgent = event.Urgent + else: + path.Urgent = 0 path = chip.interaction_model.EventPathIBstruct.build(path) readargs.append(ctypes.c_char_p(path)) diff --git a/src/controller/python/chip/clusters/attribute.cpp b/src/controller/python/chip/clusters/attribute.cpp index 99b378f97dcfc4..6e6f4f5d7681b6 100644 --- a/src/controller/python/chip/clusters/attribute.cpp +++ b/src/controller/python/chip/clusters/attribute.cpp @@ -51,6 +51,7 @@ struct __attribute__((packed)) EventPath chip::EndpointId endpointId; chip::ClusterId clusterId; chip::EventId eventId; + uint8_t urgentEvent; }; struct __attribute__((packed)) DataVersionFilter @@ -472,7 +473,7 @@ chip::ChipError::StorageType pychip_ReadClient_ReadEvents(void * appContext, Rea python::EventPath pathObj; memcpy(&pathObj, path, sizeof(python::EventPath)); - readPaths[i] = EventPathParams(pathObj.endpointId, pathObj.clusterId, pathObj.eventId); + readPaths[i] = EventPathParams(pathObj.endpointId, pathObj.clusterId, pathObj.eventId, pathObj.urgentEvent == 1); } } diff --git a/src/controller/python/chip/interaction_model/delegate.py b/src/controller/python/chip/interaction_model/delegate.py index 620ed58dbdf5d6..4909a10fc341eb 100644 --- a/src/controller/python/chip/interaction_model/delegate.py +++ b/src/controller/python/chip/interaction_model/delegate.py @@ -60,6 +60,7 @@ "EndpointId" / Int16ul, "ClusterId" / Int32ul, "EventId" / Int32ul, + "Urgent" / Int8ul, ) DataVersionFilterIBstruct = Struct( @@ -83,6 +84,7 @@ class EventPath: endpointId: int clusterId: int eventId: int + urgent: int @dataclass diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index 020e455c9b061f..bc2b9f2dde6c0b 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -287,14 +287,14 @@ async def TriggerAndWaitForEvents(cls, devCtrl, req): async def TestReadEventRequests(cls, devCtrl, expectEventsNum): logger.info("1: Reading Ex Cx Ex") req = [ - (1, Clusters.TestCluster.Events.TestEvent), + (1, Clusters.TestCluster.Events.TestEvent, 0), ] await cls.TriggerAndWaitForEvents(cls, devCtrl, req) logger.info("2: Reading Ex Cx E*") req = [ - (1, Clusters.TestCluster), + (1, Clusters.TestCluster, 0), ] await cls.TriggerAndWaitForEvents(cls, devCtrl, req) @@ -313,6 +313,13 @@ async def TestReadEventRequests(cls, devCtrl, expectEventsNum): await cls.TriggerAndWaitForEvents(cls, devCtrl, req) + logger.info("5: Reading Ex Cx E* Urgency") + req = [ + (1, Clusters.TestCluster, 1), + ] + + await cls.TriggerAndWaitForEvents(cls, devCtrl, req) + # TODO: Add more wildcard test for IM events. @classmethod From 484e6466efa87bebb0503df151d7a781eb24e8d0 Mon Sep 17 00:00:00 2001 From: Sagar Dhawan Date: Wed, 9 Mar 2022 13:00:45 -0800 Subject: [PATCH 13/43] Fix removal of all fabrics in CHIPTool (#15982) * Fix removal of all fabrics in CHIPTool * Restyled by clang-format * Remove wrorn dispatch_group_remove Co-authored-by: Restyled.io --- .../Fabric/FabricUIViewController.m | 39 +++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m index 51a0c32ae38ef5..0388186bdcf6dc 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/Fabric/FabricUIViewController.m @@ -325,27 +325,52 @@ - (IBAction)removeAllFabricsButtonPressed:(id)sender stringWithFormat:@"Failed to establish a connection with the device %@", error] isError:YES]; } + + CHIPOperationalCredentials * opCredsCluster = + [[CHIPOperationalCredentials alloc] initWithDevice:chipDevice + endpoint:0 + queue:dispatch_get_main_queue()]; + + dispatch_group_t removeGroup = dispatch_group_create(); // Loop over the list of all fabrics and for each, call remove for (CHIPOperationalCredentialsClusterFabricDescriptor * fabricDescriptor in self.fabricsList) { - CHIPOperationalCredentials * opCredsCluster = - [[CHIPOperationalCredentials alloc] initWithDevice:chipDevice - endpoint:0 - queue:dispatch_get_main_queue()]; + if ([fabricDescriptor.fabricIndex isEqualToNumber:self.currentFabricIndex]) { + // We'll remove our own fabric later + continue; + } + CHIPOperationalCredentialsClusterRemoveFabricParams * params = [[CHIPOperationalCredentialsClusterRemoveFabricParams alloc] init]; params.fabricIndex = fabricDescriptor.fabricIndex; + dispatch_group_enter(removeGroup); [opCredsCluster removeFabricWithParams:params completionHandler:^(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error) { - if (!error) { - CHIPSetDevicePaired(CHIPGetLastPairedDeviceId(), NO); - } [self updateResult:[NSString stringWithFormat:@"Removed Fabric Index %@ with Error %@", params.fabricIndex, error] isError:error]; + dispatch_group_leave(removeGroup); }]; } + dispatch_group_notify(removeGroup, dispatch_get_main_queue(), ^{ + // now we can remove ourselves + CHIPOperationalCredentialsClusterRemoveFabricParams * params = + [[CHIPOperationalCredentialsClusterRemoveFabricParams alloc] init]; + params.fabricIndex = self.currentFabricIndex; + [opCredsCluster + removeFabricWithParams:params + completionHandler:^(CHIPOperationalCredentialsClusterNOCResponseParams * _Nullable data, + NSError * _Nullable error) { + if (!error) { + CHIPSetDevicePaired(CHIPGetLastPairedDeviceId(), NO); + } + [self updateResult:[NSString + stringWithFormat:@"Removed own Fabric Index %@ with Error %@", + params.fabricIndex, error] + isError:error]; + }]; + }); })) { [self updateResult:[NSString stringWithFormat:@"Waiting for connection with the device"] isError:NO]; } else { From a8567aae0b8a4f9353dcd84b6bb82e75225f1ae2 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Wed, 9 Mar 2022 22:03:51 +0100 Subject: [PATCH 14/43] [chip-tool-darwin] Add a method to configure the path of the kvs to avoid conflicts between chip-tool and chip-tool-darwin (#16005) --- .../commands/common/CHIPCommandBridge.mm | 1 + src/darwin/Framework/CHIP/CHIPDeviceController.h | 2 ++ src/darwin/Framework/CHIP/CHIPDeviceController.mm | 15 +++++++++++++++ 3 files changed, 18 insertions(+) diff --git a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm index c422058021e817..a641977a168b78 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm +++ b/examples/chip-tool-darwin/commands/common/CHIPCommandBridge.mm @@ -39,6 +39,7 @@ } [mController setListenPort:kListenPort]; + [mController setKeyValueStoreManagerPath:"/tmp/chip_kvs_darwin"]; [nocSigner createOrLoadKeys:storage]; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.h b/src/darwin/Framework/CHIP/CHIPDeviceController.h index e2dd125619b4ef..b91c5d430cf1cf 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.h @@ -92,6 +92,8 @@ typedef void (^CHIPDeviceConnectionCallback)(CHIPDevice * _Nullable device, NSEr */ - (void)setPairingDelegate:(id)delegate queue:(dispatch_queue_t)queue; +- (void)setKeyValueStoreManagerPath:(const char *)keyValueStorePath; + /** * Start the CHIP Stack. Repeated calls to startup without calls to shutdown in between are NO-OPs. Use the isRunning property to * check if the stack needs to be started up. diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 1a20c8c5eb7757..14c8479245556a 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -45,6 +45,7 @@ static const char * const CHIP_COMMISSIONER_DEVICE_ID_KEY = "com.zigbee.chip.commissioner.device_id"; static NSString * const kErrorMemoryInit = @"Init Memory failure"; +static NSString * const kErrorKVSInit = @"Init Key Value Store failure"; static NSString * const kErrorCommissionerInit = @"Init failure while initializing a commissioner"; static NSString * const kErrorOperationalCredentialsInit = @"Init failure while creating operational credentials delegate"; static NSString * const kErrorPairingInit = @"Init failure while creating a pairing delegate"; @@ -69,6 +70,7 @@ @interface CHIPDeviceController () @property (readonly) CHIPP256KeypairBridge keypairBridge; @property (readonly) chip::NodeId localDeviceId; @property (readonly) uint16_t listenPort; +@property (readonly) const char * kvsPath; @end // TODO Replace Shared Controller with a Controller Factory Singleton @@ -91,6 +93,7 @@ - (instancetype)init CHIP_ERROR errorCode = CHIP_NO_ERROR; _chipWorkQueue = chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(); + _kvsPath = nullptr; errorCode = chip::Platform::MemoryInit(); if ([self checkForInitError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorMemoryInit]) { @@ -222,6 +225,13 @@ - (BOOL)startup:(_Nullable id)storageDelegate commissionerParams.controllerNOC = noc; commissionerParams.controllerVendorId = vendorId; + if (_kvsPath != nullptr) { + errorCode = chip::DeviceLayer::PersistedStorage::KeyValueStoreMgrImpl().Init(_kvsPath); + if ([self checkForInitError:(CHIP_NO_ERROR == errorCode) logMsg:kErrorKVSInit]) { + return; + } + } + // TODO Replace Shared Controller with a Controller Factory Singleton auto & factory = chip::Controller::DeviceControllerFactory::GetInstance(); errorCode = factory.Init(params); @@ -566,6 +576,11 @@ - (void)setPairingDelegate:(id)delegate queue:(dispat }); } +- (void)setKeyValueStoreManagerPath:(const char *)kvsPath +{ + _kvsPath = kvsPath; +} + - (BOOL)checkForInitError:(BOOL)condition logMsg:(NSString *)logMsg { if (condition) { From 3382a5f864745fdcf0ed0079548a9c96411daa07 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 9 Mar 2022 16:06:59 -0500 Subject: [PATCH 15/43] Update code PairDevice calls to work with network params. (#14429) * Update code PairDevice calls to work with network params. * Better way to do commissioning parameters That whole "Add" thing was terrible. * Add pase only option to setup code pairer * New pairing commands for pase only I broke the test assumptions. * Update src/controller/CHIPDeviceController.h Co-authored-by: Boris Zbarsky * Update src/controller/CHIPDeviceController.h Co-authored-by: Boris Zbarsky * Bootstrap the nonces in the auto commissioner. * Fix initialization Something somewhere got messed becuase the initialization happens in the destructor which is not correct for obvious reasons. * Fix auto documentation. Functions order was confusing the documentation. Co-authored-by: Boris Zbarsky --- .../chip-tool/commands/pairing/Commands.h | 54 +++++++++++++++++++ .../commands/pairing/PairingCommand.cpp | 21 +++++--- .../commands/pairing/PairingCommand.h | 12 ++--- src/controller/AutoCommissioner.cpp | 5 ++ src/controller/AutoCommissioner.h | 2 +- src/controller/CHIPDeviceController.cpp | 29 ++++++---- src/controller/CHIPDeviceController.h | 22 ++++++++ src/controller/SetUpCodePairer.cpp | 16 ++++-- src/controller/SetUpCodePairer.h | 11 +++- 9 files changed, 143 insertions(+), 29 deletions(-) diff --git a/examples/chip-tool/commands/pairing/Commands.h b/examples/chip-tool/commands/pairing/Commands.h index 013a86e32bcc71..f38471df5dd38b 100644 --- a/examples/chip-tool/commands/pairing/Commands.h +++ b/examples/chip-tool/commands/pairing/Commands.h @@ -42,6 +42,30 @@ class PairQRCode : public PairingCommand {} }; +class PairQRCodePase : public PairingCommand +{ +public: + PairQRCodePase(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("qrcode-paseonly", PairingMode::QRCodePaseOnly, PairingNetworkType::None, credsIssuerConfig) + {} +}; + +class PairQRCodeWifi : public PairingCommand +{ +public: + PairQRCodeWifi(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("qrcode-wifi", PairingMode::QRCode, PairingNetworkType::WiFi, credsIssuerConfig) + {} +}; + +class PairQRCodeThread : public PairingCommand +{ +public: + PairQRCodeThread(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("qrcode-thread", PairingMode::QRCode, PairingNetworkType::Thread, credsIssuerConfig) + {} +}; + class PairManualCode : public PairingCommand { public: @@ -50,6 +74,30 @@ class PairManualCode : public PairingCommand {} }; +class PairManualCodePase : public PairingCommand +{ +public: + PairManualCodePase(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("manualcode-paseonly", PairingMode::ManualCodePaseOnly, PairingNetworkType::None, credsIssuerConfig) + {} +}; + +class PairManualCodeWifi : public PairingCommand +{ +public: + PairManualCodeWifi(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("manualcode-wifi", PairingMode::ManualCode, PairingNetworkType::WiFi, credsIssuerConfig) + {} +}; + +class PairManualCodeThread : public PairingCommand +{ +public: + PairManualCodeThread(CredentialIssuerCommands * credsIssuerConfig) : + PairingCommand("manualcode-thread", PairingMode::ManualCode, PairingNetworkType::Thread, credsIssuerConfig) + {} +}; + class PairOnNetwork : public PairingCommand { public: @@ -182,7 +230,13 @@ void registerCommandsPairing(Commands & commands, CredentialIssuerCommands * cre commands_list clusterCommands = { make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index c0690578b1a04a..fb7b1c27d27339 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -46,10 +46,14 @@ CHIP_ERROR PairingCommand::RunInternal(NodeId remoteId) err = Unpair(remoteId); break; case PairingMode::QRCode: - err = PairWithQRCode(remoteId); + err = PairWithCode(remoteId); break; case PairingMode::ManualCode: - err = PairWithManualCode(remoteId); + err = PairWithCode(remoteId); + break; + case PairingMode::QRCodePaseOnly: + case PairingMode::ManualCodePaseOnly: + err = PaseWithCode(remoteId); break; case PairingMode::Ble: err = Pair(remoteId, PeerAddress::BLE()); @@ -83,14 +87,15 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() return CommissioningParameters(); } -CHIP_ERROR PairingCommand::PairWithQRCode(NodeId remoteId) +CHIP_ERROR PairingCommand::PaseWithCode(NodeId remoteId) { - return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload); + return CurrentCommissioner().EstablishPASEConnection(remoteId, mOnboardingPayload); } -CHIP_ERROR PairingCommand::PairWithManualCode(NodeId remoteId) +CHIP_ERROR PairingCommand::PairWithCode(NodeId remoteId) { - return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload); + CommissioningParameters commissioningParams = GetCommissioningParameters(); + return CurrentCommissioner().PairDevice(remoteId, mOnboardingPayload, commissioningParams); } CHIP_ERROR PairingCommand::Pair(NodeId remoteId, PeerAddress address) @@ -155,6 +160,10 @@ void PairingCommand::OnPairingComplete(CHIP_ERROR err) if (err == CHIP_NO_ERROR) { ChipLogProgress(chipTool, "Pairing Success"); + if (mPairingMode == PairingMode::QRCodePaseOnly || mPairingMode == PairingMode::ManualCodePaseOnly) + { + SetCommandExitStatus(err); + } } else { diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 94d55969e9a0ea..09da8f0a76c203 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -31,6 +31,8 @@ enum class PairingMode None, QRCode, ManualCode, + QRCodePaseOnly, + ManualCodePaseOnly, Ble, SoftAP, Ethernet, @@ -79,6 +81,8 @@ class PairingCommand : public CHIPCommand, break; case PairingMode::QRCode: case PairingMode::ManualCode: + case PairingMode::QRCodePaseOnly: + case PairingMode::ManualCodePaseOnly: AddArgument("payload", &mOnboardingPayload); break; case PairingMode::Ble: @@ -147,9 +151,8 @@ class PairingCommand : public CHIPCommand, CHIP_ERROR RunInternal(NodeId remoteId); CHIP_ERROR Pair(NodeId remoteId, PeerAddress address); CHIP_ERROR PairWithMdns(NodeId remoteId); - CHIP_ERROR PairWithQRCode(NodeId remoteId); - CHIP_ERROR PairWithManualCode(NodeId remoteId); - CHIP_ERROR PairWithCode(NodeId remoteId, chip::SetupPayload payload); + CHIP_ERROR PairWithCode(NodeId remoteId); + CHIP_ERROR PaseWithCode(NodeId remoteId); CHIP_ERROR Unpair(NodeId remoteId); chip::Controller::CommissioningParameters GetCommissioningParameters(); @@ -167,7 +170,4 @@ class PairingCommand : public CHIPCommand, char * mOnboardingPayload; uint64_t mDiscoveryFilterCode; char * mDiscoveryFilterInstanceName; - - chip::CommissioneeDeviceProxy * mDevice; - chip::EndpointId mEndpointId = 0; }; diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index fc071367bf54a8..56fd26caf7ac10 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -25,6 +25,11 @@ namespace chip { namespace Controller { +AutoCommissioner::AutoCommissioner() +{ + SetCommissioningParameters(CommissioningParameters()); +} + AutoCommissioner::~AutoCommissioner() { ReleaseDAC(); diff --git a/src/controller/AutoCommissioner.h b/src/controller/AutoCommissioner.h index 199f201d0e2701..15a765fa17adf6 100644 --- a/src/controller/AutoCommissioner.h +++ b/src/controller/AutoCommissioner.h @@ -28,7 +28,7 @@ class DeviceCommissioner; class AutoCommissioner : public CommissioningDelegate { public: - AutoCommissioner() {} + AutoCommissioner(); virtual ~AutoCommissioner(); CHIP_ERROR SetCommissioningParameters(const CommissioningParameters & params) override; void SetOperationalCredentialsDelegate(OperationalCredentialsDelegate * operationalCredentialsDelegate) override; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 11292067bd9c33..71196d726944b2 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -725,15 +725,21 @@ CHIP_ERROR DeviceCommissioner::GetConnectedDevice(NodeId deviceId, chip::Callbac return DeviceController::GetConnectedDevice(deviceId, onConnection, onFailure); } +CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, const char * setUpCode, const CommissioningParameters & params) +{ + ReturnErrorOnFailure(mAutoCommissioner.SetCommissioningParameters(params)); + return mSetUpCodePairer.PairDevice(remoteDeviceId, setUpCode, SetupCodePairerBehaviour::kCommission); +} + CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, const char * setUpCode) { - return mSetUpCodePairer.PairDevice(remoteDeviceId, setUpCode); + return mSetUpCodePairer.PairDevice(remoteDeviceId, setUpCode, SetupCodePairerBehaviour::kCommission); } CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParameters & params) { - CommissioningParameters commissioningParams; - return PairDevice(remoteDeviceId, params, commissioningParams); + ReturnErrorOnFailure(EstablishPASEConnection(remoteDeviceId, params)); + return Commission(remoteDeviceId); } CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParameters & rendezvousParams, @@ -743,6 +749,11 @@ CHIP_ERROR DeviceCommissioner::PairDevice(NodeId remoteDeviceId, RendezvousParam return Commission(remoteDeviceId, commissioningParams); } +CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, const char * setUpCode) +{ + return mSetUpCodePairer.PairDevice(remoteDeviceId, setUpCode, SetupCodePairerBehaviour::kPaseOnly); +} + CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, RendezvousParameters & params) { CHIP_ERROR err = CHIP_NO_ERROR; @@ -853,6 +864,12 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re } CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningParameters & params) +{ + ReturnErrorOnFailure(mAutoCommissioner.SetCommissioningParameters(params)); + return Commission(remoteDeviceId); +} + +CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId) { // TODO(cecille): Can we get rid of mDeviceBeingCommissioned and use the remote id instead? Would require storing the // commissioning stage in the device. @@ -869,18 +886,12 @@ CHIP_ERROR DeviceCommissioner::Commission(NodeId remoteDeviceId, CommissioningPa ChipLogError(Controller, "Commissioning already in progress - not restarting"); return CHIP_ERROR_INCORRECT_STATE; } - if (!params.GetWiFiCredentials().HasValue() && !params.GetThreadOperationalDataset().HasValue() && !mIsIPRendezvous) - { - ChipLogError(Controller, "Network commissioning parameters are required for BLE auto commissioning."); - return CHIP_ERROR_INVALID_ARGUMENT; - } ChipLogProgress(Controller, "Commission called for node ID 0x" ChipLogFormatX64, ChipLogValueX64(remoteDeviceId)); mSystemState->SystemLayer()->StartTimer(chip::System::Clock::Milliseconds32(kSessionEstablishmentTimeout), OnSessionEstablishmentTimeoutCallback, this); mDefaultCommissioner->SetOperationalCredentialsDelegate(mOperationalCredentialsDelegate); - ReturnErrorOnFailure(mDefaultCommissioner->SetCommissioningParameters(params)); if (device->IsSecureConnected()) { mDefaultCommissioner->StartCommissioning(this, device); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index e4979b7b24e963..22117cafaa8b2d 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -467,6 +467,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, * @param[in] setUpCode The setup code for connecting to the device */ CHIP_ERROR PairDevice(NodeId remoteDeviceId, const char * setUpCode); + CHIP_ERROR PairDevice(NodeId remoteDeviceId, const char * setUpCode, const CommissioningParameters & CommissioningParameters); /** * @brief @@ -510,6 +511,26 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, */ CHIP_ERROR EstablishPASEConnection(NodeId remoteDeviceId, RendezvousParameters & params); + /** + * @brief + * Start establishing a PASE connection with a node for the purposes of commissioning. + * Commissioners that wish to use the auto-commissioning functions should use the + * supplied "PairDevice" functions above to automatically establish a connection then + * perform commissioning. This function is intended to be used by commissioners that + * are not using the supplied auto-commissioner. + * + * This function is non-blocking. PASE is established once the DevicePairingDelegate + * receives the OnPairingComplete call. + * + * PASE connections can only be established with nodes that have their commissioning + * window open. The PASE connection will fail if this window is not open and in that case + * OnPairingComplete will be called with an error. + * + * @param[in] remoteDeviceId The remote device Id. + * @param[in] setUpCode The setup code for connecting to the device + */ + CHIP_ERROR EstablishPASEConnection(NodeId remoteDeviceId, const char * setUpCode); + /** * @brief * Start the auto-commissioning process on a node after establishing a PASE connection. @@ -523,6 +544,7 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, * @param[in] params The commissioning parameters */ CHIP_ERROR Commission(NodeId remoteDeviceId, CommissioningParameters & params); + CHIP_ERROR Commission(NodeId remoteDeviceId); CHIP_ERROR GetDeviceBeingCommissioned(NodeId deviceId, CommissioneeDeviceProxy ** device); diff --git a/src/controller/SetUpCodePairer.cpp b/src/controller/SetUpCodePairer.cpp index 7b1bb5ad962945..0cde726a50de15 100644 --- a/src/controller/SetUpCodePairer.cpp +++ b/src/controller/SetUpCodePairer.cpp @@ -33,9 +33,10 @@ namespace chip { namespace Controller { -CHIP_ERROR SetUpCodePairer::PairDevice(NodeId remoteId, const char * setUpCode) +CHIP_ERROR SetUpCodePairer::PairDevice(NodeId remoteId, const char * setUpCode, SetupCodePairerBehaviour commission) { SetupPayload payload; + mConnectionType = commission; bool isQRCode = strncmp(setUpCode, kQRCodePrefix, strlen(kQRCodePrefix)) == 0; ReturnErrorOnFailure(isQRCode ? QRCodeSetupPayloadParser(setUpCode).populatePayload(payload) @@ -134,7 +135,14 @@ CHIP_ERROR SetUpCodePairer::StopConnectOverSoftAP() void SetUpCodePairer::OnDeviceDiscovered(RendezvousParameters & params) { - LogErrorOnFailure(mCommissioner->PairDevice(mRemoteId, params.SetSetupPINCode(mSetUpPINCode))); + if (mConnectionType == SetupCodePairerBehaviour::kCommission) + { + LogErrorOnFailure(mCommissioner->PairDevice(mRemoteId, params.SetSetupPINCode(mSetUpPINCode))); + } + else + { + LogErrorOnFailure(mCommissioner->EstablishPASEConnection(mRemoteId, params.SetSetupPINCode(mSetUpPINCode))); + } } #if CONFIG_NETWORK_LAYER_BLE @@ -145,9 +153,7 @@ void SetUpCodePairer::OnDiscoveredDeviceOverBle(BLE_CONNECTION_OBJECT connObj) Transport::PeerAddress peerAddress = Transport::PeerAddress::BLE(); RendezvousParameters params = RendezvousParameters().SetPeerAddress(peerAddress).SetConnectionObject(connObj); - // We don't have network credentials, so can't do the entire pairing flow. Just establish a PASE session to the - // device and let our consumer deal with the rest. - LogErrorOnFailure(mCommissioner->EstablishPASEConnection(mRemoteId, params.SetSetupPINCode(mSetUpPINCode))); + OnDeviceDiscovered(params); } void SetUpCodePairer::OnDiscoveredDeviceOverBleSuccess(void * appState, BLE_CONNECTION_OBJECT connObj) diff --git a/src/controller/SetUpCodePairer.h b/src/controller/SetUpCodePairer.h index e79440c3c026c9..51c3bbf46ca453 100644 --- a/src/controller/SetUpCodePairer.h +++ b/src/controller/SetUpCodePairer.h @@ -45,13 +45,19 @@ namespace Controller { class DeviceCommissioner; +enum class SetupCodePairerBehaviour : uint8_t +{ + kCommission, + kPaseOnly, +}; class DLL_EXPORT SetUpCodePairer { public: SetUpCodePairer(DeviceCommissioner * commissioner) : mCommissioner(commissioner) {} virtual ~SetUpCodePairer() {} - CHIP_ERROR PairDevice(chip::NodeId remoteId, const char * setUpCode); + CHIP_ERROR PairDevice(chip::NodeId remoteId, const char * setUpCode, + SetupCodePairerBehaviour connectionType = SetupCodePairerBehaviour::kCommission); // Called by the DeviceCommissioner to notify that we have discovered a new device. void NotifyCommissionableDeviceDiscovered(const chip::Dnssd::DiscoveredNodeData & nodeData); @@ -84,7 +90,8 @@ class DLL_EXPORT SetUpCodePairer DeviceCommissioner * mCommissioner = nullptr; chip::NodeId mRemoteId; - uint32_t mSetUpPINCode = 0; + uint32_t mSetUpPINCode = 0; + SetupCodePairerBehaviour mConnectionType = SetupCodePairerBehaviour::kCommission; }; } // namespace Controller From ccad121010b3d038370be4cfde9dae79f0110d4f Mon Sep 17 00:00:00 2001 From: Harsha Rajendran Date: Wed, 9 Mar 2022 16:21:30 -0500 Subject: [PATCH 16/43] Implement a simple DetermineProviderLocation API (#15979) --- scripts/tests/ota_test.sh | 20 ++++++---- .../ExtendedOTARequestorDriver.cpp | 14 +++++-- .../GenericOTARequestorDriver.cpp | 39 +++++++++++++++---- .../ota-requestor/GenericOTARequestorDriver.h | 2 +- 4 files changed, 56 insertions(+), 19 deletions(-) diff --git a/scripts/tests/ota_test.sh b/scripts/tests/ota_test.sh index 96698b57937538..2838c106b7e11b 100755 --- a/scripts/tests/ota_test.sh +++ b/scripts/tests/ota_test.sh @@ -9,12 +9,18 @@ FIRMWARE_BIN="my-firmware.bin" FIRMWARE_OTA="my-firmware.ota" OTA_PROVIDER_APP="chip-ota-provider-app" +OTA_PROVIDER_FOLDER="out/ota_provider_debug" OTA_REQUESTOR_APP="chip-ota-requestor-app" +OTA_REQUESTOR_FOLDER="out/ota_requestor_debug" +CHIP_TOOL_APP="chip-tool" +CHIP_TOOL_FOLDER="out" killall -e "$OTA_PROVIDER_APP" "$OTA_REQUESTOR_APP" rm -f "$FIRMWARE_OTA" "$FIRMWARE_BIN" "$OTA_DOWNLOAD_PATH" -scripts/examples/gn_build_example.sh examples/chip-tool out/ +scripts/examples/gn_build_example.sh examples/chip-tool "$CHIP_TOOL_FOLDER" +scripts/examples/gn_build_example.sh examples/ota-requestor-app/linux "$OTA_REQUESTOR_FOLDER" chip_config_network_layer_ble=false +scripts/examples/gn_build_example.sh examples/ota-provider-app/linux "$OTA_PROVIDER_FOLDER" chip_config_network_layer_ble=false echo "Test" >"$FIRMWARE_BIN" @@ -26,24 +32,24 @@ if [ ! -f "$FIRMWARE_OTA" ]; then exit 1 fi -./out/ota_provider_debug/"$OTA_PROVIDER_APP" -f "$FIRMWARE_OTA" | tee /tmp/ota/provider-log.txt & +./"$OTA_PROVIDER_FOLDER"/"$OTA_PROVIDER_APP" -f "$FIRMWARE_OTA" | tee /tmp/ota/provider-log.txt & echo "Commissioning Provider" -./out/chip-tool pairing onnetwork 1 "$PASSCODE" | tee /tmp/ota/chip-tool-commission-provider.txt +./"$CHIP_TOOL_FOLDER"/"$CHIP_TOOL_APP" pairing onnetwork 1 "$PASSCODE" | tee /tmp/ota/chip-tool-commission-provider.txt if grep "Device commissioning completed with success" /tmp/ota/chip-tool-commission-provider.txt; then echo Provider Commissioned else echo Provider not commissioned properly fi -./out/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 +./"$CHIP_TOOL_FOLDER"/"$CHIP_TOOL_APP" accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 -stdbuf -o0 ./out/ota_requestor_debug/"$OTA_REQUESTOR_APP" --discriminator "$DISCRIMINATOR" --secured-device-port "$UDP_PORT" --KVS /tmp/chip_kvs_requestor --otaDownloadPath "$OTA_DOWNLOAD_PATH" | tee /tmp/ota/requestor-log.txt & +stdbuf -o0 ./"$OTA_REQUESTOR_FOLDER"/"$OTA_REQUESTOR_APP" --discriminator "$DISCRIMINATOR" --secured-device-port "$UDP_PORT" --KVS /tmp/chip_kvs_requestor --otaDownloadPath "$OTA_DOWNLOAD_PATH" | tee /tmp/ota/requestor-log.txt & echo "Commissioning Requestor" -./out/chip-tool pairing onnetwork-long 2 "$PASSCODE" "$DISCRIMINATOR" | tee /tmp/ota/chip-tool-commission-requestor.txt +./"$CHIP_TOOL_FOLDER"/"$CHIP_TOOL_APP" pairing onnetwork-long 2 "$PASSCODE" "$DISCRIMINATOR" | tee /tmp/ota/chip-tool-commission-requestor.txt if grep "Device commissioning completed with success" /tmp/ota/chip-tool-commission-requestor.txt; then echo Requestor Commissioned @@ -53,7 +59,7 @@ fi echo "Sending announce-ota-provider" -./out/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 | tee /tmp/ota/chip-tool-announce-ota.txt +./"$CHIP_TOOL_FOLDER"/"$CHIP_TOOL_APP" otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 | tee /tmp/ota/chip-tool-announce-ota.txt timeout 30 grep -q "OTA image downloaded to" <(tail -n0 -f /tmp/ota/requestor-log.txt) diff --git a/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp index a3b152a992773a..cce1b2f7bbda10 100644 --- a/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp @@ -68,9 +68,17 @@ void ExtendedOTARequestorDriver::PollUserConsentState() CHIP_ERROR ExtendedOTARequestorDriver::GetUserConsentSubject(chip::ota::UserConsentSubject & subject, const UpdateDescription & update) { - // mLastUsedProvider has the provider fabric index and endpoint id - subject.fabricIndex = mLastUsedProvider.fabricIndex; - subject.providerEndpointId = mLastUsedProvider.endpoint; + if (mLastUsedProvider.HasValue()) + { + // mLastUsedProvider has the provider fabric index and endpoint id + subject.fabricIndex = mLastUsedProvider.Value().fabricIndex; + subject.providerEndpointId = mLastUsedProvider.Value().endpoint; + } + else + { + ChipLogError(SoftwareUpdate, "mLastProvider is empty"); + return CHIP_ERROR_INTERNAL; + } // TODO: As we cannot use the src/app/Server.h in here so, figure out a way to get the node id. diff --git a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp index 09015ff34b2a35..df842d80ee4678 100644 --- a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp @@ -121,7 +121,8 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst case UpdateNotFoundReason::NotAvailable: // IMPLEMENTATION CHOICE: // This implementation schedules a query only if a different provider is available - if ((DetermineProviderLocation(providerLocation) != true) || ProviderLocationsEqual(providerLocation, mLastUsedProvider)) + if ((DetermineProviderLocation(providerLocation) != true) || + (mLastUsedProvider.HasValue() && ProviderLocationsEqual(providerLocation, mLastUsedProvider.Value()))) { willTryAnotherQuery = false; } @@ -130,7 +131,7 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst willTryAnotherQuery = true; } mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider = providerLocation; + mLastUsedProvider.SetValue(providerLocation); break; default: @@ -258,7 +259,7 @@ void GenericOTARequestorDriver::ProcessAnnounceOTAProviders( // Point the OTARequestor to the announced provider mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider = providerLocation; + mLastUsedProvider.SetValue(providerLocation); ScheduleDelayedAction(System::Clock::Seconds32(secToStart), StartDelayTimerHandler, this); } @@ -290,7 +291,7 @@ void GenericOTARequestorDriver::DefaultProviderTimerHandler(System::Layer * syst } mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider = providerLocation; + mLastUsedProvider.SetValue(providerLocation); SendQueryImage(); } @@ -320,17 +321,39 @@ void GenericOTARequestorDriver::StopDefaultProviderTimer() this); } -// Returns the next available Provider location +/** + * Returns the next available Provider location. The algorithm is to simply loop through the list of DefaultOtaProviders and return + * the next value (based on the last used provider). If no suitable candidate is found, FALSE is returned. + */ + bool GenericOTARequestorDriver::DetermineProviderLocation(ProviderLocation::Type & providerLocation) { + // Iterate through the default providers list and find the last used provider. If found, return the provider after it auto iterator = mRequestor->GetDefaultOTAProviderListIterator(); - while (iterator.Next()) + while (mLastUsedProvider.HasValue() && iterator.Next()) + { + if (ProviderLocationsEqual(iterator.GetValue(), mLastUsedProvider.Value())) + { + if (iterator.Next()) + { + providerLocation = iterator.GetValue(); + return true; + } + } + } + + // If no suitable candidate found, return the first element of the default providers list or an error + iterator = mRequestor->GetDefaultOTAProviderListIterator(); + if (iterator.Next()) { - // For now, just return the first one providerLocation = iterator.GetValue(); return true; } - + else + { + ChipLogError(SoftwareUpdate, "No suitable OTA Provider candidate found"); + return false; + } return false; } diff --git a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h index 3bae012e9074f5..c4a65520504000 100644 --- a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h @@ -87,7 +87,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver uint32_t mPeriodicQueryTimeInterval = (24 * 60 * 60); // Timeout for querying providers on the default OTA provider list using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; - ProviderLocationType mLastUsedProvider; // Provider location used for the last query or update + Optional mLastUsedProvider; // Provider location used for the last query or update }; } // namespace DeviceLayer From 475c710a049dd439a93e0eb92e993f382ef3fe68 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 9 Mar 2022 16:23:01 -0500 Subject: [PATCH 17/43] Don't error when receiving an ipv4 address (#15976) Receiving an ipv4 address isn't an error, we should just ignore it if we don't support it. --- src/platform/Linux/DnssdImpl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/platform/Linux/DnssdImpl.cpp b/src/platform/Linux/DnssdImpl.cpp index df7a176b4f6062..1d17d67ef2079a 100644 --- a/src/platform/Linux/DnssdImpl.cpp +++ b/src/platform/Linux/DnssdImpl.cpp @@ -727,8 +727,7 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte context->mCallback(context->mContext, nullptr, Span(), CHIP_ERROR_INTERNAL); break; case AVAHI_RESOLVER_FOUND: - DnssdService result = {}; - CHIP_ERROR result_err = CHIP_NO_ERROR; + DnssdService result = {}; result.mAddress.SetValue(chip::Inet::IPAddress()); ChipLogError(DeviceLayer, "Avahi resolve found"); @@ -753,6 +752,7 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte *dot = '\0'; } + CHIP_ERROR result_err = CHIP_ERROR_INVALID_ADDRESS; if (address) { switch (address->proto) @@ -763,8 +763,8 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte memcpy(&addr4, &(address->data.ipv4), sizeof(addr4)); result.mAddress.SetValue(chip::Inet::IPAddress(addr4)); + result_err = CHIP_NO_ERROR; #else - result_err = CHIP_ERROR_INVALID_ADDRESS; ChipLogError(Discovery, "Ignoring IPv4 mDNS address."); #endif break; @@ -773,6 +773,7 @@ void MdnsAvahi::HandleResolve(AvahiServiceResolver * resolver, AvahiIfIndex inte memcpy(&addr6, &(address->data.ipv6), sizeof(addr6)); result.mAddress.SetValue(chip::Inet::IPAddress(addr6)); + result_err = CHIP_NO_ERROR; break; default: break; From 2282e973b114b8fea6036712607174f1163fa873 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Wed, 9 Mar 2022 13:48:35 -0800 Subject: [PATCH 18/43] Strongly Typed Bitmaps (#15697) --- .../all-clusters-app.matter | 44 ++- .../tests/partials/command_value.zapt | 2 +- .../tv-casting-common/tv-casting-app.matter | 36 ++- .../tests/suites/include/ConstraintsChecker.h | 12 + src/app/tests/suites/include/ValueChecker.h | 6 + .../util/attribute-storage-null-handling.h | 46 +++ .../zcl/data-model/chip/test-cluster.xml | 48 ++- .../data_model/controller-clusters.matter | 44 ++- .../CHIPAttributeTLVValueDecoder.cpp | 16 +- .../java/zap-generated/CHIPReadCallbacks.cpp | 24 +- .../java/zap-generated/CHIPReadCallbacks.h | 16 +- .../templates/CHIPCallbackBridge-src.zapt | 3 + .../CHIPCallbackBridge_internal.zapt | 6 + .../attribute_data_callback_name.zapt | 2 + .../CHIPAttributeTLVValueDecoder.mm | 16 +- .../CHIP/zap-generated/CHIPCallbackBridge.mm | 208 +++++++++++++ .../CHIPCallbackBridge_internal.h | 235 ++++++++++++++ .../CHIP/zap-generated/CHIPClustersObjc.h | 28 ++ .../CHIP/zap-generated/CHIPClustersObjc.mm | 280 ++++++++--------- .../zap-generated/attributes/Accessors.cpp | 88 +++--- .../zap-generated/attributes/Accessors.h | 55 ++-- .../app-common/zap-generated/cluster-enums.h | 36 +++ .../zap-generated/cluster-objects.h | 66 ++-- .../app-common/zap-generated/enums.h | 32 ++ .../zap-generated/cluster/Commands.h | 16 +- .../cluster/logging/DataModelLogger.cpp | 16 +- .../chip-tool/zap-generated/test/Commands.h | 288 ++++++++++-------- 27 files changed, 1243 insertions(+), 426 deletions(-) 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 index 9b2755b6c30801..0070684523029b 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -2816,6 +2816,34 @@ server cluster TestCluster = 1295 { kValueC = 3; } + bitmap Bitmap16MaskMap : BITMAP16 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000; + } + + bitmap Bitmap32MaskMap : BITMAP32 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40000000; + } + + bitmap Bitmap64MaskMap : BITMAP64 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000000000000000; + } + + bitmap Bitmap8MaskMap : BITMAP8 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40; + } + bitmap SimpleBitmap : BITMAP8 { kValueA = 0x1; kValueB = 0x2; @@ -2894,10 +2922,10 @@ server cluster TestCluster = 1295 { } attribute boolean boolean = 0; - attribute bitmap8 bitmap8 = 1; - attribute bitmap16 bitmap16 = 2; - attribute bitmap32 bitmap32 = 3; - attribute bitmap64 bitmap64 = 4; + attribute Bitmap8MaskMap bitmap8 = 1; + attribute Bitmap16MaskMap bitmap16 = 2; + attribute Bitmap32MaskMap bitmap32 = 3; + attribute Bitmap64MaskMap bitmap64 = 4; attribute int8u int8u = 5; attribute int16u int16u = 6; attribute int24u int24u = 7; @@ -2941,10 +2969,10 @@ server cluster TestCluster = 1295 { attribute boolean generalErrorBoolean = 49; attribute boolean clusterErrorBoolean = 50; attribute nullable boolean nullableBoolean = 32768; - attribute nullable bitmap8 nullableBitmap8 = 32769; - attribute nullable bitmap16 nullableBitmap16 = 32770; - attribute nullable bitmap32 nullableBitmap32 = 32771; - attribute nullable bitmap64 nullableBitmap64 = 32772; + attribute nullable Bitmap8MaskMap nullableBitmap8 = 32769; + attribute nullable Bitmap16MaskMap nullableBitmap16 = 32770; + attribute nullable Bitmap32MaskMap nullableBitmap32 = 32771; + attribute nullable Bitmap64MaskMap nullableBitmap64 = 32772; attribute nullable int8u nullableInt8u = 32773; attribute nullable int16u nullableInt16u = 32774; attribute nullable int24u nullableInt24u = 32775; diff --git a/examples/chip-tool/templates/tests/partials/command_value.zapt b/examples/chip-tool/templates/tests/partials/command_value.zapt index e5e7c2b0943c7c..edb0968522bdef 100644 --- a/examples/chip-tool/templates/tests/partials/command_value.zapt +++ b/examples/chip-tool/templates/tests/partials/command_value.zapt @@ -48,7 +48,7 @@ chip::ByteSpan(chip::Uint8::from_const_char("{{octetStringEscapedForCLiteral definedValue}}garbage: not in length on purpose"), {{definedValue.length}}); {{else}} {{#if_is_bitmap type}} - static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{definedValue}}); + static_cast<{{zapTypeToEncodableClusterObjectType type ns=ns}}>({{asTypedLiteral definedValue type}}); {{else if (chip_tests_config_has definedValue)}} m{{asUpperCamelCase definedValue}}.HasValue() ? m{{asUpperCamelCase definedValue}}.Value() : {{asTypedLiteral (chip_tests_config_get_default_value definedValue) (chip_tests_config_get_type definedValue)}}; {{else}} 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 index 9aee7904ef9d0a..5e404e835a5e0c 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -2416,6 +2416,34 @@ server cluster TestCluster = 1295 { kValueC = 3; } + bitmap Bitmap16MaskMap : BITMAP16 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000; + } + + bitmap Bitmap32MaskMap : BITMAP32 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40000000; + } + + bitmap Bitmap64MaskMap : BITMAP64 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000000000000000; + } + + bitmap Bitmap8MaskMap : BITMAP8 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40; + } + bitmap SimpleBitmap : BITMAP8 { kValueA = 0x1; kValueB = 0x2; @@ -2441,10 +2469,10 @@ server cluster TestCluster = 1295 { } attribute boolean boolean = 0; - attribute bitmap8 bitmap8 = 1; - attribute bitmap16 bitmap16 = 2; - attribute bitmap32 bitmap32 = 3; - attribute bitmap64 bitmap64 = 4; + attribute Bitmap8MaskMap bitmap8 = 1; + attribute Bitmap16MaskMap bitmap16 = 2; + attribute Bitmap32MaskMap bitmap32 = 3; + attribute Bitmap64MaskMap bitmap64 = 4; attribute int8u int8u = 5; attribute int16u int16u = 6; attribute int32u int32u = 8; diff --git a/src/app/tests/suites/include/ConstraintsChecker.h b/src/app/tests/suites/include/ConstraintsChecker.h index ae50c2d969650e..1dcb9a3c56c486 100644 --- a/src/app/tests/suites/include/ConstraintsChecker.h +++ b/src/app/tests/suites/include/ConstraintsChecker.h @@ -257,6 +257,18 @@ class ConstraintsChecker return true; } + template + bool CheckConstraintNotValue(const char * itemName, chip::BitFlags current, chip::BitFlags expected) + { + if (current == expected) + { + Exit(std::string(itemName) + " got unexpected value: " + std::to_string(current.Raw())); + return false; + } + + return true; + } + template bool CheckConstraintNotValue(const char * itemName, const chip::app::DataModel::Nullable & current, U expected) { diff --git a/src/app/tests/suites/include/ValueChecker.h b/src/app/tests/suites/include/ValueChecker.h index 8c6ea93e64a157..540546667a70d2 100644 --- a/src/app/tests/suites/include/ValueChecker.h +++ b/src/app/tests/suites/include/ValueChecker.h @@ -83,6 +83,12 @@ class ValueChecker return CheckValue(itemName, current.Raw(), expected); } + template + bool CheckValue(const char * itemName, chip::BitFlags current, chip::BitFlags expected) + { + return CheckValue(itemName, current.Raw(), expected.Raw()); + } + template bool CheckValuePresent(const char * itemName, const chip::Optional & value) { diff --git a/src/app/util/attribute-storage-null-handling.h b/src/app/util/attribute-storage-null-handling.h index 720bfa29f91514..000fa8cb40483d 100644 --- a/src/app/util/attribute-storage-null-handling.h +++ b/src/app/util/attribute-storage-null-handling.h @@ -21,6 +21,7 @@ #include #include +#include namespace chip { namespace app { @@ -125,6 +126,51 @@ struct NumericAttributeTraits static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return reinterpret_cast(&value); } }; +template +struct NumericAttributeTraits> +{ + using StorageType = T; + using WorkingType = BitFlags; + + static constexpr void WorkingToStorage(WorkingType workingValue, StorageType & storageValue) + { + storageValue = static_cast(workingValue.Raw()); + } + + static constexpr WorkingType StorageToWorking(StorageType storageValue) { return WorkingType(storageValue); } + + static constexpr void SetNull(StorageType & value) + { + // + // When setting to null, store a value that has all bits set. This aliases to the same behavior + // we do for other integral types, ensuring consistency across all underlying integral types in the data store as well as + // re-using logic for serialization/de-serialization of that data in the IM. + // + value = static_cast(std::numeric_limits>::max()); + } + + static constexpr bool IsNullValue(StorageType value) + { + // + // While we store a nullable bitmap value by setting all its bits, we can be a bit more conservative when actually + // testing for null since the spec only mandates that the MSB be reserved for nullable bitmaps. + // + constexpr auto msbSetValue = std::underlying_type_t(1) << (std::numeric_limits>::digits - 1); + return !!(std::underlying_type_t(value) & msbSetValue); + } + + static constexpr bool CanRepresentValue(bool isNullable, StorageType value) + { + // + // We permit the full-range of the underlying StorageType if !isNullable, + // and the restricted range otherwise. + // + return !isNullable || !IsNullValue(value); + } + + static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return reinterpret_cast(&value); } +}; + template <> struct NumericAttributeTraits { diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index 0debda612cfdbc..c14f1cb877411a 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -105,6 +105,38 @@ limitations under the License. array="true" optional="true"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CHIP Test Cluster @@ -113,10 +145,10 @@ limitations under the License. The Test Cluster is meant to validate the generated code boolean - bitmap8 - bitmap16 - bitmap32 - bitmap64 + bitmap8 + bitmap16 + bitmap32 + bitmap64 int8u int16u int24u @@ -168,10 +200,10 @@ limitations under the License. type="BOOLEAN" writable="true" optional="false">cluster_error_boolean nullable_boolean - nullable_bitmap8 - nullable_bitmap16 - nullable_bitmap32 - nullable_bitmap64 + nullable_bitmap8 + nullable_bitmap16 + nullable_bitmap32 + nullable_bitmap64 nullable_int8u nullable_int16u nullable_int24u diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index d9402ed8ebb13f..bd4334ae89d04e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -3279,6 +3279,34 @@ client cluster TestCluster = 1295 { kValueC = 3; } + bitmap Bitmap16MaskMap : BITMAP16 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000; + } + + bitmap Bitmap32MaskMap : BITMAP32 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40000000; + } + + bitmap Bitmap64MaskMap : BITMAP64 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x4000000000000000; + } + + bitmap Bitmap8MaskMap : BITMAP8 { + kMaskVal1 = 0x1; + kMaskVal2 = 0x2; + kMaskVal3 = 0x4; + kMaskVal4 = 0x40; + } + bitmap SimpleBitmap : BITMAP8 { kValueA = 0x1; kValueB = 0x2; @@ -3357,10 +3385,10 @@ client cluster TestCluster = 1295 { } attribute boolean boolean = 0; - attribute bitmap8 bitmap8 = 1; - attribute bitmap16 bitmap16 = 2; - attribute bitmap32 bitmap32 = 3; - attribute bitmap64 bitmap64 = 4; + attribute Bitmap8MaskMap bitmap8 = 1; + attribute Bitmap16MaskMap bitmap16 = 2; + attribute Bitmap32MaskMap bitmap32 = 3; + attribute Bitmap64MaskMap bitmap64 = 4; attribute int8u int8u = 5; attribute int16u int16u = 6; attribute int24u int24u = 7; @@ -3405,10 +3433,10 @@ client cluster TestCluster = 1295 { attribute boolean clusterErrorBoolean = 50; attribute boolean unsupported = 255; attribute nullable boolean nullableBoolean = 32768; - attribute nullable bitmap8 nullableBitmap8 = 32769; - attribute nullable bitmap16 nullableBitmap16 = 32770; - attribute nullable bitmap32 nullableBitmap32 = 32771; - attribute nullable bitmap64 nullableBitmap64 = 32772; + attribute nullable Bitmap8MaskMap nullableBitmap8 = 32769; + attribute nullable Bitmap16MaskMap nullableBitmap16 = 32770; + attribute nullable Bitmap32MaskMap nullableBitmap32 = 32771; + attribute nullable Bitmap64MaskMap nullableBitmap64 = 32772; attribute nullable int8u nullableInt8u = 32773; attribute nullable int16u nullableInt16u = 32774; attribute nullable int24u nullableInt24u = 32775; diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index fd7be76f1564a3..0f1188b2e1d185 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -11527,7 +11527,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::Bitmap16::Id: { @@ -11542,7 +11542,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::Bitmap32::Id: { @@ -11557,7 +11557,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::Bitmap64::Id: { @@ -11572,7 +11572,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue, value); + cppValue.Raw(), value); return value; } case Attributes::Int8u::Id: { @@ -13048,7 +13048,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + cppValue.Value().Raw(), value); } return value; } @@ -13070,7 +13070,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Integer"; std::string valueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + cppValue.Value().Raw(), value); } return value; } @@ -13092,7 +13092,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + cppValue.Value().Raw(), value); } return value; } @@ -13114,7 +13114,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR std::string valueClassName = "java/lang/Long"; std::string valueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - cppValue.Value(), value); + cppValue.Value().Raw(), value); } return value; } diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp index e73b9aeca48d6a..97656a3dd69e48 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.cpp @@ -18410,8 +18410,8 @@ CHIPTestClusterNullableBitmap8AttributeCallback::~CHIPTestClusterNullableBitmap8 env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18441,7 +18441,7 @@ void CHIPTestClusterNullableBitmap8AttributeCallback::CallbackFn(void * context, std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + value.Value().Raw(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -18477,8 +18477,8 @@ CHIPTestClusterNullableBitmap16AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18508,7 +18508,7 @@ void CHIPTestClusterNullableBitmap16AttributeCallback::CallbackFn(void * context std::string javaValueClassName = "java/lang/Integer"; std::string javaValueCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + value.Value().Raw(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -18544,8 +18544,8 @@ CHIPTestClusterNullableBitmap32AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18575,7 +18575,7 @@ void CHIPTestClusterNullableBitmap32AttributeCallback::CallbackFn(void * context std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + value.Value().Raw(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); @@ -18611,8 +18611,8 @@ CHIPTestClusterNullableBitmap64AttributeCallback::~CHIPTestClusterNullableBitmap env->DeleteGlobalRef(javaCallbackRef); } -void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::Nullable & value) +void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::Nullable> & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -18642,7 +18642,7 @@ void CHIPTestClusterNullableBitmap64AttributeCallback::CallbackFn(void * context std::string javaValueClassName = "java/lang/Long"; std::string javaValueCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject(javaValueClassName.c_str(), javaValueCtorSignature.c_str(), - value.Value(), javaValue); + value.Value().Raw(), javaValue); } env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); diff --git a/src/controller/java/zap-generated/CHIPReadCallbacks.h b/src/controller/java/zap-generated/CHIPReadCallbacks.h index 1bd5ff901f82a9..9518830a1eacdc 100644 --- a/src/controller/java/zap-generated/CHIPReadCallbacks.h +++ b/src/controller/java/zap-generated/CHIPReadCallbacks.h @@ -7368,7 +7368,9 @@ class CHIPTestClusterNullableBitmap8AttributeCallback } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -7398,7 +7400,9 @@ class CHIPTestClusterNullableBitmap16AttributeCallback } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -7428,7 +7432,9 @@ class CHIPTestClusterNullableBitmap32AttributeCallback } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( @@ -7458,7 +7464,9 @@ class CHIPTestClusterNullableBitmap64AttributeCallback } } - static void CallbackFn(void * context, const chip::app::DataModel::Nullable & value); + static void + CallbackFn(void * context, + const chip::app::DataModel::Nullable> & value); static void OnSubscriptionEstablished(void * context) { CHIP_ERROR err = chip::JniReferences::GetInstance().CallSubscriptionEstablished( diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt index c83769158ca2b1..9cad8988ca0745 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge-src.zapt @@ -46,6 +46,9 @@ {{#if_is_struct type}} {{#>CHIPCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/CHIPCallbackBridge}} {{/if_is_struct}} + {{#if_is_bitmap type}} + {{#>CHIPCallbackBridge ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/CHIPCallbackBridge}} + {{/if_is_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt index 06d6e8c7ed65f8..67f1b986f552a9 100644 --- a/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt +++ b/src/darwin/Framework/CHIP/templates/CHIPCallbackBridge_internal.zapt @@ -33,6 +33,9 @@ typedef void (*Nullable{{asUpperCamelCase parent.name}}Cluster{{asUpperCamelCase {{#if_is_struct type}} typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}StructAttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); {{/if_is_struct}} +{{#if_is_bitmap type}} +typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}AttributeCallback)(void *, {{zapTypeToDecodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}}); +{{/if_is_bitmap}} {{/unless}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} @@ -76,6 +79,9 @@ typedef void (*{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}StructAt {{#if_is_struct type}} {{#>CHIPCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}StructAttributeCallback{{/CHIPCallbackBridge}} {{/if_is_struct}} + {{#if_is_bitmap type}} + {{#>CHIPCallbackBridge header="1" ns=parent.name }}{{asUpperCamelCase ../../name}}{{asUpperCamelCase ../name}}AttributeCallback{{/CHIPCallbackBridge}} + {{/if_is_bitmap}} {{/if}} {{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt index 48845cc5f6a89d..f852aac380a31f 100644 --- a/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt +++ b/src/darwin/Framework/CHIP/templates/partials/attribute_data_callback_name.zapt @@ -6,6 +6,8 @@ less code to generate the callbacks on a per-attribute basis than a per-struct-type basis. ~}} {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Struct + {{~else if_is_bitmap type~}} + {{asUpperCamelCase parent.name}}{{asUpperCamelCase name}} {{~else~}} {{~#if isNullable}}Nullable{{/if~}} {{~#if (isStrEqual (asUpperCamelCase type) (asUpperCamelCase "vendor_id"))~}} diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm index aac2e2f2efe0ce..5330268f99c07d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPAttributeTLVValueDecoder.mm @@ -9598,7 +9598,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } case Attributes::Bitmap16::Id: { @@ -9609,7 +9609,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; return value; } case Attributes::Bitmap32::Id: { @@ -9620,7 +9620,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } case Attributes::Bitmap64::Id: { @@ -9631,7 +9631,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedLongLong:cppValue]; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Raw()]; return value; } case Attributes::Int8u::Id: { @@ -10463,7 +10463,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedChar:cppValue.Value()]; + value = [NSNumber numberWithUnsignedChar:cppValue.Value().Raw()]; } return value; } @@ -10478,7 +10478,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedShort:cppValue.Value().Raw()]; } return value; } @@ -10493,7 +10493,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; + value = [NSNumber numberWithUnsignedInt:cppValue.Value().Raw()]; } return value; } @@ -10508,7 +10508,7 @@ id CHIPDecodeAttributeValue(const ConcreteAttributePath & aPath, TLV::TLVReader if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; + value = [NSNumber numberWithUnsignedLongLong:cppValue.Value().Raw()]; } return value; } diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm index 8379e4ad22e85a..c16fbfaf47b22c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge.mm @@ -8512,6 +8512,102 @@ } } +void CHIPTestClusterBitmap8AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedChar:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterBitmap16AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedShort:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterBitmap32AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedInt:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterBitmap64AttributeCallbackBridge::OnSuccessFn( + void * context, chip::BitFlags value) +{ + NSNumber * _Nonnull objCValue; + objCValue = [NSNumber numberWithUnsignedLongLong:value.Raw()]; + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPTestClusterListInt8uListAttributeCallbackBridge::OnSuccessFn( void * context, const chip::app::DataModel::DecodableList & value) { @@ -9012,6 +9108,118 @@ } } +void CHIPTestClusterNullableBitmap8AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedChar:value.Value().Raw()]; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterNullableBitmap16AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedShort:value.Value().Raw()]; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterNullableBitmap32AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedInt:value.Value().Raw()]; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + +void CHIPTestClusterNullableBitmap64AttributeCallbackBridge::OnSuccessFn( + void * context, const chip::app::DataModel::Nullable> & value) +{ + NSNumber * _Nullable objCValue; + if (value.IsNull()) { + objCValue = nil; + } else { + objCValue = [NSNumber numberWithUnsignedLongLong:value.Value().Raw()]; + } + DispatchSuccess(context, objCValue); +}; + +void CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished(void * context) +{ + auto * self = static_cast(context); + if (!self->mQueue) { + return; + } + + if (self->mEstablishedHandler != nil) { + dispatch_async(self->mQueue, self->mEstablishedHandler); + // On failure, mEstablishedHandler will be cleaned up by our destructor, + // but we can clean it up earlier on successful subscription + // establishment. + self->mEstablishedHandler = nil; + } +} + void CHIPTestClusterNullableStructStructAttributeCallbackBridge::OnSuccessFn(void * context, const chip::app::DataModel::Nullable & value) { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h index 7ce6ad44dae0a9..0a9748496d1942 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCallbackBridge_internal.h @@ -568,8 +568,20 @@ typedef void (*GeneralCommissioningBasicCommissioningInfoStructAttributeCallback void *, const chip::app::Clusters::GeneralCommissioning::Structs::BasicCommissioningInfo::DecodableType &); typedef void (*MediaPlaybackSampledPositionStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); +typedef void (*TestClusterBitmap8AttributeCallback)(void *, chip::BitFlags); +typedef void (*TestClusterBitmap16AttributeCallback)(void *, chip::BitFlags); +typedef void (*TestClusterBitmap32AttributeCallback)(void *, chip::BitFlags); +typedef void (*TestClusterBitmap64AttributeCallback)(void *, chip::BitFlags); typedef void (*TestClusterStructAttrStructAttributeCallback)( void *, const chip::app::Clusters::TestCluster::Structs::SimpleStruct::DecodableType &); +typedef void (*TestClusterNullableBitmap8AttributeCallback)( + void *, const chip::app::DataModel::Nullable> &); +typedef void (*TestClusterNullableBitmap16AttributeCallback)( + void *, const chip::app::DataModel::Nullable> &); +typedef void (*TestClusterNullableBitmap32AttributeCallback)( + void *, const chip::app::DataModel::Nullable> &); +typedef void (*TestClusterNullableBitmap64AttributeCallback)( + void *, const chip::app::DataModel::Nullable> &); typedef void (*TestClusterNullableStructStructAttributeCallback)( void *, const chip::app::DataModel::Nullable &); @@ -6806,6 +6818,110 @@ class CHIPTemperatureMeasurementAttributeListListAttributeCallbackSubscriptionBr SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPTestClusterBitmap8AttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTestClusterBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::BitFlags value); +}; + +class CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap8AttributeCallbackBridge +{ +public: + CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterBitmap8AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterBitmap16AttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTestClusterBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::BitFlags value); +}; + +class CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap16AttributeCallbackBridge +{ +public: + CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterBitmap16AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterBitmap32AttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTestClusterBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::BitFlags value); +}; + +class CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap32AttributeCallbackBridge +{ +public: + CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterBitmap32AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterBitmap64AttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTestClusterBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void OnSuccessFn(void * context, chip::BitFlags value); +}; + +class CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge : public CHIPTestClusterBitmap64AttributeCallbackBridge +{ +public: + CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterBitmap64AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPTestClusterListInt8uListAttributeCallbackBridge : public CHIPCallbackBridge { public: @@ -7009,6 +7125,125 @@ class CHIPTestClusterListFabricScopedListAttributeCallbackSubscriptionBridge SubscriptionEstablishedHandler mEstablishedHandler; }; +class CHIPTestClusterNullableBitmap8AttributeCallbackBridge : public CHIPCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap8AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); +}; + +class CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge + : public CHIPTestClusterNullableBitmap8AttributeCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterNullableBitmap8AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterNullableBitmap16AttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap16AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); +}; + +class CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge + : public CHIPTestClusterNullableBitmap16AttributeCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterNullableBitmap16AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterNullableBitmap32AttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap32AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); +}; + +class CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge + : public CHIPTestClusterNullableBitmap32AttributeCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterNullableBitmap32AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + +class CHIPTestClusterNullableBitmap64AttributeCallbackBridge + : public CHIPCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap64AttributeCallbackBridge(dispatch_queue_t queue, ResponseHandler handler, CHIPActionBlock action, + bool keepAlive = false) : + CHIPCallbackBridge(queue, handler, action, OnSuccessFn, keepAlive){}; + + static void + OnSuccessFn(void * context, + const chip::app::DataModel::Nullable> & value); +}; + +class CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge + : public CHIPTestClusterNullableBitmap64AttributeCallbackBridge +{ +public: + CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge(dispatch_queue_t queue, ResponseHandler handler, + CHIPActionBlock action, + SubscriptionEstablishedHandler establishedHandler) : + CHIPTestClusterNullableBitmap64AttributeCallbackBridge(queue, handler, action, true), + mEstablishedHandler(establishedHandler) + {} + + static void OnSubscriptionEstablished(void * context); + +private: + SubscriptionEstablishedHandler mEstablishedHandler; +}; + class CHIPTestClusterNullableStructStructAttributeCallbackBridge : public CHIPCallbackBridge { diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h index fa1e74f3c6eb1b..b5c5cc998753ee 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.h @@ -13208,6 +13208,34 @@ typedef NS_ENUM(NSInteger, CHIPTestClusterSimple) { CHIPTestClusterSimpleValueC = 0x03, }; +typedef NS_OPTIONS(NSUInteger, CHIPTestClusterBitmap16MaskMap) { + CHIPTestClusterBitmap16MaskMapMaskVal1 = 0x1, + CHIPTestClusterBitmap16MaskMapMaskVal2 = 0x2, + CHIPTestClusterBitmap16MaskMapMaskVal3 = 0x4, + CHIPTestClusterBitmap16MaskMapMaskVal4 = 0x4000, +}; + +typedef NS_OPTIONS(NSUInteger, CHIPTestClusterBitmap32MaskMap) { + CHIPTestClusterBitmap32MaskMapMaskVal1 = 0x1, + CHIPTestClusterBitmap32MaskMapMaskVal2 = 0x2, + CHIPTestClusterBitmap32MaskMapMaskVal3 = 0x4, + CHIPTestClusterBitmap32MaskMapMaskVal4 = 0x40000000, +}; + +typedef NS_OPTIONS(NSUInteger, CHIPTestClusterBitmap64MaskMap) { + CHIPTestClusterBitmap64MaskMapMaskVal1 = 0x1, + CHIPTestClusterBitmap64MaskMapMaskVal2 = 0x2, + CHIPTestClusterBitmap64MaskMapMaskVal3 = 0x4, + CHIPTestClusterBitmap64MaskMapMaskVal4 = 0x4000000000000000, +}; + +typedef NS_OPTIONS(NSUInteger, CHIPTestClusterBitmap8MaskMap) { + CHIPTestClusterBitmap8MaskMapMaskVal1 = 0x1, + CHIPTestClusterBitmap8MaskMapMaskVal2 = 0x2, + CHIPTestClusterBitmap8MaskMapMaskVal3 = 0x4, + CHIPTestClusterBitmap8MaskMapMaskVal4 = 0x40, +}; + typedef NS_OPTIONS(NSUInteger, CHIPTestClusterSimpleBitmap) { CHIPTestClusterSimpleBitmapValueA = 0x1, CHIPTestClusterSimpleBitmapValueB = 0x2, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index 24c0eb8f998b97..c5af0a24a645a3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -36501,12 +36501,13 @@ new CHIPBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * - (void)readAttributeBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap8AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap8WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -36520,7 +36521,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36533,15 +36534,15 @@ - (void)subscribeAttributeBitmap8WithMinInterval:(NSNumber * _Nonnull)minInterva subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt8uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap8::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36553,7 +36554,7 @@ + (void)readAttributeBitmap8WithAttributeCache:(CHIPAttributeCacheContainer *)at queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap8AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TestCluster::Attributes::Bitmap8::TypeInfo; @@ -36562,7 +36563,7 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36575,12 +36576,13 @@ new CHIPInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * su - (void)readAttributeBitmap16WithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap16AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap16WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -36594,7 +36596,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; + cppValue = static_cast>(value.unsignedShortValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36607,15 +36609,15 @@ - (void)subscribeAttributeBitmap16WithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt16uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap16::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36627,7 +36629,7 @@ + (void)readAttributeBitmap16WithAttributeCache:(CHIPAttributeCacheContainer *)a queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap16AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TestCluster::Attributes::Bitmap16::TypeInfo; @@ -36636,7 +36638,7 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36649,12 +36651,13 @@ new CHIPInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeBitmap32WithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap32AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap32WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -36668,7 +36671,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedIntValue; + cppValue = static_cast>(value.unsignedIntValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36681,15 +36684,15 @@ - (void)subscribeAttributeBitmap32WithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt32uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap32::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36701,7 +36704,7 @@ + (void)readAttributeBitmap32WithAttributeCache:(CHIPAttributeCacheContainer *)a queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap32AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TestCluster::Attributes::Bitmap32::TypeInfo; @@ -36710,7 +36713,7 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -36723,12 +36726,13 @@ new CHIPInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s - (void)readAttributeBitmap64WithCompletionHandler:(void (^)( NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); - auto failureFn = Callback::FromCancelable(failure); - return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); - }); + new CHIPTestClusterBitmap64AttributeCallbackBridge( + self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; + auto successFn = Callback::FromCancelable(success); + auto failureFn = Callback::FromCancelable(failure); + return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); + }); } - (void)writeAttributeBitmap64WithValue:(NSNumber * _Nonnull)value completionHandler:(StatusCompletion)completionHandler @@ -36742,7 +36746,7 @@ new CHIPDefaultSuccessCallbackBridge( ListFreer listFreer; using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = static_cast>(value.unsignedLongLongValue); auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.WriteAttribute(cppValue, successFn->mContext, successFn->mCall, failureFn->mCall); @@ -36755,15 +36759,15 @@ - (void)subscribeAttributeBitmap64WithMinInterval:(NSNumber * _Nonnull)minInterv subscriptionEstablished:(SubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPInt64uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::Bitmap64::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -36775,7 +36779,7 @@ + (void)readAttributeBitmap64WithAttributeCache:(CHIPAttributeCacheContainer *)a queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + new CHIPTestClusterBitmap64AttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { if (attributeCacheContainer.cppAttributeCache) { chip::app::ConcreteAttributePath path; using TypeInfo = TestCluster::Attributes::Bitmap64::TypeInfo; @@ -36784,7 +36788,7 @@ new CHIPInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * s path.mAttributeId = TypeInfo::GetAttributeId(); TypeInfo::DecodableType value; CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); if (err == CHIP_NO_ERROR) { successFn->mCall(successFn->mContext, value); } @@ -40469,10 +40473,10 @@ new CHIPNullableBooleanAttributeCallbackBridge(queue, completionHandler, ^(Cance - (void)readAttributeNullableBitmap8WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40493,7 +40497,7 @@ new CHIPDefaultSuccessCallbackBridge( cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; + nonNullValue_0 = static_cast>(value.unsignedCharValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -40508,15 +40512,15 @@ - (void)subscribeAttributeNullableBitmap8WithMinInterval:(NSNumber * _Nonnull)mi reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt8uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap8::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt8uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap8AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40529,32 +40533,33 @@ + (void)readAttributeNullableBitmap8WithAttributeCache:(CHIPAttributeCacheContai completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt8uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap8AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap8::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap16WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40575,7 +40580,7 @@ new CHIPDefaultSuccessCallbackBridge( cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; + nonNullValue_0 = static_cast>(value.unsignedShortValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -40590,15 +40595,15 @@ - (void)subscribeAttributeNullableBitmap16WithMinInterval:(NSNumber * _Nonnull)m reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt16uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap16::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt16uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap16AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40611,32 +40616,33 @@ + (void)readAttributeNullableBitmap16WithAttributeCache:(CHIPAttributeCacheConta completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt16uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap16AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap16::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap32WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40657,7 +40663,7 @@ new CHIPDefaultSuccessCallbackBridge( cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedIntValue; + nonNullValue_0 = static_cast>(value.unsignedIntValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -40672,15 +40678,15 @@ - (void)subscribeAttributeNullableBitmap32WithMinInterval:(NSNumber * _Nonnull)m reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt32uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap32::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt32uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap32AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40693,32 +40699,33 @@ + (void)readAttributeNullableBitmap32WithAttributeCache:(CHIPAttributeCacheConta completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt32uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap32AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap32::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableBitmap64WithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge( + new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( self.callbackQueue, completionHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - auto successFn = Callback::FromCancelable(success); + auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); return self.cppCluster.ReadAttribute(successFn->mContext, successFn->mCall, failureFn->mCall); }); @@ -40739,7 +40746,7 @@ new CHIPDefaultSuccessCallbackBridge( cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedLongLongValue; + nonNullValue_0 = static_cast>(value.unsignedLongLongValue); } auto successFn = Callback::FromCancelable(success); auto failureFn = Callback::FromCancelable(failure); @@ -40754,15 +40761,15 @@ - (void)subscribeAttributeNullableBitmap64WithMinInterval:(NSNumber * _Nonnull)m reportHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - new CHIPNullableInt64uAttributeCallbackSubscriptionBridge( + new CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge( self.callbackQueue, reportHandler, ^(Cancelable * success, Cancelable * failure) { using TypeInfo = TestCluster::Attributes::NullableBitmap64::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 unsignedShortValue], [maxInterval unsignedShortValue], - CHIPNullableInt64uAttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, + CHIPTestClusterNullableBitmap64AttributeCallbackSubscriptionBridge::OnSubscriptionEstablished, params == nil || params.fabricFiltered == nil || [params.fabricFiltered boolValue], params != nil && params.keepPreviousSubscriptions != nil && [params.keepPreviousSubscriptions boolValue]); }, @@ -40775,23 +40782,24 @@ + (void)readAttributeNullableBitmap64WithAttributeCache:(CHIPAttributeCacheConta completionHandler: (void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - new CHIPNullableInt64uAttributeCallbackBridge(queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { - if (attributeCacheContainer.cppAttributeCache) { - chip::app::ConcreteAttributePath path; - using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; - path.mEndpointId = static_cast([endpoint unsignedShortValue]); - path.mClusterId = TypeInfo::GetClusterId(); - path.mAttributeId = TypeInfo::GetAttributeId(); - TypeInfo::DecodableType value; - CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); - auto successFn = Callback::FromCancelable(success); - if (err == CHIP_NO_ERROR) { - successFn->mCall(successFn->mContext, value); + new CHIPTestClusterNullableBitmap64AttributeCallbackBridge( + queue, completionHandler, ^(Cancelable * success, Cancelable * failure) { + if (attributeCacheContainer.cppAttributeCache) { + chip::app::ConcreteAttributePath path; + using TypeInfo = TestCluster::Attributes::NullableBitmap64::TypeInfo; + path.mEndpointId = static_cast([endpoint unsignedShortValue]); + path.mClusterId = TypeInfo::GetClusterId(); + path.mAttributeId = TypeInfo::GetAttributeId(); + TypeInfo::DecodableType value; + CHIP_ERROR err = attributeCacheContainer.cppAttributeCache->Get(path, value); + auto successFn = Callback::FromCancelable(success); + if (err == CHIP_NO_ERROR) { + successFn->mCall(successFn->mContext, value); + } + return err; } - return err; - } - return CHIP_ERROR_NOT_FOUND; - }); + return CHIP_ERROR_NOT_FOUND; + }); } - (void)readAttributeNullableInt8uWithCompletionHandler:(void (^)( 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 4a87e6a0e990e7..014cec69b4c5b3 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 @@ -31626,9 +31626,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value) namespace Bitmap8 { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -31640,9 +31640,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -31657,9 +31657,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) namespace Bitmap16 { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -31671,9 +31671,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -31688,9 +31688,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace Bitmap32 { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -31702,9 +31702,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -31719,9 +31719,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) namespace Bitmap64 { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::BitFlags * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -31733,9 +31733,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -32915,9 +32915,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap8 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -32932,9 +32933,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -32947,14 +32948,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -32968,9 +32970,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap16 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -32985,9 +32988,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33000,14 +33003,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -33021,9 +33025,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap32 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33038,9 +33043,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33053,14 +33058,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { @@ -33074,9 +33080,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl namespace NullableBitmap64 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadServerAttribute(endpoint, Clusters::TestCluster::Id, Id, readable, sizeof(temp)); @@ -33091,9 +33098,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -33106,14 +33113,15 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); return emberAfWriteServerAttribute(endpoint, Clusters::TestCluster::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) { 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 32db1883d7e531..7928ae7778d7b5 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 @@ -5554,23 +5554,27 @@ EmberAfStatus Set(chip::EndpointId endpoint, bool value); } // namespace Boolean namespace Bitmap8 { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitFlags * value); // Bitmap8MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); } // namespace Bitmap8 namespace Bitmap16 { -EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitFlags * value); // Bitmap16MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); } // namespace Bitmap16 namespace Bitmap32 { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitFlags * value); // Bitmap32MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); } // namespace Bitmap32 namespace Bitmap64 { -EmberAfStatus Get(chip::EndpointId endpoint, uint64_t * value); // bitmap64 -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitFlags * value); // Bitmap64MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); } // namespace Bitmap64 namespace Int8u { @@ -5761,31 +5765,42 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl } // namespace NullableBoolean namespace NullableBitmap8 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap8 -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap8MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap8 namespace NullableBitmap16 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap16 -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap16MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap16 namespace NullableBitmap32 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap32 -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap32MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap32 namespace NullableBitmap64 { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // bitmap64 -EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value); +EmberAfStatus +Get(chip::EndpointId endpoint, + DataModel::Nullable> & value); // Bitmap64MaskMap +EmberAfStatus Set(chip::EndpointId endpoint, chip::BitFlags value); EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable> & value); } // namespace NullableBitmap64 namespace NullableInt8u { diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h index 56067b0fbe4dfc..2471223302da32 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums.h @@ -2296,6 +2296,42 @@ enum class SimpleEnum : uint8_t kValueC = 0x03, }; +// Bitmap for Bitmap16MaskMap +enum class Bitmap16MaskMap : uint16_t +{ + kMaskVal1 = 0x1, + kMaskVal2 = 0x2, + kMaskVal3 = 0x4, + kMaskVal4 = 0x4000, +}; + +// Bitmap for Bitmap32MaskMap +enum class Bitmap32MaskMap : uint32_t +{ + kMaskVal1 = 0x1, + kMaskVal2 = 0x2, + kMaskVal3 = 0x4, + kMaskVal4 = 0x40000000, +}; + +// Bitmap for Bitmap64MaskMap +enum class Bitmap64MaskMap : uint64_t +{ + kMaskVal1 = 0x1, + kMaskVal2 = 0x2, + kMaskVal3 = 0x4, + kMaskVal4 = 0x4000000000000000, +}; + +// Bitmap for Bitmap8MaskMap +enum class Bitmap8MaskMap : uint8_t +{ + kMaskVal1 = 0x1, + kMaskVal2 = 0x2, + kMaskVal3 = 0x4, + kMaskVal4 = 0x40, +}; + // Bitmap for SimpleBitmap enum class SimpleBitmap : uint8_t { 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 538f052bbddb03..469f09794dbff3 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 @@ -36722,9 +36722,9 @@ struct TypeInfo namespace Bitmap8 { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::BitFlags; + using DecodableType = chip::BitFlags; + using DecodableArgType = chip::BitFlags; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap8::Id; } @@ -36734,9 +36734,9 @@ struct TypeInfo namespace Bitmap16 { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitFlags; + using DecodableType = chip::BitFlags; + using DecodableArgType = chip::BitFlags; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap16::Id; } @@ -36746,9 +36746,9 @@ struct TypeInfo namespace Bitmap32 { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = chip::BitFlags; + using DecodableType = chip::BitFlags; + using DecodableArgType = chip::BitFlags; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap32::Id; } @@ -36758,9 +36758,9 @@ struct TypeInfo namespace Bitmap64 { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = chip::BitFlags; + using DecodableType = chip::BitFlags; + using DecodableArgType = chip::BitFlags; static constexpr ClusterId GetClusterId() { return Clusters::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::Bitmap64::Id; } @@ -37308,9 +37308,10 @@ struct TypeInfo namespace NullableBitmap8 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap8::Id; } @@ -37320,9 +37321,10 @@ struct TypeInfo namespace NullableBitmap16 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap16::Id; } @@ -37332,9 +37334,10 @@ struct TypeInfo namespace NullableBitmap32 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap32::Id; } @@ -37344,9 +37347,10 @@ struct TypeInfo namespace NullableBitmap64 { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::TestCluster::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::NullableBitmap64::Id; } @@ -37761,11 +37765,15 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Boolean::TypeInfo::DecodableType boolean = static_cast(0); - Attributes::Bitmap8::TypeInfo::DecodableType bitmap8 = static_cast(0); - Attributes::Bitmap16::TypeInfo::DecodableType bitmap16 = static_cast(0); - Attributes::Bitmap32::TypeInfo::DecodableType bitmap32 = static_cast(0); - Attributes::Bitmap64::TypeInfo::DecodableType bitmap64 = static_cast(0); + Attributes::Boolean::TypeInfo::DecodableType boolean = static_cast(0); + Attributes::Bitmap8::TypeInfo::DecodableType bitmap8 = + static_cast>(0); + Attributes::Bitmap16::TypeInfo::DecodableType bitmap16 = + static_cast>(0); + Attributes::Bitmap32::TypeInfo::DecodableType bitmap32 = + static_cast>(0); + Attributes::Bitmap64::TypeInfo::DecodableType bitmap64 = + static_cast>(0); Attributes::Int8u::TypeInfo::DecodableType int8u = static_cast(0); Attributes::Int16u::TypeInfo::DecodableType int16u = static_cast(0); Attributes::Int24u::TypeInfo::DecodableType int24u = 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 27d671b181d6f5..5a0bdf956c7cef 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -467,6 +467,38 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_BARRIER_CONTROL_SAFETY_STATUS_POSITION_FAILURE_OFFSET (3) #define EMBER_AF_BATTERY_ALARM_MASK_VOLTAGE_TOO_LOW (1) #define EMBER_AF_BATTERY_ALARM_MASK_VOLTAGE_TOO_LOW_OFFSET (0) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL1 (1) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL1_OFFSET (0) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL2 (2) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL2_OFFSET (1) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL3 (4) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL3_OFFSET (2) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL4 (16384) +#define EMBER_AF_BITMAP16_MASK_MAP_MASK_VAL4_OFFSET (14) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL1 (1) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL1_OFFSET (0) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL2 (2) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL2_OFFSET (1) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL3 (4) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL3_OFFSET (2) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL4 (1073741824) +#define EMBER_AF_BITMAP32_MASK_MAP_MASK_VAL4_OFFSET (30) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL1 (1) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL1_OFFSET (0) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL2 (2) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL2_OFFSET (1) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL3 (4) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL3_OFFSET (2) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL4 (4611686018427388000) +#define EMBER_AF_BITMAP64_MASK_MAP_MASK_VAL4_OFFSET (62) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL1 (1) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL1_OFFSET (0) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL2 (2) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL2_OFFSET (1) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL3 (4) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL3_OFFSET (2) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL4 (64) +#define EMBER_AF_BITMAP8_MASK_MAP_MASK_VAL4_OFFSET (6) #define EMBER_AF_CHANNEL_FEATURE_CHANNEL_LIST (1) #define EMBER_AF_CHANNEL_FEATURE_CHANNEL_LIST_OFFSET (0) #define EMBER_AF_CHANNEL_FEATURE_LINEUP_INFO (2) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 081cf702a8c999..ad487efd602276 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -16151,7 +16151,7 @@ class WriteTestClusterBitmap8 : public WriteAttribute } private: - uint8_t mValue; + chip::BitFlags mValue; }; class WriteTestClusterBitmap16 : public WriteAttribute @@ -16177,7 +16177,7 @@ class WriteTestClusterBitmap16 : public WriteAttribute } private: - uint16_t mValue; + chip::BitFlags mValue; }; class WriteTestClusterBitmap32 : public WriteAttribute @@ -16203,7 +16203,7 @@ class WriteTestClusterBitmap32 : public WriteAttribute } private: - uint32_t mValue; + chip::BitFlags mValue; }; class WriteTestClusterBitmap64 : public WriteAttribute @@ -16229,7 +16229,7 @@ class WriteTestClusterBitmap64 : public WriteAttribute } private: - uint64_t mValue; + chip::BitFlags mValue; }; class WriteTestClusterInt8u : public WriteAttribute @@ -17428,7 +17428,7 @@ class WriteTestClusterNullableBitmap8 : public WriteAttribute } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap16 : public WriteAttribute @@ -17455,7 +17455,7 @@ class WriteTestClusterNullableBitmap16 : public WriteAttribute } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap32 : public WriteAttribute @@ -17482,7 +17482,7 @@ class WriteTestClusterNullableBitmap32 : public WriteAttribute } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableBitmap64 : public WriteAttribute @@ -17509,7 +17509,7 @@ class WriteTestClusterNullableBitmap64 : public WriteAttribute } private: - chip::app::DataModel::Nullable mValue; + chip::app::DataModel::Nullable> mValue; }; class WriteTestClusterNullableInt8u : public WriteAttribute diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index b0f44914d734a8..603932a4b073dc 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -8464,22 +8464,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("boolean", 1, value); } case TestCluster::Attributes::Bitmap8::Id: { - uint8_t value; + chip::BitFlags value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap8", 1, value); } case TestCluster::Attributes::Bitmap16::Id: { - uint16_t value; + chip::BitFlags value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap16", 1, value); } case TestCluster::Attributes::Bitmap32::Id: { - uint32_t value; + chip::BitFlags value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap32", 1, value); } case TestCluster::Attributes::Bitmap64::Id: { - uint64_t value; + chip::BitFlags value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("bitmap64", 1, value); } @@ -8707,22 +8707,22 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP return DataModelLogger::LogValue("nullable_boolean", 1, value); } case TestCluster::Attributes::NullableBitmap8::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap8", 1, value); } case TestCluster::Attributes::NullableBitmap16::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap16", 1, value); } case TestCluster::Attributes::NullableBitmap32::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap32", 1, value); } case TestCluster::Attributes::NullableBitmap64::Id: { - chip::app::DataModel::Nullable value; + chip::app::DataModel::Nullable> value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("nullable_bitmap64", 1, value); } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 021a9f8bb6627e..a2eecf03d9d76c 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -65803,7 +65803,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, uint8_t bitmap8) + static void OnSuccessCallback_11(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_11(bitmap8); } @@ -65820,7 +65820,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_13(error); } - static void OnSuccessCallback_13(void * context, uint8_t bitmap8) + static void OnSuccessCallback_13(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_13(bitmap8); } @@ -65837,7 +65837,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_15(error); } - static void OnSuccessCallback_15(void * context, uint8_t bitmap8) + static void OnSuccessCallback_15(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_15(bitmap8); } @@ -65847,7 +65847,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_16(error); } - static void OnSuccessCallback_16(void * context, uint16_t bitmap16) + static void OnSuccessCallback_16(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_16(bitmap16); } @@ -65864,7 +65864,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_18(error); } - static void OnSuccessCallback_18(void * context, uint16_t bitmap16) + static void OnSuccessCallback_18(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_18(bitmap16); } @@ -65881,7 +65881,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_20(error); } - static void OnSuccessCallback_20(void * context, uint16_t bitmap16) + static void OnSuccessCallback_20(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_20(bitmap16); } @@ -65891,7 +65891,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_21(error); } - static void OnSuccessCallback_21(void * context, uint32_t bitmap32) + static void OnSuccessCallback_21(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_21(bitmap32); } @@ -65908,7 +65908,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_23(error); } - static void OnSuccessCallback_23(void * context, uint32_t bitmap32) + static void OnSuccessCallback_23(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_23(bitmap32); } @@ -65925,7 +65925,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_25(error); } - static void OnSuccessCallback_25(void * context, uint32_t bitmap32) + static void OnSuccessCallback_25(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_25(bitmap32); } @@ -65935,7 +65935,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_26(error); } - static void OnSuccessCallback_26(void * context, uint64_t bitmap64) + static void OnSuccessCallback_26(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_26(bitmap64); } @@ -65952,7 +65952,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_28(error); } - static void OnSuccessCallback_28(void * context, uint64_t bitmap64) + static void OnSuccessCallback_28(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_28(bitmap64); } @@ -65969,7 +65969,7 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_30(error); } - static void OnSuccessCallback_30(void * context, uint64_t bitmap64) + static void OnSuccessCallback_30(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_30(bitmap64); } @@ -67143,7 +67143,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_184(error); } - static void OnSuccessCallback_184(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_184( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_184(nullableBitmap8); } @@ -67160,7 +67162,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_186(error); } - static void OnSuccessCallback_186(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_186( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_186(nullableBitmap8); } @@ -67177,7 +67181,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_188(error); } - static void OnSuccessCallback_188(void * context, const chip::app::DataModel::Nullable & nullableBitmap8) + static void OnSuccessCallback_188( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap8) { (static_cast(context))->OnSuccessResponse_188(nullableBitmap8); } @@ -67194,7 +67200,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_190(error); } - static void OnSuccessCallback_190(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_190( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_190(nullableBitmap16); } @@ -67211,7 +67219,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_192(error); } - static void OnSuccessCallback_192(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_192( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_192(nullableBitmap16); } @@ -67228,7 +67238,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_194(error); } - static void OnSuccessCallback_194(void * context, const chip::app::DataModel::Nullable & nullableBitmap16) + static void OnSuccessCallback_194( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap16) { (static_cast(context))->OnSuccessResponse_194(nullableBitmap16); } @@ -67245,7 +67257,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_196(error); } - static void OnSuccessCallback_196(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_196( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_196(nullableBitmap32); } @@ -67262,7 +67276,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_198(error); } - static void OnSuccessCallback_198(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_198( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_198(nullableBitmap32); } @@ -67279,7 +67295,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_200(error); } - static void OnSuccessCallback_200(void * context, const chip::app::DataModel::Nullable & nullableBitmap32) + static void OnSuccessCallback_200( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap32) { (static_cast(context))->OnSuccessResponse_200(nullableBitmap32); } @@ -67296,7 +67314,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_202(error); } - static void OnSuccessCallback_202(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_202( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_202(nullableBitmap64); } @@ -67313,7 +67333,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_204(error); } - static void OnSuccessCallback_204(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_204( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_204(nullableBitmap64); } @@ -67330,7 +67352,9 @@ class TestClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_206(error); } - static void OnSuccessCallback_206(void * context, const chip::app::DataModel::Nullable & nullableBitmap64) + static void OnSuccessCallback_206( + void * context, + const chip::app::DataModel::Nullable> & nullableBitmap64) { (static_cast(context))->OnSuccessResponse_206(nullableBitmap64); } @@ -70001,7 +70025,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_11(uint8_t bitmap8) + void OnSuccessResponse_11(chip::BitFlags bitmap8) { VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); @@ -70014,8 +70038,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t bitmap8Argument; - bitmap8Argument = 255; + chip::BitFlags bitmap8Argument; + bitmap8Argument = static_cast>(255); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap8Argument, this, OnSuccessCallback_12, OnFailureCallback_12)); @@ -70047,7 +70071,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_13(uint8_t bitmap8) + void OnSuccessResponse_13(chip::BitFlags bitmap8) { VerifyOrReturn(CheckValue("bitmap8", bitmap8, 255)); @@ -70060,8 +70084,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t bitmap8Argument; - bitmap8Argument = 0; + chip::BitFlags bitmap8Argument; + bitmap8Argument = static_cast>(0); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap8Argument, this, OnSuccessCallback_14, OnFailureCallback_14)); @@ -70093,7 +70117,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_15(uint8_t bitmap8) + void OnSuccessResponse_15(chip::BitFlags bitmap8) { VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); @@ -70117,7 +70141,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_16(uint16_t bitmap16) + void OnSuccessResponse_16(chip::BitFlags bitmap16) { VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); @@ -70130,8 +70154,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t bitmap16Argument; - bitmap16Argument = 65535U; + chip::BitFlags bitmap16Argument; + bitmap16Argument = static_cast>(65535U); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap16Argument, this, OnSuccessCallback_17, OnFailureCallback_17)); @@ -70163,7 +70187,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_18(uint16_t bitmap16) + void OnSuccessResponse_18(chip::BitFlags bitmap16) { VerifyOrReturn(CheckValue("bitmap16", bitmap16, 65535U)); @@ -70176,8 +70200,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t bitmap16Argument; - bitmap16Argument = 0U; + chip::BitFlags bitmap16Argument; + bitmap16Argument = static_cast>(0U); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap16Argument, this, OnSuccessCallback_19, OnFailureCallback_19)); @@ -70209,7 +70233,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_20(uint16_t bitmap16) + void OnSuccessResponse_20(chip::BitFlags bitmap16) { VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); @@ -70233,7 +70257,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_21(uint32_t bitmap32) + void OnSuccessResponse_21(chip::BitFlags bitmap32) { VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); @@ -70246,8 +70270,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t bitmap32Argument; - bitmap32Argument = 4294967295UL; + chip::BitFlags bitmap32Argument; + bitmap32Argument = static_cast>(4294967295UL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap32Argument, this, OnSuccessCallback_22, OnFailureCallback_22)); @@ -70279,7 +70303,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_23(uint32_t bitmap32) + void OnSuccessResponse_23(chip::BitFlags bitmap32) { VerifyOrReturn(CheckValue("bitmap32", bitmap32, 4294967295UL)); @@ -70292,8 +70316,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t bitmap32Argument; - bitmap32Argument = 0UL; + chip::BitFlags bitmap32Argument; + bitmap32Argument = static_cast>(0UL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap32Argument, this, OnSuccessCallback_24, OnFailureCallback_24)); @@ -70325,7 +70349,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_25(uint32_t bitmap32) + void OnSuccessResponse_25(chip::BitFlags bitmap32) { VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); @@ -70349,7 +70373,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_26(uint64_t bitmap64) + void OnSuccessResponse_26(chip::BitFlags bitmap64) { VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); @@ -70362,8 +70386,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t bitmap64Argument; - bitmap64Argument = 18446744073709551615ULL; + chip::BitFlags bitmap64Argument; + bitmap64Argument = static_cast>(18446744073709551615ULL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap64Argument, this, OnSuccessCallback_27, OnFailureCallback_27)); @@ -70395,7 +70419,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_28(uint64_t bitmap64) + void OnSuccessResponse_28(chip::BitFlags bitmap64) { VerifyOrReturn(CheckValue("bitmap64", bitmap64, 18446744073709551615ULL)); @@ -70408,8 +70432,8 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t bitmap64Argument; - bitmap64Argument = 0ULL; + chip::BitFlags bitmap64Argument; + bitmap64Argument = static_cast>(0ULL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap64Argument, this, OnSuccessCallback_29, OnFailureCallback_29)); @@ -70441,7 +70465,7 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_30(uint64_t bitmap64) + void OnSuccessResponse_30(chip::BitFlags bitmap64) { VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); @@ -74988,9 +75012,9 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; + chip::app::DataModel::Nullable> nullableBitmap8Argument; nullableBitmap8Argument.SetNonNull(); - nullableBitmap8Argument.Value() = 254; + nullableBitmap8Argument.Value() = static_cast>(254); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap8Argument, this, OnSuccessCallback_183, OnFailureCallback_183)); @@ -75022,7 +75046,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_184(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_184( + const chip::app::DataModel::Nullable> & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -75036,9 +75061,9 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; + chip::app::DataModel::Nullable> nullableBitmap8Argument; nullableBitmap8Argument.SetNonNull(); - nullableBitmap8Argument.Value() = 255; + nullableBitmap8Argument.Value() = static_cast>(255); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap8Argument, this, OnSuccessCallback_185, OnFailureCallback_185)); @@ -75071,7 +75096,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_186(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_186( + const chip::app::DataModel::Nullable> & nullableBitmap8) { VerifyOrReturn(CheckValueNonNull("nullableBitmap8", nullableBitmap8)); VerifyOrReturn(CheckValue("nullableBitmap8.Value()", nullableBitmap8.Value(), 254)); @@ -75085,7 +75111,7 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap8Argument; + chip::app::DataModel::Nullable> nullableBitmap8Argument; nullableBitmap8Argument.SetNull(); ReturnErrorOnFailure(cluster.WriteAttribute( @@ -75118,7 +75144,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_188(const chip::app::DataModel::Nullable & nullableBitmap8) + void OnSuccessResponse_188( + const chip::app::DataModel::Nullable> & nullableBitmap8) { VerifyOrReturn(CheckValueNull("nullableBitmap8", nullableBitmap8)); @@ -75131,9 +75158,9 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; + chip::app::DataModel::Nullable> nullableBitmap16Argument; nullableBitmap16Argument.SetNonNull(); - nullableBitmap16Argument.Value() = 65534U; + nullableBitmap16Argument.Value() = static_cast>(65534U); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap16Argument, this, OnSuccessCallback_189, OnFailureCallback_189)); @@ -75165,7 +75192,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_190(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_190( + const chip::app::DataModel::Nullable> & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -75179,9 +75207,9 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; + chip::app::DataModel::Nullable> nullableBitmap16Argument; nullableBitmap16Argument.SetNonNull(); - nullableBitmap16Argument.Value() = 65535U; + nullableBitmap16Argument.Value() = static_cast>(65535U); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap16Argument, this, OnSuccessCallback_191, OnFailureCallback_191)); @@ -75214,7 +75242,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_192(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_192( + const chip::app::DataModel::Nullable> & nullableBitmap16) { VerifyOrReturn(CheckValueNonNull("nullableBitmap16", nullableBitmap16)); VerifyOrReturn(CheckValue("nullableBitmap16.Value()", nullableBitmap16.Value(), 65534U)); @@ -75228,7 +75257,7 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap16Argument; + chip::app::DataModel::Nullable> nullableBitmap16Argument; nullableBitmap16Argument.SetNull(); ReturnErrorOnFailure(cluster.WriteAttribute( @@ -75261,7 +75290,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_194(const chip::app::DataModel::Nullable & nullableBitmap16) + void OnSuccessResponse_194( + const chip::app::DataModel::Nullable> & nullableBitmap16) { VerifyOrReturn(CheckValueNull("nullableBitmap16", nullableBitmap16)); @@ -75274,9 +75304,10 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap32Argument; + chip::app::DataModel::Nullable> nullableBitmap32Argument; nullableBitmap32Argument.SetNonNull(); - nullableBitmap32Argument.Value() = 4294967294UL; + nullableBitmap32Argument.Value() = + static_cast>(4294967294UL); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap32Argument, this, OnSuccessCallback_195, OnFailureCallback_195)); @@ -75308,7 +75339,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_196(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_196( + const chip::app::DataModel::Nullable> & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -75322,9 +75354,10 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap32Argument; + chip::app::DataModel::Nullable> nullableBitmap32Argument; nullableBitmap32Argument.SetNonNull(); - nullableBitmap32Argument.Value() = 4294967295UL; + nullableBitmap32Argument.Value() = + static_cast>(4294967295UL); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap32Argument, this, OnSuccessCallback_197, OnFailureCallback_197)); @@ -75357,7 +75390,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_198(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_198( + const chip::app::DataModel::Nullable> & nullableBitmap32) { VerifyOrReturn(CheckValueNonNull("nullableBitmap32", nullableBitmap32)); VerifyOrReturn(CheckValue("nullableBitmap32.Value()", nullableBitmap32.Value(), 4294967294UL)); @@ -75371,7 +75405,7 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap32Argument; + chip::app::DataModel::Nullable> nullableBitmap32Argument; nullableBitmap32Argument.SetNull(); ReturnErrorOnFailure(cluster.WriteAttribute( @@ -75404,7 +75438,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_200(const chip::app::DataModel::Nullable & nullableBitmap32) + void OnSuccessResponse_200( + const chip::app::DataModel::Nullable> & nullableBitmap32) { VerifyOrReturn(CheckValueNull("nullableBitmap32", nullableBitmap32)); @@ -75417,9 +75452,10 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap64Argument; + chip::app::DataModel::Nullable> nullableBitmap64Argument; nullableBitmap64Argument.SetNonNull(); - nullableBitmap64Argument.Value() = 18446744073709551614ULL; + nullableBitmap64Argument.Value() = + static_cast>(18446744073709551614ULL); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap64Argument, this, OnSuccessCallback_201, OnFailureCallback_201)); @@ -75451,7 +75487,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_202(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_202( + const chip::app::DataModel::Nullable> & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -75465,9 +75502,10 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap64Argument; + chip::app::DataModel::Nullable> nullableBitmap64Argument; nullableBitmap64Argument.SetNonNull(); - nullableBitmap64Argument.Value() = 18446744073709551615ULL; + nullableBitmap64Argument.Value() = + static_cast>(18446744073709551615ULL); ReturnErrorOnFailure(cluster.WriteAttribute( nullableBitmap64Argument, this, OnSuccessCallback_203, OnFailureCallback_203)); @@ -75500,7 +75538,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_204(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_204( + const chip::app::DataModel::Nullable> & nullableBitmap64) { VerifyOrReturn(CheckValueNonNull("nullableBitmap64", nullableBitmap64)); VerifyOrReturn(CheckValue("nullableBitmap64.Value()", nullableBitmap64.Value(), 18446744073709551614ULL)); @@ -75514,7 +75553,7 @@ class TestClusterSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - chip::app::DataModel::Nullable nullableBitmap64Argument; + chip::app::DataModel::Nullable> nullableBitmap64Argument; nullableBitmap64Argument.SetNull(); ReturnErrorOnFailure(cluster.WriteAttribute( @@ -75547,7 +75586,8 @@ class TestClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_206(const chip::app::DataModel::Nullable & nullableBitmap64) + void OnSuccessResponse_206( + const chip::app::DataModel::Nullable> & nullableBitmap64) { VerifyOrReturn(CheckValueNull("nullableBitmap64", nullableBitmap64)); @@ -85186,10 +85226,10 @@ class TestSaveAsSuite : public TestCommand uint8_t TestAddArgumentDefaultValue; bool readAttributeBooleanDefaultValue; - uint8_t readAttributeBitmap8DefaultValue; - uint16_t readAttributeBitmap16DefaultValue; - uint32_t readAttributeBitmap32DefaultValue; - uint64_t readAttributeBitmap64DefaultValue; + chip::BitFlags readAttributeBitmap8DefaultValue; + chip::BitFlags readAttributeBitmap16DefaultValue; + chip::BitFlags readAttributeBitmap32DefaultValue; + chip::BitFlags readAttributeBitmap64DefaultValue; uint8_t readAttributeInt8uDefaultValue; uint16_t readAttributeInt16uDefaultValue; uint32_t readAttributeInt32uDefaultValue; @@ -85269,7 +85309,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_9(error); } - static void OnSuccessCallback_9(void * context, uint8_t bitmap8) + static void OnSuccessCallback_9(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_9(bitmap8); } @@ -85286,7 +85326,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_11(error); } - static void OnSuccessCallback_11(void * context, uint8_t bitmap8) + static void OnSuccessCallback_11(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_11(bitmap8); } @@ -85303,7 +85343,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_13(error); } - static void OnSuccessCallback_13(void * context, uint8_t bitmap8) + static void OnSuccessCallback_13(void * context, chip::BitFlags bitmap8) { (static_cast(context))->OnSuccessResponse_13(bitmap8); } @@ -85313,7 +85353,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_14(error); } - static void OnSuccessCallback_14(void * context, uint16_t bitmap16) + static void OnSuccessCallback_14(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_14(bitmap16); } @@ -85330,7 +85370,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_16(error); } - static void OnSuccessCallback_16(void * context, uint16_t bitmap16) + static void OnSuccessCallback_16(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_16(bitmap16); } @@ -85347,7 +85387,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_18(error); } - static void OnSuccessCallback_18(void * context, uint16_t bitmap16) + static void OnSuccessCallback_18(void * context, chip::BitFlags bitmap16) { (static_cast(context))->OnSuccessResponse_18(bitmap16); } @@ -85357,7 +85397,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_19(error); } - static void OnSuccessCallback_19(void * context, uint32_t bitmap32) + static void OnSuccessCallback_19(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_19(bitmap32); } @@ -85374,7 +85414,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_21(error); } - static void OnSuccessCallback_21(void * context, uint32_t bitmap32) + static void OnSuccessCallback_21(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_21(bitmap32); } @@ -85391,7 +85431,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_23(error); } - static void OnSuccessCallback_23(void * context, uint32_t bitmap32) + static void OnSuccessCallback_23(void * context, chip::BitFlags bitmap32) { (static_cast(context))->OnSuccessResponse_23(bitmap32); } @@ -85401,7 +85441,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_24(error); } - static void OnSuccessCallback_24(void * context, uint64_t bitmap64) + static void OnSuccessCallback_24(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_24(bitmap64); } @@ -85418,7 +85458,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_26(error); } - static void OnSuccessCallback_26(void * context, uint64_t bitmap64) + static void OnSuccessCallback_26(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_26(bitmap64); } @@ -85435,7 +85475,7 @@ class TestSaveAsSuite : public TestCommand (static_cast(context))->OnFailureResponse_28(error); } - static void OnSuccessCallback_28(void * context, uint64_t bitmap64) + static void OnSuccessCallback_28(void * context, chip::BitFlags bitmap64) { (static_cast(context))->OnSuccessResponse_28(bitmap64); } @@ -86401,7 +86441,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_9(uint8_t bitmap8) + void OnSuccessResponse_9(chip::BitFlags bitmap8) { VerifyOrReturn(CheckValue("bitmap8", bitmap8, 0)); @@ -86415,8 +86455,8 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t bitmap8Argument; - bitmap8Argument = 1; + chip::BitFlags bitmap8Argument; + bitmap8Argument = static_cast>(1); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap8Argument, this, OnSuccessCallback_10, OnFailureCallback_10)); @@ -86448,7 +86488,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_11(uint8_t bitmap8) + void OnSuccessResponse_11(chip::BitFlags bitmap8) { VerifyOrReturn(CheckConstraintNotValue("bitmap8", bitmap8, readAttributeBitmap8DefaultValue)); @@ -86461,7 +86501,7 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint8_t bitmap8Argument; + chip::BitFlags bitmap8Argument; bitmap8Argument = readAttributeBitmap8DefaultValue; ReturnErrorOnFailure(cluster.WriteAttribute( @@ -86494,7 +86534,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_13(uint8_t bitmap8) + void OnSuccessResponse_13(chip::BitFlags bitmap8) { VerifyOrReturn(CheckValue("bitmap8", bitmap8, readAttributeBitmap8DefaultValue)); @@ -86518,7 +86558,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_14(uint16_t bitmap16) + void OnSuccessResponse_14(chip::BitFlags bitmap16) { VerifyOrReturn(CheckValue("bitmap16", bitmap16, 0U)); @@ -86532,8 +86572,8 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t bitmap16Argument; - bitmap16Argument = 1U; + chip::BitFlags bitmap16Argument; + bitmap16Argument = static_cast>(1U); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap16Argument, this, OnSuccessCallback_15, OnFailureCallback_15)); @@ -86565,7 +86605,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_16(uint16_t bitmap16) + void OnSuccessResponse_16(chip::BitFlags bitmap16) { VerifyOrReturn(CheckConstraintNotValue("bitmap16", bitmap16, readAttributeBitmap16DefaultValue)); @@ -86578,7 +86618,7 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint16_t bitmap16Argument; + chip::BitFlags bitmap16Argument; bitmap16Argument = readAttributeBitmap16DefaultValue; ReturnErrorOnFailure(cluster.WriteAttribute( @@ -86611,7 +86651,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_18(uint16_t bitmap16) + void OnSuccessResponse_18(chip::BitFlags bitmap16) { VerifyOrReturn(CheckValue("bitmap16", bitmap16, readAttributeBitmap16DefaultValue)); @@ -86635,7 +86675,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_19(uint32_t bitmap32) + void OnSuccessResponse_19(chip::BitFlags bitmap32) { VerifyOrReturn(CheckValue("bitmap32", bitmap32, 0UL)); @@ -86649,8 +86689,8 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t bitmap32Argument; - bitmap32Argument = 1UL; + chip::BitFlags bitmap32Argument; + bitmap32Argument = static_cast>(1UL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap32Argument, this, OnSuccessCallback_20, OnFailureCallback_20)); @@ -86682,7 +86722,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_21(uint32_t bitmap32) + void OnSuccessResponse_21(chip::BitFlags bitmap32) { VerifyOrReturn(CheckConstraintNotValue("bitmap32", bitmap32, readAttributeBitmap32DefaultValue)); @@ -86695,7 +86735,7 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint32_t bitmap32Argument; + chip::BitFlags bitmap32Argument; bitmap32Argument = readAttributeBitmap32DefaultValue; ReturnErrorOnFailure(cluster.WriteAttribute( @@ -86728,7 +86768,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_23(uint32_t bitmap32) + void OnSuccessResponse_23(chip::BitFlags bitmap32) { VerifyOrReturn(CheckValue("bitmap32", bitmap32, readAttributeBitmap32DefaultValue)); @@ -86752,7 +86792,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_24(uint64_t bitmap64) + void OnSuccessResponse_24(chip::BitFlags bitmap64) { VerifyOrReturn(CheckValue("bitmap64", bitmap64, 0ULL)); @@ -86766,8 +86806,8 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t bitmap64Argument; - bitmap64Argument = 1ULL; + chip::BitFlags bitmap64Argument; + bitmap64Argument = static_cast>(1ULL); ReturnErrorOnFailure(cluster.WriteAttribute( bitmap64Argument, this, OnSuccessCallback_25, OnFailureCallback_25)); @@ -86799,7 +86839,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_26(uint64_t bitmap64) + void OnSuccessResponse_26(chip::BitFlags bitmap64) { VerifyOrReturn(CheckConstraintNotValue("bitmap64", bitmap64, readAttributeBitmap64DefaultValue)); @@ -86812,7 +86852,7 @@ class TestSaveAsSuite : public TestCommand chip::Controller::TestClusterClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - uint64_t bitmap64Argument; + chip::BitFlags bitmap64Argument; bitmap64Argument = readAttributeBitmap64DefaultValue; ReturnErrorOnFailure(cluster.WriteAttribute( @@ -86845,7 +86885,7 @@ class TestSaveAsSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_28(uint64_t bitmap64) + void OnSuccessResponse_28(chip::BitFlags bitmap64) { VerifyOrReturn(CheckValue("bitmap64", bitmap64, readAttributeBitmap64DefaultValue)); From 60811939e59136471c088efc2c89b1e3011f368a Mon Sep 17 00:00:00 2001 From: Thomas Lykkeberg <80672974+tlykkeberg-grundfos@users.noreply.github.com> Date: Wed, 9 Mar 2022 23:57:12 +0100 Subject: [PATCH 19/43] Update pump-controller-app example app with OTA (#15633) * * Modified the pump-controller-app.zap to fit spec. * Added OTA functionality to pump-controller-app.zap * * Ran the `zap_regen_all.py` script * * Added OTA functionality to the pump-controller-app application * Modified the ICALL HEAP size to be able to link the project * * Added line feed to comply with Restyle * * Removed white space requested by Restyle bot * * Updated to match ToT --- .../cc13x2x7_26x2x7/args.gni | 2 + .../cc13x2x7_26x2x7/chip.syscfg | 5 + .../cc13x2x7_26x2x7/main/AppTask.cpp | 30 +- .../cc13x2x7_26x2x7/main/main.cpp | 2 +- .../pump-controller-app.matter | 417 +- .../pump-controller-app.zap | 3847 +++++++---------- .../zap-generated/CHIPClusters.h | 7 - .../zap-generated/IMClusterCommandHandler.cpp | 384 ++ .../PluginApplicationCallbacks.h | 9 +- .../zap-generated/callback-stub.cpp | 46 +- .../zap-generated/endpoint_config.h | 417 +- .../zap-generated/gen_config.h | 41 +- 12 files changed, 2477 insertions(+), 2730 deletions(-) diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni b/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni index f1c62eec215e79..21aca9d359af72 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/args.gni @@ -25,6 +25,8 @@ ti_simplelink_board = "LP_CC2652R7" # use -Os instead of -Og, LWIP release build is_debug = false +chip_enable_ota_requestor = true + # Disable CHIP Logging #chip_progress_logging = false #chip_detail_logging = false diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg index cd153a744fea1d..3a9cd96753a247 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/chip.syscfg @@ -46,6 +46,7 @@ const ECJPAKE = scripting.addModule("/ti/drivers/ECJPAKE"); const ECJPAKE1 = ECJPAKE.addInstance(); const NVS = scripting.addModule("/ti/drivers/NVS"); const NVS1 = NVS.addInstance(); +const NVS2 = NVS.addInstance(); const RF = scripting.addModule("/ti/drivers/RF"); const RTOS = scripting.addModule("/ti/drivers/RTOS"); const SHA2 = scripting.addModule("/ti/drivers/SHA2"); @@ -148,6 +149,10 @@ NVS1.internalFlash.$name = "ti_drivers_nvs_NVSCC26XX0"; NVS1.internalFlash.regionBase = 0xAA000; NVS1.internalFlash.regionSize = 0x4000; +NVS2.$name = "CONFIG_NVSEXTERNAL"; +NVS2.nvsType = "External"; // NVS Region Type +NVS2.$hardware = system.deviceData.board.components.MX25R8035F; + RTOS.name = "FreeRTOS"; SHA21.$name = "CONFIG_SHA2_0"; diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp index e394f5574f58df..8ccd13b292aeb4 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/AppTask.cpp @@ -22,10 +22,6 @@ #include "AppEvent.h" #include -#include -#include -#include - #include "FreeRTOS.h" #include #include @@ -33,6 +29,13 @@ #include #include +#if defined(CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) +#include +#include +#include +#include +#endif +#include #include #include #include @@ -49,6 +52,7 @@ #define APP_TASK_PRIORITY 4 #define APP_EVENT_QUEUE_SIZE 10 +using namespace ::chip; using namespace ::chip::Credentials; using namespace ::chip::DeviceLayer; @@ -62,6 +66,24 @@ static Button_Handle sAppRightHandle; AppTask AppTask::sAppTask; +#if defined(CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR) +static OTARequestor sRequestorCore; +static GenericOTARequestorDriver sRequestorUser; +static BDXDownloader sDownloader; +static OTAImageProcessorImpl sImageProcessor; + +void InitializeOTARequestor(void) +{ + // Initialize and interconnect the Requestor and Image Processor objects + SetRequestorInstance(&sRequestorCore); + + sRequestorCore.Init(&Server::GetInstance(), &sRequestorUser, &sDownloader); + sImageProcessor.SetOTADownloader(&sDownloader); + sDownloader.SetImageProcessorDelegate(&sImageProcessor); + sRequestorUser.Init(&sRequestorCore, &sImageProcessor); +} +#endif + int AppTask::StartAppTask() { int ret = 0; diff --git a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp index 76db456fda3999..e68bab7cb1fad4 100644 --- a/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp +++ b/examples/pump-controller-app/cc13x2x7_26x2x7/main/main.cpp @@ -39,7 +39,7 @@ #include #include -#define TOTAL_ICALL_HEAP_SIZE (0xE000) +#define TOTAL_ICALL_HEAP_SIZE (0xCB00) using namespace ::chip; using namespace ::chip::Inet; 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 index 9877dda276a130..d6799d18ef4982 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -151,6 +151,9 @@ server cluster Descriptor = 29 { readonly attribute CLUSTER_ID serverList[] = 1; readonly attribute CLUSTER_ID clientList[] = 2; readonly attribute ENDPOINT_NO partsList[] = 3; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; } @@ -174,6 +177,7 @@ server cluster DiagnosticLogs = 50 { kBdx = 1; } + readonly global attribute int16u clusterRevision = 65533; request struct RetrieveLogsRequestRequest { LogsIntent intent = 0; @@ -181,34 +185,14 @@ server cluster DiagnosticLogs = 50 { OCTET_STRING transferFileDesignator = 2; } - command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; -} + response struct RetrieveLogsResponse { + LogsStatus status = 0; + OCTET_STRING content = 1; + epoch_s timeStamp = 2; + INT32U timeSinceBoot = 3; + } -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; - } - - readonly attribute nullable PHYRateType PHYRate = 0; - readonly attribute nullable boolean fullDuplex = 1; - readonly attribute int64u packetRxCount = 2; - readonly attribute int64u packetTxCount = 3; - readonly attribute int64u txErrCount = 4; - readonly attribute int64u collisionCount = 5; - readonly attribute int64u overrunCount = 6; - readonly attribute nullable boolean carrierDetect = 7; - readonly attribute int64u timeSinceReset = 8; - readonly global attribute bitmap32 featureMap = 65532; - readonly global attribute int16u clusterRevision = 65533; + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; } server cluster FixedLabel = 64 { @@ -370,80 +354,176 @@ server cluster GeneralDiagnostics = 51 { readonly attribute ENUM8 activeHardwareFaults[] = 5; readonly attribute ENUM8 activeRadioFaults[] = 6; readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; readonly global attribute int16u clusterRevision = 65533; } -client cluster LevelControl = 8 { - enum MoveMode : ENUM8 { - kUp = 0; - kDown = 1; +server cluster GroupKeyManagement = 63 { + enum GroupKeySecurityPolicy : ENUM8 { + kTrustFirst = 0; + kCacheAndSync = 1; } - enum StepMode : ENUM8 { - kUp = 0; - kDown = 1; + struct GroupKeyMapStruct { + fabric_idx fabricIndex = 0; + group_id groupId = 1; + INT16U groupKeySetID = 2; } - bitmap LevelControlFeature : BITMAP32 { - kOnOff = 0x1; - kLighting = 0x2; - kFrequency = 0x4; + struct GroupInfoMapStruct { + fabric_idx fabricIndex = 0; + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional CHAR_STRING<16> groupName = 3; + } + + struct GroupKeySetStruct { + INT16U groupKeySetID = 0; + GroupKeySecurityPolicy groupKeySecurityPolicy = 1; + nullable OCTET_STRING<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable OCTET_STRING<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable OCTET_STRING<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly global attribute int16u clusterRevision = 65533; + + request struct KeySetReadRequest { + INT16U groupKeySetID = 0; + } + + request struct KeySetReadAllIndicesRequest { + INT16U groupKeySetIDs[] = 0; + } + + request struct KeySetRemoveRequest { + INT16U groupKeySetID = 0; } - readonly attribute int8u currentLevel = 0; + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + response struct KeySetReadAllIndicesResponse { + INT16U groupKeySetIDs[] = 0; + } + + response struct KeySetReadResponse { + GroupKeySetStruct 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 { + readonly attribute bitmap8 nameSupport = 0; readonly global attribute int16u clusterRevision = 65533; - request struct MoveRequest { - MoveMode moveMode = 0; - INT8U rate = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + request struct AddGroupRequest { + group_id groupId = 0; + CHAR_STRING groupName = 1; } - request struct MoveToLevelRequest { - INT8U level = 0; - INT16U transitionTime = 1; - BITMAP8 optionMask = 2; - BITMAP8 optionOverride = 3; + request struct AddGroupIfIdentifyingRequest { + group_id groupId = 0; + CHAR_STRING groupName = 1; } - request struct MoveToLevelWithOnOffRequest { - INT8U level = 0; - INT16U transitionTime = 1; + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; } - request struct MoveWithOnOffRequest { - MoveMode moveMode = 0; - INT8U rate = 1; + request struct RemoveGroupRequest { + group_id groupId = 0; } - request struct StepRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - INT16U transitionTime = 2; - BITMAP8 optionMask = 3; - BITMAP8 optionOverride = 4; + request struct ViewGroupRequest { + group_id groupId = 0; } - request struct StepWithOnOffRequest { - StepMode stepMode = 0; - INT8U stepSize = 1; - INT16U transitionTime = 2; + response struct AddGroupResponse { + ENUM8 status = 0; + group_id groupId = 1; + } + + response struct GetGroupMembershipResponse { + nullable INT8U capacity = 0; + group_id groupList[] = 1; + } + + response struct RemoveGroupResponse { + ENUM8 status = 0; + group_id groupId = 1; } - request struct StopRequest { - BITMAP8 optionMask = 0; - BITMAP8 optionOverride = 1; + response struct ViewGroupResponse { + ENUM8 status = 0; + group_id groupId = 1; + CHAR_STRING groupName = 2; } - 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; + 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 int16u identifyTime = 0; + readonly attribute enum8 identifyType = 1; + readonly global attribute 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 { @@ -668,12 +748,6 @@ server cluster OtaSoftwareUpdateRequestor = 42 { kDelayedOnUserConsent = 8; } - struct ProviderLocation { - node_id providerNodeID = 1; - endpoint_no endpoint = 2; - fabric_idx fabricIndex = 254; - } - info event StateTransition = 0 { OTAUpdateStateEnum previousState = 0; OTAUpdateStateEnum newState = 1; @@ -693,12 +767,9 @@ server cluster OtaSoftwareUpdateRequestor = 42 { nullable INT64S platformCode = 3; } - attribute ProviderLocation defaultOtaProviders[] = 0; readonly attribute boolean updatePossible = 1; readonly attribute OTAUpdateStateEnum updateState = 2; readonly attribute nullable int8u updateStateProgress = 3; - readonly global attribute command_id serverGeneratedCommandList[] = 65528; - readonly global attribute command_id clientGeneratedCommandList[] = 65529; readonly global attribute int16u clusterRevision = 65533; request struct AnnounceOtaProviderRequest { @@ -954,6 +1025,110 @@ client cluster PumpConfigurationAndControl = 512 { readonly global attribute int16u clusterRevision = 65533; } +server cluster Scenes = 5 { + bitmap ScenesCopyMode : BITMAP8 { + kCopyAllScenes = 0x1; + } + + struct SceneExtensionFieldSet { + CLUSTER_ID clusterId = 0; + INT8U length = 1; + INT8U value = 2; + } + + readonly attribute int8u sceneCount = 0; + readonly attribute int8u currentScene = 1; + readonly attribute int16u currentGroup = 2; + readonly attribute boolean sceneValid = 3; + readonly attribute bitmap8 nameSupport = 4; + readonly global attribute 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 = 0; @@ -973,6 +1148,8 @@ server cluster SoftwareDiagnostics = 52 { readonly attribute int64u currentHeapHighWatermark = 3; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; + + command ResetWatermarks(): DefaultSuccess = 0; } client cluster TemperatureMeasurement = 1026 { @@ -1131,6 +1308,8 @@ server cluster ThreadNetworkDiagnostics = 53 { readonly attribute NetworkFault activeNetworkFaultsList[] = 62; readonly global attribute bitmap32 featureMap = 65532; readonly global attribute int16u clusterRevision = 65533; + + command ResetCounts(): DefaultSuccess = 0; } server cluster TimeFormatLocalization = 44 { @@ -1181,67 +1360,6 @@ server cluster UserLabel = 65 { readonly global attribute 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; - } - - readonly attribute nullable octet_string<6> bssid = 0; - readonly attribute nullable SecurityType securityType = 1; - readonly attribute nullable WiFiVersionType wiFiVersion = 2; - readonly attribute nullable int16u channelNumber = 3; - readonly attribute nullable int8s rssi = 4; - readonly attribute int32u beaconLostCount = 5; - readonly attribute int32u beaconRxCount = 6; - readonly attribute int32u packetMulticastRxCount = 7; - readonly attribute int32u packetMulticastTxCount = 8; - readonly attribute int32u packetUnicastRxCount = 9; - readonly attribute int32u packetUnicastTxCount = 10; - readonly attribute int64u currentMaxRate = 11; - readonly attribute int64u overrunCount = 12; - readonly global attribute bitmap32 featureMap = 65532; - readonly global attribute int16u clusterRevision = 65533; -} - endpoint 0 { server cluster AccessControl; @@ -1249,22 +1367,23 @@ endpoint 0 { server cluster Basic; server cluster Descriptor; server cluster DiagnosticLogs; - server cluster EthernetNetworkDiagnostics; server cluster FixedLabel; server cluster GeneralCommissioning; server cluster GeneralDiagnostics; - binding cluster LevelControl; + server cluster GroupKeyManagement; + server cluster Groups; + server cluster Identify; server cluster LocalizationConfiguration; server cluster NetworkCommissioning; binding cluster OtaSoftwareUpdateProvider; server cluster OtaSoftwareUpdateRequestor; server cluster OperationalCredentials; + server cluster Scenes; server cluster SoftwareDiagnostics; server cluster ThreadNetworkDiagnostics; server cluster TimeFormatLocalization; server cluster UnitLocalization; server cluster UserLabel; - server cluster WiFiNetworkDiagnostics; } endpoint 1 { diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index 748cacf90639a0..c135a242122ac4 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -31,10 +31,10 @@ ], "endpointTypes": [ { - "name": "MA-pumpcontroller", - "deviceTypeName": "MA-pumpcontroller", - "deviceTypeCode": 772, - "deviceTypeProfileId": 2457, + "name": "MA-rootdevice", + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, "clusters": [ { "name": "Identify", @@ -59,6 +59,14 @@ "source": "client", "incoming": 1, "outgoing": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ @@ -85,7 +93,7 @@ "mfgCode": null, "define": "IDENTIFY_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "IdentifyQueryResponse", @@ -112,6 +120,21 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "identify type", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -142,7 +165,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -150,7 +173,7 @@ "code": 1, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -158,7 +181,7 @@ "code": 2, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -166,7 +189,7 @@ "code": 3, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -174,7 +197,7 @@ "code": 4, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -182,7 +205,7 @@ "code": 5, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 } ], @@ -210,7 +233,7 @@ "mfgCode": null, "define": "GROUPS_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "AddGroupResponse", @@ -218,7 +241,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "ViewGroupResponse", @@ -226,7 +249,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "GetGroupMembershipResponse", @@ -234,7 +257,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "RemoveGroupResponse", @@ -242,7 +265,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ @@ -261,6 +284,66 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -291,7 +374,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -299,7 +382,7 @@ "code": 1, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -307,7 +390,7 @@ "code": 2, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -315,7 +398,7 @@ "code": 3, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -323,7 +406,7 @@ "code": 4, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -331,7 +414,7 @@ "code": 5, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 }, { @@ -339,7 +422,7 @@ "code": 6, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 } ], @@ -367,7 +450,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "AddSceneResponse", @@ -375,7 +458,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "ViewSceneResponse", @@ -383,7 +466,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "RemoveSceneResponse", @@ -391,7 +474,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "RemoveAllScenesResponse", @@ -399,7 +482,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "StoreSceneResponse", @@ -407,7 +490,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 }, { "name": "GetSceneMembershipResponse", @@ -415,7 +498,7 @@ "mfgCode": null, "source": "server", "incoming": 1, - "outgoing": 0 + "outgoing": 1 } ], "attributes": [ @@ -495,66 +578,90 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "last configured by", + "code": 5, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ + }, { - "name": "Off", - "code": 0, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "On", - "code": 1, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "Toggle", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, "mfgCode": null, - "side": "client", + "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -563,187 +670,29 @@ ] }, { - "name": "On/Off", - "code": 6, + "name": "Descriptor", + "code": 29, "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", + "define": "DESCRIPTOR_CLUSTER", + "side": "client", "enabled": 0, "commands": [], "attributes": [ { - "name": "OnOff", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, - "side": "server", - "included": 1, + "side": "client", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ { "name": "ClusterRevision", "code": 65533, @@ -831,48 +780,27 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Access Control", - "code": 31, - "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Access Control", - "code": 31, - "mfgCode": null, - "define": "ACCESS_CONTROL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + }, { - "name": "ACL", - "code": 0, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -882,12 +810,12 @@ "reportableChange": 0 }, { - "name": "Extension", - "code": 1, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -897,15 +825,15 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -917,7 +845,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -929,14 +857,29 @@ ] }, { - "name": "Basic", - "code": 40, + "name": "Access Control", + "code": 31, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "ACCESS_CONTROL_CLUSTER", "side": "client", "enabled": 0, "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -944,63 +887,220 @@ "side": "client", "included": 1, "storageOption": "RAM", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] }, { - "name": "Basic", - "code": 40, + "name": "Access Control", + "code": 31, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "ACCESS_CONTROL_CLUSTER", "side": "server", "enabled": 1, "commands": [], "attributes": [ { - "name": "DataModelRevision", + "name": "ACL", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "10", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorName", + "name": "Extension", "code": 1, "mfgCode": null, "side": "server", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "VendorID", - "code": 2, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic", + "code": 40, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Basic", + "code": 40, + "mfgCode": null, + "define": "BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "10", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 1, "bounded": 0, "defaultValue": "", "reportable": 1, @@ -1248,6 +1348,66 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1319,12 +1479,12 @@ "code": 65533, "mfgCode": null, "side": "client", - "included": 0, + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1391,8 +1551,8 @@ "code": 0, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1410,7 +1570,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "true", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1440,7 +1600,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -1451,12 +1611,12 @@ "code": 65528, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1466,12 +1626,12 @@ "code": 65529, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1573,22 +1733,82 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 1, + "defaultValue": "", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - } - ] - }, + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Time Format Localization", "code": 44, @@ -1653,6 +1873,66 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1704,6 +1984,51 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1770,6 +2095,21 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -1881,6 +2221,51 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1971,6 +2356,21 @@ } ], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2043,7 +2443,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2143,12 +2543,12 @@ "reportableChange": 0 }, { - "name": "AttributeList", - "code": 65531, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", "included": 0, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2158,11 +2558,41 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, @@ -2204,9 +2634,93 @@ "source": "client", "incoming": 1, "outgoing": 0 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 0, + "outgoing": 1 } ], - "attributes": [] + "attributes": [ + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] }, { "name": "General Diagnostics", @@ -2217,6 +2731,21 @@ "enabled": 0, "commands": [], "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2363,6 +2892,66 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "ClusterRevision", "code": 65533, @@ -2393,7 +2982,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 } ], @@ -2484,6 +3073,51 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2529,7 +3163,7 @@ "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 0 } ], @@ -3506,262 +4140,242 @@ "reportableChange": 0 }, { - "name": "FeatureMap", - "code": 65532, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x000F", - "reportable": 1, + "defaultValue": "", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "WiFi Network Diagnostics", - "code": 54, - "mfgCode": null, - "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "bssid", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SecurityType", - "code": 1, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "WiFiVersion", - "code": 2, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x000F", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "ChannelNumber", - "code": 3, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0001", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "AdministratorCommissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "Rssi", - "code": 4, + "name": "OpenBasicCommissioningWindow", + "code": 1, "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "BeaconLostCount", - "code": 5, + "name": "RevokeCommissioning", + "code": 2, "mfgCode": null, - "side": "server", - "included": 1, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "BeaconRxCount", - "code": 6, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0x0001", "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, + "minInterval": 0, + "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "AdministratorCommissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "PacketMulticastRxCount", - "code": 7, + "name": "WindowStatus", + "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketMulticastTxCount", - "code": 8, + "name": "AdminFabricIndex", + "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastRxCount", - "code": 9, + "name": "AdminVendorId", + "code": 2, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketUnicastTxCount", - "code": 10, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentMaxRate", - "code": 11, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 12, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3772,11 +4386,11 @@ "code": 65532, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3800,179 +4414,291 @@ ] }, { - "name": "Ethernet Network Diagnostics", - "code": 55, + "name": "Operational Credentials", + "code": 62, "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "ResetCounts", + "name": "AttestationRequest", "code": 0, "mfgCode": null, "source": "client", - "incoming": 0, + "incoming": 1, "outgoing": 1 - } - ], - "attributes": [ + }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CertificateChainRequest", + "code": 2, "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Ethernet Network Diagnostics", - "code": 55, - "mfgCode": null, - "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + "source": "client", + "incoming": 1, + "outgoing": 1 + }, { - "name": "PHYRate", - "code": 0, + "name": "CSRRequest", + "code": 4, "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 + "source": "client", + "incoming": 1, + "outgoing": 1 }, { - "name": "FullDuplex", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "RemoveTrustedRootCertificate", + "code": 12, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "PacketRxCount", - "code": 2, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "0x0001", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 }, { - "name": "PacketTxCount", + "name": "CertificateChainResponse", "code": 3, "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "TxErrCount", - "code": 4, + "name": "SupportedFabrics", + "code": 2, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CollisionCount", - "code": 5, + "name": "CommissionedFabrics", + "code": 3, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "OverrunCount", - "code": 6, + "name": "TrustedRootCertificates", + "code": 4, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "CarrierDetect", - "code": 7, + "name": "CurrentFabricIndex", + "code": 5, "mfgCode": null, "side": "server", "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TimeSinceReset", - "code": 8, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000000000000000", + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3983,11 +4709,11 @@ "code": 65532, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4011,74 +4737,56 @@ ] }, { - "name": "AdministratorCommissioning", - "code": 60, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "client", "enabled": 0, "commands": [ { - "name": "OpenCommissioningWindow", + "name": "KeySetWrite", "code": 0, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "OpenBasicCommissioningWindow", + "name": "KeySetRead", "code": 1, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 }, { - "name": "RevokeCommissioning", - "code": 2, + "name": "KeySetRemove", + "code": 3, "mfgCode": null, "source": "client", "incoming": 1, - "outgoing": 1 + "outgoing": 0 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 } ], "attributes": [ { - "name": "ClusterRevision", - "code": 65533, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "client", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "AdministratorCommissioning", - "code": 60, - "mfgCode": null, - "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "WindowStatus", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, "defaultValue": "0", "reportable": 1, "minInterval": 1, @@ -4086,12 +4794,12 @@ "reportableChange": 0 }, { - "name": "AdminFabricIndex", - "code": 1, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -4099,187 +4807,42 @@ "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 - }, - { - "name": "AdminVendorId", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Operational Credentials", - "code": 62, - "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AttestationRequest", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainRequest", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CSRRequest", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "UpdateNOC", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "UpdateFabricLabel", - "code": 9, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveFabric", - "code": 10, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddTrustedRootCertificate", - "code": 11, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "RemoveTrustedRootCertificate", - "code": 12, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 } ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "Group Key Management", + "code": 63, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, "commands": [ { - "name": "AttestationResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "CertificateChainResponse", - "code": 3, + "name": "KeySetReadResponse", + "code": 2, "mfgCode": null, "source": "server", - "incoming": 1, + "incoming": 0, "outgoing": 1 }, { - "name": "CSRResponse", + "name": "KeySetReadAllIndicesResponse", "code": 5, "mfgCode": null, "source": "server", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "NOCResponse", - "code": 8, - "mfgCode": null, - "source": "server", - "incoming": 1, + "incoming": 0, "outgoing": 1 } ], "attributes": [ { - "name": "NOCs", + "name": "GroupKeyMap", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4289,22 +4852,22 @@ "reportableChange": 0 }, { - "name": "Fabrics", + "name": "GroupTable", "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SupportedFabrics", + "name": "MaxGroupsPerFabric", "code": 2, "mfgCode": null, "side": "server", @@ -4314,12 +4877,12 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CommissionedFabrics", + "name": "MaxGroupKeysPerFabric", "code": 3, "mfgCode": null, "side": "server", @@ -4329,32 +4892,32 @@ "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "TrustedRootCertificates", - "code": 4, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "CurrentFabricIndex", - "code": 5, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4364,51 +4927,30 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0001", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - } - ] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [] - }, - { - "name": "Fixed Label", - "code": 64, - "mfgCode": null, - "define": "FIXED_LABEL_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ + }, { - "name": "label list", - "code": 0, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4432,20 +4974,20 @@ ] }, { - "name": "User Label", - "code": 65, + "name": "Fixed Label", + "code": 64, "mfgCode": null, - "define": "USER_LABEL_CLUSTER", + "define": "FIXED_LABEL_CLUSTER", "side": "client", "enabled": 0, "commands": [], "attributes": [] }, { - "name": "User Label", - "code": 65, + "name": "Fixed Label", + "code": 64, "mfgCode": null, - "define": "USER_LABEL_CLUSTER", + "define": "FIXED_LABEL_CLUSTER", "side": "server", "enabled": 1, "commands": [], @@ -4466,1358 +5008,61 @@ "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Pump Configuration and Control", - "code": 512, - "mfgCode": null, - "define": "PUMP_CONFIG_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Pump Configuration and Control", - "code": 512, - "mfgCode": null, - "define": "PUMP_CONFIG_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "MaxPressure", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MaxSpeed", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MaxFlow", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "PumpStatus", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "EffectiveOperationMode", - "code": 17, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "EffectiveControlMode", - "code": 18, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Capacity", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "OperationMode", - "code": 32, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0001", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Temperature Measurement", - "code": 1026, - "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x8000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Pressure Measurement", - "code": 1027, - "mfgCode": null, - "define": "PRESSURE_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Pressure Measurement", - "code": 1027, - "mfgCode": null, - "define": "PRESSURE_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ScaledValue", - "code": 16, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ScaledTolerance", - "code": 19, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Flow Measurement", - "code": 1028, - "mfgCode": null, - "define": "FLOW_MEASUREMENT_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Flow Measurement", - "code": 1028, - "mfgCode": null, - "define": "FLOW_MEASUREMENT_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "MeasuredValue", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MinMeasuredValue", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "MaxMeasuredValue", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Tolerance", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - } - ] - }, - { - "name": "MA-pumpcontroller", - "deviceTypeName": "MA-pumpcontroller", - "deviceTypeCode": 772, - "deviceTypeProfileId": 2457, - "clusters": [ - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "Identify", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "IdentifyQuery", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Identify", - "code": 3, - "mfgCode": null, - "define": "IDENTIFY_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "IdentifyQueryResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "identify time", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddGroup", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewGroup", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetGroupMembership", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveGroup", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllGroups", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "AddGroupIfIdentifying", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Groups", - "code": 4, - "mfgCode": null, - "define": "GROUPS_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddGroupResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewGroupResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetGroupMembershipResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveGroupResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "name support", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Scenes", - "code": 5, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [ - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "incoming": 1, - "outgoing": 0 - } - ], - "attributes": [ - { - "name": "scene count", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current scene", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "current group", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "scene valid", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "name support", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "3", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "client", - "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "2", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [ - { - "name": "MoveToLevel", - "code": 0, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Move", - "code": 1, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Step", - "code": 2, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "Stop", - "code": 3, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "MoveToLevelWithOnOff", - "code": 4, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "MoveWithOnOff", - "code": 5, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StepWithOnOff", - "code": 6, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - }, - { - "name": "StopWithOnOff", - "code": 7, - "mfgCode": null, - "source": "client", - "incoming": 0, - "outgoing": 1 - } - ], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Level Control", - "code": 8, - "mfgCode": null, - "define": "LEVEL_CONTROL_CLUSTER", - "side": "server", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "current level", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x00", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "client", - "enabled": 0, - "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, + "included": 0, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Descriptor", - "code": 29, - "mfgCode": null, - "define": "DESCRIPTOR_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [], - "attributes": [ - { - "name": "device list", - "code": 0, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "server list", - "code": 1, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "client list", - "code": 2, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "parts list", - "code": 3, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", + "included": 0, + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, + "defaultValue": "0", + "reportable": 0, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5828,7 +5073,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, "defaultValue": "1", @@ -5840,323 +5085,309 @@ ] }, { - "name": "Basic", - "code": 40, + "name": "User Label", + "code": 65, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "USER_LABEL_CLUSTER", "side": "client", "enabled": 0, "commands": [], - "attributes": [ - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "client", - "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - } - ] + "attributes": [] }, { - "name": "Basic", - "code": 40, + "name": "User Label", + "code": 65, "mfgCode": null, - "define": "BASIC_CLUSTER", + "define": "USER_LABEL_CLUSTER", "side": "server", - "enabled": 0, + "enabled": 1, "commands": [], "attributes": [ { - "name": "DataModelRevision", + "name": "label list", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", - "singleton": 1, - "bounded": 0, - "defaultValue": "10", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorName", - "code": 1, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "VendorID", - "code": 2, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductName", - "code": 3, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "ProductID", - "code": 4, - "mfgCode": null, - "side": "server", - "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NodeLabel", - "code": 5, + "name": "ServerGeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "NVM", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, - "reportableChange": 0 - }, - { - "name": "Location", - "code": 6, - "mfgCode": null, - "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, - "bounded": 0, - "defaultValue": "XX", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersion", - "code": 7, + "name": "ClientGeneratedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "defaultValue": "", + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "HardwareVersionString", - "code": 8, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersion", - "code": 9, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "included": 1, - "storageOption": "External", - "singleton": 1, + "included": 0, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "reportable": 0, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "SoftwareVersionString", - "code": 10, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 + } + ] + } + ] + }, + { + "name": "MA-pumpcontroller", + "deviceTypeName": "MA-pumpcontroller", + "deviceTypeCode": 772, + "deviceTypeProfileId": 2457, + "clusters": [ + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 }, { - "name": "ManufacturingDate", - "code": 11, + "name": "On", + "code": 1, "mfgCode": null, - "side": "server", + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "20210614123456ZZ", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "PartNumber", - "code": 12, + "name": "OnOff", + "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ProductURL", - "code": 13, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "2", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ { - "name": "ProductLabel", - "code": 14, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, - "side": "server", + "side": "client", "included": 1, - "storageOption": "External", - "singleton": 1, + "storageOption": "RAM", + "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 - }, + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ { - "name": "SerialNumber", - "code": 15, + "name": "device list", + "code": 0, "mfgCode": null, "side": "server", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "LocalConfigDisabled", - "code": 16, + "name": "server list", + "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "NVM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "Reachable", - "code": 17, + "name": "client list", + "code": 2, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UniqueID", - "code": 18, + "name": "parts list", + "code": 3, "mfgCode": null, "side": "server", "included": 1, "storageOption": "External", - "singleton": 1, + "singleton": 0, "bounded": 0, "defaultValue": "", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 }, { @@ -6165,13 +5396,13 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", - "singleton": 1, + "storageOption": "External", + "singleton": 0, "bounded": 0, "defaultValue": "1", "reportable": 1, - "minInterval": 0, - "maxInterval": 65344, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] @@ -6719,13 +5950,13 @@ ], "endpoints": [ { - "endpointTypeName": "MA-pumpcontroller", + "endpointTypeName": "MA-rootdevice", "endpointTypeIndex": 0, - "profileId": 2457, + "profileId": 259, "endpointId": 0, "networkId": 0, "endpointVersion": 1, - "deviceIdentifier": 772 + "deviceIdentifier": 22 }, { "endpointTypeName": "MA-pumpcontroller", diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h index ac67a86ce8e939..4d31515bb86a16 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h @@ -37,13 +37,6 @@ class DLL_EXPORT FlowMeasurementCluster : public ClusterBase ~FlowMeasurementCluster() {} }; -class DLL_EXPORT LevelControlCluster : public ClusterBase -{ -public: - LevelControlCluster() : ClusterBase(app::Clusters::LevelControl::Id) {} - ~LevelControlCluster() {} -}; - class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase { public: diff --git a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp index 9587f7e6315da4..b540a704309247 100644 --- a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp @@ -192,6 +192,207 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace GeneralCommissioning +namespace GroupKeyManagement { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::KeySetRead::Id: { + Commands::KeySetRead::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupKeyManagementClusterKeySetReadCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetReadAllIndices::Id: { + Commands::KeySetReadAllIndices::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupKeyManagementClusterKeySetReadAllIndicesCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetRemove::Id: { + Commands::KeySetRemove::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupKeyManagementClusterKeySetRemoveCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::KeySetWrite::Id: { + Commands::KeySetWrite::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupKeyManagementClusterKeySetWriteCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace GroupKeyManagement + +namespace Groups { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::AddGroup::Id: { + Commands::AddGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterAddGroupCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::AddGroupIfIdentifying::Id: { + Commands::AddGroupIfIdentifying::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterAddGroupIfIdentifyingCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GetGroupMembership::Id: { + Commands::GetGroupMembership::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterGetGroupMembershipCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveAllGroups::Id: { + Commands::RemoveAllGroups::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterRemoveAllGroupsCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveGroup::Id: { + Commands::RemoveGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterRemoveGroupCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ViewGroup::Id: { + Commands::ViewGroup::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfGroupsClusterViewGroupCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Groups + +namespace Identify { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::Identify::Id: { + Commands::Identify::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfIdentifyClusterIdentifyCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::IdentifyQuery::Id: { + Commands::IdentifyQuery::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfIdentifyClusterIdentifyQueryCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::TriggerEffect::Id: { + Commands::TriggerEffect::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfIdentifyClusterTriggerEffectCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Identify + namespace NetworkCommissioning { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -427,6 +628,171 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace OperationalCredentials +namespace Scenes { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::AddScene::Id: { + Commands::AddScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterAddSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GetSceneMembership::Id: { + Commands::GetSceneMembership::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterGetSceneMembershipCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RecallScene::Id: { + Commands::RecallScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterRecallSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveAllScenes::Id: { + Commands::RemoveAllScenes::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterRemoveAllScenesCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::RemoveScene::Id: { + Commands::RemoveScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterRemoveSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StoreScene::Id: { + Commands::StoreScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterStoreSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::ViewScene::Id: { + Commands::ViewScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfScenesClusterViewSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace Scenes + +namespace SoftwareDiagnostics { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ResetWatermarks::Id: { + Commands::ResetWatermarks::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfSoftwareDiagnosticsClusterResetWatermarksCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace SoftwareDiagnostics + +namespace ThreadNetworkDiagnostics { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::ResetCounts::Id: { + Commands::ResetCounts::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfThreadNetworkDiagnosticsClusterResetCountsCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace ThreadNetworkDiagnostics + } // namespace Clusters void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj) @@ -444,6 +810,15 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::GeneralCommissioning::Id: Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::GroupKeyManagement::Id: + Clusters::GroupKeyManagement::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::Groups::Id: + Clusters::Groups::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::Identify::Id: + Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::NetworkCommissioning::Id: Clusters::NetworkCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -453,6 +828,15 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::Scenes::Id: + Clusters::Scenes::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::SoftwareDiagnostics::Id: + Clusters::SoftwareDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::ThreadNetworkDiagnostics::Id: + Clusters::ThreadNetworkDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; default: ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster); diff --git a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h index 3b3c191b1d97ca..da1fe4f52a4645 100644 --- a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h @@ -27,12 +27,13 @@ MatterBasicPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ MatterDiagnosticLogsPluginServerInitCallback(); \ - MatterEthernetNetworkDiagnosticsPluginServerInitCallback(); \ MatterFixedLabelPluginServerInitCallback(); \ MatterFlowMeasurementPluginClientInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ MatterGeneralDiagnosticsPluginServerInitCallback(); \ - MatterLevelControlPluginClientInitCallback(); \ + MatterGroupKeyManagementPluginServerInitCallback(); \ + MatterGroupsPluginServerInitCallback(); \ + MatterIdentifyPluginServerInitCallback(); \ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginClientInitCallback(); \ @@ -41,10 +42,10 @@ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPressureMeasurementPluginClientInitCallback(); \ MatterPumpConfigurationAndControlPluginClientInitCallback(); \ + MatterScenesPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginClientInitCallback(); \ MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \ MatterTimeFormatLocalizationPluginServerInitCallback(); \ MatterUnitLocalizationPluginServerInitCallback(); \ - MatterUserLabelPluginServerInitCallback(); \ - MatterWiFiNetworkDiagnosticsPluginServerInitCallback(); + MatterUserLabelPluginServerInitCallback(); 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 b066afad83848a..a96c5dc52d959b 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -44,9 +44,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_DIAGNOSTIC_LOGS_CLUSTER_ID: emberAfDiagnosticLogsClusterInitCallback(endpoint); break; - case ZCL_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_ID: - emberAfEthernetNetworkDiagnosticsClusterInitCallback(endpoint); - break; case ZCL_FIXED_LABEL_CLUSTER_ID: emberAfFixedLabelClusterInitCallback(endpoint); break; @@ -59,8 +56,14 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: emberAfGeneralDiagnosticsClusterInitCallback(endpoint); break; - case ZCL_LEVEL_CONTROL_CLUSTER_ID: - emberAfLevelControlClusterInitCallback(endpoint); + case ZCL_GROUP_KEY_MANAGEMENT_CLUSTER_ID: + emberAfGroupKeyManagementClusterInitCallback(endpoint); + break; + case ZCL_GROUPS_CLUSTER_ID: + emberAfGroupsClusterInitCallback(endpoint); + break; + case ZCL_IDENTIFY_CLUSTER_ID: + emberAfIdentifyClusterInitCallback(endpoint); break; case ZCL_LOCALIZATION_CONFIGURATION_CLUSTER_ID: emberAfLocalizationConfigurationClusterInitCallback(endpoint); @@ -86,6 +89,9 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID: emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); break; + case ZCL_SCENES_CLUSTER_ID: + emberAfScenesClusterInitCallback(endpoint); + break; case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; @@ -104,9 +110,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_USER_LABEL_CLUSTER_ID: emberAfUserLabelClusterInitCallback(endpoint); break; - case ZCL_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_ID: - emberAfWiFiNetworkDiagnosticsClusterInitCallback(endpoint); - break; default: // Unrecognized cluster ID break; @@ -138,11 +141,6 @@ void __attribute__((weak)) emberAfDiagnosticLogsClusterInitCallback(EndpointId e // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfEthernetNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfFixedLabelClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -163,7 +161,17 @@ void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(Endpoint // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) +void __attribute__((weak)) emberAfGroupKeyManagementClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; @@ -208,6 +216,11 @@ void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -238,11 +251,6 @@ void __attribute__((weak)) emberAfUserLabelClusterInitCallback(EndpointId endpoi // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfWiFiNetworkDiagnosticsClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} // // Non-Cluster Related Callbacks diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 0725d0323d3b5c..8d99f63179e03e 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -207,58 +207,6 @@ \ /* 255 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x0F, \ - \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), big-endian */ \ - \ - /* 259 - BeaconLostCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 263 - BeaconRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 267 - PacketMulticastRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 271 - PacketMulticastTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 275 - PacketUnicastRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 279 - PacketUnicastTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 283 - CurrentMaxRate, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 291 - OverrunCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 299 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x03, \ - \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), big-endian */ \ - \ - /* 303 - PacketRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 311 - PacketTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 319 - TxErrCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 327 - CollisionCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 335 - OverrunCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 343 - TimeSinceReset, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 351 - FeatureMap, */ \ - 0x00, 0x00, 0x00, 0x03, \ } #else // !BIGENDIAN_CPU @@ -443,63 +391,11 @@ \ /* 255 - FeatureMap, */ \ 0x0F, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server), little-endian */ \ - \ - /* 259 - BeaconLostCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 263 - BeaconRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 267 - PacketMulticastRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 271 - PacketMulticastTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 275 - PacketUnicastRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 279 - PacketUnicastTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, \ - \ - /* 283 - CurrentMaxRate, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 291 - OverrunCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 299 - FeatureMap, */ \ - 0x03, 0x00, 0x00, 0x00, \ - \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server), little-endian */ \ - \ - /* 303 - PacketRxCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 311 - PacketTxCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 319 - TxErrCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 327 - CollisionCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 335 - OverrunCount, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 343 - TimeSinceReset, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ - \ - /* 351 - FeatureMap, */ \ - 0x03, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (71) +#define GENERATED_DEFAULTS_COUNT (55) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -520,10 +416,13 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 1 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { \ (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 \ @@ -532,12 +431,30 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 185 +#define GENERATED_ATTRIBUTE_COUNT 175 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Groups (server) */ \ + { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Scenes (server) */ \ + { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ + { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ + { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ @@ -593,12 +510,10 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_EMPTY_DEFAULT() }, /* DefaultOtaProviders */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(1) }, /* UpdatePossible */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ - { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0) }, /* UpdateStateProgress */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + { 0x00000001, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(true) }, /* UpdatePossible */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* UpdateState */ \ + { 0x00000003, ZAP_TYPE(INT8U), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* UpdateStateProgress */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ { 0x00000001, ZAP_TYPE(CHAR_STRING), 36, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ @@ -609,7 +524,7 @@ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ { 0x00000000, ZAP_TYPE(ENUM8), 1, \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* HourFormat */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* HourFormat */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ ZAP_SIMPLE_DEFAULT(0) }, /* ActiveCalendarType */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -644,6 +559,9 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(26) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ @@ -734,36 +652,6 @@ { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(255) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(OCTET_STRING), 7, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* bssid */ \ - { 0x00000001, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* SecurityType */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* WiFiVersion */ \ - { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* ChannelNumber */ \ - { 0x00000004, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* Rssi */ \ - { 0x00000005, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(259) }, /* BeaconLostCount */ \ - { 0x00000006, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(263) }, /* BeaconRxCount */ \ - { 0x00000007, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(267) }, /* PacketMulticastRxCount */ \ - { 0x00000008, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(271) }, /* PacketMulticastTxCount */ \ - { 0x00000009, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(275) }, /* PacketUnicastRxCount */ \ - { 0x0000000A, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(279) }, /* PacketUnicastTxCount */ \ - { 0x0000000B, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(283) }, /* CurrentMaxRate */ \ - { 0x0000000C, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(291) }, /* OverrunCount */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(299) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ - \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - { 0x00000000, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* PHYRate */ \ - { 0x00000001, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* FullDuplex */ \ - { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(303) }, /* PacketRxCount */ \ - { 0x00000003, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(311) }, /* PacketTxCount */ \ - { 0x00000004, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(319) }, /* TxErrCount */ \ - { 0x00000005, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(327) }, /* CollisionCount */ \ - { 0x00000006, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(335) }, /* OverrunCount */ \ - { 0x00000007, ZAP_TYPE(BOOLEAN), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x00) }, /* CarrierDetect */ \ - { 0x00000008, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(343) }, /* TimeSinceReset */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(351) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ - \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* WindowStatus */ \ { 0x00000001, ZAP_TYPE(FABRIC_IDX), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ @@ -782,6 +670,14 @@ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Group Key Management (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_EMPTY_DEFAULT() }, /* GroupKeyMap */ \ + { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* GroupTable */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxGroupsPerFabric */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxGroupKeysPerFabric */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* label list */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -806,6 +702,16 @@ // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ + (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayGroupsServer[] = { \ + (EmberAfGenericClusterFunction) emberAfGroupsClusterServerInitCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayScenesServer[] = { \ + (EmberAfGenericClusterFunction) emberAfScenesClusterServerInitCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \ (EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback, \ }; \ @@ -820,6 +726,48 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: Identify (server) */\ + /* client_generated */ \ + 0x00000000 /* Identify */, \ + 0x00000001 /* IdentifyQuery */, \ + 0x00000040 /* TriggerEffect */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000000 /* IdentifyQueryResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Groups (server) */\ + /* client_generated */ \ + 0x00000000 /* AddGroup */, \ + 0x00000001 /* ViewGroup */, \ + 0x00000002 /* GetGroupMembership */, \ + 0x00000003 /* RemoveGroup */, \ + 0x00000004 /* RemoveAllGroups */, \ + 0x00000005 /* AddGroupIfIdentifying */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000000 /* AddGroupResponse */, \ + 0x00000001 /* ViewGroupResponse */, \ + 0x00000002 /* GetGroupMembershipResponse */, \ + 0x00000003 /* RemoveGroupResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Scenes (server) */\ + /* client_generated */ \ + 0x00000000 /* AddScene */, \ + 0x00000001 /* ViewScene */, \ + 0x00000002 /* RemoveScene */, \ + 0x00000003 /* RemoveAllScenes */, \ + 0x00000004 /* StoreScene */, \ + 0x00000005 /* RecallScene */, \ + 0x00000006 /* GetSceneMembership */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000000 /* AddSceneResponse */, \ + 0x00000001 /* ViewSceneResponse */, \ + 0x00000002 /* RemoveSceneResponse */, \ + 0x00000003 /* RemoveAllScenesResponse */, \ + 0x00000004 /* StoreSceneResponse */, \ + 0x00000006 /* GetSceneMembershipResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* client_generated */ \ 0x00000000 /* AnnounceOtaProvider */, \ @@ -851,11 +799,14 @@ /* client_generated */ \ 0x00000000 /* RetrieveLogsRequest */, \ chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000001 /* RetrieveLogsResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */\ /* client_generated */ \ 0x00000000 /* ResetWatermarks */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */\ + /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */\ /* client_generated */ \ 0x00000000 /* ResetCounts */, \ chip::kInvalidCommandId /* end of list */, \ @@ -883,30 +834,63 @@ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Group Key Management (server) */\ + /* client_generated */ \ + 0x00000000 /* KeySetWrite */, \ + 0x00000001 /* KeySetRead */, \ + 0x00000003 /* KeySetRemove */, \ + 0x00000004 /* KeySetReadAllIndices */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000002 /* KeySetReadResponse */, \ + 0x00000005 /* KeySetReadAllIndicesResponse */, \ + chip::kInvalidCommandId /* end of list */, \ } // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 27 +#define GENERATED_CLUSTER_COUNT 28 // clang-format off #define GENERATED_CLUSTERS { \ { \ - /* Endpoint: 0, Cluster: Level Control (client) */ \ - .clusterId = 0x00000008, \ + /* Endpoint: 0, Cluster: Identify (server) */ \ + .clusterId = 0x00000003, \ .attributes = ZAP_ATTRIBUTE_INDEX(0), \ - .attributeCount = 0, \ - .clusterSize = 0, \ - .mask = ZAP_CLUSTER_MASK(CLIENT), \ - .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ + .attributeCount = 3, \ + .clusterSize = 5, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayIdentifyServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Groups (server) */ \ + .clusterId = 0x00000004, \ + .attributes = ZAP_ATTRIBUTE_INDEX(3), \ + .attributeCount = 2, \ + .clusterSize = 3, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayGroupsServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Scenes (server) */ \ + .clusterId = 0x00000005, \ + .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributeCount = 6, \ + .clusterSize = 8, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayScenesServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributes = ZAP_ATTRIBUTE_INDEX(11), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -917,7 +901,7 @@ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributes = ZAP_ATTRIBUTE_INDEX(16), \ .attributeCount = 3, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -928,7 +912,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(8), \ + .attributes = ZAP_ATTRIBUTE_INDEX(19), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -939,7 +923,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(28), \ + .attributes = ZAP_ATTRIBUTE_INDEX(39), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -950,18 +934,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(28), \ - .attributeCount = 5, \ + .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(33), \ + .attributes = ZAP_ATTRIBUTE_INDEX(43), \ .attributeCount = 3, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -972,7 +956,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(36), \ + .attributes = ZAP_ATTRIBUTE_INDEX(46), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -983,7 +967,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(40), \ + .attributes = ZAP_ATTRIBUTE_INDEX(50), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -994,40 +978,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(53), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 2 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(49), \ + .attributes = ZAP_ATTRIBUTE_INDEX(59), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 9 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 16 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(59), \ - .attributeCount = 0, \ - .clusterSize = 0, \ + .attributes = ZAP_ATTRIBUTE_INDEX(69), \ + .attributeCount = 1, \ + .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 19 ) ,\ - .serverGeneratedCommandList = nullptr ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(59), \ + .attributes = ZAP_ATTRIBUTE_INDEX(70), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1038,73 +1022,62 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(68), \ + .attributes = ZAP_ATTRIBUTE_INDEX(79), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 21 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(74), \ + .attributes = ZAP_ATTRIBUTE_INDEX(85), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ - },\ - { \ - /* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \ - .clusterId = 0x00000036, \ - .attributes = ZAP_ATTRIBUTE_INDEX(139), \ - .attributeCount = 15, \ - .clusterSize = 58, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .clientGeneratedCommandList = nullptr ,\ - .serverGeneratedCommandList = nullptr ,\ - },\ - { \ - /* Endpoint: 0, Cluster: Ethernet Network Diagnostics (server) */ \ - .clusterId = 0x00000037, \ - .attributes = ZAP_ATTRIBUTE_INDEX(154), \ - .attributeCount = 11, \ - .clusterSize = 57, \ - .mask = ZAP_CLUSTER_MASK(SERVER), \ - .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 23 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(165), \ + .attributes = ZAP_ATTRIBUTE_INDEX(150), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(169), \ + .attributes = ZAP_ATTRIBUTE_INDEX(154), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 29 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Group Key Management (server) */ \ + .clusterId = 0x0000003F, \ + .attributes = ZAP_ATTRIBUTE_INDEX(161), \ + .attributeCount = 5, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(176), \ + .attributes = ZAP_ATTRIBUTE_INDEX(166), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1115,7 +1088,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(178), \ + .attributes = ZAP_ATTRIBUTE_INDEX(168), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1126,7 +1099,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(180), \ + .attributes = ZAP_ATTRIBUTE_INDEX(170), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1137,7 +1110,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(180), \ + .attributes = ZAP_ATTRIBUTE_INDEX(170), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1148,7 +1121,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1159,7 +1132,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1170,7 +1143,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1181,7 +1154,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(185), \ + .attributes = ZAP_ATTRIBUTE_INDEX(175), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1195,12 +1168,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 20 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 22 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 21, 578 }, { ZAP_CLUSTER_INDEX(21), 6, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 487 }, { ZAP_CLUSTER_INDEX(22), 6, 0 }, \ } // Largest attribute size is needed for various buffers @@ -1212,7 +1185,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (39) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (578) +#define ATTRIBUTE_MAX_SIZE (487) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) @@ -1227,13 +1200,13 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, // Array of profile ids #define FIXED_PROFILE_IDS \ { \ - 0x0999, 0x0999 \ + 0x0103, 0x0999 \ } // Array of device ids #define FIXED_DEVICE_IDS \ { \ - 772, 772 \ + 22, 772 \ } // Array of device versions diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_config.h b/zzz_generated/pump-controller-app/zap-generated/gen_config.h index ff37239ff303ba..c51ed0609752ee 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_config.h @@ -34,12 +34,13 @@ #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_DIAGNOSTIC_LOGS_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FIXED_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_FLOW_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -48,13 +49,13 @@ #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PRESSURE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TIME_FORMAT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_UNIT_LOCALIZATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_USER_LABEL_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ @@ -83,11 +84,6 @@ #define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS_SERVER #define EMBER_AF_PLUGIN_DIAGNOSTIC_LOGS -// Use this macro to check if the server side of the Ethernet Network Diagnostics cluster is included -#define ZCL_USING_ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS_SERVER -#define EMBER_AF_PLUGIN_ETHERNET_NETWORK_DIAGNOSTICS - // Use this macro to check if the server side of the Fixed Label cluster is included #define ZCL_USING_FIXED_LABEL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_FIXED_LABEL_SERVER @@ -107,9 +103,20 @@ #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER #define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS -// Use this macro to check if the client side of the Level Control cluster is included -#define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT -#define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT +// Use this macro to check if the server side of the Group Key Management cluster is included +#define ZCL_USING_GROUP_KEY_MANAGEMENT_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT_SERVER +#define EMBER_AF_PLUGIN_GROUP_KEY_MANAGEMENT + +// Use this macro to check if the server side of the Groups cluster is included +#define ZCL_USING_GROUPS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GROUPS_SERVER +#define EMBER_AF_PLUGIN_GROUPS + +// Use this macro to check if the server side of the Identify cluster is included +#define ZCL_USING_IDENTIFY_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_IDENTIFY_SERVER +#define EMBER_AF_PLUGIN_IDENTIFY // Use this macro to check if the server side of the Localization Configuration cluster is included #define ZCL_USING_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER @@ -147,6 +154,13 @@ #define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL_CLIENT +// Use this macro to check if the server side of the Scenes cluster is included +#define ZCL_USING_SCENES_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_SCENES_SERVER +#define EMBER_AF_PLUGIN_SCENES +// User options for server plugin Scenes +#define EMBER_AF_PLUGIN_SCENES_TABLE_SIZE 3 + // Use this macro to check if the server side of the Software Diagnostics cluster is included #define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER @@ -175,8 +189,3 @@ #define ZCL_USING_USER_LABEL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_USER_LABEL_SERVER #define EMBER_AF_PLUGIN_USER_LABEL - -// Use this macro to check if the server side of the WiFi Network Diagnostics cluster is included -#define ZCL_USING_WIFI_NETWORK_DIAGNOSTICS_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS_SERVER -#define EMBER_AF_PLUGIN_WI_FI_NETWORK_DIAGNOSTICS From 190520d307ae12bfe97bd05d64c3db591ea11091 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 9 Mar 2022 18:16:36 -0500 Subject: [PATCH 20/43] Disable DNSSD cache globally in preparation for address resolve (#16029) * Remove CHIP_CONFIG_MDNS_CACHE_SIZE and dns caching in general. In #15934 caching is generally not used, with the rationale of: - cache is doubled/trippled: - Platform MDNS servers are expected to cache at least on linux and mac due to avahi/bonjour being system wide and enforcing TTLs - We have cache both on CASESession and Platform, with separate caching between operational and commissionable - MinMdns does not have the dnssd cache like platform, but would likely benefit the most of it (since it would have TTLs) - we do not have a good way to clear caches and we do not update them on boot advertising (platform dnssd implementations would, however since we have an internal cache that seems to break) Looking to disable caching and either build it anew if it required/helps and at least make use of only one. * Add ifdefs for mdns cache variable * Add more conditionals for MDNS cache size * Fix typo in endif/else * Restyle --- src/app/CASESessionManager.cpp | 19 +++++++++++++++---- src/app/CASESessionManager.h | 6 ++++-- src/app/server/Server.cpp | 7 +++++-- src/controller/CHIPDeviceController.cpp | 10 +++++++--- src/controller/CHIPDeviceController.h | 2 ++ src/lib/core/CHIPConfig.h | 2 +- src/platform/Ameba/SystemPlatformConfig.h | 2 +- src/platform/EFR32/SystemPlatformConfig.h | 2 +- src/platform/ESP32/SystemPlatformConfig.h | 2 +- src/platform/Linux/SystemPlatformConfig.h | 2 +- src/platform/P6/SystemPlatformConfig.h | 2 +- src/platform/Tizen/SystemPlatformConfig.h | 2 +- .../cc13x2_26x2/SystemPlatformConfig.h | 2 +- src/platform/mbed/SystemPlatformConfig.h | 2 +- .../nrfconnect/SystemPlatformConfig.h | 2 +- .../nxp/k32w/k32w0/SystemPlatformConfig.h | 2 +- src/platform/qpg/SystemPlatformConfig.h | 2 +- src/platform/telink/SystemPlatformConfig.h | 2 +- src/platform/webos/SystemPlatformConfig.h | 2 +- 19 files changed, 47 insertions(+), 25 deletions(-) diff --git a/src/app/CASESessionManager.cpp b/src/app/CASESessionManager.cpp index 80d66a50b81cc0..e87d857c8ab229 100644 --- a/src/app/CASESessionManager.cpp +++ b/src/app/CASESessionManager.cpp @@ -37,7 +37,12 @@ CHIP_ERROR CASESessionManager::FindOrEstablishSession(PeerId peerId, Callback::C { Dnssd::ResolvedNodeData resolutionData; - bool nodeIDWasResolved = (mConfig.dnsCache != nullptr && mConfig.dnsCache->Lookup(peerId, resolutionData) == CHIP_NO_ERROR); + bool nodeIDWasResolved = +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 + (mConfig.dnsCache != nullptr && mConfig.dnsCache->Lookup(peerId, resolutionData) == CHIP_NO_ERROR); +#else + false; +#endif OperationalDeviceProxy * session = FindExistingSession(peerId); if (session == nullptr) @@ -98,6 +103,7 @@ void CASESessionManager::OnOperationalNodeResolved(const Dnssd::ResolvedNodeData { ChipLogProgress(Controller, "Address resolved for node: 0x" ChipLogFormatX64, ChipLogValueX64(nodeData.mPeerId.GetNodeId())); +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 if (mConfig.dnsCache != nullptr) { CHIP_ERROR err = mConfig.dnsCache->Insert(nodeData); @@ -106,6 +112,7 @@ void CASESessionManager::OnOperationalNodeResolved(const Dnssd::ResolvedNodeData ChipLogError(Controller, "DNS Cache insert: %" CHIP_ERROR_FORMAT, err.Format()); } } +#endif OperationalDeviceProxy * session = FindExistingSession(nodeData.mPeerId); VerifyOrReturn(session != nullptr, @@ -125,13 +132,17 @@ void CASESessionManager::OnOperationalNodeResolutionFailed(const PeerId & peer, CHIP_ERROR CASESessionManager::GetPeerAddress(PeerId peerId, Transport::PeerAddress & addr) { +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 if (mConfig.dnsCache != nullptr) { Dnssd::ResolvedNodeData resolutionData; - ReturnErrorOnFailure(mConfig.dnsCache->Lookup(peerId, resolutionData)); - addr = OperationalDeviceProxy::ToPeerAddress(resolutionData); - return CHIP_NO_ERROR; + if (mConfig.dnsCache->Lookup(peerId, resolutionData) == CHIP_NO_ERROR) + { + addr = OperationalDeviceProxy::ToPeerAddress(resolutionData); + return CHIP_NO_ERROR; + } } +#endif OperationalDeviceProxy * session = FindExistingSession(peerId); VerifyOrReturnError(session != nullptr, CHIP_ERROR_NOT_CONNECTED); diff --git a/src/app/CASESessionManager.h b/src/app/CASESessionManager.h index a3c0dbe81dfe2f..2f129e9f71b08d 100644 --- a/src/app/CASESessionManager.h +++ b/src/app/CASESessionManager.h @@ -35,9 +35,11 @@ namespace chip { struct CASESessionManagerConfig { DeviceProxyInitParams sessionInitParams; +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 Dnssd::DnssdCache * dnsCache = nullptr; - OperationalDeviceProxyPoolDelegate * devicePool = nullptr; - Dnssd::ResolverProxy * dnsResolver = nullptr; +#endif + OperationalDeviceProxyPoolDelegate * devicePool = nullptr; + Dnssd::ResolverProxy * dnsResolver = nullptr; }; /** diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 0f6666fed07297..50b5b3f4e15862 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -109,11 +109,14 @@ Server::Server() : .fabricTable = &mFabrics, .clientPool = &mCASEClientPool, }, +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 .dnsCache = nullptr, +#endif .devicePool = &mDevicePool, .dnsResolver = nullptr, - }), mCommissioningWindowManager(this), mGroupsProvider(mDeviceStorage), - mAttributePersister(mDeviceStorage), mAccessControl(Access::Examples::GetAccessControlDelegate(&mDeviceStorage)) + }), + mCommissioningWindowManager(this), mGroupsProvider(mDeviceStorage), mAttributePersister(mDeviceStorage), + mAccessControl(Access::Examples::GetAccessControlDelegate(&mDeviceStorage)) {} CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint16_t unsecureServicePort, diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 71196d726944b2..598fa4d65585f0 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -160,9 +160,11 @@ CHIP_ERROR DeviceController::Init(ControllerInitParams params) CASESessionManagerConfig sessionManagerConfig = { .sessionInitParams = deviceInitParams, - .dnsCache = &mDNSCache, - .devicePool = &mDevicePool, - .dnsResolver = &mDNSResolver, +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 + .dnsCache = &mDNSCache, +#endif + .devicePool = &mDevicePool, + .dnsResolver = &mDNSResolver, }; mCASESessionManager = chip::Platform::New(sessionManagerConfig); @@ -1458,7 +1460,9 @@ void DeviceCommissioner::OnOperationalNodeResolved(const chip::Dnssd::ResolvedNo return; } +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 mDNSCache.Insert(nodeData); +#endif mCASESessionManager->FindOrEstablishSession(nodeData.mPeerId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); DeviceController::OnOperationalNodeResolved(nodeData); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 22117cafaa8b2d..aeb4db8c9fba2e 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -347,7 +347,9 @@ class DLL_EXPORT DeviceController : public SessionRecoveryDelegate, CASESessionManager * mCASESessionManager = nullptr; +#if CHIP_CONFIG_MDNS_CACHE_SIZE > 0 Dnssd::DnssdCache mDNSCache; +#endif CASEClientPool mCASEClientPool; OperationalDeviceProxyPool mDevicePool; diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 2c3448cc53041b..144f38465369b8 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1330,7 +1330,7 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; * */ #ifndef CHIP_CONFIG_MDNS_CACHE_SIZE -#define CHIP_CONFIG_MDNS_CACHE_SIZE 20 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 #endif /** * @name Interaction Model object pool configuration. diff --git a/src/platform/Ameba/SystemPlatformConfig.h b/src/platform/Ameba/SystemPlatformConfig.h index e5ad3b3ebade61..7db088f4a77d77 100755 --- a/src/platform/Ameba/SystemPlatformConfig.h +++ b/src/platform/Ameba/SystemPlatformConfig.h @@ -61,4 +61,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_USE_SOCKETS 0 #define CHIP_SYSTEM_CONFIG_USE_NETWORK_FRAMEWORK 0 #define CHIP_SYSTEM_CONFIG_POSIX_LOCKING 0 -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/EFR32/SystemPlatformConfig.h b/src/platform/EFR32/SystemPlatformConfig.h index 6f5a1ebed34ed7..435ef60fa1e3f4 100644 --- a/src/platform/EFR32/SystemPlatformConfig.h +++ b/src/platform/EFR32/SystemPlatformConfig.h @@ -43,4 +43,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/ESP32/SystemPlatformConfig.h b/src/platform/ESP32/SystemPlatformConfig.h index 6838379fc15932..34ed45cc8aa76d 100644 --- a/src/platform/ESP32/SystemPlatformConfig.h +++ b/src/platform/ESP32/SystemPlatformConfig.h @@ -48,4 +48,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS CONFIG_NUM_TIMERS #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/Linux/SystemPlatformConfig.h b/src/platform/Linux/SystemPlatformConfig.h index 2794184ca8e0a3..1dcf357521dff3 100644 --- a/src/platform/Linux/SystemPlatformConfig.h +++ b/src/platform/Linux/SystemPlatformConfig.h @@ -46,4 +46,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/P6/SystemPlatformConfig.h b/src/platform/P6/SystemPlatformConfig.h index 1a1cda338b6dca..e37527cadfef3d 100644 --- a/src/platform/P6/SystemPlatformConfig.h +++ b/src/platform/P6/SystemPlatformConfig.h @@ -55,4 +55,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/Tizen/SystemPlatformConfig.h b/src/platform/Tizen/SystemPlatformConfig.h index 69fa7d72f37f8d..7a49ab8c277c34 100644 --- a/src/platform/Tizen/SystemPlatformConfig.h +++ b/src/platform/Tizen/SystemPlatformConfig.h @@ -48,4 +48,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/cc13x2_26x2/SystemPlatformConfig.h b/src/platform/cc13x2_26x2/SystemPlatformConfig.h index 76bb84bce8e462..e66eeaeeb1cae5 100644 --- a/src/platform/cc13x2_26x2/SystemPlatformConfig.h +++ b/src/platform/cc13x2_26x2/SystemPlatformConfig.h @@ -38,4 +38,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_EVENT_OBJECT_TYPE const struct ::chip::DeviceLayer::ChipDeviceEvent * // ========== Platform-specific Configuration Overrides ========= -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/mbed/SystemPlatformConfig.h b/src/platform/mbed/SystemPlatformConfig.h index a8891d351305b9..0ca39de5790290 100644 --- a/src/platform/mbed/SystemPlatformConfig.h +++ b/src/platform/mbed/SystemPlatformConfig.h @@ -48,4 +48,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/nrfconnect/SystemPlatformConfig.h b/src/platform/nrfconnect/SystemPlatformConfig.h index 9882917b1cf08c..001a90b8627258 100644 --- a/src/platform/nrfconnect/SystemPlatformConfig.h +++ b/src/platform/nrfconnect/SystemPlatformConfig.h @@ -57,4 +57,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h index 3a3c439d2ead70..833cc88ea9b9e3 100644 --- a/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h +++ b/src/platform/nxp/k32w/k32w0/SystemPlatformConfig.h @@ -44,4 +44,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/qpg/SystemPlatformConfig.h b/src/platform/qpg/SystemPlatformConfig.h index 8ec4376d3bab36..0972796ff08b34 100644 --- a/src/platform/qpg/SystemPlatformConfig.h +++ b/src/platform/qpg/SystemPlatformConfig.h @@ -42,4 +42,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/telink/SystemPlatformConfig.h b/src/platform/telink/SystemPlatformConfig.h index c2e51709232a8a..30e47b700390e1 100644 --- a/src/platform/telink/SystemPlatformConfig.h +++ b/src/platform/telink/SystemPlatformConfig.h @@ -57,4 +57,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 diff --git a/src/platform/webos/SystemPlatformConfig.h b/src/platform/webos/SystemPlatformConfig.h index 6a74853d884b78..bf9d871c6d89b0 100644 --- a/src/platform/webos/SystemPlatformConfig.h +++ b/src/platform/webos/SystemPlatformConfig.h @@ -46,4 +46,4 @@ struct ChipDeviceEvent; #define CHIP_SYSTEM_CONFIG_NUM_TIMERS 16 #endif // CHIP_SYSTEM_CONFIG_NUM_TIMERS -#define CHIP_CONFIG_MDNS_CACHE_SIZE 4 +#define CHIP_CONFIG_MDNS_CACHE_SIZE 0 From 4279b678c16453b332d8e3108098b678a2940df6 Mon Sep 17 00:00:00 2001 From: "Josh V [Apple]" Date: Wed, 9 Mar 2022 18:29:01 -0800 Subject: [PATCH 21/43] Add cluster commands to simulated app (#16024) * Add new clusters and commands to simulated app * Generated Code --- .../placeholder/linux/apps/app1/config.matter | 949 +++++++ .../placeholder/linux/apps/app1/config.zap | 2314 +++++++++++++++- .../placeholder/linux/apps/app2/config.matter | 949 +++++++ .../placeholder/linux/apps/app2/config.zap | 2323 ++++++++++++++++- .../app1/zap-generated/CHIPClientCallbacks.h | 75 + .../app1/zap-generated/CHIPClusters.h | 28 + .../zap-generated/IMClusterCommandHandler.cpp | 250 ++ .../PluginApplicationCallbacks.h | 14 +- .../app1/zap-generated/callback-stub.cpp | 64 + .../app1/zap-generated/endpoint_config.h | 577 +++- .../app1/zap-generated/gen_config.h | 70 +- .../app2/zap-generated/CHIPClientCallbacks.h | 75 + .../app2/zap-generated/CHIPClusters.h | 28 + .../zap-generated/IMClusterCommandHandler.cpp | 250 ++ .../PluginApplicationCallbacks.h | 14 +- .../app2/zap-generated/callback-stub.cpp | 64 + .../app2/zap-generated/endpoint_config.h | 577 +++- .../app2/zap-generated/gen_config.h | 70 +- 18 files changed, 8437 insertions(+), 254 deletions(-) diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 916fea9e0fc222..e39670fda270d1 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -1,6 +1,48 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + readonly attribute char_string<32> vendorName = 0; + readonly attribute int16u vendorID = 1; + readonly attribute char_string<32> applicationName = 2; + readonly attribute int16u productID = 3; + readonly attribute ApplicationStatusEnum status = 5; + readonly attribute char_string<32> applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + readonly attribute char_string<32> vendorName = 0; + readonly attribute int16u vendorID = 1; + readonly attribute char_string<32> applicationName = 2; + readonly attribute int16u productID = 3; + readonly attribute ApplicationStatusEnum status = 5; + readonly attribute char_string<32> applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Basic = 40 { critical event StartUp = 0 { INT32U softwareVersion = 0; @@ -135,6 +177,210 @@ server cluster ColorControl = 768 { command StepColor(StepColorRequest): DefaultSuccess = 9; } +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; + } + + bitmap ContentLauncherFeature : BITMAP32 { + kContentSearch = 0x1; + kURLPlayback = 0x2; + } + + bitmap SupportedStreamingProtocol : BITMAP32 { + kDash = 0x1; + kHls = 0x2; + } + + struct ContentSearch { + Parameter parameterList[] = 0; + } + + struct Parameter { + ParameterEnum type = 0; + CHAR_STRING value = 1; + optional AdditionalInfo externalIDList[] = 2; + } + + struct AdditionalInfo { + CHAR_STRING name = 0; + CHAR_STRING value = 1; + } + + struct BrandingInformation { + CHAR_STRING providerName = 0; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; + } + + struct StyleInformation { + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; + } + + struct Dimension { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + readonly attribute CHAR_STRING acceptHeader[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct LaunchContentRequest { + ContentSearch search = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; + } + + request struct LaunchURLRequest { + CHAR_STRING contentURL = 0; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command LaunchContent(LaunchContentRequest): LaunchResponse = 0; + command LaunchURL(LaunchURLRequest): LaunchResponse = 1; +} + +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; + } + + bitmap ContentLauncherFeature : BITMAP32 { + kContentSearch = 0x1; + kURLPlayback = 0x2; + } + + bitmap SupportedStreamingProtocol : BITMAP32 { + kDash = 0x1; + kHls = 0x2; + } + + struct ContentSearch { + Parameter parameterList[] = 0; + } + + struct Parameter { + ParameterEnum type = 0; + CHAR_STRING value = 1; + optional AdditionalInfo externalIDList[] = 2; + } + + struct AdditionalInfo { + CHAR_STRING name = 0; + CHAR_STRING value = 1; + } + + struct BrandingInformation { + CHAR_STRING providerName = 0; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; + } + + struct StyleInformation { + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; + } + + struct Dimension { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + readonly attribute CHAR_STRING acceptHeader[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct LaunchContentRequest { + ContentSearch search = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; + } + + request struct LaunchURLRequest { + CHAR_STRING contentURL = 0; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command LaunchContent(LaunchContentRequest): LaunchResponse = 0; + command LaunchURL(LaunchURLRequest): LaunchResponse = 1; +} + server cluster Descriptor = 29 { struct DeviceType { DEVTYPE_ID type = 0; @@ -257,6 +503,97 @@ server cluster GeneralCommissioning = 48 { 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<32> name = 0; + BOOLEAN isOperational = 1; + nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; + nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING<8> hardwareAddress = 4; + OCTET_STRING IPv4Addresses[] = 5; + OCTET_STRING IPv6Addresses[] = 6; + InterfaceType type = 7; + } + + 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; + } + + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; readonly global attribute int16u clusterRevision = 65533; @@ -351,6 +688,242 @@ server cluster Identify = 3 { 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; + } + + bitmap KeypadInputFeature : BITMAP32 { + kNavigationKeyCodes = 0x1; + kLocationKeys = 0x2; + kNumberKeys = 0x4; + } + + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKey(SendKeyRequest): SendKeyResponse = 0; +} + +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; + } + + bitmap KeypadInputFeature : BITMAP32 { + kNavigationKeyCodes = 0x1; + kLocationKeys = 0x2; + kNumberKeys = 0x4; + } + + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKey(SendKeyRequest): SendKeyResponse = 0; +} + server cluster LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -574,10 +1147,29 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly global attribute bitmap32 featureMap = 65532; readonly global attribute 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; } @@ -765,6 +1357,114 @@ server cluster OperationalCredentials = 62 { command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; } +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; + } + + bitmap PumpStatus : BITMAP16 { + kDeviceFault = 0x1; + kSupplyfault = 0x2; + kSpeedLow = 0x4; + kSpeedHigh = 0x8; + kLocalOverride = 0x10; + kRunning = 0x20; + kRemotePressure = 0x40; + kRemoteFlow = 0x80; + kRemoteTemperature = 0x100; + } + + 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 { + } + + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute int16s minConstPressure = 3; + readonly attribute int16s maxConstPressure = 4; + readonly attribute int16s minCompPressure = 5; + readonly attribute int16s maxCompPressure = 6; + readonly attribute int16u minConstSpeed = 7; + readonly attribute int16u maxConstSpeed = 8; + readonly attribute int16u minConstFlow = 9; + readonly attribute int16u maxConstFlow = 10; + readonly attribute int16s minConstTemp = 11; + readonly attribute int16s maxConstTemp = 12; + readonly attribute bitmap16 pumpStatus = 16; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + readonly attribute int16u speed = 20; + attribute nullable int24u lifetimeRunningHours = 21; + readonly attribute int24u power = 22; + attribute nullable int32u lifetimeEnergyConsumed = 23; + attribute enum8 operationMode = 32; + attribute enum8 controlMode = 33; + readonly attribute bitmap16 alarmMask = 34; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Scenes = 5 { bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; @@ -869,6 +1569,70 @@ server cluster Scenes = 5 { command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; } +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kTargetNotFound = 1; + kNotAllowed = 2; + } + + struct TargetInfo { + INT8U identifier = 0; + CHAR_STRING<32> name = 1; + } + + readonly attribute TargetInfo targetList[] = 0; + readonly attribute int8u currentTarget = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct NavigateTargetRequest { + INT8U target = 0; + optional CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kTargetNotFound = 1; + kNotAllowed = 2; + } + + struct TargetInfo { + INT8U identifier = 0; + CHAR_STRING<32> name = 1; + } + + readonly attribute TargetInfo targetList[] = 0; + readonly attribute int8u currentTarget = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct NavigateTargetRequest { + INT8U target = 0; + optional CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; +} + client cluster TemperatureMeasurement = 1026 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; @@ -883,17 +1647,202 @@ server cluster TemperatureMeasurement = 1026 { readonly global attribute int16u clusterRevision = 65533; } +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeating = 5; + kPrecooling = 6; + kFanOnly = 7; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAwayOrVacation = 0x80; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointFieldPresent = 0x1; + kCoolSetpointFieldPresent = 0x2; + } + + bitmap ThermostatFeature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kSchedule = 0x8; + kSetback = 0x10; + kAutomode = 0x20; + } + + readonly attribute int16s localTemperature = 0; + readonly attribute int16s absMinHeatSetpointLimit = 3; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s minHeatSetpointLimit = 21; + attribute int16s maxHeatSetpointLimit = 22; + attribute int16s minCoolSetpointLimit = 23; + attribute int16s maxCoolSetpointLimit = 24; + attribute int8s minSetpointDeadBand = 25; + attribute ThermostatControlSequence controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + bitmap WcConfigStatus : BITMAP8 { + kOperational = 0x1; + kOnline = 0x2; + kOpenAndUpCommandsReversed = 0x4; + kLiftPositionAware = 0x8; + kTiltPositionAware = 0x10; + kLiftEncoderControlled = 0x20; + kTiltEncoderControlled = 0x40; + } + + bitmap WcFeature : BITMAP32 { + kLift = 0x1; + kTilt = 0x2; + kPositionAwareLift = 0x4; + kAbsolutePosition = 0x8; + kPositionAwareTilt = 0x10; + } + + bitmap WcMode : BITMAP8 { + kMotorDirectionReversed = 0x1; + kCalibrationMode = 0x2; + kMaintenanceMode = 0x4; + kLEDFeedback = 0x8; + } + + bitmap WcOperationalStatus : BITMAP8 { + kGlobal = 0x3; + kLift = 0xC; + kTilt = 0x30; + } + + bitmap WcSafetyStatus : BITMAP16 { + kRemoteLockout = 0x1; + kTamperDetection = 0x2; + kFailedCommunication = 0x4; + kPositionFailure = 0x8; + kThermalProtection = 0x10; + kObstacleDetected = 0x20; + kPower = 0x40; + kStopInput = 0x80; + kMotorJammed = 0x100; + kHardwareFailure = 0x200; + kManualOperation = 0x400; + kProtection = 0x800; + } + + readonly attribute enum8 type = 0; + readonly attribute nullable int16u currentPositionLift = 3; + readonly attribute nullable int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute nullable Percent currentPositionLiftPercentage = 8; + readonly attribute nullable Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute nullable Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute nullable Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute nullable Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute nullable Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute 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 { + binding cluster ApplicationBasic; + server cluster ApplicationBasic; server cluster Basic; + binding cluster ContentLauncher; + server cluster ContentLauncher; server cluster Descriptor; binding cluster GeneralCommissioning; server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + binding cluster KeypadInput; + server cluster KeypadInput; server cluster NetworkCommissioning; + server cluster OnOff; binding cluster OperationalCredentials; server cluster OperationalCredentials; + server cluster PumpConfigurationAndControl; + binding cluster TargetNavigator; + server cluster TargetNavigator; binding cluster TemperatureMeasurement; server cluster TemperatureMeasurement; + server cluster Thermostat; + server cluster WindowCovering; } endpoint 1 { diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 70d941ce1a8c85..b9bf12c600a628 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -36,6 +36,197 @@ "deviceTypeCode": null, "deviceTypeProfileId": null, "clusters": [ + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Descriptor", "code": 29, @@ -984,45 +1175,217 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", "enabled": 1, - "commands": [ + "commands": [], + "attributes": [ { - "name": "AttestationRequest", + "name": "NetworkInterfaces", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CertificateChainRequest", - "code": 2, + "name": "RebootCount", + "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CSRRequest", - "code": 4, + "name": "UpTime", + "code": 2, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 }, { - "name": "AddNOC", - "code": 6, + "name": "TotalOperationalHours", + "code": 3, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReasons", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, { "name": "UpdateNOC", "code": 7, @@ -1217,13 +1580,70 @@ ] }, { - "name": "Temperature Measurement", - "code": 1026, + "name": "Window Covering", + "code": 258, "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", + "define": "WINDOW_COVERING_CLUSTER", "side": "client", - "enabled": 1, - "commands": [], + "enabled": 0, + "commands": [ + { + "name": "UpOrOpen", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "DownOrClose", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMotion", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToLiftValue", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToLiftPercentage", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToTiltValue", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToTiltPercentage", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -1234,7 +1654,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1243,16 +1663,16 @@ ] }, { - "name": "Temperature Measurement", - "code": 1026, + "name": "Window Covering", + "code": 258, "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", + "define": "WINDOW_COVERING_CLUSTER", "side": "server", "enabled": 1, "commands": [], "attributes": [ { - "name": "MeasuredValue", + "name": "Type", "code": 0, "mfgCode": null, "side": "server", @@ -1260,70 +1680,1860 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MinMeasuredValue", - "code": 1, + "name": "CurrentPositionLift", + "code": 3, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x7FFF", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MaxMeasuredValue", - "code": 2, + "name": "CurrentPositionTilt", + "code": 4, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x7FFF", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Tolerance", - "code": 3, + "name": "ConfigStatus", + "code": 7, "mfgCode": null, "side": "server", - "included": 0, - "storageOption": "RAM", + "included": 1, + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x03", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentPositionLiftPercentage", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 0, + "maxInterval": 100, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercentage", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 0, + "maxInterval": 100, + "reportableChange": 0 + }, + { + "name": "OperationalStatus", + "code": 10, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 127, + "reportableChange": 0 + }, + { + "name": "TargetPositionLiftPercent100ths", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "TargetPositionTiltPercent100ths", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "EndProductType", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPositionLiftPercent100ths", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercent100ths", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitLift", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitLift", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitTilt", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitTilt", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Mode", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 15, + "reportableChange": 0 + }, + { + "name": "SafetyStatus", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "0x17", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIG_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIG_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "MaxPressure", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxSpeed", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxFlow", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinConstPressure", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstPressure", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCompPressure", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCompPressure", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstSpeed", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstSpeed", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstFlow", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstFlow", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstTemp", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstTemp", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PumpStatus", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EffectiveOperationMode", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EffectiveControlMode", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Capacity", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Speed", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeRunningHours", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Power", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeEnergyConsumed", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationMode", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ControlMode", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AlarmMask", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "SetWeeklySchedule", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetWeeklySchedule", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ClearWeeklySchedule", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetRelayStatusLog", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "GetWeeklyScheduleResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetRelayStatusLogResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "local temperature", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs min heat setpoint limit", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02BC", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs min cool setpoint limit", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0640", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs max cool setpoint limit", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0C80", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "pi cooling demand", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "pi heating demand", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "occupied cooling setpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A28", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "occupied heating setpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x07D0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min heat setpoint limit", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02BC", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max heat setpoint limit", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0BB8", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min cool setpoint limit", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0640", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max cool setpoint limit", + "code": 24, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0C80", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min setpoint dead band", + "code": 25, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x19", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "control sequence of operation", + "code": 27, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x04", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "system mode", + "code": 28, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "start of week", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of weekly transitions", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of daily transitions", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "temperature setpoint hold", + "code": 35, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "0x000b", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "NavigateTarget", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "NavigateTargetResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "TargetList", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentTarget", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "SendKey", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SendKeyResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCH_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "LaunchContent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "LaunchURL", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCH_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "LaunchResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "AcceptHeader", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedStreamingProtocols", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "VendorName", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationName", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + + { + "name": "Status", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationVersion", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AllowedVendorList", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 916fea9e0fc222..e39670fda270d1 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -1,6 +1,48 @@ // This IDL was generated automatically by ZAP. // It is for view/code review purposes only. +client cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + readonly attribute char_string<32> vendorName = 0; + readonly attribute int16u vendorID = 1; + readonly attribute char_string<32> applicationName = 2; + readonly attribute int16u productID = 3; + readonly attribute ApplicationStatusEnum status = 5; + readonly attribute char_string<32> applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; +} + +server cluster ApplicationBasic = 1293 { + enum ApplicationStatusEnum : ENUM8 { + kStopped = 0; + kActiveVisibleFocus = 1; + kActiveHidden = 2; + kActiveVisibleNotFocus = 3; + } + + readonly attribute char_string<32> vendorName = 0; + readonly attribute int16u vendorID = 1; + readonly attribute char_string<32> applicationName = 2; + readonly attribute int16u productID = 3; + readonly attribute ApplicationStatusEnum status = 5; + readonly attribute char_string<32> applicationVersion = 6; + readonly attribute vendor_id allowedVendorList[] = 7; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Basic = 40 { critical event StartUp = 0 { INT32U softwareVersion = 0; @@ -135,6 +177,210 @@ server cluster ColorControl = 768 { command StepColor(StepColorRequest): DefaultSuccess = 9; } +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; + } + + bitmap ContentLauncherFeature : BITMAP32 { + kContentSearch = 0x1; + kURLPlayback = 0x2; + } + + bitmap SupportedStreamingProtocol : BITMAP32 { + kDash = 0x1; + kHls = 0x2; + } + + struct ContentSearch { + Parameter parameterList[] = 0; + } + + struct Parameter { + ParameterEnum type = 0; + CHAR_STRING value = 1; + optional AdditionalInfo externalIDList[] = 2; + } + + struct AdditionalInfo { + CHAR_STRING name = 0; + CHAR_STRING value = 1; + } + + struct BrandingInformation { + CHAR_STRING providerName = 0; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; + } + + struct StyleInformation { + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; + } + + struct Dimension { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + readonly attribute CHAR_STRING acceptHeader[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct LaunchContentRequest { + ContentSearch search = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; + } + + request struct LaunchURLRequest { + CHAR_STRING contentURL = 0; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command LaunchContent(LaunchContentRequest): LaunchResponse = 0; + command LaunchURL(LaunchURLRequest): LaunchResponse = 1; +} + +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; + } + + bitmap ContentLauncherFeature : BITMAP32 { + kContentSearch = 0x1; + kURLPlayback = 0x2; + } + + bitmap SupportedStreamingProtocol : BITMAP32 { + kDash = 0x1; + kHls = 0x2; + } + + struct ContentSearch { + Parameter parameterList[] = 0; + } + + struct Parameter { + ParameterEnum type = 0; + CHAR_STRING value = 1; + optional AdditionalInfo externalIDList[] = 2; + } + + struct AdditionalInfo { + CHAR_STRING name = 0; + CHAR_STRING value = 1; + } + + struct BrandingInformation { + CHAR_STRING providerName = 0; + optional StyleInformation background = 1; + optional StyleInformation logo = 2; + optional StyleInformation progressBar = 3; + optional StyleInformation splash = 4; + optional StyleInformation waterMark = 5; + } + + struct StyleInformation { + optional CHAR_STRING imageUrl = 0; + optional CHAR_STRING color = 1; + optional Dimension size = 2; + } + + struct Dimension { + double width = 0; + double height = 1; + MetricTypeEnum metric = 2; + } + + readonly attribute CHAR_STRING acceptHeader[] = 0; + attribute bitmap32 supportedStreamingProtocols = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct LaunchContentRequest { + ContentSearch search = 0; + BOOLEAN autoPlay = 1; + optional CHAR_STRING data = 2; + } + + request struct LaunchURLRequest { + CHAR_STRING contentURL = 0; + optional CHAR_STRING displayString = 1; + optional BrandingInformation brandingInformation = 2; + } + + response struct LaunchResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command LaunchContent(LaunchContentRequest): LaunchResponse = 0; + command LaunchURL(LaunchURLRequest): LaunchResponse = 1; +} + server cluster Descriptor = 29 { struct DeviceType { DEVTYPE_ID type = 0; @@ -257,6 +503,97 @@ server cluster GeneralCommissioning = 48 { 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<32> name = 0; + BOOLEAN isOperational = 1; + nullable BOOLEAN offPremiseServicesReachableIPv4 = 2; + nullable BOOLEAN offPremiseServicesReachableIPv6 = 3; + OCTET_STRING<8> hardwareAddress = 4; + OCTET_STRING IPv4Addresses[] = 5; + OCTET_STRING IPv6Addresses[] = 6; + InterfaceType type = 7; + } + + 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; + } + + readonly attribute NetworkInterfaceType networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute int64u upTime = 2; + readonly attribute int32u totalOperationalHours = 3; + readonly attribute enum8 bootReasons = 4; + readonly attribute ENUM8 activeHardwareFaults[] = 5; + readonly attribute ENUM8 activeRadioFaults[] = 6; + readonly attribute ENUM8 activeNetworkFaults[] = 7; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Groups = 4 { readonly attribute bitmap8 nameSupport = 0; readonly global attribute int16u clusterRevision = 65533; @@ -351,6 +688,242 @@ server cluster Identify = 3 { 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; + } + + bitmap KeypadInputFeature : BITMAP32 { + kNavigationKeyCodes = 0x1; + kLocationKeys = 0x2; + kNumberKeys = 0x4; + } + + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKey(SendKeyRequest): SendKeyResponse = 0; +} + +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; + } + + bitmap KeypadInputFeature : BITMAP32 { + kNavigationKeyCodes = 0x1; + kLocationKeys = 0x2; + kNumberKeys = 0x4; + } + + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct SendKeyRequest { + CecKeyCode keyCode = 0; + } + + response struct SendKeyResponse { + StatusEnum status = 0; + } + + command SendKey(SendKeyRequest): SendKeyResponse = 0; +} + server cluster LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -574,10 +1147,29 @@ server cluster OnOff = 6 { } readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly global attribute bitmap32 featureMap = 65532; readonly global attribute 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; } @@ -765,6 +1357,114 @@ server cluster OperationalCredentials = 62 { command UpdateNOC(UpdateNOCRequest): NOCResponse = 7; } +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; + } + + bitmap PumpStatus : BITMAP16 { + kDeviceFault = 0x1; + kSupplyfault = 0x2; + kSpeedLow = 0x4; + kSpeedHigh = 0x8; + kLocalOverride = 0x10; + kRunning = 0x20; + kRemotePressure = 0x40; + kRemoteFlow = 0x80; + kRemoteTemperature = 0x100; + } + + 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 { + } + + readonly attribute int16s maxPressure = 0; + readonly attribute int16u maxSpeed = 1; + readonly attribute int16u maxFlow = 2; + readonly attribute int16s minConstPressure = 3; + readonly attribute int16s maxConstPressure = 4; + readonly attribute int16s minCompPressure = 5; + readonly attribute int16s maxCompPressure = 6; + readonly attribute int16u minConstSpeed = 7; + readonly attribute int16u maxConstSpeed = 8; + readonly attribute int16u minConstFlow = 9; + readonly attribute int16u maxConstFlow = 10; + readonly attribute int16s minConstTemp = 11; + readonly attribute int16s maxConstTemp = 12; + readonly attribute bitmap16 pumpStatus = 16; + readonly attribute enum8 effectiveOperationMode = 17; + readonly attribute enum8 effectiveControlMode = 18; + readonly attribute int16s capacity = 19; + readonly attribute int16u speed = 20; + attribute nullable int24u lifetimeRunningHours = 21; + readonly attribute int24u power = 22; + attribute nullable int32u lifetimeEnergyConsumed = 23; + attribute enum8 operationMode = 32; + attribute enum8 controlMode = 33; + readonly attribute bitmap16 alarmMask = 34; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Scenes = 5 { bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; @@ -869,6 +1569,70 @@ server cluster Scenes = 5 { command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; } +client cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kTargetNotFound = 1; + kNotAllowed = 2; + } + + struct TargetInfo { + INT8U identifier = 0; + CHAR_STRING<32> name = 1; + } + + readonly attribute TargetInfo targetList[] = 0; + readonly attribute int8u currentTarget = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct NavigateTargetRequest { + INT8U target = 0; + optional CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; +} + +server cluster TargetNavigator = 1285 { + enum StatusEnum : ENUM8 { + kSuccess = 0; + kTargetNotFound = 1; + kNotAllowed = 2; + } + + struct TargetInfo { + INT8U identifier = 0; + CHAR_STRING<32> name = 1; + } + + readonly attribute TargetInfo targetList[] = 0; + readonly attribute int8u currentTarget = 1; + readonly global attribute command_id serverGeneratedCommandList[] = 65528; + readonly global attribute command_id clientGeneratedCommandList[] = 65529; + readonly global attribute attrib_id attributeList[] = 65531; + readonly global attribute int16u clusterRevision = 65533; + + request struct NavigateTargetRequest { + INT8U target = 0; + optional CHAR_STRING data = 1; + } + + response struct NavigateTargetResponse { + StatusEnum status = 0; + optional CHAR_STRING data = 1; + } + + command NavigateTarget(NavigateTargetRequest): NavigateTargetResponse = 0; +} + client cluster TemperatureMeasurement = 1026 { readonly attribute nullable int16s measuredValue = 0; readonly attribute nullable int16s minMeasuredValue = 1; @@ -883,17 +1647,202 @@ server cluster TemperatureMeasurement = 1026 { readonly global attribute int16u clusterRevision = 65533; } +server cluster Thermostat = 513 { + enum SetpointAdjustMode : ENUM8 { + kHeatSetpoint = 0; + kCoolSetpoint = 1; + kHeatAndCoolSetpoints = 2; + } + + enum ThermostatControlSequence : ENUM8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum ThermostatRunningMode : ENUM8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + enum ThermostatSystemMode : ENUM8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeating = 5; + kPrecooling = 6; + kFanOnly = 7; + } + + bitmap DayOfWeek : BITMAP8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAwayOrVacation = 0x80; + } + + bitmap ModeForSequence : BITMAP8 { + kHeatSetpointFieldPresent = 0x1; + kCoolSetpointFieldPresent = 0x2; + } + + bitmap ThermostatFeature : BITMAP32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kSchedule = 0x8; + kSetback = 0x10; + kAutomode = 0x20; + } + + readonly attribute int16s localTemperature = 0; + readonly attribute int16s absMinHeatSetpointLimit = 3; + readonly attribute int16s absMinCoolSetpointLimit = 5; + readonly attribute int16s absMaxCoolSetpointLimit = 6; + attribute int16s occupiedCoolingSetpoint = 17; + attribute int16s occupiedHeatingSetpoint = 18; + attribute int16s minHeatSetpointLimit = 21; + attribute int16s maxHeatSetpointLimit = 22; + attribute int16s minCoolSetpointLimit = 23; + attribute int16s maxCoolSetpointLimit = 24; + attribute int8s minSetpointDeadBand = 25; + attribute ThermostatControlSequence controlSequenceOfOperation = 27; + attribute enum8 systemMode = 28; + readonly attribute enum8 startOfWeek = 32; + readonly attribute int8u numberOfWeeklyTransitions = 33; + readonly attribute int8u numberOfDailyTransitions = 34; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; +} + +server cluster WindowCovering = 258 { + bitmap WcConfigStatus : BITMAP8 { + kOperational = 0x1; + kOnline = 0x2; + kOpenAndUpCommandsReversed = 0x4; + kLiftPositionAware = 0x8; + kTiltPositionAware = 0x10; + kLiftEncoderControlled = 0x20; + kTiltEncoderControlled = 0x40; + } + + bitmap WcFeature : BITMAP32 { + kLift = 0x1; + kTilt = 0x2; + kPositionAwareLift = 0x4; + kAbsolutePosition = 0x8; + kPositionAwareTilt = 0x10; + } + + bitmap WcMode : BITMAP8 { + kMotorDirectionReversed = 0x1; + kCalibrationMode = 0x2; + kMaintenanceMode = 0x4; + kLEDFeedback = 0x8; + } + + bitmap WcOperationalStatus : BITMAP8 { + kGlobal = 0x3; + kLift = 0xC; + kTilt = 0x30; + } + + bitmap WcSafetyStatus : BITMAP16 { + kRemoteLockout = 0x1; + kTamperDetection = 0x2; + kFailedCommunication = 0x4; + kPositionFailure = 0x8; + kThermalProtection = 0x10; + kObstacleDetected = 0x20; + kPower = 0x40; + kStopInput = 0x80; + kMotorJammed = 0x100; + kHardwareFailure = 0x200; + kManualOperation = 0x400; + kProtection = 0x800; + } + + readonly attribute enum8 type = 0; + readonly attribute nullable int16u currentPositionLift = 3; + readonly attribute nullable int16u currentPositionTilt = 4; + readonly attribute bitmap8 configStatus = 7; + readonly attribute nullable Percent currentPositionLiftPercentage = 8; + readonly attribute nullable Percent currentPositionTiltPercentage = 9; + readonly attribute bitmap8 operationalStatus = 10; + readonly attribute nullable Percent100ths targetPositionLiftPercent100ths = 11; + readonly attribute nullable Percent100ths targetPositionTiltPercent100ths = 12; + readonly attribute enum8 endProductType = 13; + readonly attribute nullable Percent100ths currentPositionLiftPercent100ths = 14; + readonly attribute nullable Percent100ths currentPositionTiltPercent100ths = 15; + readonly attribute int16u installedOpenLimitLift = 16; + readonly attribute int16u installedClosedLimitLift = 17; + readonly attribute int16u installedOpenLimitTilt = 18; + readonly attribute int16u installedClosedLimitTilt = 19; + attribute bitmap8 mode = 23; + readonly attribute bitmap16 safetyStatus = 26; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute 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 { + binding cluster ApplicationBasic; + server cluster ApplicationBasic; server cluster Basic; + binding cluster ContentLauncher; + server cluster ContentLauncher; server cluster Descriptor; binding cluster GeneralCommissioning; server cluster GeneralCommissioning; + server cluster GeneralDiagnostics; + binding cluster KeypadInput; + server cluster KeypadInput; server cluster NetworkCommissioning; + server cluster OnOff; binding cluster OperationalCredentials; server cluster OperationalCredentials; + server cluster PumpConfigurationAndControl; + binding cluster TargetNavigator; + server cluster TargetNavigator; binding cluster TemperatureMeasurement; server cluster TemperatureMeasurement; + server cluster Thermostat; + server cluster WindowCovering; } endpoint 1 { diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 63840d8902ca4c..b9bf12c600a628 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -36,6 +36,197 @@ "deviceTypeCode": null, "deviceTypeProfileId": null, "clusters": [ + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OffWithEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithRecallGlobalScene", + "code": 65, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "OnWithTimedOff", + "code": 66, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "OnOff", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GlobalSceneControl", + "code": 16384, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OnTime", + "code": 16385, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OffWaitTime", + "code": 16386, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StartUpOnOff", + "code": 16387, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "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": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Descriptor", "code": 29, @@ -519,21 +710,6 @@ } ], "attributes": [ - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "client", - "included": 0, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 0, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "ClusterRevision", "code": 65533, @@ -999,39 +1175,211 @@ ] }, { - "name": "Operational Credentials", - "code": 62, + "name": "General Diagnostics", + "code": 51, "mfgCode": null, - "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "define": "GENERAL_DIAGNOSTICS_CLUSTER", "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", "enabled": 1, - "commands": [ + "commands": [], + "attributes": [ { - "name": "AttestationRequest", + "name": "NetworkInterfaces", "code": 0, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CertificateChainRequest", - "code": 2, + "name": "RebootCount", + "code": 1, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 }, { - "name": "CSRRequest", - "code": 4, + "name": "UpTime", + "code": 2, "mfgCode": null, - "source": "client", - "incoming": 1, - "outgoing": 1 - }, - { - "name": "AddNOC", + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReasons", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "AddNOC", "code": 6, "mfgCode": null, "source": "client", @@ -1232,13 +1580,70 @@ ] }, { - "name": "Temperature Measurement", - "code": 1026, + "name": "Window Covering", + "code": 258, "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", + "define": "WINDOW_COVERING_CLUSTER", "side": "client", - "enabled": 1, - "commands": [], + "enabled": 0, + "commands": [ + { + "name": "UpOrOpen", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "DownOrClose", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "StopMotion", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToLiftValue", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToLiftPercentage", + "code": 5, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToTiltValue", + "code": 7, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GoToTiltPercentage", + "code": 8, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 0 + } + ], "attributes": [ { "name": "ClusterRevision", @@ -1249,7 +1654,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "5", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -1258,16 +1663,16 @@ ] }, { - "name": "Temperature Measurement", - "code": 1026, + "name": "Window Covering", + "code": 258, "mfgCode": null, - "define": "TEMP_MEASUREMENT_CLUSTER", + "define": "WINDOW_COVERING_CLUSTER", "side": "server", "enabled": 1, "commands": [], "attributes": [ { - "name": "MeasuredValue", + "name": "Type", "code": 0, "mfgCode": null, "side": "server", @@ -1275,70 +1680,1860 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MinMeasuredValue", - "code": 1, + "name": "CurrentPositionLift", + "code": 3, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x7FFF", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "MaxMeasuredValue", - "code": 2, + "name": "CurrentPositionTilt", + "code": 4, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "0x8000", + "defaultValue": "0x7FFF", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "Tolerance", - "code": 3, + "name": "ConfigStatus", + "code": 7, "mfgCode": null, "side": "server", - "included": 0, - "storageOption": "RAM", + "included": 1, + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x03", "reportable": 1, "minInterval": 0, "maxInterval": 65344, "reportableChange": 0 }, { - "name": "ClusterRevision", - "code": 65533, + "name": "CurrentPositionLiftPercentage", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 0, + "maxInterval": 100, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercentage", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "50", + "reportable": 1, + "minInterval": 0, + "maxInterval": 100, + "reportableChange": 0 + }, + { + "name": "OperationalStatus", + "code": 10, "mfgCode": null, "side": "server", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "0x00", "reportable": 1, "minInterval": 0, - "maxInterval": 65344, + "maxInterval": 127, + "reportableChange": 0 + }, + { + "name": "TargetPositionLiftPercent100ths", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "TargetPositionTiltPercent100ths", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "EndProductType", + "code": 13, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentPositionLiftPercent100ths", + "code": 14, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "CurrentPositionTiltPercent100ths", + "code": 15, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "500", + "reportable": 1, + "minInterval": 0, + "maxInterval": 10000, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitLift", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitLift", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledOpenLimitTilt", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "InstalledClosedLimitTilt", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFFFF", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Mode", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 15, + "reportableChange": 0 + }, + { + "name": "SafetyStatus", + "code": 26, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "0x17", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIG_CONTROL_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Pump Configuration and Control", + "code": 512, + "mfgCode": null, + "define": "PUMP_CONFIG_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "MaxPressure", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxSpeed", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxFlow", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinConstPressure", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstPressure", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinCompPressure", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCompPressure", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstSpeed", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstSpeed", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstFlow", + "code": 9, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstFlow", + "code": 10, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinConstTemp", + "code": 11, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxConstTemp", + "code": 12, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PumpStatus", + "code": 16, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EffectiveOperationMode", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "EffectiveControlMode", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Capacity", + "code": 19, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Speed", + "code": 20, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeRunningHours", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Power", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LifetimeEnergyConsumed", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00000000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OperationMode", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ControlMode", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AlarmMask", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "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": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "client", + "enabled": 0, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "SetWeeklySchedule", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetWeeklySchedule", + "code": 2, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "ClearWeeklySchedule", + "code": 3, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + }, + { + "name": "GetRelayStatusLog", + "code": 4, + "mfgCode": null, + "source": "client", + "incoming": 0, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "GetWeeklyScheduleResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + }, + { + "name": "GetRelayStatusLogResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 0 + } + ], + "attributes": [ + { + "name": "local temperature", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs min heat setpoint limit", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02BC", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs min cool setpoint limit", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0640", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "abs max cool setpoint limit", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0C80", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "pi cooling demand", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "pi heating demand", + "code": 8, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "occupied cooling setpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A28", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "occupied heating setpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x07D0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min heat setpoint limit", + "code": 21, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x02BC", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max heat setpoint limit", + "code": 22, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0BB8", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min cool setpoint limit", + "code": 23, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0640", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "max cool setpoint limit", + "code": 24, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0C80", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "min setpoint dead band", + "code": 25, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x19", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "control sequence of operation", + "code": 27, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x04", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "system mode", + "code": 28, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "start of week", + "code": 32, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of weekly transitions", + "code": 33, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "7", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "number of daily transitions", + "code": 34, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "temperature setpoint hold", + "code": 35, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "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": "0x000b", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Temperature Measurement", + "code": 1026, + "mfgCode": null, + "define": "TEMP_MEASUREMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "MeasuredValue", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinMeasuredValue", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxMeasuredValue", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x8000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Tolerance", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 0, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "NavigateTarget", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Target Navigator", + "code": 1285, + "mfgCode": null, + "define": "TARGET_NAVIGATOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "NavigateTargetResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "TargetList", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentTarget", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "SendKey", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Keypad Input", + "code": 1289, + "mfgCode": null, + "define": "KEYPAD_INPUT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SendKeyResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCH_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "LaunchContent", + "code": 0, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + }, + { + "name": "LaunchURL", + "code": 1, + "mfgCode": null, + "source": "client", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Content Launcher", + "code": 1290, + "mfgCode": null, + "define": "CONTENT_LAUNCH_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "LaunchResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "incoming": 1, + "outgoing": 1 + } + ], + "attributes": [ + { + "name": "AcceptHeader", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedStreamingProtocols", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Application Basic", + "code": 1293, + "mfgCode": null, + "define": "APPLICATION_BASIC_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [], + "attributes": [ + { + "name": "VendorName", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationName", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + + { + "name": "Status", + "code": 5, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ApplicationVersion", + "code": 6, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AllowedVendorList", + "code": 7, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerGeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientGeneratedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, "reportableChange": 0 } ] diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h index edf603084e6a0d..c407ac1f419f35 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClientCallbacks.h @@ -31,6 +31,46 @@ #include // List specific responses +void ApplicationBasicClusterAllowedVendorListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void GeneralCommissioningClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -46,6 +86,20 @@ void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVR chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -58,3 +112,24 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chi chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorTargetListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h index 28fd99fb7cbc7e..c59f0704744494 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h @@ -30,6 +30,20 @@ namespace chip { namespace Controller { +class DLL_EXPORT ApplicationBasicCluster : public ClusterBase +{ +public: + ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ~ApplicationBasicCluster() {} +}; + +class DLL_EXPORT ContentLauncherCluster : public ClusterBase +{ +public: + ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ~ContentLauncherCluster() {} +}; + class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: @@ -37,6 +51,13 @@ class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase ~GeneralCommissioningCluster() {} }; +class DLL_EXPORT KeypadInputCluster : public ClusterBase +{ +public: + KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + ~KeypadInputCluster() {} +}; + class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: @@ -44,6 +65,13 @@ class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase ~OperationalCredentialsCluster() {} }; +class DLL_EXPORT TargetNavigatorCluster : public ClusterBase +{ +public: + TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + ~TargetNavigatorCluster() {} +}; + class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: diff --git a/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp index 31ca036c72818d..64aea788706522 100644 --- a/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/IMClusterCommandHandler.cpp @@ -96,6 +96,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace ColorControl +namespace ContentLauncher { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::LaunchContent::Id: { + Commands::LaunchContent::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfContentLauncherClusterLaunchContentCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::LaunchURL::Id: { + Commands::LaunchURL::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfContentLauncherClusterLaunchURLCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace ContentLauncher + namespace GeneralCommissioning { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -280,6 +326,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Identify +namespace KeypadInput { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::SendKey::Id: { + Commands::SendKey::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfKeypadInputClusterSendKeyCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace KeypadInput + namespace LevelControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -482,6 +565,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::OffWithEffect::Id: { + Commands::OffWithEffect::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOffWithEffectCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::On::Id: { Commands::On::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -491,6 +583,24 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::OnWithRecallGlobalScene::Id: { + Commands::OnWithRecallGlobalScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::OnWithTimedOff::Id: { + Commands::OnWithTimedOff::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::Toggle::Id: { Commands::Toggle::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -723,6 +833,134 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Scenes +namespace TargetNavigator { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::NavigateTarget::Id: { + Commands::NavigateTarget::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfTargetNavigatorClusterNavigateTargetCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace TargetNavigator + +namespace WindowCovering { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::DownOrClose::Id: { + Commands::DownOrClose::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterDownOrCloseCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToLiftPercentage::Id: { + Commands::GoToLiftPercentage::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToLiftPercentageCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToLiftValue::Id: { + Commands::GoToLiftValue::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToLiftValueCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToTiltPercentage::Id: { + Commands::GoToTiltPercentage::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToTiltPercentageCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToTiltValue::Id: { + Commands::GoToTiltValue::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToTiltValueCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StopMotion::Id: { + Commands::StopMotion::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterStopMotionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpOrOpen::Id: { + Commands::UpOrOpen::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterUpOrOpenCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace WindowCovering + } // namespace Clusters void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj) @@ -734,6 +972,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::ColorControl::Id: Clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::ContentLauncher::Id: + Clusters::ContentLauncher::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::GeneralCommissioning::Id: Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -743,6 +984,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Identify::Id: Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::KeypadInput::Id: + Clusters::KeypadInput::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::LevelControl::Id: Clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -758,6 +1002,12 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Scenes::Id: Clusters::Scenes::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::TargetNavigator::Id: + Clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::WindowCovering::Id: + Clusters::WindowCovering::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; default: ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster); diff --git a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h index 837b9ca341ef68..c73db0e906ef14 100644 --- a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h @@ -22,18 +22,30 @@ #include #define MATTER_PLUGINS_INIT \ + MatterApplicationBasicPluginClientInitCallback(); \ + MatterApplicationBasicPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ + MatterContentLauncherPluginClientInitCallback(); \ + MatterContentLauncherPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ MatterGeneralCommissioningPluginClientInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterGroupsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterKeypadInputPluginClientInitCallback(); \ + MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginClientInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ + MatterPumpConfigurationAndControlPluginServerInitCallback(); \ MatterScenesPluginServerInitCallback(); \ + MatterTargetNavigatorPluginClientInitCallback(); \ + MatterTargetNavigatorPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginClientInitCallback(); \ - MatterTemperatureMeasurementPluginServerInitCallback(); + MatterTemperatureMeasurementPluginServerInitCallback(); \ + MatterThermostatPluginServerInitCallback(); \ + MatterWindowCoveringPluginServerInitCallback(); diff --git a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp index 0b3aa180536821..f57c304662c26c 100644 --- a/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app1/zap-generated/callback-stub.cpp @@ -29,24 +29,36 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { + case ZCL_APPLICATION_BASIC_CLUSTER_ID: + emberAfApplicationBasicClusterInitCallback(endpoint); + break; case ZCL_BASIC_CLUSTER_ID: emberAfBasicClusterInitCallback(endpoint); break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; + case ZCL_CONTENT_LAUNCH_CLUSTER_ID: + emberAfContentLauncherClusterInitCallback(endpoint); + break; case ZCL_DESCRIPTOR_CLUSTER_ID: emberAfDescriptorClusterInitCallback(endpoint); break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_GROUPS_CLUSTER_ID: emberAfGroupsClusterInitCallback(endpoint); break; case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_KEYPAD_INPUT_CLUSTER_ID: + emberAfKeypadInputClusterInitCallback(endpoint); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; @@ -59,18 +71,35 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; + case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID: + emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); + break; case ZCL_SCENES_CLUSTER_ID: emberAfScenesClusterInitCallback(endpoint); break; + case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: + emberAfTargetNavigatorClusterInitCallback(endpoint); + break; case ZCL_TEMP_MEASUREMENT_CLUSTER_ID: emberAfTemperatureMeasurementClusterInitCallback(endpoint); break; + case ZCL_THERMOSTAT_CLUSTER_ID: + emberAfThermostatClusterInitCallback(endpoint); + break; + case ZCL_WINDOW_COVERING_CLUSTER_ID: + emberAfWindowCoveringClusterInitCallback(endpoint); + break; default: // Unrecognized cluster ID break; } } +void __attribute__((weak)) emberAfApplicationBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfBasicClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -81,6 +110,11 @@ void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfContentLauncherClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -91,6 +125,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -101,6 +140,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfKeypadInputClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -121,16 +165,36 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfWindowCoveringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} // // Non-Cluster Related Callbacks diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 357c1c868001d8..10d7785531b69e 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -29,47 +29,131 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + /* Endpoint: 0, Cluster: On/Off (server), big-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 0 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x01, \ \ - /* 8 - FeatureMap, */ \ + /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + \ + /* 4 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 12 - LastConnectErrorValue, */ \ + /* 16 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ + \ + /* 24 - UpTime, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 32 - TotalOperationalHours, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Window Covering (server), big-endian */ \ + \ + /* 36 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x17, \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server), big-endian */ \ + \ + /* 40 - LifetimeRunningHours, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 43 - Power, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 46 - LifetimeEnergyConsumed, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 50 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thermostat (server), big-endian */ \ + \ + /* 54 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x0B, \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server), big-endian */ \ + \ + /* 58 - SupportedStreamingProtocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ + /* Endpoint: 0, Cluster: On/Off (server), little-endian */ \ + \ + /* 0 - FeatureMap, */ \ + 0x01, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 4 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 12 - LastConnectErrorValue, */ \ + /* 16 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 24 - UpTime, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 32 - TotalOperationalHours, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Window Covering (server), little-endian */ \ + \ + /* 36 - FeatureMap, */ \ + 0x17, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server), little-endian */ \ + \ + /* 40 - LifetimeRunningHours, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 43 - Power, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 46 - LifetimeEnergyConsumed, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 50 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thermostat (server), little-endian */ \ + \ + /* 54 - FeatureMap, */ \ + 0x0B, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server), little-endian */ \ + \ + /* 58 - SupportedStreamingProtocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (4) +#define GENERATED_DEFAULTS_COUNT (14) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -90,12 +174,28 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 12 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: Identify (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ @@ -105,12 +205,21 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 92 +#define GENERATED_ATTRIBUTE_COUNT 187 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + /* Endpoint: 0, Cluster: On/Off (server) */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFF) }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ @@ -159,13 +268,13 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ @@ -176,10 +285,23 @@ { 0x00000005, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ { 0x00000007, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(12) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + ZAP_LONG_DEFAULTS_INDEX(16) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Fabrics */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ @@ -190,15 +312,136 @@ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionLiftPercentage */ \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionLiftPercent100ths */ \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(36) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(40) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(43) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(46) }, /* LifetimeEnergyConsumed */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OperationMode */ \ + { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x02BC) }, /* abs min heat setpoint limit */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* abs min cool setpoint limit */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* abs max cool setpoint limit */ \ + { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ + { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ + { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* min heat setpoint limit */ \ + { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* max heat setpoint limit */ \ + { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* min cool setpoint limit */ \ + { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* max cool setpoint limit */ \ + { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* min setpoint dead band */ \ + { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* control sequence of operation */ \ + { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ { 0x00000001, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ { 0x00000002, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Target Navigator (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TargetList */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* CurrentTarget */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Keypad Input (server) */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* AcceptHeader */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(58) }, /* SupportedStreamingProtocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Application Basic (server) */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationVersion */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* AllowedVendorList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* identify time */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -271,7 +514,7 @@ ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* start up color temperature mireds */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } @@ -282,9 +525,22 @@ // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ + (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \ (EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayWindowCoveringServer[] = { \ + (EmberAfGenericClusterFunction) MatterWindowCoveringClusterServerAttributeChangedCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \ + (EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayThermostatServer[] = { \ + (EmberAfGenericClusterFunction) emberAfThermostatClusterServerInitCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback, \ @@ -295,9 +551,6 @@ const EmberAfGenericClusterFunction chipFuncArrayScenesServer[] = { \ (EmberAfGenericClusterFunction) emberAfScenesClusterServerInitCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ - (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \ }; \ @@ -307,6 +560,15 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: On/Off (server) */\ + /* client_generated */ \ + 0x00000000 /* Off */, \ + 0x00000001 /* On */, \ + 0x00000002 /* Toggle */, \ + 0x00000040 /* OffWithEffect */, \ + 0x00000041 /* OnWithRecallGlobalScene */, \ + 0x00000042 /* OnWithTimedOff */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* client_generated */ \ 0x00000000 /* ArmFailSafe */, \ @@ -349,6 +611,44 @@ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Window Covering (server) */\ + /* client_generated */ \ + 0x00000000 /* UpOrOpen */, \ + 0x00000001 /* DownOrClose */, \ + 0x00000002 /* StopMotion */, \ + 0x00000004 /* GoToLiftValue */, \ + 0x00000005 /* GoToLiftPercentage */, \ + 0x00000007 /* GoToTiltValue */, \ + 0x00000008 /* GoToTiltPercentage */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Thermostat (server) */\ + /* client_generated */ \ + 0x00000000 /* SetpointRaiseLower */, \ + 0x00000000 /* GetWeeklyScheduleResponse */, \ + 0x00000001 /* GetRelayStatusLogResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Target Navigator (server) */\ + /* client_generated */ \ + 0x00000000 /* NavigateTarget */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000001 /* NavigateTargetResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Keypad Input (server) */\ + /* client_generated */ \ + 0x00000000 /* SendKey */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000001 /* SendKeyResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Content Launcher (server) */\ + /* client_generated */ \ + 0x00000000 /* LaunchContent */, \ + 0x00000001 /* LaunchURL */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000002 /* LaunchResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ /* client_generated */ \ 0x00000000 /* Identify */, \ @@ -418,14 +718,25 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 16 +#define GENERATED_CLUSTER_COUNT 29 // clang-format off #define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: On/Off (server) */ \ + .clusterId = 0x00000006, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 7, \ + .clusterSize = 13, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayOnOffServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributes = ZAP_ATTRIBUTE_INDEX(7), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -436,7 +747,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributes = ZAP_ATTRIBUTE_INDEX(12), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -447,7 +758,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(25), \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -458,29 +769,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(25), \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 11 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(31), \ + .attributes = ZAP_ATTRIBUTE_INDEX(38), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + .clusterId = 0x00000033, \ + .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributeCount = 9, \ + .clusterSize = 17, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -491,18 +813,51 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + .clusterId = 0x00000102, \ + .attributes = ZAP_ATTRIBUTE_INDEX(63), \ + .attributeCount = 20, \ + .clusterSize = 35, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayWindowCoveringServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + .clusterId = 0x00000200, \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ + .attributeCount = 26, \ + .clusterSize = 54, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayPumpConfigurationAndControlServer, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + .clusterId = 0x00000201, \ + .attributes = ZAP_ATTRIBUTE_INDEX(109), \ + .attributeCount = 18, \ + .clusterSize = 32, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayThermostatServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ + .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(127), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -513,7 +868,7 @@ { \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(127), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -521,65 +876,153 @@ .clientGeneratedCommandList = nullptr ,\ .serverGeneratedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 0, Cluster: Target Navigator (client) */ \ + .clusterId = 0x00000505, \ + .attributes = ZAP_ATTRIBUTE_INDEX(131), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Target Navigator (server) */ \ + .clusterId = 0x00000505, \ + .attributes = ZAP_ATTRIBUTE_INDEX(131), \ + .attributeCount = 3, \ + .clusterSize = 3, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Keypad Input (client) */ \ + .clusterId = 0x00000509, \ + .attributes = ZAP_ATTRIBUTE_INDEX(134), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Keypad Input (server) */ \ + .clusterId = 0x00000509, \ + .attributes = ZAP_ATTRIBUTE_INDEX(134), \ + .attributeCount = 1, \ + .clusterSize = 2, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Content Launcher (client) */ \ + .clusterId = 0x0000050A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(135), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Content Launcher (server) */ \ + .clusterId = 0x0000050A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(135), \ + .attributeCount = 3, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Application Basic (client) */ \ + .clusterId = 0x0000050D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Application Basic (server) */ \ + .clusterId = 0x0000050D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributeCount = 8, \ + .clusterSize = 106, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(51), \ + .attributes = ZAP_ATTRIBUTE_INDEX(146), \ .attributeCount = 3, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(54), \ + .attributes = ZAP_ATTRIBUTE_INDEX(149), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(56), \ + .attributes = ZAP_ATTRIBUTE_INDEX(151), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(62), \ + .attributes = ZAP_ATTRIBUTE_INDEX(157), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 97 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(64), \ + .attributes = ZAP_ATTRIBUTE_INDEX(159), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(66), \ + .attributes = ZAP_ATTRIBUTE_INDEX(161), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -590,12 +1033,12 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(86), \ + .attributes = ZAP_ATTRIBUTE_INDEX(181), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 110 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ } @@ -604,12 +1047,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 13 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 22 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 9, 115 }, { ZAP_CLUSTER_INDEX(9), 7, 72 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 383 }, { ZAP_CLUSTER_INDEX(22), 7, 72 }, \ } // Largest attribute size is needed for various buffers @@ -621,7 +1064,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (78) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (187) +#define ATTRIBUTE_MAX_SIZE (455) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index 42419dcf74379a..6ae5cf0539b8e0 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -29,24 +29,45 @@ #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ +#define EMBER_AF_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ +// Use this macro to check if the client side of the Application Basic cluster is included +#define ZCL_USING_APPLICATION_BASIC_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_APPLICATION_BASIC_CLIENT + +// Use this macro to check if the server side of the Application Basic cluster is included +#define ZCL_USING_APPLICATION_BASIC_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_APPLICATION_BASIC_SERVER +#define EMBER_AF_PLUGIN_APPLICATION_BASIC + // Use this macro to check if the server side of the Basic cluster is included #define ZCL_USING_BASIC_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BASIC_SERVER @@ -61,6 +82,15 @@ #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV +// Use this macro to check if the client side of the Content Launcher cluster is included +#define ZCL_USING_CONTENT_LAUNCH_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_CLIENT + +// Use this macro to check if the server side of the Content Launcher cluster is included +#define ZCL_USING_CONTENT_LAUNCH_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_SERVER +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER + // Use this macro to check if the server side of the Descriptor cluster is included #define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER @@ -75,6 +105,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the General Diagnostics cluster is included +#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS + // Use this macro to check if the server side of the Groups cluster is included #define ZCL_USING_GROUPS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUPS_SERVER @@ -85,6 +120,15 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the client side of the Keypad Input cluster is included +#define ZCL_USING_KEYPAD_INPUT_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_KEYPAD_INPUT_CLIENT + +// Use this macro to check if the server side of the Keypad Input cluster is included +#define ZCL_USING_KEYPAD_INPUT_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_KEYPAD_INPUT_SERVER +#define EMBER_AF_PLUGIN_KEYPAD_INPUT + // Use this macro to check if the server side of the Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER @@ -113,6 +157,11 @@ #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS +// Use this macro to check if the server side of the Pump Configuration and Control cluster is included +#define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL_SERVER +#define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL + // Use this macro to check if the server side of the Scenes cluster is included #define ZCL_USING_SCENES_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SCENES_SERVER @@ -120,6 +169,15 @@ // User options for server plugin Scenes #define EMBER_AF_PLUGIN_SCENES_TABLE_SIZE 3 +// Use this macro to check if the client side of the Target Navigator cluster is included +#define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_CLIENT + +// Use this macro to check if the server side of the Target Navigator cluster is included +#define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR + // Use this macro to check if the client side of the Temperature Measurement cluster is included #define ZCL_USING_TEMP_MEASUREMENT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT_CLIENT @@ -128,3 +186,13 @@ #define ZCL_USING_TEMP_MEASUREMENT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT_SERVER #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT + +// Use this macro to check if the server side of the Thermostat cluster is included +#define ZCL_USING_THERMOSTAT_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_THERMOSTAT_SERVER +#define EMBER_AF_PLUGIN_THERMOSTAT + +// Use this macro to check if the server side of the Window Covering cluster is included +#define ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_WINDOW_COVERING_SERVER +#define EMBER_AF_PLUGIN_WINDOW_COVERING diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h index edf603084e6a0d..c407ac1f419f35 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClientCallbacks.h @@ -31,6 +31,46 @@ #include // List specific responses +void ApplicationBasicClusterAllowedVendorListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicAllowedVendorListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ApplicationBasicClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ApplicationBasicAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void ContentLauncherClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*ContentLauncherAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); void GeneralCommissioningClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -46,6 +86,20 @@ void GeneralCommissioningClusterAttributeListListAttributeFilter(chip::TLV::TLVR chip::Callback::Cancelable * onFailureCallback); typedef void (*GeneralCommissioningAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void KeypadInputClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*KeypadInputAttributeListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void OperationalCredentialsClusterFabricsListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); @@ -58,3 +112,24 @@ void OperationalCredentialsClusterTrustedRootCertificatesListAttributeFilter(chi chip::Callback::Cancelable * onFailureCallback); typedef void (*OperationalCredentialsTrustedRootCertificatesListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterTargetListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorTargetListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterServerGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorServerGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterClientGeneratedCommandListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorClientGeneratedCommandListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); +void TargetNavigatorClusterAttributeListListAttributeFilter(chip::TLV::TLVReader * data, + chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*TargetNavigatorAttributeListListAttributeCallback)( + void * context, const chip::app::DataModel::DecodableList & data); diff --git a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h index 28fd99fb7cbc7e..c59f0704744494 100644 --- a/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app2/zap-generated/CHIPClusters.h @@ -30,6 +30,20 @@ namespace chip { namespace Controller { +class DLL_EXPORT ApplicationBasicCluster : public ClusterBase +{ +public: + ApplicationBasicCluster() : ClusterBase(app::Clusters::ApplicationBasic::Id) {} + ~ApplicationBasicCluster() {} +}; + +class DLL_EXPORT ContentLauncherCluster : public ClusterBase +{ +public: + ContentLauncherCluster() : ClusterBase(app::Clusters::ContentLauncher::Id) {} + ~ContentLauncherCluster() {} +}; + class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase { public: @@ -37,6 +51,13 @@ class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase ~GeneralCommissioningCluster() {} }; +class DLL_EXPORT KeypadInputCluster : public ClusterBase +{ +public: + KeypadInputCluster() : ClusterBase(app::Clusters::KeypadInput::Id) {} + ~KeypadInputCluster() {} +}; + class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: @@ -44,6 +65,13 @@ class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase ~OperationalCredentialsCluster() {} }; +class DLL_EXPORT TargetNavigatorCluster : public ClusterBase +{ +public: + TargetNavigatorCluster() : ClusterBase(app::Clusters::TargetNavigator::Id) {} + ~TargetNavigatorCluster() {} +}; + class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase { public: diff --git a/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp index 31ca036c72818d..64aea788706522 100644 --- a/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/IMClusterCommandHandler.cpp @@ -96,6 +96,52 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace ColorControl +namespace ContentLauncher { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::LaunchContent::Id: { + Commands::LaunchContent::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfContentLauncherClusterLaunchContentCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::LaunchURL::Id: { + Commands::LaunchURL::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfContentLauncherClusterLaunchURLCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace ContentLauncher + namespace GeneralCommissioning { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -280,6 +326,43 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Identify +namespace KeypadInput { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::SendKey::Id: { + Commands::SendKey::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfKeypadInputClusterSendKeyCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace KeypadInput + namespace LevelControl { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -482,6 +565,15 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::OffWithEffect::Id: { + Commands::OffWithEffect::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOffWithEffectCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::On::Id: { Commands::On::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -491,6 +583,24 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } break; } + case Commands::OnWithRecallGlobalScene::Id: { + Commands::OnWithRecallGlobalScene::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOnWithRecallGlobalSceneCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::OnWithTimedOff::Id: { + Commands::OnWithTimedOff::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfOnOffClusterOnWithTimedOffCallback(apCommandObj, aCommandPath, commandData); + } + break; + } case Commands::Toggle::Id: { Commands::Toggle::DecodableType commandData; TLVError = DataModel::Decode(aDataTlv, commandData); @@ -723,6 +833,134 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace Scenes +namespace TargetNavigator { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::NavigateTarget::Id: { + Commands::NavigateTarget::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfTargetNavigatorClusterNavigateTargetCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace TargetNavigator + +namespace WindowCovering { + +void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) +{ + CHIP_ERROR TLVError = CHIP_NO_ERROR; + bool wasHandled = false; + { + switch (aCommandPath.mCommandId) + { + case Commands::DownOrClose::Id: { + Commands::DownOrClose::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterDownOrCloseCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToLiftPercentage::Id: { + Commands::GoToLiftPercentage::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToLiftPercentageCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToLiftValue::Id: { + Commands::GoToLiftValue::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToLiftValueCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToTiltPercentage::Id: { + Commands::GoToTiltPercentage::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToTiltPercentageCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::GoToTiltValue::Id: { + Commands::GoToTiltValue::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterGoToTiltValueCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::StopMotion::Id: { + Commands::StopMotion::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterStopMotionCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + case Commands::UpOrOpen::Id: { + Commands::UpOrOpen::DecodableType commandData; + TLVError = DataModel::Decode(aDataTlv, commandData); + if (TLVError == CHIP_NO_ERROR) + { + wasHandled = emberAfWindowCoveringClusterUpOrOpenCallback(apCommandObj, aCommandPath, commandData); + } + break; + } + default: { + // Unrecognized command ID, error status will apply. + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); + ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, + ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); + return; + } + } + } + + if (CHIP_NO_ERROR != TLVError || !wasHandled) + { + apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); + ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); + } +} + +} // namespace WindowCovering + } // namespace Clusters void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aReader, CommandHandler * apCommandObj) @@ -734,6 +972,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::ColorControl::Id: Clusters::ColorControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::ContentLauncher::Id: + Clusters::ContentLauncher::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::GeneralCommissioning::Id: Clusters::GeneralCommissioning::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -743,6 +984,9 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Identify::Id: Clusters::Identify::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::KeypadInput::Id: + Clusters::KeypadInput::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; case Clusters::LevelControl::Id: Clusters::LevelControl::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; @@ -758,6 +1002,12 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::Scenes::Id: Clusters::Scenes::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; + case Clusters::TargetNavigator::Id: + Clusters::TargetNavigator::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; + case Clusters::WindowCovering::Id: + Clusters::WindowCovering::DispatchServerCommand(apCommandObj, aCommandPath, aReader); + break; default: ChipLogError(Zcl, "Unknown cluster " ChipLogFormatMEI, ChipLogValueMEI(aCommandPath.mClusterId)); apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCluster); diff --git a/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h index 837b9ca341ef68..c73db0e906ef14 100644 --- a/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/placeholder/app2/zap-generated/PluginApplicationCallbacks.h @@ -22,18 +22,30 @@ #include #define MATTER_PLUGINS_INIT \ + MatterApplicationBasicPluginClientInitCallback(); \ + MatterApplicationBasicPluginServerInitCallback(); \ MatterBasicPluginServerInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ + MatterContentLauncherPluginClientInitCallback(); \ + MatterContentLauncherPluginServerInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ MatterGeneralCommissioningPluginClientInitCallback(); \ MatterGeneralCommissioningPluginServerInitCallback(); \ + MatterGeneralDiagnosticsPluginServerInitCallback(); \ MatterGroupsPluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ + MatterKeypadInputPluginClientInitCallback(); \ + MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginClientInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ + MatterPumpConfigurationAndControlPluginServerInitCallback(); \ MatterScenesPluginServerInitCallback(); \ + MatterTargetNavigatorPluginClientInitCallback(); \ + MatterTargetNavigatorPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginClientInitCallback(); \ - MatterTemperatureMeasurementPluginServerInitCallback(); + MatterTemperatureMeasurementPluginServerInitCallback(); \ + MatterThermostatPluginServerInitCallback(); \ + MatterWindowCoveringPluginServerInitCallback(); diff --git a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp index 0b3aa180536821..f57c304662c26c 100644 --- a/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp +++ b/zzz_generated/placeholder/app2/zap-generated/callback-stub.cpp @@ -29,24 +29,36 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) { switch (clusterId) { + case ZCL_APPLICATION_BASIC_CLUSTER_ID: + emberAfApplicationBasicClusterInitCallback(endpoint); + break; case ZCL_BASIC_CLUSTER_ID: emberAfBasicClusterInitCallback(endpoint); break; case ZCL_COLOR_CONTROL_CLUSTER_ID: emberAfColorControlClusterInitCallback(endpoint); break; + case ZCL_CONTENT_LAUNCH_CLUSTER_ID: + emberAfContentLauncherClusterInitCallback(endpoint); + break; case ZCL_DESCRIPTOR_CLUSTER_ID: emberAfDescriptorClusterInitCallback(endpoint); break; case ZCL_GENERAL_COMMISSIONING_CLUSTER_ID: emberAfGeneralCommissioningClusterInitCallback(endpoint); break; + case ZCL_GENERAL_DIAGNOSTICS_CLUSTER_ID: + emberAfGeneralDiagnosticsClusterInitCallback(endpoint); + break; case ZCL_GROUPS_CLUSTER_ID: emberAfGroupsClusterInitCallback(endpoint); break; case ZCL_IDENTIFY_CLUSTER_ID: emberAfIdentifyClusterInitCallback(endpoint); break; + case ZCL_KEYPAD_INPUT_CLUSTER_ID: + emberAfKeypadInputClusterInitCallback(endpoint); + break; case ZCL_LEVEL_CONTROL_CLUSTER_ID: emberAfLevelControlClusterInitCallback(endpoint); break; @@ -59,18 +71,35 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_OPERATIONAL_CREDENTIALS_CLUSTER_ID: emberAfOperationalCredentialsClusterInitCallback(endpoint); break; + case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID: + emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); + break; case ZCL_SCENES_CLUSTER_ID: emberAfScenesClusterInitCallback(endpoint); break; + case ZCL_TARGET_NAVIGATOR_CLUSTER_ID: + emberAfTargetNavigatorClusterInitCallback(endpoint); + break; case ZCL_TEMP_MEASUREMENT_CLUSTER_ID: emberAfTemperatureMeasurementClusterInitCallback(endpoint); break; + case ZCL_THERMOSTAT_CLUSTER_ID: + emberAfThermostatClusterInitCallback(endpoint); + break; + case ZCL_WINDOW_COVERING_CLUSTER_ID: + emberAfWindowCoveringClusterInitCallback(endpoint); + break; default: // Unrecognized cluster ID break; } } +void __attribute__((weak)) emberAfApplicationBasicClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfBasicClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -81,6 +110,11 @@ void __attribute__((weak)) emberAfColorControlClusterInitCallback(EndpointId end // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfContentLauncherClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfDescriptorClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -91,6 +125,11 @@ void __attribute__((weak)) emberAfGeneralCommissioningClusterInitCallback(Endpoi // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfGeneralDiagnosticsClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfGroupsClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -101,6 +140,11 @@ void __attribute__((weak)) emberAfIdentifyClusterInitCallback(EndpointId endpoin // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfKeypadInputClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfLevelControlClusterInitCallback(EndpointId endpoint) { // To prevent warning @@ -121,16 +165,36 @@ void __attribute__((weak)) emberAfOperationalCredentialsClusterInitCallback(Endp // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfTargetNavigatorClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} void __attribute__((weak)) emberAfTemperatureMeasurementClusterInitCallback(EndpointId endpoint) { // To prevent warning (void) endpoint; } +void __attribute__((weak)) emberAfThermostatClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} +void __attribute__((weak)) emberAfWindowCoveringClusterInitCallback(EndpointId endpoint) +{ + // To prevent warning + (void) endpoint; +} // // Non-Cluster Related Callbacks diff --git a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h index 357c1c868001d8..10d7785531b69e 100644 --- a/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/endpoint_config.h @@ -29,47 +29,131 @@ #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + /* Endpoint: 0, Cluster: On/Off (server), big-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 0 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x01, \ \ - /* 8 - FeatureMap, */ \ + /* Endpoint: 0, Cluster: General Commissioning (server), big-endian */ \ + \ + /* 4 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), big-endian */ \ \ - /* 12 - LastConnectErrorValue, */ \ + /* 16 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x02, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), big-endian */ \ + \ + /* 24 - UpTime, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 32 - TotalOperationalHours, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Window Covering (server), big-endian */ \ + \ + /* 36 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x17, \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server), big-endian */ \ + \ + /* 40 - LifetimeRunningHours, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 43 - Power, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 46 - LifetimeEnergyConsumed, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 50 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thermostat (server), big-endian */ \ + \ + /* 54 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x0B, \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server), big-endian */ \ + \ + /* 58 - SupportedStreamingProtocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #else // !BIGENDIAN_CPU #define GENERATED_DEFAULTS \ { \ \ - /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ + /* Endpoint: 0, Cluster: On/Off (server), little-endian */ \ + \ + /* 0 - FeatureMap, */ \ + 0x01, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Commissioning (server), little-endian */ \ \ - /* 0 - Breadcrumb, */ \ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + /* 4 - Breadcrumb, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ \ - /* 8 - FeatureMap, */ \ + /* 12 - FeatureMap, */ \ 0x00, 0x00, 0x00, 0x00, \ \ /* Endpoint: 0, Cluster: Network Commissioning (server), little-endian */ \ \ - /* 12 - LastConnectErrorValue, */ \ + /* 16 - LastConnectErrorValue, */ \ 0x00, 0x00, 0x00, 0x00, \ \ - /* 16 - FeatureMap, */ \ + /* 20 - FeatureMap, */ \ 0x02, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: General Diagnostics (server), little-endian */ \ + \ + /* 24 - UpTime, */ \ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \ + \ + /* 32 - TotalOperationalHours, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Window Covering (server), little-endian */ \ + \ + /* 36 - FeatureMap, */ \ + 0x17, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server), little-endian */ \ + \ + /* 40 - LifetimeRunningHours, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 43 - Power, */ \ + 0x00, 0x00, 0x00, \ + \ + /* 46 - LifetimeEnergyConsumed, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* 50 - FeatureMap, */ \ + 0x00, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Thermostat (server), little-endian */ \ + \ + /* 54 - FeatureMap, */ \ + 0x0B, 0x00, 0x00, 0x00, \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server), little-endian */ \ + \ + /* 58 - SupportedStreamingProtocols, */ \ + 0x00, 0x00, 0x00, 0x00, \ } #endif // BIGENDIAN_CPU -#define GENERATED_DEFAULTS_COUNT (4) +#define GENERATED_DEFAULTS_COUNT (14) #define ZAP_TYPE(type) ZCL_##type##_ATTRIBUTE_TYPE #define ZAP_LONG_DEFAULTS_INDEX(index) \ @@ -90,12 +174,28 @@ } // This is an array of EmberAfAttributeMinMaxValue structures. -#define GENERATED_MIN_MAX_DEFAULT_COUNT 2 +#define GENERATED_MIN_MAX_DEFAULT_COUNT 12 #define GENERATED_MIN_MAX_DEFAULTS \ { \ \ - /* Endpoint: 1, Cluster: Identify (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xF }, /* Mode */ \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* OperationMode */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* ControlMode */ \ + \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + { (uint16_t) 0x2BC, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min heat setpoint limit */ \ + { (uint16_t) 0xBB8, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max heat setpoint limit */ \ + { (uint16_t) 0x640, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* min cool setpoint limit */ \ + { (uint16_t) 0xC80, (uint16_t) 0x954D, (uint16_t) 0x7FFF }, /* max cool setpoint limit */ \ + { (uint16_t) 0x19, (uint16_t) 0xA, (uint16_t) 0x19 }, /* min setpoint dead band */ \ + { (uint16_t) 0x4, (uint16_t) 0x0, (uint16_t) 0x5 }, /* control sequence of operation */ \ + { (uint16_t) 0x1, (uint16_t) 0x0, (uint16_t) 0x7 }, /* system mode */ \ + \ + /* Endpoint: 1, Cluster: Identify (server) */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFE }, /* identify time */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ { \ @@ -105,12 +205,21 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 92 +#define GENERATED_ATTRIBUTE_COUNT 187 #define GENERATED_ATTRIBUTES \ { \ \ - /* Endpoint: 0, Cluster: Descriptor (server) */ \ - { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ + /* Endpoint: 0, Cluster: On/Off (server) */ \ + { 0x00000000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OnOff */ \ + { 0x00004000, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* GlobalSceneControl */ \ + { 0x00004001, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OnTime */ \ + { 0x00004002, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0x0000) }, /* OffWaitTime */ \ + { 0x00004003, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_SIMPLE_DEFAULT(0xFF) }, /* StartUpOnOff */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(0) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(4) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Descriptor (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ { 0x00000002, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* client list */ \ { 0x00000003, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* parts list */ \ @@ -159,13 +268,13 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(SINGLETON), ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ - { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(0) }, /* Breadcrumb */ \ + { 0x00000000, ZAP_TYPE(INT64U), 8, ZAP_ATTRIBUTE_MASK(WRITABLE), ZAP_LONG_DEFAULTS_INDEX(4) }, /* Breadcrumb */ \ { 0x00000001, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ - ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ - { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RegulatoryConfig */ \ - { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(8) }, /* FeatureMap */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + ZAP_EMPTY_DEFAULT() }, /* BasicCommissioningInfo */ \ + { 0x00000002, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* RegulatoryConfig */ \ + { 0x00000003, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* LocationCapability */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(12) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* MaxNetworks */ \ @@ -176,10 +285,23 @@ { 0x00000005, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkingStatus */ \ { 0x00000006, ZAP_TYPE(OCTET_STRING), 33, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_EMPTY_DEFAULT() }, /* LastNetworkID */ \ { 0x00000007, ZAP_TYPE(INT32S), 4, ZAP_ATTRIBUTE_MASK(NULLABLE), \ - ZAP_LONG_DEFAULTS_INDEX(12) }, /* LastConnectErrorValue */ \ - { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(16) }, /* FeatureMap */ \ + ZAP_LONG_DEFAULTS_INDEX(16) }, /* LastConnectErrorValue */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(20) }, /* FeatureMap */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* NetworkInterfaces */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* RebootCount */ \ + { 0x00000002, ZAP_TYPE(INT64U), 8, 0, ZAP_LONG_DEFAULTS_INDEX(24) }, /* UpTime */ \ + { 0x00000003, ZAP_TYPE(INT32U), 4, 0, ZAP_LONG_DEFAULTS_INDEX(32) }, /* TotalOperationalHours */ \ + { 0x00000004, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* BootReasons */ \ + { 0x00000005, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveHardwareFaults */ \ + { 0x00000006, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* ActiveRadioFaults */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), \ + ZAP_EMPTY_DEFAULT() }, /* ActiveNetworkFaults */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Fabrics */ \ { 0x00000002, ZAP_TYPE(INT8U), 1, 0, ZAP_EMPTY_DEFAULT() }, /* SupportedFabrics */ \ @@ -190,15 +312,136 @@ ZAP_EMPTY_DEFAULT() }, /* CurrentFabricIndex */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + { 0x00000000, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* Type */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionLift */ \ + { 0x00000004, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(0x7FFF) }, /* CurrentPositionTilt */ \ + { 0x00000007, ZAP_TYPE(BITMAP8), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE), ZAP_SIMPLE_DEFAULT(0x03) }, /* ConfigStatus */ \ + { 0x00000008, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionLiftPercentage */ \ + { 0x00000009, ZAP_TYPE(PERCENT), 1, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(50) }, /* CurrentPositionTiltPercentage */ \ + { 0x0000000A, ZAP_TYPE(BITMAP8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* OperationalStatus */ \ + { 0x0000000B, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionLiftPercent100ths */ \ + { 0x0000000C, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* TargetPositionTiltPercent100ths */ \ + { 0x0000000D, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* EndProductType */ \ + { 0x0000000E, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionLiftPercent100ths */ \ + { 0x0000000F, ZAP_TYPE(PERCENT100THS), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_SIMPLE_DEFAULT(500) }, /* CurrentPositionTiltPercent100ths */ \ + { 0x00000010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitLift */ \ + { 0x00000011, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitLift */ \ + { 0x00000012, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0x0000) }, /* InstalledOpenLimitTilt */ \ + { 0x00000013, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(TOKENIZE), \ + ZAP_SIMPLE_DEFAULT(0xFFFF) }, /* InstalledClosedLimitTilt */ \ + { 0x00000017, ZAP_TYPE(BITMAP8), 1, \ + ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* Mode */ \ + { 0x0000001A, ZAP_TYPE(BITMAP16), 2, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* SafetyStatus */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(36) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(5) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxPressure */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxSpeed */ \ + { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxFlow */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstPressure */ \ + { 0x00000004, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstPressure */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinCompPressure */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxCompPressure */ \ + { 0x00000007, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstSpeed */ \ + { 0x00000008, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstSpeed */ \ + { 0x00000009, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstFlow */ \ + { 0x0000000A, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstFlow */ \ + { 0x0000000B, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MinConstTemp */ \ + { 0x0000000C, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* MaxConstTemp */ \ + { 0x00000010, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* PumpStatus */ \ + { 0x00000011, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveOperationMode */ \ + { 0x00000012, ZAP_TYPE(ENUM8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* EffectiveControlMode */ \ + { 0x00000013, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Capacity */ \ + { 0x00000014, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* Speed */ \ + { 0x00000015, ZAP_TYPE(INT24U), 3, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(40) }, /* LifetimeRunningHours */ \ + { 0x00000016, ZAP_TYPE(INT24U), 3, 0, ZAP_LONG_DEFAULTS_INDEX(43) }, /* Power */ \ + { 0x00000017, ZAP_TYPE(INT32U), 4, ZAP_ATTRIBUTE_MASK(WRITABLE) | ZAP_ATTRIBUTE_MASK(NULLABLE), \ + ZAP_LONG_DEFAULTS_INDEX(46) }, /* LifetimeEnergyConsumed */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* OperationMode */ \ + { 0x00000021, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(2) }, /* ControlMode */ \ + { 0x00000022, ZAP_TYPE(BITMAP16), 2, 0, ZAP_EMPTY_DEFAULT() }, /* AlarmMask */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(50) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0001) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + { 0x00000000, ZAP_TYPE(INT16S), 2, 0, ZAP_EMPTY_DEFAULT() }, /* local temperature */ \ + { 0x00000003, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x02BC) }, /* abs min heat setpoint limit */ \ + { 0x00000005, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0640) }, /* abs min cool setpoint limit */ \ + { 0x00000006, ZAP_TYPE(INT16S), 2, 0, ZAP_SIMPLE_DEFAULT(0x0C80) }, /* abs max cool setpoint limit */ \ + { 0x00000011, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x0A28) }, /* occupied cooling setpoint */ \ + { 0x00000012, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_SIMPLE_DEFAULT(0x07D0) }, /* occupied heating setpoint */ \ + { 0x00000015, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(3) }, /* min heat setpoint limit */ \ + { 0x00000016, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(4) }, /* max heat setpoint limit */ \ + { 0x00000017, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(5) }, /* min cool setpoint limit */ \ + { 0x00000018, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(6) }, /* max cool setpoint limit */ \ + { 0x00000019, ZAP_TYPE(INT8S), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(7) }, /* min setpoint dead band */ \ + { 0x0000001B, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(8) }, /* control sequence of operation */ \ + { 0x0000001C, ZAP_TYPE(ENUM8), 1, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_MIN_MAX_DEFAULTS_INDEX(9) }, /* system mode */ \ + { 0x00000020, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* start of week */ \ + { 0x00000021, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(7) }, /* number of weekly transitions */ \ + { 0x00000022, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(4) }, /* number of daily transitions */ \ + { 0x0000FFFC, ZAP_TYPE(BITMAP32), 4, 0, ZAP_LONG_DEFAULTS_INDEX(54) }, /* FeatureMap */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ + \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ { 0x00000000, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MeasuredValue */ \ { 0x00000001, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MinMeasuredValue */ \ { 0x00000002, ZAP_TYPE(INT16S), 2, ZAP_ATTRIBUTE_MASK(NULLABLE), ZAP_SIMPLE_DEFAULT(0x8000) }, /* MaxMeasuredValue */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ + /* Endpoint: 0, Cluster: Target Navigator (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* TargetList */ \ + { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0) }, /* CurrentTarget */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Keypad Input (server) */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Content Launcher (server) */ \ + { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* AcceptHeader */ \ + { 0x00000001, ZAP_TYPE(BITMAP32), 4, ZAP_ATTRIBUTE_MASK(WRITABLE), \ + ZAP_LONG_DEFAULTS_INDEX(58) }, /* SupportedStreamingProtocols */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ + /* Endpoint: 0, Cluster: Application Basic (server) */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Status */ \ + { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationVersion */ \ + { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* AllowedVendorList */ \ + { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ + \ /* Endpoint: 1, Cluster: Identify (server) */ \ { 0x00000000, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(0) }, /* identify time */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(10) }, /* identify time */ \ { 0x00000001, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* identify type */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(2) }, /* ClusterRevision */ \ \ @@ -271,7 +514,7 @@ ZAP_SIMPLE_DEFAULT(0x00) }, /* color control options */ \ { 0x0000400D, ZAP_TYPE(INT16U), 2, 0, ZAP_EMPTY_DEFAULT() }, /* couple color temp to level min-mireds */ \ { 0x00004010, ZAP_TYPE(INT16U), 2, ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(WRITABLE), \ - ZAP_MIN_MAX_DEFAULTS_INDEX(1) }, /* start up color temperature mireds */ \ + ZAP_MIN_MAX_DEFAULTS_INDEX(11) }, /* start up color temperature mireds */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ } @@ -282,9 +525,22 @@ // Cluster function static arrays #define GENERATED_FUNCTION_ARRAYS \ + const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ + (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \ (EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback, \ }; \ + const EmberAfGenericClusterFunction chipFuncArrayWindowCoveringServer[] = { \ + (EmberAfGenericClusterFunction) MatterWindowCoveringClusterServerAttributeChangedCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayPumpConfigurationAndControlServer[] = { \ + (EmberAfGenericClusterFunction) emberAfPumpConfigurationAndControlClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterPumpConfigurationAndControlClusterServerAttributeChangedCallback, \ + }; \ + const EmberAfGenericClusterFunction chipFuncArrayThermostatServer[] = { \ + (EmberAfGenericClusterFunction) emberAfThermostatClusterServerInitCallback, \ + }; \ const EmberAfGenericClusterFunction chipFuncArrayIdentifyServer[] = { \ (EmberAfGenericClusterFunction) emberAfIdentifyClusterServerInitCallback, \ (EmberAfGenericClusterFunction) MatterIdentifyClusterServerAttributeChangedCallback, \ @@ -295,9 +551,6 @@ const EmberAfGenericClusterFunction chipFuncArrayScenesServer[] = { \ (EmberAfGenericClusterFunction) emberAfScenesClusterServerInitCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayOnOffServer[] = { \ - (EmberAfGenericClusterFunction) emberAfOnOffClusterServerInitCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayLevelControlServer[] = { \ (EmberAfGenericClusterFunction) emberAfLevelControlClusterServerInitCallback, \ }; \ @@ -307,6 +560,15 @@ // clang-format off #define GENERATED_COMMANDS { \ + /* Endpoint: 0, Cluster: On/Off (server) */\ + /* client_generated */ \ + 0x00000000 /* Off */, \ + 0x00000001 /* On */, \ + 0x00000002 /* Toggle */, \ + 0x00000040 /* OffWithEffect */, \ + 0x00000041 /* OnWithRecallGlobalScene */, \ + 0x00000042 /* OnWithTimedOff */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: General Commissioning (server) */\ /* client_generated */ \ 0x00000000 /* ArmFailSafe */, \ @@ -349,6 +611,44 @@ 0x00000005 /* CSRResponse */, \ 0x00000008 /* NOCResponse */, \ chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Window Covering (server) */\ + /* client_generated */ \ + 0x00000000 /* UpOrOpen */, \ + 0x00000001 /* DownOrClose */, \ + 0x00000002 /* StopMotion */, \ + 0x00000004 /* GoToLiftValue */, \ + 0x00000005 /* GoToLiftPercentage */, \ + 0x00000007 /* GoToTiltValue */, \ + 0x00000008 /* GoToTiltPercentage */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Thermostat (server) */\ + /* client_generated */ \ + 0x00000000 /* SetpointRaiseLower */, \ + 0x00000000 /* GetWeeklyScheduleResponse */, \ + 0x00000001 /* GetRelayStatusLogResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Target Navigator (server) */\ + /* client_generated */ \ + 0x00000000 /* NavigateTarget */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000001 /* NavigateTargetResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Keypad Input (server) */\ + /* client_generated */ \ + 0x00000000 /* SendKey */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000001 /* SendKeyResponse */, \ + chip::kInvalidCommandId /* end of list */, \ + /* Endpoint: 0, Cluster: Content Launcher (server) */\ + /* client_generated */ \ + 0x00000000 /* LaunchContent */, \ + 0x00000001 /* LaunchURL */, \ + chip::kInvalidCommandId /* end of list */, \ + /* server_generated */ \ + 0x00000002 /* LaunchResponse */, \ + chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 1, Cluster: Identify (server) */\ /* client_generated */ \ 0x00000000 /* Identify */, \ @@ -418,14 +718,25 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 16 +#define GENERATED_CLUSTER_COUNT 29 // clang-format off #define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: On/Off (server) */ \ + .clusterId = 0x00000006, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 7, \ + .clusterSize = 13, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayOnOffServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributes = ZAP_ATTRIBUTE_INDEX(7), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -436,7 +747,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ + .attributes = ZAP_ATTRIBUTE_INDEX(12), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -447,7 +758,7 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (client) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(25), \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -458,29 +769,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(25), \ + .attributes = ZAP_ATTRIBUTE_INDEX(32), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 0 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 4 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 11 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(31), \ + .attributes = ZAP_ATTRIBUTE_INDEX(38), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 7 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 15 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 14 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 22 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ + .clusterId = 0x00000033, \ + .attributes = ZAP_ATTRIBUTE_INDEX(48), \ + .attributeCount = 9, \ + .clusterSize = 17, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (client) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -491,18 +813,51 @@ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(41), \ + .attributes = ZAP_ATTRIBUTE_INDEX(57), \ .attributeCount = 6, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 28 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 25 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Window Covering (server) */ \ + .clusterId = 0x00000102, \ + .attributes = ZAP_ATTRIBUTE_INDEX(63), \ + .attributeCount = 20, \ + .clusterSize = 35, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayWindowCoveringServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 40 ) ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Pump Configuration and Control (server) */ \ + .clusterId = 0x00000200, \ + .attributes = ZAP_ATTRIBUTE_INDEX(83), \ + .attributeCount = 26, \ + .clusterSize = 54, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ + .functions = chipFuncArrayPumpConfigurationAndControlServer, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Thermostat (server) */ \ + .clusterId = 0x00000201, \ + .attributes = ZAP_ATTRIBUTE_INDEX(109), \ + .attributeCount = 18, \ + .clusterSize = 32, \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ + .functions = chipFuncArrayThermostatServer, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 48 ) ,\ + .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Temperature Measurement (client) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(127), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -513,7 +868,7 @@ { \ /* Endpoint: 0, Cluster: Temperature Measurement (server) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(47), \ + .attributes = ZAP_ATTRIBUTE_INDEX(127), \ .attributeCount = 4, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -521,65 +876,153 @@ .clientGeneratedCommandList = nullptr ,\ .serverGeneratedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 0, Cluster: Target Navigator (client) */ \ + .clusterId = 0x00000505, \ + .attributes = ZAP_ATTRIBUTE_INDEX(131), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Target Navigator (server) */ \ + .clusterId = 0x00000505, \ + .attributes = ZAP_ATTRIBUTE_INDEX(131), \ + .attributeCount = 3, \ + .clusterSize = 3, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Keypad Input (client) */ \ + .clusterId = 0x00000509, \ + .attributes = ZAP_ATTRIBUTE_INDEX(134), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Keypad Input (server) */ \ + .clusterId = 0x00000509, \ + .attributes = ZAP_ATTRIBUTE_INDEX(134), \ + .attributeCount = 1, \ + .clusterSize = 2, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Content Launcher (client) */ \ + .clusterId = 0x0000050A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(135), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Content Launcher (server) */ \ + .clusterId = 0x0000050A, \ + .attributes = ZAP_ATTRIBUTE_INDEX(135), \ + .attributeCount = 3, \ + .clusterSize = 6, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 63 ) ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Application Basic (client) */ \ + .clusterId = 0x0000050D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ + { \ + /* Endpoint: 0, Cluster: Application Basic (server) */ \ + .clusterId = 0x0000050D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(138), \ + .attributeCount = 8, \ + .clusterSize = 106, \ + .mask = ZAP_CLUSTER_MASK(SERVER), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(51), \ + .attributes = ZAP_ATTRIBUTE_INDEX(146), \ .attributeCount = 3, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayIdentifyServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 36 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 68 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(54), \ + .attributes = ZAP_ATTRIBUTE_INDEX(149), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayGroupsServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 38 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 70 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 77 ) ,\ },\ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(56), \ + .attributes = ZAP_ATTRIBUTE_INDEX(151), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 50 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(62), \ + .attributes = ZAP_ATTRIBUTE_INDEX(157), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayOnOffServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 65 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 97 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(64), \ + .attributes = ZAP_ATTRIBUTE_INDEX(159), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayLevelControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 101 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(66), \ + .attributes = ZAP_ATTRIBUTE_INDEX(161), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -590,12 +1033,12 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(86), \ + .attributes = ZAP_ATTRIBUTE_INDEX(181), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ .functions = chipFuncArrayColorControlServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 78 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 110 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ } @@ -604,12 +1047,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 13 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 22 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 9, 115 }, { ZAP_CLUSTER_INDEX(9), 7, 72 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 383 }, { ZAP_CLUSTER_INDEX(22), 7, 72 }, \ } // Largest attribute size is needed for various buffers @@ -621,7 +1064,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (78) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (187) +#define ATTRIBUTE_MAX_SIZE (455) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/placeholder/app2/zap-generated/gen_config.h b/zzz_generated/placeholder/app2/zap-generated/gen_config.h index 42419dcf74379a..6ae5cf0539b8e0 100644 --- a/zzz_generated/placeholder/app2/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app2/zap-generated/gen_config.h @@ -29,24 +29,45 @@ #define EMBER_APS_UNICAST_MESSAGE_COUNT 10 /**** Cluster endpoint counts ****/ +#define EMBER_AF_APPLICATION_BASIC_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_CONTENT_LAUNCH_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_GENERAL_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_GENERAL_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_GROUPS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) -#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1) /**** Cluster Plugins ****/ +// Use this macro to check if the client side of the Application Basic cluster is included +#define ZCL_USING_APPLICATION_BASIC_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_APPLICATION_BASIC_CLIENT + +// Use this macro to check if the server side of the Application Basic cluster is included +#define ZCL_USING_APPLICATION_BASIC_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_APPLICATION_BASIC_SERVER +#define EMBER_AF_PLUGIN_APPLICATION_BASIC + // Use this macro to check if the server side of the Basic cluster is included #define ZCL_USING_BASIC_CLUSTER_SERVER #define EMBER_AF_PLUGIN_BASIC_SERVER @@ -61,6 +82,15 @@ #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_TEMP #define EMBER_AF_PLUGIN_COLOR_CONTROL_SERVER_HSV +// Use this macro to check if the client side of the Content Launcher cluster is included +#define ZCL_USING_CONTENT_LAUNCH_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_CLIENT + +// Use this macro to check if the server side of the Content Launcher cluster is included +#define ZCL_USING_CONTENT_LAUNCH_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_SERVER +#define EMBER_AF_PLUGIN_CONTENT_LAUNCHER + // Use this macro to check if the server side of the Descriptor cluster is included #define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER @@ -75,6 +105,11 @@ #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_GENERAL_COMMISSIONING +// Use this macro to check if the server side of the General Diagnostics cluster is included +#define ZCL_USING_GENERAL_DIAGNOSTICS_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS_SERVER +#define EMBER_AF_PLUGIN_GENERAL_DIAGNOSTICS + // Use this macro to check if the server side of the Groups cluster is included #define ZCL_USING_GROUPS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_GROUPS_SERVER @@ -85,6 +120,15 @@ #define EMBER_AF_PLUGIN_IDENTIFY_SERVER #define EMBER_AF_PLUGIN_IDENTIFY +// Use this macro to check if the client side of the Keypad Input cluster is included +#define ZCL_USING_KEYPAD_INPUT_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_KEYPAD_INPUT_CLIENT + +// Use this macro to check if the server side of the Keypad Input cluster is included +#define ZCL_USING_KEYPAD_INPUT_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_KEYPAD_INPUT_SERVER +#define EMBER_AF_PLUGIN_KEYPAD_INPUT + // Use this macro to check if the server side of the Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER @@ -113,6 +157,11 @@ #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS_SERVER #define EMBER_AF_PLUGIN_OPERATIONAL_CREDENTIALS +// Use this macro to check if the server side of the Pump Configuration and Control cluster is included +#define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL_SERVER +#define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL + // Use this macro to check if the server side of the Scenes cluster is included #define ZCL_USING_SCENES_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SCENES_SERVER @@ -120,6 +169,15 @@ // User options for server plugin Scenes #define EMBER_AF_PLUGIN_SCENES_TABLE_SIZE 3 +// Use this macro to check if the client side of the Target Navigator cluster is included +#define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_CLIENT + +// Use this macro to check if the server side of the Target Navigator cluster is included +#define ZCL_USING_TARGET_NAVIGATOR_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR_SERVER +#define EMBER_AF_PLUGIN_TARGET_NAVIGATOR + // Use this macro to check if the client side of the Temperature Measurement cluster is included #define ZCL_USING_TEMP_MEASUREMENT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT_CLIENT @@ -128,3 +186,13 @@ #define ZCL_USING_TEMP_MEASUREMENT_CLUSTER_SERVER #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT_SERVER #define EMBER_AF_PLUGIN_TEMPERATURE_MEASUREMENT + +// Use this macro to check if the server side of the Thermostat cluster is included +#define ZCL_USING_THERMOSTAT_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_THERMOSTAT_SERVER +#define EMBER_AF_PLUGIN_THERMOSTAT + +// Use this macro to check if the server side of the Window Covering cluster is included +#define ZCL_USING_WINDOW_COVERING_CLUSTER_SERVER +#define EMBER_AF_PLUGIN_WINDOW_COVERING_SERVER +#define EMBER_AF_PLUGIN_WINDOW_COVERING From 2727739f0b25cdeed066f7a9b381a3cd8dcfbebc Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Wed, 9 Mar 2022 19:29:14 -0800 Subject: [PATCH 22/43] Updated PASE PasscodeId to Always be 0 to Match Spec (#15924) -- Removed PasscodeId from all APIs. -- When opening an ECM window, the passcodeID to use in PASE PBKDFParamRequest is always 0. -- Non-zero values of passcodeID in PASE PBKDFParamRequest are forbidden. -- Removed PasscodeId field in OpenCommissioningWindow command needs. --- .../all-clusters-app.matter | 1 - .../bridge-common/bridge-app.matter | 1 - .../door-lock-common/door-lock-app.matter | 1 - .../light-switch-app.matter | 1 - .../lighting-common/lighting-app.matter | 1 - examples/lock-app/lock-common/lock-app.matter | 1 - .../ota-requestor-app.matter | 1 - examples/pump-app/pump-common/pump-app.matter | 1 - .../pump-controller-app.matter | 1 - .../esp32/main/temperature-measurement.matter | 1 - .../thermostat-common/thermostat.matter | 1 - examples/tv-app/tv-common/tv-app.matter | 1 - .../tv-casting-common/tv-casting-app.matter | 1 - examples/window-app/common/window-app.matter | 1 - .../administrator-commissioning-server.cpp | 3 +- src/app/server/CommissioningWindowManager.cpp | 14 +++--- src/app/server/CommissioningWindowManager.h | 4 +- src/app/tests/TestCommissionManager.cpp | 4 +- .../administrator-commissioning-cluster.xml | 1 - src/controller/CHIPDeviceController.cpp | 7 +-- src/controller/CHIPDeviceController.h | 6 +-- .../data_model/controller-clusters.matter | 1 - .../java/CHIPDeviceController-JNI.cpp | 12 ++--- .../ChipDeviceController.java | 2 +- .../devicecontroller/PaseVerifierParams.java | 21 ++------- .../chip/devicecontroller/ChipClusters.java | 3 -- .../devicecontroller/ClusterInfoMapping.java | 8 ---- .../python/chip/clusters/CHIPClusters.py | 1 - .../python/chip/clusters/Objects.py | 2 - .../CHIP/zap-generated/CHIPClustersObjc.mm | 1 - .../zap-generated/CHIPCommandPayloadsObjc.h | 1 - .../zap-generated/CHIPCommandPayloadsObjc.mm | 2 - src/protocols/secure_channel/PASESession.cpp | 21 ++++----- src/protocols/secure_channel/PASESession.h | 12 ++--- .../secure_channel/tests/TestPASESession.cpp | 47 +++++++++---------- .../zap-generated/cluster-objects.cpp | 4 -- .../zap-generated/cluster-objects.h | 3 -- .../zap-generated/cluster/Commands.h | 3 -- .../zap-generated/cluster/Commands.h | 1 - 39 files changed, 56 insertions(+), 142 deletions(-) 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 index 0070684523029b..d39ad6fc0abb11 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -99,7 +99,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index f181f6b8f04a38..312e99cd554b5b 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -158,7 +158,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; 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 index 388266623cd4a3..cd3a9880e1b3cb 100644 --- a/examples/door-lock-app/door-lock-common/door-lock-app.matter +++ b/examples/door-lock-app/door-lock-common/door-lock-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 6a3bb56e8b50f4..6dfb199c86a493 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 5aabcaad49974e..2f7b48080c2e60 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 4989ee7548dd82..209fd9de61d73d 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; 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 index 4fca136829d232..d66db472b19f94 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index dcec916f5a3e3a..efb7faa268a6e9 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; 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 index d6799d18ef4982..c2515effab992a 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter index d8a7e2b2c8c86f..8f6a97fdf9993c 100644 --- a/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter +++ b/examples/temperature-measurement-app/esp32/main/temperature-measurement.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 34af03792f3def..21e61114ca0084 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index 12a4f1428a4f29..b5af48262dbb83 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -117,7 +117,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; 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 index 5e404e835a5e0c..5c9013a55970a1 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -113,7 +113,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index e7aa5758c407ea..25a387ec364270 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -96,7 +96,6 @@ server cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp index 9a9bcaa32ef73d..5302609f0fa064 100644 --- a/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp +++ b/src/app/clusters/administrator-commissioning-server/administrator-commissioning-server.cpp @@ -95,7 +95,6 @@ bool emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback( auto & discriminator = commandData.discriminator; auto & iterations = commandData.iterations; auto & salt = commandData.salt; - auto & passcodeID = commandData.passcodeID; Optional status = Optional::Missing(); Spake2pVerifier verifier; @@ -124,7 +123,7 @@ bool emberAfAdministratorCommissioningClusterOpenCommissioningWindowCallback( VerifyOrExit(verifier.Deserialize(pakeVerifier) == CHIP_NO_ERROR, status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_PAKE_PARAMETER_ERROR)); VerifyOrExit(Server::GetInstance().GetCommissioningWindowManager().OpenEnhancedCommissioningWindow( - commissioningTimeout, discriminator, verifier, iterations, salt, passcodeID) == CHIP_NO_ERROR, + commissioningTimeout, discriminator, verifier, iterations, salt) == CHIP_NO_ERROR, status.Emplace(StatusCode::EMBER_ZCL_STATUS_CODE_PAKE_PARAMETER_ERROR)); ChipLogProgress(Zcl, "Commissioning window is now open"); diff --git a/src/app/server/CommissioningWindowManager.cpp b/src/app/server/CommissioningWindowManager.cpp index 2e608d501b116b..fa421f532138b0 100644 --- a/src/app/server/CommissioningWindowManager.cpp +++ b/src/app/server/CommissioningWindowManager.cpp @@ -85,7 +85,6 @@ void CommissioningWindowManager::ResetState() mUseECM = false; mECMDiscriminator = 0; - mECMPasscodeID = 0; mECMIterations = 0; mECMSaltLength = 0; mWindowStatus = app::Clusters::AdministratorCommissioning::CommissioningWindowStatus::kWindowNotOpen; @@ -183,8 +182,8 @@ CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow() { ReturnErrorOnFailure(SetTemporaryDiscriminator(mECMDiscriminator)); ReturnErrorOnFailure( - mPairingSession.WaitForPairing(mECMPASEVerifier, mECMIterations, ByteSpan(mECMSalt, mECMSaltLength), mECMPasscodeID, - keyID, Optional::Value(GetLocalMRPConfig()), this)); + mPairingSession.WaitForPairing(mECMPASEVerifier, mECMIterations, ByteSpan(mECMSalt, mECMSaltLength), keyID, + Optional::Value(GetLocalMRPConfig()), this)); } else { @@ -202,9 +201,9 @@ CHIP_ERROR CommissioningWindowManager::OpenCommissioningWindow() VerifyOrReturnError(kSpake2p_VerifierSerialized_Length == serializedVerifierLen, CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(verifier.Deserialize(ByteSpan(serializedVerifier))); - ReturnErrorOnFailure( - mPairingSession.WaitForPairing(verifier, iterationCount, ByteSpan(salt, saltLen), kDefaultCommissioningPasscodeId, - keyID, Optional::Value(GetLocalMRPConfig()), this)); + ReturnErrorOnFailure(mPairingSession.WaitForPairing(verifier, iterationCount, ByteSpan(salt, saltLen), keyID, + Optional::Value(GetLocalMRPConfig()), + this)); } ReturnErrorOnFailure(StartAdvertisement()); @@ -241,7 +240,7 @@ CHIP_ERROR CommissioningWindowManager::OpenBasicCommissioningWindow(uint16_t com CHIP_ERROR CommissioningWindowManager::OpenEnhancedCommissioningWindow(uint16_t commissioningTimeoutSeconds, uint16_t discriminator, Spake2pVerifier & verifier, uint32_t iterations, - ByteSpan salt, PasscodeId passcodeID) + ByteSpan salt) { // Once a device is operational, it shall be commissioned into subsequent fabrics using // the operational network only. @@ -256,7 +255,6 @@ CHIP_ERROR CommissioningWindowManager::OpenEnhancedCommissioningWindow(uint16_t mCommissioningTimeoutSeconds = commissioningTimeoutSeconds; mECMDiscriminator = discriminator; - mECMPasscodeID = passcodeID; mECMIterations = iterations; memcpy(&mECMPASEVerifier, &verifier, sizeof(Spake2pVerifier)); diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index ec61eebe649c19..02dde6edeb77c9 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -56,8 +56,7 @@ class CommissioningWindowManager : public SessionEstablishmentDelegate, public a CommissioningWindowAdvertisement advertisementMode = chip::CommissioningWindowAdvertisement::kAllSupported); CHIP_ERROR OpenEnhancedCommissioningWindow(uint16_t commissioningTimeoutSeconds, uint16_t discriminator, - Spake2pVerifier & verifier, uint32_t iterations, chip::ByteSpan salt, - PasscodeId passcodeID); + Spake2pVerifier & verifier, uint32_t iterations, chip::ByteSpan salt); void CloseCommissioningWindow(); @@ -113,7 +112,6 @@ class CommissioningWindowManager : public SessionEstablishmentDelegate, public a bool mUseECM = false; Spake2pVerifier mECMPASEVerifier; uint16_t mECMDiscriminator = 0; - PasscodeId mECMPasscodeID = kDefaultCommissioningPasscodeId; // mListeningForPASE is true only when we are listening for // PBKDFParamRequest messages. bool mListeningForPASE = false; diff --git a/src/app/tests/TestCommissionManager.cpp b/src/app/tests/TestCommissionManager.cpp index e594fb54172e3a..e823d7f8eebe76 100644 --- a/src/app/tests/TestCommissionManager.cpp +++ b/src/app/tests/TestCommissionManager.cpp @@ -143,11 +143,9 @@ void CheckCommissioningWindowManagerEnhancedWindowTask(intptr_t context) constexpr uint32_t kIterations = chip::kSpake2p_Min_PBKDF_Iterations; uint8_t salt[chip::kSpake2p_Min_PBKDF_Salt_Length]; chip::ByteSpan saltData(salt); - constexpr chip::PasscodeId kPasscodeID = 1; uint16_t currentDiscriminator; - err = commissionMgr.OpenEnhancedCommissioningWindow(kNoCommissioningTimeout, newDiscriminator, verifier, kIterations, saltData, - kPasscodeID); + err = commissionMgr.OpenEnhancedCommissioningWindow(kNoCommissioningTimeout, newDiscriminator, verifier, kIterations, saltData); NL_TEST_ASSERT(suite, err == CHIP_NO_ERROR); NL_TEST_ASSERT(suite, commissionMgr.CommissioningWindowStatus() == diff --git a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml index 2343df7f1b98ab..96608c0b9c8a65 100644 --- a/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/administrator-commissioning-cluster.xml @@ -49,7 +49,6 @@ limitations under the License. - diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 598fa4d65585f0..f18f0f29e3f232 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -444,11 +444,10 @@ void DeviceController::OnOpenPairingWindowFailureResponse(void * context, CHIP_E } CHIP_ERROR DeviceController::ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, - Spake2pVerifier & outVerifier, PasscodeId & outPasscodeId) + Spake2pVerifier & outVerifier) { ReturnErrorOnFailure(PASESession::GeneratePASEVerifier(outVerifier, iterations, salt, /* useRandomPIN= */ false, setupPincode)); - outPasscodeId = mPAKEVerifierID++; return CHIP_NO_ERROR; } @@ -531,7 +530,6 @@ CHIP_ERROR DeviceController::OpenCommissioningWindowInternal() request.discriminator = mSetupPayload.discriminator; request.iterations = mCommissioningWindowIteration; request.salt = salt; - request.passcodeID = mPAKEVerifierID++; // TODO: What should the timed invoke timeout here be? uint16_t timedInvokeTimeoutMs = 10000; @@ -847,8 +845,7 @@ CHIP_ERROR DeviceCommissioner::EstablishPASEConnection(NodeId remoteDeviceId, Re exchangeCtxt = mSystemState->ExchangeMgr()->NewContext(session.Value(), &device->GetPairing()); VerifyOrExit(exchangeCtxt != nullptr, err = CHIP_ERROR_INTERNAL); - // TODO: Need to determine how PasscodeId is provided for a non-default case. i.e. ECM - err = device->GetPairing().Pair(params.GetPeerAddress(), params.GetSetupPINCode(), kDefaultCommissioningPasscodeId, keyID, + err = device->GetPairing().Pair(params.GetPeerAddress(), params.GetSetupPINCode(), keyID, Optional::Value(GetLocalMRPConfig()), exchangeCtxt, this); SuccessOrExit(err); diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index aeb4db8c9fba2e..6b025c8fe4bb58 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -243,12 +243,11 @@ class DLL_EXPORT DeviceController : public SessionRecoveryDelegate, * @param[in] setupPincode The desired PIN code to use * @param[in] salt The 16-byte salt for verifier computation * @param[out] outVerifier The Spake2pVerifier to be populated on success - * @param[out] outPasscodeId The passcode ID to be populated on success * * @return CHIP_ERROR CHIP_NO_ERROR on success, or corresponding error */ - CHIP_ERROR ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, Spake2pVerifier & outVerifier, - PasscodeId & outPasscodeId); + CHIP_ERROR ComputePASEVerifier(uint32_t iterations, uint32_t setupPincode, const ByteSpan & salt, + Spake2pVerifier & outVerifier); /** * @brief @@ -413,7 +412,6 @@ class DLL_EXPORT DeviceController : public SessionRecoveryDelegate, static void OnOpenPairingWindowFailureResponse(void * context, CHIP_ERROR error); CHIP_ERROR ProcessControllerNOCChain(const ControllerInitParams & params); - PasscodeId mPAKEVerifierID = 1; }; /** diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index bd4334ae89d04e..0ba1b9da8ad16f 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -125,7 +125,6 @@ client cluster AdministratorCommissioning = 60 { INT16U discriminator = 2; INT32U iterations = 3; OCTET_STRING salt = 4; - INT16U passcodeID = 5; } timed command OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; diff --git a/src/controller/java/CHIPDeviceController-JNI.cpp b/src/controller/java/CHIPDeviceController-JNI.cpp index 1d5e1fcc080bed..f653f51765626a 100644 --- a/src/controller/java/CHIPDeviceController-JNI.cpp +++ b/src/controller/java/CHIPDeviceController-JNI.cpp @@ -66,8 +66,7 @@ using namespace chip::Controller; #define CDC_JNI_CALLBACK_LOCAL_REF_COUNT 256 static void * IOThreadMain(void * arg); -static CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jint passcodeId, jbyteArray pakeVerifier, - jobject & outParams); +static CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jbyteArray pakeVerifier, jobject & outParams); static CHIP_ERROR N2J_NetworkLocation(JNIEnv * env, jstring ipAddress, jint port, jobject & outLocation); static CHIP_ERROR GetChipPathIdValue(jobject chipPathId, uint32_t wildcardValue, uint32_t & outValue); static CHIP_ERROR ParseAttributePathList(jobject attributePathList, @@ -668,7 +667,6 @@ JNI_METHOD(jobject, computePaseVerifier) CHIP_ERROR err = CHIP_NO_ERROR; jobject params; jbyteArray verifierBytes; - PasscodeId passcodeId; Spake2pVerifier verifier; Spake2pVerifierSerialized serializedVerifier; MutableByteSpan serializedVerifierSpan(serializedVerifier); @@ -677,7 +675,7 @@ JNI_METHOD(jobject, computePaseVerifier) ChipLogProgress(Controller, "computePaseVerifier() called"); AndroidDeviceControllerWrapper * wrapper = AndroidDeviceControllerWrapper::FromJNIHandle(handle); - err = wrapper->Controller()->ComputePASEVerifier(iterations, setupPincode, jniSalt.byteSpan(), verifier, passcodeId); + err = wrapper->Controller()->ComputePASEVerifier(iterations, setupPincode, jniSalt.byteSpan(), verifier); SuccessOrExit(err); err = verifier.Serialize(serializedVerifierSpan); @@ -686,7 +684,7 @@ JNI_METHOD(jobject, computePaseVerifier) err = JniReferences::GetInstance().N2J_ByteArray(env, serializedVerifier, kSpake2p_VerifierSerialized_Length, verifierBytes); SuccessOrExit(err); - err = N2J_PaseVerifierParams(env, setupPincode, static_cast(passcodeId), verifierBytes, params); + err = N2J_PaseVerifierParams(env, setupPincode, verifierBytes, params); SuccessOrExit(err); return params; exit: @@ -908,7 +906,7 @@ void * IOThreadMain(void * arg) return NULL; } -CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jint passcodeId, jbyteArray paseVerifier, jobject & outParams) +CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jbyteArray paseVerifier, jobject & outParams) { CHIP_ERROR err = CHIP_NO_ERROR; jmethodID constructor; @@ -922,7 +920,7 @@ CHIP_ERROR N2J_PaseVerifierParams(JNIEnv * env, jlong setupPincode, jint passcod constructor = env->GetMethodID(paramsClass, "", "(JI[B)V"); VerifyOrExit(constructor != nullptr, err = CHIP_JNI_ERROR_METHOD_NOT_FOUND); - outParams = (jobject) env->NewObject(paramsClass, constructor, setupPincode, passcodeId, paseVerifier); + outParams = (jobject) env->NewObject(paramsClass, constructor, setupPincode, paseVerifier); VerifyOrExit(!env->ExceptionCheck(), err = CHIP_JNI_ERROR_EXCEPTION_THROWN); exit: diff --git a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java index 2ee00811bcc963..85af26649e4fd1 100644 --- a/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java +++ b/src/controller/java/src/chip/devicecontroller/ChipDeviceController.java @@ -347,7 +347,7 @@ public void readPath( public native byte[] convertX509CertToMatterCert(byte[] x509Cert); /** - * Generates a new PASE verifier and passcode ID for the given setup PIN code. + * Generates a new PASE verifier for the given setup PIN code. * * @param devicePtr a pointer to the device object for which to generate the PASE verifier * @param setupPincode the PIN code to use diff --git a/src/controller/java/src/chip/devicecontroller/PaseVerifierParams.java b/src/controller/java/src/chip/devicecontroller/PaseVerifierParams.java index cc2ea0876ddc20..30ca681a3a093c 100644 --- a/src/controller/java/src/chip/devicecontroller/PaseVerifierParams.java +++ b/src/controller/java/src/chip/devicecontroller/PaseVerifierParams.java @@ -7,19 +7,16 @@ public final class PaseVerifierParams { private final long setupPincode; - private final int passcodeId; private final byte[] pakeVerifier; /** * Constructor * * @param setupPincode the PIN code associated with this verifier - * @param passcodeId the passcode ID for this generated verifier * @param pakeVerifier the encoded verifier (concatenation of w0 and L) */ - public PaseVerifierParams(long setupPincode, int passcodeId, byte[] pakeVerifier) { + public PaseVerifierParams(long setupPincode, byte[] pakeVerifier) { this.setupPincode = setupPincode; - this.passcodeId = passcodeId; this.pakeVerifier = pakeVerifier.clone(); } @@ -28,11 +25,6 @@ public long getSetupPincode() { return setupPincode; } - /** Returns the passcode ID for this generated verifier. */ - public int getPasscodeId() { - return passcodeId; - } - /** * Returns the encoded PAKE verifier (the concatenation of w0 and L, as described in section 3.10 * (PAKE) of the Matter specification). @@ -49,21 +41,14 @@ public boolean equals(Object other) { return false; } else { PaseVerifierParams that = (PaseVerifierParams) other; - return setupPincode == that.setupPincode - && passcodeId == that.passcodeId - && Arrays.equals(pakeVerifier, that.pakeVerifier); + return setupPincode == that.setupPincode && Arrays.equals(pakeVerifier, that.pakeVerifier); } } @Override public int hashCode() { - int result = Objects.hash(setupPincode, passcodeId); + int result = Objects.hash(setupPincode); result = 31 * result + Arrays.hashCode(pakeVerifier); return result; } - - @Override - public String toString() { - return "PaseVerifierParams{ passcodeId=" + passcodeId + " }"; - } } diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 4dccdbf9cbde37..31fc6c2c19cd69 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -478,7 +478,6 @@ public void openCommissioningWindow( Integer discriminator, Long iterations, byte[] salt, - Integer passcodeID, int timedInvokeTimeoutMs) { openCommissioningWindow( chipClusterPtr, @@ -488,7 +487,6 @@ public void openCommissioningWindow( discriminator, iterations, salt, - passcodeID, timedInvokeTimeoutMs); } @@ -511,7 +509,6 @@ private native void openCommissioningWindow( Integer discriminator, Long iterations, byte[] salt, - Integer passcodeID, @Nullable Integer timedInvokeTimeoutMs); private native void revokeCommissioning( diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 87923ab2843bf3..645892841fe67a 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -7683,13 +7683,6 @@ public Map> getCommandMap() { administratorCommissioningopenCommissioningWindowCommandParams.put( "salt", administratorCommissioningopenCommissioningWindowsaltCommandParameterInfo); - CommandParameterInfo - administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo = - new CommandParameterInfo("passcodeID", Integer.class); - administratorCommissioningopenCommissioningWindowCommandParams.put( - "passcodeID", - administratorCommissioningopenCommissioningWindowpasscodeIDCommandParameterInfo); - InteractionInfo administratorCommissioningopenCommissioningWindowInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -7701,7 +7694,6 @@ public Map> getCommandMap() { (Integer) commandArguments.get("discriminator"), (Long) commandArguments.get("iterations"), (byte[]) commandArguments.get("salt"), - (Integer) commandArguments.get("passcodeID"), 10000); }, () -> new DelegatedDefaultClusterCallback(), diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 975ed8b8bcd82a..c04e11f4a01da9 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -148,7 +148,6 @@ class ChipClusters: "discriminator": "int", "iterations": "int", "salt": "bytes", - "passcodeID": "int", }, }, 0x00000002: { diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 0b51ee35c4b3dd..81ef8395dc9063 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -13853,7 +13853,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="discriminator", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="iterations", Tag=3, Type=uint), ClusterObjectFieldDescriptor(Label="salt", Tag=4, Type=bytes), - ClusterObjectFieldDescriptor(Label="passcodeID", Tag=5, Type=uint), ]) @ChipUtility.classproperty @@ -13865,7 +13864,6 @@ def must_use_timed_invoke(cls) -> bool: discriminator: 'uint' = 0 iterations: 'uint' = 0 salt: 'bytes' = b"" - passcodeID: 'uint' = 0 @dataclass class OpenBasicCommissioningWindow(ClusterCommand): diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm index c5af0a24a645a3..6b2f538e2d02ec 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPClustersObjc.mm @@ -892,7 +892,6 @@ - (void)openCommissioningWindowWithParams:(CHIPAdministratorCommissioningCluster request.discriminator = params.discriminator.unsignedShortValue; request.iterations = params.iterations.unsignedIntValue; request.salt = [self asByteSpan:params.salt]; - request.passcodeID = params.passcodeID.unsignedShortValue; new CHIPCommandSuccessCallbackBridge( self.callbackQueue, diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h index 213f9cda4d836c..c26dc1428dcd4c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.h @@ -727,7 +727,6 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic) NSNumber * _Nonnull discriminator; @property (strong, nonatomic) NSNumber * _Nonnull iterations; @property (strong, nonatomic) NSData * _Nonnull salt; -@property (strong, nonatomic) NSNumber * _Nonnull passcodeID; - (instancetype)init; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm index 0f8365fe6bd088..008a1b12fcf19c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm @@ -1531,8 +1531,6 @@ - (instancetype)init _iterations = @(0); _salt = [NSData data]; - - _passcodeID = @(0); } return self; } diff --git a/src/protocols/secure_channel/PASESession.cpp b/src/protocols/secure_channel/PASESession.cpp index c951e17f54a375..933ba327eab14a 100644 --- a/src/protocols/secure_channel/PASESession.cpp +++ b/src/protocols/secure_channel/PASESession.cpp @@ -233,8 +233,8 @@ CHIP_ERROR PASESession::SetupSpake2p() } CHIP_ERROR PASESession::WaitForPairing(const Spake2pVerifier & verifier, uint32_t pbkdf2IterCount, const ByteSpan & salt, - PasscodeId passcodeID, uint16_t mySessionId, - Optional mrpConfig, SessionEstablishmentDelegate * delegate) + uint16_t mySessionId, Optional mrpConfig, + SessionEstablishmentDelegate * delegate) { // Return early on error here, as we have not initialized any state yet ReturnErrorCodeIf(salt.empty(), CHIP_ERROR_INVALID_ARGUMENT); @@ -265,10 +265,9 @@ CHIP_ERROR PASESession::WaitForPairing(const Spake2pVerifier & verifier, uint32_ mIterationCount = pbkdf2IterCount; mNextExpectedMsg = MsgType::PBKDFParamRequest; mPairingComplete = false; - mPasscodeID = passcodeID; mLocalMRPConfig = mrpConfig; - SetPeerNodeId(NodeIdFromPAKEKeyId(mPasscodeID)); + SetPeerNodeId(NodeIdFromPAKEKeyId(kDefaultCommissioningPasscodeId)); ChipLogDetail(SecureChannel, "Waiting for PBKDF param request"); @@ -280,9 +279,9 @@ CHIP_ERROR PASESession::WaitForPairing(const Spake2pVerifier & verifier, uint32_ return err; } -CHIP_ERROR PASESession::Pair(const Transport::PeerAddress peerAddress, uint32_t peerSetUpPINCode, PasscodeId passcodeID, - uint16_t mySessionId, Optional mrpConfig, - Messaging::ExchangeContext * exchangeCtxt, SessionEstablishmentDelegate * delegate) +CHIP_ERROR PASESession::Pair(const Transport::PeerAddress peerAddress, uint32_t peerSetUpPINCode, uint16_t mySessionId, + Optional mrpConfig, Messaging::ExchangeContext * exchangeCtxt, + SessionEstablishmentDelegate * delegate) { TRACE_EVENT_SCOPE("Pair", "PASESession"); ReturnErrorCodeIf(exchangeCtxt == nullptr, CHIP_ERROR_INVALID_ARGUMENT); @@ -295,8 +294,7 @@ CHIP_ERROR PASESession::Pair(const Transport::PeerAddress peerAddress, uint32_t SetPeerAddress(peerAddress); mLocalMRPConfig = mrpConfig; - mPasscodeID = passcodeID; - SetPeerNodeId(NodeIdFromPAKEKeyId(mPasscodeID)); + SetPeerNodeId(NodeIdFromPAKEKeyId(kDefaultCommissioningPasscodeId)); err = SendPBKDFParamRequest(); SuccessOrExit(err); @@ -356,7 +354,7 @@ CHIP_ERROR PASESession::SendPBKDFParamRequest() ReturnErrorOnFailure(tlvWriter.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerContainerType)); ReturnErrorOnFailure(tlvWriter.PutBytes(TLV::ContextTag(1), mPBKDFLocalRandomData, sizeof(mPBKDFLocalRandomData))); ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(2), GetLocalSessionId())); - ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(3), mPasscodeID)); + ReturnErrorOnFailure(tlvWriter.Put(TLV::ContextTag(3), kDefaultCommissioningPasscodeId)); ReturnErrorOnFailure(tlvWriter.PutBoolean(TLV::ContextTag(4), mHavePBKDFParameters)); if (mLocalMRPConfig.HasValue()) { @@ -416,8 +414,7 @@ CHIP_ERROR PASESession::HandlePBKDFParamRequest(System::PacketBufferHandle && ms SuccessOrExit(err = tlvReader.Next()); VerifyOrExit(TLV::TagNumFromTag(tlvReader.GetTag()) == ++decodeTagIdSeq, err = CHIP_ERROR_INVALID_TLV_TAG); SuccessOrExit(err = tlvReader.Get(passcodeId)); - // TODO: uncomment once proper fix for #15362 is implemented - // VerifyOrExit(passcodeId == mPasscodeID, err = CHIP_ERROR_INVALID_PASE_PARAMETER); + VerifyOrExit(passcodeId == kDefaultCommissioningPasscodeId, err = CHIP_ERROR_INVALID_PASE_PARAMETER); SuccessOrExit(err = tlvReader.Next()); VerifyOrExit(TLV::TagNumFromTag(tlvReader.GetTag()) == ++decodeTagIdSeq, err = CHIP_ERROR_INVALID_TLV_TAG); diff --git a/src/protocols/secure_channel/PASESession.h b/src/protocols/secure_channel/PASESession.h index bf18c95524ed9c..98bbc6c2d72914 100644 --- a/src/protocols/secure_channel/PASESession.h +++ b/src/protocols/secure_channel/PASESession.h @@ -86,14 +86,13 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin * @param verifier PASE verifier to be used for SPAKE2P pairing * @param pbkdf2IterCount Iteration count for PBKDF2 function * @param salt Salt to be used for SPAKE2P operation - * @param passcodeID Passcode ID assigned by the administrator to this PASE verifier * @param mySessionId Session ID to be assigned to the secure session on the peer node * @param delegate Callback object * * @return CHIP_ERROR The result of initialization */ CHIP_ERROR WaitForPairing(const Spake2pVerifier & verifier, uint32_t pbkdf2IterCount, const ByteSpan & salt, - PasscodeId passcodeID, uint16_t mySessionId, Optional mrpConfig, + uint16_t mySessionId, Optional mrpConfig, SessionEstablishmentDelegate * delegate); /** @@ -102,7 +101,6 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin * * @param peerAddress Address of peer to pair * @param peerSetUpPINCode Setup PIN code of the peer device - * @param passcodeID Passcode ID assigned by the administrator to this PASE verifier * @param mySessionId Session ID to be assigned to the secure session on the peer node * @param exchangeCtxt The exchange context to send and receive messages with the peer * Note: It's expected that the caller of this API hands over the @@ -112,9 +110,9 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin * * @return CHIP_ERROR The result of initialization */ - CHIP_ERROR Pair(const Transport::PeerAddress peerAddress, uint32_t peerSetUpPINCode, PasscodeId passcodeID, - uint16_t mySessionId, Optional mrpConfig, - Messaging::ExchangeContext * exchangeCtxt, SessionEstablishmentDelegate * delegate); + CHIP_ERROR Pair(const Transport::PeerAddress peerAddress, uint32_t peerSetUpPINCode, uint16_t mySessionId, + Optional mrpConfig, Messaging::ExchangeContext * exchangeCtxt, + SessionEstablishmentDelegate * delegate); /** * @brief @@ -249,8 +247,6 @@ class DLL_EXPORT PASESession : public Messaging::ExchangeDelegate, public Pairin Spake2pVerifier mPASEVerifier; - PasscodeId mPasscodeID = kDefaultCommissioningPasscodeId; - uint32_t mSetupPINCode; bool mHavePBKDFParameters = false; diff --git a/src/protocols/secure_channel/tests/TestPASESession.cpp b/src/protocols/secure_channel/tests/TestPASESession.cpp index 6bfa5373d7f6b0..2dfffa2453d0cd 100644 --- a/src/protocols/secure_channel/tests/TestPASESession.cpp +++ b/src/protocols/secure_channel/tests/TestPASESession.cpp @@ -123,29 +123,28 @@ void SecurePairingWaitTest(nlTestSuite * inSuite, void * inContext) gLoopback.Reset(); NL_TEST_ASSERT(inSuite, - pairing.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, ByteSpan(nullptr, 0), - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), + pairing.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, ByteSpan(nullptr, 0), 0, + Optional::Missing(), &delegate) == CHIP_ERROR_INVALID_ARGUMENT); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, pairing.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, - ByteSpan(reinterpret_cast("saltSalt"), 8), - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), + ByteSpan(reinterpret_cast("saltSalt"), 8), 0, + Optional::Missing(), nullptr) == CHIP_ERROR_INVALID_ARGUMENT); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, pairing.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, - ByteSpan(reinterpret_cast("saltSalt"), 8), - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), + ByteSpan(reinterpret_cast("saltSalt"), 8), 0, + Optional::Missing(), &delegate) == CHIP_ERROR_INVALID_ARGUMENT); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, pairing.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, ByteSpan(sTestSpake2p01_Salt), - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), - &delegate) == CHIP_NO_ERROR); + 0, Optional::Missing(), &delegate) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); } @@ -163,15 +162,13 @@ void SecurePairingStartTest(nlTestSuite * inSuite, void * inContext) ExchangeContext * context = ctx.NewUnauthenticatedExchangeToBob(&pairing); NL_TEST_ASSERT(inSuite, - pairing.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), nullptr, - nullptr) != CHIP_NO_ERROR); + pairing.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, 0, + Optional::Missing(), nullptr, nullptr) != CHIP_NO_ERROR); gLoopback.Reset(); NL_TEST_ASSERT(inSuite, - pairing.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), context, - &delegate) == CHIP_NO_ERROR); + pairing.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, 0, + Optional::Missing(), context, &delegate) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, gLoopback.mSentMessageCount == 1); @@ -188,8 +185,8 @@ void SecurePairingStartTest(nlTestSuite * inSuite, void * inContext) PASESession pairing1; ExchangeContext * context1 = ctx.NewUnauthenticatedExchangeToBob(&pairing1); NL_TEST_ASSERT(inSuite, - pairing1.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, - kDefaultCommissioningPasscodeId, 0, Optional::Missing(), context1, + pairing1.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, 0, + Optional::Missing(), context1, &delegate) == CHIP_ERROR_BAD_REQUEST); ctx.DrainAndServiceIO(); @@ -229,14 +226,13 @@ void SecurePairingHandshakeTestCommon(nlTestSuite * inSuite, void * inContext, P NL_TEST_ASSERT(inSuite, pairingAccessory.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, - ByteSpan(sTestSpake2p01_Salt), kDefaultCommissioningPasscodeId, 0, - mrpAccessoryConfig, &delegateAccessory) == CHIP_NO_ERROR); + ByteSpan(sTestSpake2p01_Salt), 0, mrpAccessoryConfig, + &delegateAccessory) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, - pairingCommissioner.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, - kDefaultCommissioningPasscodeId, 0, mrpCommissionerConfig, contextCommissioner, - &delegateCommissioner) == CHIP_NO_ERROR); + pairingCommissioner.Pair(Transport::PeerAddress(Transport::Type::kBle), sTestSpake2p01_PinCode, 0, + mrpCommissionerConfig, contextCommissioner, &delegateCommissioner) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); while (gLoopback.mMessageDropped) @@ -356,14 +352,13 @@ void SecurePairingFailedHandshake(nlTestSuite * inSuite, void * inContext) Protocols::SecureChannel::MsgType::PBKDFParamRequest, &pairingAccessory) == CHIP_NO_ERROR); NL_TEST_ASSERT(inSuite, - pairingAccessory.WaitForPairing(sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, - ByteSpan(sTestSpake2p01_Salt), kDefaultCommissioningPasscodeId, 0, - Optional::Missing(), - &delegateAccessory) == CHIP_NO_ERROR); + pairingAccessory.WaitForPairing( + sTestSpake2p01_PASEVerifier, sTestSpake2p01_IterationCount, ByteSpan(sTestSpake2p01_Salt), 0, + Optional::Missing(), &delegateAccessory) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); NL_TEST_ASSERT(inSuite, - pairingCommissioner.Pair(Transport::PeerAddress(Transport::Type::kBle), 4321, kDefaultCommissioningPasscodeId, 0, + pairingCommissioner.Pair(Transport::PeerAddress(Transport::Type::kBle), 4321, 0, Optional::Missing(), contextCommissioner, &delegateCommissioner) == CHIP_NO_ERROR); ctx.DrainAndServiceIO(); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index c279b60e01a115..c32353bbd1d684 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -10033,7 +10033,6 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kDiscriminator)), discriminator)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kIterations)), iterations)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSalt)), salt)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kPasscodeID)), passcodeID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -10064,9 +10063,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kSalt): ReturnErrorOnFailure(DataModel::Decode(reader, salt)); break; - case to_underlying(Fields::kPasscodeID): - ReturnErrorOnFailure(DataModel::Decode(reader, passcodeID)); - break; default: break; } 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 469f09794dbff3..0dd2d68e998832 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 @@ -14828,7 +14828,6 @@ enum class Fields kDiscriminator = 2, kIterations = 3, kSalt = 4, - kPasscodeID = 5, }; struct Type @@ -14843,7 +14842,6 @@ struct Type uint16_t discriminator = static_cast(0); uint32_t iterations = static_cast(0); chip::ByteSpan salt; - uint16_t passcodeID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -14863,7 +14861,6 @@ struct DecodableType uint16_t discriminator = static_cast(0); uint32_t iterations = static_cast(0); chip::ByteSpan salt; - uint16_t passcodeID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace OpenCommissioningWindow diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h index 11923488e27490..2218d93f02c788 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/Commands.h @@ -1128,7 +1128,6 @@ class AdministratorCommissioningOpenCommissioningWindow : public ModelCommand { AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mCommissioningTimeout); AddArgument("Discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("Iterations", 0, UINT32_MAX, &mIterations); - AddArgument("PasscodeID", 0, UINT16_MAX, &mPasscodeID); ModelCommand::AddArguments(); } @@ -1147,7 +1146,6 @@ class AdministratorCommissioningOpenCommissioningWindow : public ModelCommand { params.discriminator = [NSNumber numberWithUnsignedShort:mDiscriminator]; params.iterations = [NSNumber numberWithUnsignedInt:mIterations]; params.salt = [[NSData alloc] initWithBytes:mSalt.data() length:mSalt.size()]; - params.passcodeID = [NSNumber numberWithUnsignedShort:mPasscodeID]; [cluster openCommissioningWindowWithParams:params completionHandler:^(NSError * _Nullable error) { err = [CHIPError errorToCHIPErrorCode:error]; @@ -1163,7 +1161,6 @@ class AdministratorCommissioningOpenCommissioningWindow : public ModelCommand { uint16_t mDiscriminator; uint32_t mIterations; chip::ByteSpan mSalt; - uint16_t mPasscodeID; }; /* diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index ad487efd602276..6aae4c8c2579f4 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -6453,7 +6453,6 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand AddArgument("Discriminator", 0, UINT16_MAX, &mRequest.discriminator); AddArgument("Iterations", 0, UINT32_MAX, &mRequest.iterations); AddArgument("Salt", &mRequest.salt); - AddArgument("PasscodeID", 0, UINT16_MAX, &mRequest.passcodeID); ClusterCommand::AddArguments(); } From b5a0754e008bcaf3e191ff3390b61e5f3c330604 Mon Sep 17 00:00:00 2001 From: Jerry Johns Date: Wed, 9 Mar 2022 21:20:47 -0800 Subject: [PATCH 23/43] Improve Subscription Liveness Logging (#15833) --- src/app/ReadClient.cpp | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/app/ReadClient.cpp b/src/app/ReadClient.cpp index 9ee2e760f41141..2e0ad3ce8f57de 100644 --- a/src/app/ReadClient.cpp +++ b/src/app/ReadClient.cpp @@ -693,7 +693,10 @@ CHIP_ERROR ReadClient::RefreshLivenessCheckTimer() System::Clock::Timeout timeout = System::Clock::Seconds16(mMaxIntervalCeilingSeconds) + mpExchangeCtx->GetSessionHandle()->GetAckTimeout(); // EFR32/MBED/INFINION/K32W's chrono count return long unsinged, but other platform returns unsigned - ChipLogProgress(DataManagement, "Refresh LivenessCheckTime with %lu milliseconds", static_cast(timeout.count())); + ChipLogProgress( + DataManagement, + "Refresh LivenessCheckTime for %lu milliseconds with SubscriptionId = 0x" ChipLogFormatX64 " Peer = %02x:" ChipLogFormatX64, + static_cast(timeout.count()), ChipLogValueX64(mSubscriptionId), mFabricIndex, ChipLogValueX64(mPeerNodeId)); err = InteractionModelEngine::GetInstance()->GetExchangeManager()->GetSessionManager()->SystemLayer()->StartTimer( timeout, OnLivenessTimeoutCallback, this); @@ -728,8 +731,9 @@ void ReadClient::OnLivenessTimeoutCallback(System::Layer * apSystemLayer, void * // VerifyOrDie(_this->mpImEngine->InActiveReadClientList(_this)); - ChipLogError(DataManagement, "Subscription Liveness timeout with subscription id 0x%" PRIx64 " peer node 0x%" PRIx64, - _this->mSubscriptionId, _this->mPeerNodeId); + ChipLogError(DataManagement, + "Subscription Liveness timeout with SubscriptionID = 0x" ChipLogFormatX64 ", Peer = %02x:" ChipLogFormatX64, + ChipLogValueX64(_this->mSubscriptionId), _this->mFabricIndex, ChipLogValueX64(_this->mPeerNodeId)); // TODO: add a more specific error here for liveness timeout failure to distinguish between other classes of timeouts (i.e // response timeouts). @@ -753,6 +757,13 @@ CHIP_ERROR ReadClient::ProcessSubscribeResponse(System::PacketBufferHandle && aP VerifyOrReturnError(IsMatchingClient(subscriptionId), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure(subscribeResponse.GetMinIntervalFloorSeconds(&mMinIntervalFloorSeconds)); ReturnErrorOnFailure(subscribeResponse.GetMaxIntervalCeilingSeconds(&mMaxIntervalCeilingSeconds)); + + ChipLogProgress(DataManagement, + "Subscription established with SubscriptionID = 0x" ChipLogFormatX64 " MinInterval = %" PRIu16 + "s MaxInterval = %" PRIu16 "s Peer = %02x:" ChipLogFormatX64, + ChipLogValueX64(mSubscriptionId), mMinIntervalFloorSeconds, mMaxIntervalCeilingSeconds, mFabricIndex, + ChipLogValueX64(mPeerNodeId)); + ReturnErrorOnFailure(subscribeResponse.ExitContainer()); mpCallback.OnSubscriptionEstablished(subscriptionId); @@ -890,8 +901,9 @@ bool ReadClient::ResubscribeIfNeeded() } else { - ChipLogProgress(DataManagement, "Will try to Resubscribe at retry index %" PRIu32 " after %" PRIu32 "ms", mNumRetries, - intervalMsec); + ChipLogProgress(DataManagement, + "Will try to Resubscribe to %02x:" ChipLogFormatX64 " at retry index %" PRIu32 " after %" PRIu32 "ms", + mFabricIndex, ChipLogValueX64(mPeerNodeId), mNumRetries, intervalMsec); } return true; } From 04b02c246fe247571a1dde14343298e0205fc194 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Thu, 10 Mar 2022 09:44:10 +0100 Subject: [PATCH 24/43] [ota] Remove two outdated/redundant methods (#16019) * [ota] Move test requestor feature to the application * [ota] Remove SetOTAImageProcessorParams The function was initially used to set name of image file to be downloaded, but most platforms don't use that and some platforms use the file name as the output file name, that is, the file name where the downloaded image should be saved. Remove the method from the common interface and add SetOTAImageFile setters in platforms that need to have the output file name set. --- .../ameba/main/chipinterface.cpp | 6 ---- .../lighting-app/ameba/main/chipinterface.cpp | 6 ---- .../nxp/k32w/k32w0/main/AppTask.cpp | 8 +----- .../ameba/main/chipinterface.cpp | 7 ----- .../ota-requestor-app/efr32/src/AppTask.cpp | 4 +-- examples/ota-requestor-app/linux/main.cpp | 28 ++++++++++--------- examples/ota-requestor-app/p6/src/AppTask.cpp | 1 - examples/platform/efr32/OTAConfig.cpp | 4 +-- .../clusters/ota-requestor/OTARequestor.cpp | 2 +- src/app/clusters/ota-requestor/OTARequestor.h | 6 ---- src/include/platform/OTAImageProcessor.h | 10 ++----- src/platform/EFR32/OTAImageProcessorImpl.cpp | 6 ++-- src/platform/EFR32/OTAImageProcessorImpl.h | 2 ++ src/platform/Linux/OTAImageProcessorImpl.cpp | 11 ++++---- src/platform/Linux/OTAImageProcessorImpl.h | 2 ++ .../nxp/k32w/k32w0/OTAImageProcessorImpl.cpp | 8 +++--- .../nxp/k32w/k32w0/OTAImageProcessorImpl.h | 2 ++ 17 files changed, 39 insertions(+), 74 deletions(-) diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 48e285b03d986a..bceeec83e598f5 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -122,12 +122,6 @@ static void InitOTARequestor(void) // Set server instance used for session establishment gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); - // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at - // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. - // TODO: instatiate and initialize these values when QueryImageResponse tells us an image is available - // TODO: add API for OTARequestor to pass QueryImageResponse info to the application to use for OTADownloader init - OTAImageProcessorParams ipParams; - gImageProcessor.SetOTAImageProcessorParams(ipParams); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the Downloader and Image Processor objects diff --git a/examples/lighting-app/ameba/main/chipinterface.cpp b/examples/lighting-app/ameba/main/chipinterface.cpp index 96fd9c5887efaf..44322dbbe4ea2e 100644 --- a/examples/lighting-app/ameba/main/chipinterface.cpp +++ b/examples/lighting-app/ameba/main/chipinterface.cpp @@ -107,12 +107,6 @@ static void InitOTARequestor(void) // Set server instance used for session establishment gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); - // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at - // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. - // TODO: instatiate and initialize these values when QueryImageResponse tells us an image is available - // TODO: add API for OTARequestor to pass QueryImageResponse info to the application to use for OTADownloader init - OTAImageProcessorParams ipParams; - gImageProcessor.SetOTAImageProcessorParams(ipParams); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the Downloader and Image Processor objects diff --git a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp index 646144671c8713..ed3a162cdb6e66 100644 --- a/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp +++ b/examples/lighting-app/nxp/k32w/k32w0/main/AppTask.cpp @@ -127,13 +127,7 @@ CHIP_ERROR AppTask::Init() gRequestorCore.Init(Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at - // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. - // TODO: instatiate and initialize these values when QueryImageResponse tells us an image is available - // TODO: add API for OTARequestor to pass QueryImageResponse info to the application to use for OTADownloader init - OTAImageProcessorParams ipParams; - ipParams.imageFile = CharSpan("test.txt"); - gImageProcessor.SetOTAImageProcessorParams(ipParams); + gImageProcessor.SetOTAImageFile(CharSpan("test.txt")); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the gDownloader and Image Processor objects diff --git a/examples/ota-requestor-app/ameba/main/chipinterface.cpp b/examples/ota-requestor-app/ameba/main/chipinterface.cpp index 679937ef2ff481..bfb91532a8c1db 100644 --- a/examples/ota-requestor-app/ameba/main/chipinterface.cpp +++ b/examples/ota-requestor-app/ameba/main/chipinterface.cpp @@ -50,7 +50,6 @@ using chip::NodeId; using chip::OnDeviceConnected; using chip::OnDeviceConnectionFailure; using chip::OTADownloader; -using chip::OTAImageProcessorParams; using chip::OTARequestor; using chip::PeerId; using chip::Server; @@ -107,12 +106,6 @@ static void InitOTARequestor(void) // Set server instance used for session establishment gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); - // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at - // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. - // TODO: instatiate and initialize these values when QueryImageResponse tells us an image is available - // TODO: add API for OTARequestor to pass QueryImageResponse info to the application to use for OTADownloader init - OTAImageProcessorParams ipParams; - gImageProcessor.SetOTAImageProcessorParams(ipParams); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the Downloader and Image Processor objects diff --git a/examples/ota-requestor-app/efr32/src/AppTask.cpp b/examples/ota-requestor-app/efr32/src/AppTask.cpp index a6f9dc56c6f705..0659962b174a9d 100644 --- a/examples/ota-requestor-app/efr32/src/AppTask.cpp +++ b/examples/ota-requestor-app/efr32/src/AppTask.cpp @@ -542,9 +542,7 @@ void AppTask::InitOTARequestor() gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - OTAImageProcessorParams ipParams; - ipParams.imageFile = CharSpan("test.txt"); - gImageProcessor.SetOTAImageProcessorParams(ipParams); + gImageProcessor.SetOTAImageFile(CharSpan("test.txt")); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the Downloader and Image Processor objects diff --git a/examples/ota-requestor-app/linux/main.cpp b/examples/ota-requestor-app/linux/main.cpp index 0de41918de1e23..520c30a099542c 100644 --- a/examples/ota-requestor-app/linux/main.cpp +++ b/examples/ota-requestor-app/linux/main.cpp @@ -35,7 +35,6 @@ using chip::OnDeviceConnected; using chip::OnDeviceConnectionFailure; using chip::OTADownloader; using chip::OTAImageProcessorImpl; -using chip::OTAImageProcessorParams; using chip::OTARequestor; using chip::PeerId; using chip::Server; @@ -48,9 +47,15 @@ using namespace chip::ArgParser; using namespace chip::Messaging; using namespace chip::app::Clusters::OtaSoftwareUpdateProvider::Commands; +class CustomOTARequestorDriver : public DeviceLayer::ExtendedOTARequestorDriver +{ +public: + bool CanConsent() override; +}; + OTARequestor gRequestorCore; DefaultOTARequestorStorage gRequestorStorage; -DeviceLayer::ExtendedOTARequestorDriver gRequestorUser; +CustomOTARequestorDriver gRequestorUser; BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; chip::ota::DefaultOTARequestorUserConsentProvider gUserConsentProvider; @@ -81,7 +86,8 @@ OptionSet cmdLineOptions = { HandleOptions, cmdLineOptionsDef, "PROGRAM OPTIONS" " Periodic timeout for querying providers in the default OTA provider list\n" " If none or zero is supplied the timeout is set to every 24 hours. \n" " -c/--requestorCanConsent\n" - " If supplied, the RequestorCanConsent field of the QueryImage command is set to true.\n" + " If supplied, the RequestorCanConsent field of the QueryImage command is set to " + "true.\n" " Otherwise, the value is determined by the driver.\n " " -f/--otaDownloadPath \n" " If supplied, the OTA image is downloaded to the given fully-qualified file-path.\n" @@ -93,6 +99,11 @@ OptionSet cmdLineOptions = { HandleOptions, cmdLineOptionsDef, "PROGRAM OPTIONS" OptionSet * allOptions[] = { &cmdLineOptions, nullptr }; +bool CustomOTARequestorDriver::CanConsent() +{ + return gRequestorCanConsent.ValueOr(DeviceLayer::ExtendedOTARequestorDriver::CanConsent()); +} + static void InitOTARequestor(void) { // Set the global instance of the OTA requestor core component @@ -105,11 +116,7 @@ static void InitOTARequestor(void) gRequestorCore.Init(chip::Server::GetInstance(), gRequestorStorage, gRequestorUser, gDownloader); gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - // WARNING: this is probably not realistic to know such details of the image or to even have an OTADownloader instantiated at - // the beginning of program execution. We're using hardcoded values here for now since this is a reference application. - OTAImageProcessorParams ipParams; - ipParams.imageFile = CharSpan::fromCharString(gOtaDownloadPath); - gImageProcessor.SetOTAImageProcessorParams(ipParams); + gImageProcessor.SetOTAImageFile(CharSpan::fromCharString(gOtaDownloadPath)); gImageProcessor.SetOTADownloader(&gDownloader); // Set the image processor instance used for handling image being downloaded @@ -174,11 +181,6 @@ void ApplicationInit() { chip::Dnssd::Resolver::Instance().Init(chip::DeviceLayer::UDPEndPointManager()); - if (gRequestorCanConsent.HasValue()) - { - gRequestorCore.SetRequestorCanConsent(gRequestorCanConsent.Value()); - } - // Initialize all OTA download components InitOTARequestor(); } diff --git a/examples/ota-requestor-app/p6/src/AppTask.cpp b/examples/ota-requestor-app/p6/src/AppTask.cpp index 2631a843160081..a5c4a61cc5d090 100644 --- a/examples/ota-requestor-app/p6/src/AppTask.cpp +++ b/examples/ota-requestor-app/p6/src/AppTask.cpp @@ -65,7 +65,6 @@ using chip::GetRequestorInstance; using chip::NodeId; using chip::OTADownloader; using chip::OTAImageProcessorImpl; -using chip::OTAImageProcessorParams; using chip::OTARequestor; using chip::System::Layer; diff --git a/examples/platform/efr32/OTAConfig.cpp b/examples/platform/efr32/OTAConfig.cpp index 068ff810bcc47e..4b9201230c84da 100644 --- a/examples/platform/efr32/OTAConfig.cpp +++ b/examples/platform/efr32/OTAConfig.cpp @@ -77,9 +77,7 @@ void OTAConfig::Init() gRequestorUser.Init(&gRequestorCore, &gImageProcessor); - chip::OTAImageProcessorParams ipParams; - ipParams.imageFile = chip::CharSpan("test.txt"); - gImageProcessor.SetOTAImageProcessorParams(ipParams); + gImageProcessor.SetOTAImageFile(chip::CharSpan("test.txt")); gImageProcessor.SetOTADownloader(&gDownloader); // Connect the Downloader and Image Processor objects diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index d70298bdf6abc1..f45a1f1fdb8eb5 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -656,7 +656,7 @@ CHIP_ERROR OTARequestor::SendQueryImageRequest(OperationalDeviceProxy & devicePr ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetSoftwareVersion(args.softwareVersion)); args.protocolsSupported = kProtocolsSupported; - args.requestorCanConsent.SetValue(mRequestorCanConsent.ValueOr(mOtaRequestorDriver->CanConsent())); + args.requestorCanConsent.SetValue(mOtaRequestorDriver->CanConsent()); uint16_t hardwareVersion; if (DeviceLayer::ConfigurationMgr().GetHardwareVersion(hardwareVersion) == CHIP_NO_ERROR) diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index b5de8b40b0c55b..9b0cdc1e84be34 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -130,11 +130,6 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe reinterpret_cast(this)); } - /** - * Called to set optional requestorCanConsent value provided by Requestor. - */ - void SetRequestorCanConsent(bool requestorCanConsent) { mRequestorCanConsent.SetValue(requestorCanConsent); } - private: using QueryImageResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; using ApplyUpdateResponseDecodableType = app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType; @@ -314,7 +309,6 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe CharSpan mFileDesignator; OTAUpdateStateEnum mCurrentUpdateState = OTAUpdateStateEnum::kUnknown; Server * mServer = nullptr; - chip::Optional mRequestorCanConsent; ProviderLocationList mDefaultOtaProviderList; Optional mProviderLocation; // Provider location used for the current update in progress }; diff --git a/src/include/platform/OTAImageProcessor.h b/src/include/platform/OTAImageProcessor.h index 7fd7a2487ba95a..9317ce42136c9d 100644 --- a/src/include/platform/OTAImageProcessor.h +++ b/src/include/platform/OTAImageProcessor.h @@ -26,9 +26,8 @@ namespace chip { -struct OTAImageProcessorParams +struct OTAImageProgress { - CharSpan imageFile; uint64_t downloadedBytes = 0; uint64_t totalFileBytes = 0; }; @@ -76,11 +75,6 @@ class DLL_EXPORT OTAImageProcessorInterface */ virtual CHIP_ERROR ProcessBlock(ByteSpan & block) = 0; - /** - * Called to setup params for the OTA image download - */ - virtual void SetOTAImageProcessorParams(OTAImageProcessorParams & params) { mParams = params; }; - /** * Called to check the current download status of the OTA image download. */ @@ -97,7 +91,7 @@ class DLL_EXPORT OTAImageProcessorInterface virtual uint64_t GetBytesDownloaded() { return mParams.downloadedBytes; } protected: - OTAImageProcessorParams mParams; + OTAImageProgress mParams; }; } // namespace chip diff --git a/src/platform/EFR32/OTAImageProcessorImpl.cpp b/src/platform/EFR32/OTAImageProcessorImpl.cpp index d3f2190b588e6d..be2284d61afc27 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.cpp +++ b/src/platform/EFR32/OTAImageProcessorImpl.cpp @@ -34,7 +34,7 @@ uint32_t OTAImageProcessorImpl::mWriteOffset; CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -80,7 +80,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() CHIP_ERROR OTAImageProcessorImpl::Abort() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -143,7 +143,7 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) imageProcessor->ReleaseBlock(); - ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mParams.imageFile.data()); + ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mImageFile.data()); } void OTAImageProcessorImpl::HandleAbort(intptr_t context) diff --git a/src/platform/EFR32/OTAImageProcessorImpl.h b/src/platform/EFR32/OTAImageProcessorImpl.h index c2318fc6c61525..186c2b0be2a2d7 100644 --- a/src/platform/EFR32/OTAImageProcessorImpl.h +++ b/src/platform/EFR32/OTAImageProcessorImpl.h @@ -37,6 +37,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR ProcessBlock(ByteSpan & block) override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } + void SetOTAImageFile(CharSpan name) { mImageFile = name; } private: //////////// Actual handlers for the OTAImageProcessorInterface /////////////// @@ -59,6 +60,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface static uint8_t mSlotId; // Bootloader storage slot MutableByteSpan mBlock; OTADownloader * mDownloader; + CharSpan mImageFile; }; } // namespace chip diff --git a/src/platform/Linux/OTAImageProcessorImpl.cpp b/src/platform/Linux/OTAImageProcessorImpl.cpp index 2609d337413c6c..ef415d4406a2d8 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.cpp +++ b/src/platform/Linux/OTAImageProcessorImpl.cpp @@ -25,7 +25,7 @@ namespace chip { CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -49,7 +49,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() CHIP_ERROR OTAImageProcessorImpl::Abort() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -97,8 +97,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) } imageProcessor->mHeaderParser.Init(); - imageProcessor->mOfs.open(imageProcessor->mParams.imageFile.data(), - std::ofstream::out | std::ofstream::ate | std::ofstream::app); + imageProcessor->mOfs.open(imageProcessor->mImageFile.data(), std::ofstream::out | std::ofstream::ate | std::ofstream::app); if (!imageProcessor->mOfs.good()) { imageProcessor->mDownloader->OnPreparedForDownload(CHIP_ERROR_OPEN_FAILED); @@ -121,7 +120,7 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) imageProcessor->mOfs.close(); imageProcessor->ReleaseBlock(); - ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mParams.imageFile.data()); + ChipLogProgress(SoftwareUpdate, "OTA image downloaded to %s", imageProcessor->mImageFile.data()); } void OTAImageProcessorImpl::HandleApply(intptr_t context) @@ -149,7 +148,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) } imageProcessor->mOfs.close(); - remove(imageProcessor->mParams.imageFile.data()); + remove(imageProcessor->mImageFile.data()); imageProcessor->ReleaseBlock(); } diff --git a/src/platform/Linux/OTAImageProcessorImpl.h b/src/platform/Linux/OTAImageProcessorImpl.h index 334bbd7d223afa..d01a7c92a2404e 100644 --- a/src/platform/Linux/OTAImageProcessorImpl.h +++ b/src/platform/Linux/OTAImageProcessorImpl.h @@ -38,6 +38,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR ProcessBlock(ByteSpan & block) override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } + void SetOTAImageFile(CharSpan name) { mImageFile = name; } private: //////////// Actual handlers for the OTAImageProcessorInterface /////////////// @@ -64,6 +65,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTADownloader * mDownloader; OTAImageHeaderParser mHeaderParser; uint32_t mSoftwareVersion; + CharSpan mImageFile; }; } // namespace chip diff --git a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp index a0f9065c7aa19e..67decb387c2639 100644 --- a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp +++ b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.cpp @@ -28,7 +28,7 @@ namespace chip { CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -51,7 +51,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() CHIP_ERROR OTAImageProcessorImpl::Abort() { - if (mParams.imageFile.empty()) + if (mImageFile.empty()) { ChipLogError(SoftwareUpdate, "Invalid output image file supplied"); return CHIP_ERROR_INTERNAL; @@ -95,7 +95,7 @@ void OTAImageProcessorImpl::HandlePrepareDownload(intptr_t context) if (gOtaSuccess_c == OTA_ClientInit()) { - if (gOtaSuccess_c == OTA_StartImage(imageProcessor->mParams.imageFile.size())) + if (gOtaSuccess_c == OTA_StartImage(imageProcessor->mImageFile.size())) { imageProcessor->mDownloader->OnPreparedForDownload(CHIP_NO_ERROR); } @@ -110,7 +110,7 @@ void OTAImageProcessorImpl::HandleAbort(intptr_t context) return; } - remove(imageProcessor->mParams.imageFile.data()); + remove(imageProcessor->mImageFile.data()); imageProcessor->ReleaseBlock(); } diff --git a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.h b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.h index 05d6beb941e8ce..45f091bf6624c0 100644 --- a/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.h +++ b/src/platform/nxp/k32w/k32w0/OTAImageProcessorImpl.h @@ -35,6 +35,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface CHIP_ERROR ProcessBlock(ByteSpan & block) override; void SetOTADownloader(OTADownloader * downloader) { mDownloader = downloader; } + void SetOTAImageFile(CharSpan name) { mImageFile = name; } private: //////////// Actual handlers for the OTAImageProcessorInterface /////////////// @@ -55,6 +56,7 @@ class OTAImageProcessorImpl : public OTAImageProcessorInterface OTADownloader * mDownloader; MutableByteSpan mBlock; + CharSpan mImageFile; }; } // namespace chip From 922213061a9073e2e42db2ac17d5815822be300d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 10 Mar 2022 03:53:22 -0500 Subject: [PATCH 25/43] Add missing space in DataVersion logging. (#16038) The attribute id was getting glued to "DataVersion". --- .../templates/logging/DataModelLogger-src.zapt | 2 +- src/app/tests/suites/certification/Test_TC_BR_1.yaml | 2 +- src/app/tests/suites/certification/Test_TC_GC_1_1.yaml | 10 +++++----- .../tests/suites/certification/Test_TC_IDM_1_2.yaml | 2 +- .../tests/suites/certification/Test_TC_MC_10_1.yaml | 4 ++-- .../tests/suites/certification/Test_TC_MC_3_13.yaml | 4 ++-- src/app/tests/suites/certification/Test_TC_MC_4_1.yaml | 2 +- .../tests/suites/certification/Test_TC_MOD_1_2.yaml | 8 ++++---- .../tests/suites/certification/Test_TC_MOD_2_1.yaml | 2 +- .../tests/suites/certification/Test_TC_MOD_3_1.yaml | 6 +++--- .../tests/suites/certification/Test_TC_MOD_3_2.yaml | 6 +++--- .../tests/suites/certification/Test_TC_MOD_3_3.yaml | 6 +++--- .../tests/suites/certification/Test_TC_OCC_2_3.yaml | 4 ++-- .../tests/suites/certification/Test_TC_OCC_3_1.yaml | 4 ++-- .../tests/suites/certification/Test_TC_PRS_2_3.yaml | 2 +- .../tests/suites/certification/Test_TC_PSCFG_1_1.yaml | 4 ++-- .../zap-generated/cluster/logging/DataModelLogger.cpp | 2 +- 17 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt index 62b5f708652404..7ddea44e083d5f 100644 --- a/examples/chip-tool/templates/logging/DataModelLogger-src.zapt +++ b/examples/chip-tool/templates/logging/DataModelLogger-src.zapt @@ -62,7 +62,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const {{ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data) { - ChipLogProgress(chipTool, "Endpoint: %" PRIu16 " Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI "DataVersion: %" PRIu32, path.mEndpointId, + ChipLogProgress(chipTool, "Endpoint: %" PRIu16 " Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI " DataVersion: %" PRIu32, path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId), path.mDataVersion.ValueOr(0)); switch (path.mClusterId) diff --git a/src/app/tests/suites/certification/Test_TC_BR_1.yaml b/src/app/tests/suites/certification/Test_TC_BR_1.yaml index acd6b9db57f935..306fa02164cdc1 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_1.yaml @@ -25,7 +25,7 @@ tests: verification: "./chip-tool descriptor read device-list 1 1 C[1646119893.830333][3487:3492] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_001D Attribute 0x0000_0000DataVersion: 4007324196 + 0x0000_001D Attribute 0x0000_0000 DataVersion: 4007324196 [1646119893.830428][3487:3492] CHIP:TOO: device list: 1 entries [1646119893.830500][3487:3492] CHIP:TOO: [1]: { [1646119893.830531][3487:3492] CHIP:TOO: Type: 256 diff --git a/src/app/tests/suites/certification/Test_TC_GC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_GC_1_1.yaml index 2af65174af41c7..848bf60d2d8d87 100644 --- a/src/app/tests/suites/certification/Test_TC_GC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_GC_1_1.yaml @@ -60,7 +60,7 @@ tests: SuppressResponse = true, [1646201945.126404][2860:2865] CHIP:DMG: InteractionModelRevision = 1 [1646201945.126437][2860:2865] CHIP:DMG: } [1646201945.126644][2860:2865] CHIP:TOO: Endpoint: 0 Cluster: - 0x0000_0030 Attribute 0x0000_0002DataVersion: 1894223167 + 0x0000_0030 Attribute 0x0000_0002 DataVersion: 1894223167 [1646201945.126728][2860:2865] CHIP:TOO: RegulatoryConfig: 0 [1646201945.126810][2860:2865] CHIP:EM: Sending Standalone Ack for MessageCounter:2750188 on exchange 60766ii" @@ -73,7 +73,7 @@ tests: SuppressResponse = true, [1646201921.080530][2848:2853] CHIP:DMG: InteractionModelRevision = 1 [1646201921.080561][2848:2853] CHIP:DMG: } [1646201921.080735][2848:2853] CHIP:TOO: Endpoint: 0 Cluster: - 0x0000_0030 Attribute 0x0000_0003DataVersion: 1894223167 + 0x0000_0030 Attribute 0x0000_0003 DataVersion: 1894223167 [1646201921.080821][2848:2853] CHIP:TOO: LocationCapability: 0 [1646201921.080903][2848:2853] CHIP:EM: Sending Standalone Ack for MessageCounter:13587220 on exchange 43838ii" @@ -83,7 +83,7 @@ tests: verification: "ubuntu@ubuntu:~/apps$ sudo ./chip-tool generalcommissioning read basic-commissioning-info 1 0 [1646201777.003556][2827:2832] CHIP:TOO: - Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0001DataVersion: + Endpoint: 0 Cluster: 0x0000_0030 Attribute 0x0000_0001 DataVersion: 1894223167 [1646201777.006423][2827:2832] CHIP:TOO: BasicCommissioningInfo: { [1646201777.006478][2827:2832] CHIP:TOO: FailSafeExpiryLengthSeconds: 60 [1646201777.006512][2827:2832] @@ -127,7 +127,7 @@ tests: CHIP:DMG: SuppressResponse = true,[1646202241.425668][2879:2884] CHIP:DMG: InteractionModelRevision = 1 [1646202241.425702][2879:2884] CHIP:DMG: } [1646202241.426186][2879:2884] CHIP:TOO: Endpoint: 0 - Cluster: 0x0000_0030 Attribute 0x0000_FFF8DataVersion: 1894223167 + Cluster: 0x0000_0030 Attribute 0x0000_FFF8 DataVersion: 1894223167 [1646202241.426293][2879:2884] CHIP:TOO: ServerGeneratedCommandList: 2 entries [1646202241.426379][2879:2884] CHIP:TOO: [1]: 1[1646202241.426420][2879:2884] CHIP:TOO: [2]: 5 @@ -142,7 +142,7 @@ tests: CHIP:DMG: SuppressResponse = true, [1646202324.586156][2908:2913] CHIP:DMG: InteractionModelRevision = 1 [1646202324.586198][2908:2913] CHIP:DMG: } [1646202324.587108][2908:2913] CHIP:TOO: Endpoint: 0 - Cluster: 0x0000_0030 Attribute 0x0000_FFF9DataVersion: 1894223167 + Cluster: 0x0000_0030 Attribute 0x0000_FFF9 DataVersion: 1894223167 [1646202324.587242][2908:2913] CHIP:TOO: ClientGeneratedCommandList: 4 entries [1646202324.587385][2908:2913] CHIP:TOO: [1]: 0 [1646202324.587438][2908:2913] CHIP:TOO: [2]: 2 diff --git a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml index 12335ba1a96529..61f7a6cd9e8005 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_1_2.yaml @@ -240,7 +240,7 @@ tests: [5094:213098] CHIP: [DMG] SuppressResponse = true, [1646261193889] [5094:213098] CHIP: [DMG] InteractionModelRevision = 1 [1646261193889] [5094:213098] CHIP: [DMG] } [1646261193889] [5094:213098] CHIP: [TOO] - Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFF9DataVersion: + Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_FFF9 DataVersion: 759594214 [1646261193889] [5094:213098] CHIP: [TOO] ClientGeneratedCommandList: 0 entries" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MC_10_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_10_1.yaml index 9fb08a09e979d7..b0f4e0e0218867 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_10_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_10_1.yaml @@ -84,7 +84,7 @@ tests: true, [1646143737358] [87142:3768651] CHIP: [DMG] InteractionModelRevision = 1 [1646143737358] [87142:3768651] CHIP: [DMG] } [1646143737359] [87142:3768651] CHIP: [TOO] Endpoint: 1 - Cluster: 0x0000_050A Attribute 0x0000_0000DataVersion: 1291728690 + Cluster: 0x0000_050A Attribute 0x0000_0000 DataVersion: 1291728690 [1646143737360] [87142:3768651] CHIP: [TOO] AcceptHeader: 2 entries [1646143737360] [87142:3768651] CHIP: [TOO] [1]: example [1646143737360] [87142:3768651] CHIP: [TOO] [2]: example @@ -131,7 +131,7 @@ tests: true, [1646143780979] [87181:3769324] CHIP: [DMG] InteractionModelRevision = 1 [1646143780979] [87181:3769324] CHIP: [DMG] } [1646143780979] [87181:3769324] CHIP: [TOO] Endpoint: 1 - Cluster: 0x0000_050A Attribute 0x0000_0001DataVersion: 1291728690 + Cluster: 0x0000_050A Attribute 0x0000_0001 DataVersion: 1291728690 [1646143780980] [87181:3769324] CHIP: [TOO] SupportedStreamingProtocols: 0 [1646143780980] [87181:3769324] CHIP: [EM] Sending Standalone Ack for MessageCounter:6010019 on exchange diff --git a/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml index b5445cc41979f1..80a7909e850dc6 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_3_13.yaml @@ -26,7 +26,7 @@ tests: verification: "./chip-tool mediainput read input-list 1 1 [1646140193572] [83167:3718213] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0507 Attribute - 0x0000_0000DataVersion: 645543558 [1646140193572] [83167:3718213] + 0x0000_0000 DataVersion: 645543558 [1646140193572] [83167:3718213] CHIP: [TOO] InputList: 2 entries [1646140193572] [83167:3718213] CHIP: [TOO] [1]: { [1646140193572] [83167:3718213] CHIP: [TOO] Index: 1 [1646140193573] [83167:3718213] CHIP: [TOO] InputType: 4 @@ -88,7 +88,7 @@ tests: verification: "./chip-tool mediainput read input-list 1 1 [1646140289219] [83463:3720087] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0507 Attribute - 0x0000_0000DataVersion: 645543558 [1646140289219] [83463:3720087] + 0x0000_0000 DataVersion: 645543558 [1646140289219] [83463:3720087] CHIP: [TOO] InputList: 2 entries [1646140289219] [83463:3720087] CHIP: [TOO] [1]: { [1646140289219] [83463:3720087] CHIP: [TOO] Index: 1 [1646140289219] [83463:3720087] CHIP: [TOO] InputType: 4 diff --git a/src/app/tests/suites/certification/Test_TC_MC_4_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_4_1.yaml index 47edb1c72bab39..782eb538504994 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_4_1.yaml @@ -24,7 +24,7 @@ tests: verification: "./chip-tool wakeonlan read macaddress 1 1 [1646140497523] [83791:3722553] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0503 Attribute - 0x0000_0000DataVersion: 937942620 [1646140497523] [83791:3722553] + 0x0000_0000 DataVersion: 937942620 [1646140497523] [83791:3722553] CHIP: [TOO] MACAddress: 00:00:00:00:00" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml index 0512bbdf78c115..4bdfb155fdb6c8 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_2.yaml @@ -71,7 +71,7 @@ tests: [1645776767.610958][4667:4672] CHIP:DMG: InteractionModelRevision = 1 [1645776767.610983][4667:4672] CHIP:DMG: } [1645776767.611140][4667:4672] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469718 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469718 [1645776767.611214][4667:4672] CHIP:TOO: CurrentMode: 0" disabled: true @@ -105,7 +105,7 @@ tests: [1645776797.704080][4674:4679] CHIP:DMG: InteractionModelRevision = 1 [1645776797.704108][4674:4679] CHIP:DMG: } [1645776797.704270][4674:4679] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0002DataVersion: 3781469718 + 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3781469718 [1645776797.704349][4674:4679] CHIP:TOO: OnMode: 0" disabled: true @@ -139,7 +139,7 @@ tests: [1645776818.700095][4682:4687] CHIP:DMG: InteractionModelRevision = 1 [1645776818.700127][4682:4687] CHIP:DMG: } [1645776818.700294][4682:4687] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469718 + 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3781469718 [1645776818.700374][4682:4687] CHIP:TOO: StartUpMode: 0" disabled: true @@ -173,7 +173,7 @@ tests: [1645776853.155563][4691:4696] CHIP:DMG: InteractionModelRevision = 1 [1645776853.155591][4691:4696] CHIP:DMG: } [1645776853.155757][4691:4696] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0004DataVersion: 3781469718 + 0x0000_0050 Attribute 0x0000_0004 DataVersion: 3781469718 [1645776853.155812][4691:4696] CHIP:TOO: Description: Coffee" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml index e38b0785a14fb8..ce52b3599d6ae3 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml @@ -105,7 +105,7 @@ tests: [1645777197.118618][4759:4764] CHIP:DMG: InteractionModelRevision = 1 [1645777197.118647][4759:4764] CHIP:DMG: } [1645777197.118795][4759:4764] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469720 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469720 [1645777197.118866][4759:4764] CHIP:TOO: CurrentMode: 4" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml index b64a9b3d8d90cd..20381f2bea7937 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml @@ -50,7 +50,7 @@ tests: [1645777342.721698][4783:4788] CHIP:DMG: InteractionModelRevision = 1 [1645777342.721723][4783:4788] CHIP:DMG: } [1645777342.721860][4783:4788] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0002DataVersion: 3781469720 + 0x0000_0050 Attribute 0x0000_0002 DataVersion: 3781469720 [1645777342.721929][4783:4788] CHIP:TOO: OnMode: 0" disabled: true @@ -84,7 +84,7 @@ tests: [1645777371.982914][4789:4794] CHIP:DMG: InteractionModelRevision = 1 [1645777371.982945][4789:4794] CHIP:DMG: } [1645777371.983122][4789:4794] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469720 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469720 [1645777371.983204][4789:4794] CHIP:TOO: CurrentMode: 4" disabled: true @@ -257,6 +257,6 @@ tests: [1645777734.855968][4848:4853] CHIP:DMG: InteractionModelRevision = 1 [1645777734.855993][4848:4853] CHIP:DMG: } [1645777734.856233][4848:4853] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469721 [1645777734.856345][4848:4853] CHIP:TOO: CurrentMode: 0" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml index 348f7428daf44a..91cae11c037520 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_2.yaml @@ -50,7 +50,7 @@ tests: [1645777708.406700][4841:4846] CHIP:DMG: InteractionModelRevision = 1 [1645777708.406725][4841:4846] CHIP:DMG: } [1645777708.406864][4841:4846] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3781469721 [1645777708.406933][4841:4846] CHIP:TOO: StartUpMode: 0" disabled: true @@ -84,7 +84,7 @@ tests: [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 [1645778146.171290][4876:4881] CHIP:DMG: } [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7" disabled: true @@ -189,6 +189,6 @@ tests: [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 [1645778146.171290][4876:4881] CHIP:DMG: } [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 0" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml index ced116b522b691..2e88ab2b0665ed 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_3.yaml @@ -50,7 +50,7 @@ tests: [1645778279.692921][4898:4903] CHIP:DMG: InteractionModelRevision = 1 [1645778279.692944][4898:4903] CHIP:DMG: } [1645778279.693082][4898:4903] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0003DataVersion: 3781469722 + 0x0000_0050 Attribute 0x0000_0003 DataVersion: 3781469722 [1645778279.693151][4898:4903] CHIP:TOO: StartUpMode: 0" disabled: true @@ -83,7 +83,7 @@ tests: [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 [1645778146.171290][4876:4881] CHIP:DMG: } [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 7" disabled: true @@ -190,6 +190,6 @@ tests: [1645778146.171262][4876:4881] CHIP:DMG: InteractionModelRevision = 1 [1645778146.171290][4876:4881] CHIP:DMG: } [1645778146.171510][4876:4881] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0050 Attribute 0x0000_0000DataVersion: 3781469721 + 0x0000_0050 Attribute 0x0000_0000 DataVersion: 3781469721 [1645778146.171602][4876:4881] CHIP:TOO: CurrentMode: 4" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml index 9f44b2b1b5bc0d..d980d20b3e1179 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_3.yaml @@ -29,14 +29,14 @@ tests: - label: "TH reads OccupancySensorType attribute from DUT" verification: "./chip-tool occupancysensing read occupancy-sensor-type 1 1 Endpoint: - 1 Cluster: 0x0000_0406 Attribute 0x0000_0001DataVersion: 289401399 + 1 Cluster: 0x0000_0406 Attribute 0x0000_0001 DataVersion: 289401399 [1646129490.492433][2997:3002] CHIP:TOO: occupancy sensor type: 0" disabled: true - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" verification: "./chip-tool occupancysensing read occupancy-sensor-type-bitmap 1 1 - Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002DataVersion: + Endpoint: 1 Cluster: 0x0000_0406 Attribute 0x0000_0002 DataVersion: 289401399 [1646129577.158531][3007:3013] CHIP:TOO: occupancy sensor type bitmap: 1" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml index 0dca88fa6d3763..20322cfca0b5ce 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_3_1.yaml @@ -27,7 +27,7 @@ tests: - label: "TH reads Occupancy attribute from DUT" verification: "./chip-tool occupancysensing read occupancy 1 1 Endpoint: 1 Cluster: - 0x0000_0406 Attribute 0x0000_0000DataVersion: 289401399 + 0x0000_0406 Attribute 0x0000_0000 DataVersion: 289401399 [1646130536.783615][3045:3050] CHIP:TOO: occupancy: 0" disabled: true @@ -38,6 +38,6 @@ tests: - label: "after a few seconds, TH reads Occupancy attribute from DUT" verification: "./chip-tool occupancysensing read occupancy 1 1 Endpoint: 1 Cluster: - 0x0000_0406 Attribute 0x0000_0000DataVersion: 289401399 + 0x0000_0406 Attribute 0x0000_0000 DataVersion: 289401399 [1646130536.783615][3045:3050] CHIP:TOO: occupancy: 1" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml b/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml index e4a207fd336707..3fdb6d6629470a 100644 --- a/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_PRS_2_3.yaml @@ -35,7 +35,7 @@ tests: [1646049376.458003][12096:12101] CHIP:DMG: InteractionModelRevision = 1 [1646049376.458033][12096:12101] CHIP:DMG: } [1646049376.458206][12096:12101] CHIP:TOO: Endpoint: 1 Cluster: - 0x0000_0403 Attribute 0x0000_0000 DataVersion: 781236764 + 0x0000_0403 Attribute 0x0000_0000 DataVersion: 781236764 [1646049376.458395][12096:12101] CHIP:TOO: MeasuredValue: 0" disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml index a09bd23d8f8e9a..0b49fa17cf6935 100644 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_1_1.yaml @@ -70,7 +70,7 @@ tests: "./chip-tool powersourceconfiguration read client-generated-command-list 1234 0 [...] [1646048092.858800][36301:36306] CHIP:TOO: Endpoint: 0 Cluster: - 0x0000_002E Attribute 0x0000_FFF9DataVersion: 502821112 + 0x0000_002E Attribute 0x0000_FFF9 DataVersion: 502821112 [1646048092.858890][36301:36306] CHIP:TOO: ClientGeneratedCommandList: 0 entries" disabled: true @@ -80,7 +80,7 @@ tests: "./chip-tool powersourceconfiguration read server-generated-command-list 1234 0 [...] [1646048186.753316][36310:36315] CHIP:TOO: Endpoint: 0 Cluster: - 0x0000_002E Attribute 0x0000_FFF8DataVersion: 502821112 + 0x0000_002E Attribute 0x0000_FFF8 DataVersion: 502821112 [1646048186.753391][36310:36315] CHIP:TOO: ServerGeneratedCommandList: 0 entries" disabled: true diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp index 603932a4b073dc..0ecc381437c736 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -4243,7 +4243,7 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributePath & path, chip::TLV::TLVReader * data) { ChipLogProgress( - chipTool, "Endpoint: %" PRIu16 " Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI "DataVersion: %" PRIu32, + chipTool, "Endpoint: %" PRIu16 " Cluster: " ChipLogFormatMEI " Attribute " ChipLogFormatMEI " DataVersion: %" PRIu32, path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId), path.mDataVersion.ValueOr(0)); switch (path.mClusterId) From 1c74a21c958a5bc7ec8a298328b2e08107f8e024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Thu, 10 Mar 2022 10:45:52 +0100 Subject: [PATCH 26/43] [events] Refactor startup and shutdown event management (#15909) * [events] Refactor startup and shutdown event management Add PlatformMgr().HandleServerStarted() to handle post-init actions, such as emitting StartUp and BootReason events and call it explicitly inside Server::Init not to rely on any specific Matter stack initialization mechanism. Add PlatformMgr().HandleServerShuttingDown() to handle pre-shutdown actions, such as emitting Shutdown event. Use the method in the existing factory reset sequence, and in nRF Connect OTA image processor (other platforms should probably be updated, too). * Fix fake platform --- src/app/clusters/basic/basic.cpp | 16 +++-- src/app/server/Server.cpp | 39 ++++-------- src/app/server/Server.h | 2 - src/include/platform/PlatformManager.h | 22 +++++++ .../internal/GenericPlatformManagerImpl.cpp | 62 ++++++++++--------- .../internal/GenericPlatformManagerImpl.h | 3 +- src/platform/fake/PlatformManagerImpl.h | 2 + .../nrfconnect/CHIPDevicePlatformConfig.h | 6 ++ .../nrfconnect/OTAImageProcessorImpl.cpp | 9 ++- 9 files changed, 95 insertions(+), 66 deletions(-) diff --git a/src/app/clusters/basic/basic.cpp b/src/app/clusters/basic/basic.cpp index 130a1442c0e853..c0844f7c325c60 100644 --- a/src/app/clusters/basic/basic.cpp +++ b/src/app/clusters/basic/basic.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -329,10 +330,10 @@ CHIP_ERROR BasicAttrAccess::WriteLocation(AttributeValueDecoder & aDecoder) class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate { - // Gets called by the current Node after completing a boot or reboot process void OnStartUp(uint32_t softwareVersion) override { - ChipLogProgress(Zcl, "PlatformMgrDelegate: OnStartUp"); + // The StartUp event SHALL be emitted by a Node after completing a boot or reboot process + ChipLogDetail(Zcl, "Emitting StartUp event"); for (auto endpoint : EnabledEndpointsWithServerCluster(Basic::Id)) { @@ -343,15 +344,15 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); if (CHIP_NO_ERROR != err) { - ChipLogError(Zcl, "PlatformMgrDelegate: Failed to record StartUp event: %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(Zcl, "Failed to emit StartUp event: %" CHIP_ERROR_FORMAT, err.Format()); } } } - // Gets called by the current Node prior to any orderly shutdown sequence on a best-effort basis. void OnShutDown() override { - ChipLogProgress(Zcl, "PlatformMgrDelegate: OnShutDown"); + // The ShutDown event SHOULD be emitted on a best-effort basis by a Node prior to any orderly shutdown sequence. + ChipLogDetail(Zcl, "Emitting ShutDown event"); for (auto endpoint : EnabledEndpointsWithServerCluster(Basic::Id)) { @@ -362,9 +363,12 @@ class PlatformMgrDelegate : public DeviceLayer::PlatformManagerDelegate CHIP_ERROR err = LogEvent(event, endpoint, eventNumber); if (CHIP_NO_ERROR != err) { - ChipLogError(Zcl, "PlatformMgrDelegate: Failed to record ShutDown event: %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(Zcl, "Failed to emit ShutDown event: %" CHIP_ERROR_FORMAT, err.Format()); } } + + // Flush the events to increase chances that they get sent before the shutdown + InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleUrgentEventDeliverySync(); } }; diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 50b5b3f4e15862..137eb2cf974de2 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -45,6 +45,8 @@ #include #include +using namespace chip::DeviceLayer; + using chip::kMinValidFabricIndex; using chip::RendezvousInformationFlag; using chip::DeviceLayer::PersistedStorage::KeyValueStoreMgr; @@ -75,16 +77,6 @@ void StopEventLoop(intptr_t arg) } } -void DispatchShutDownEvent(intptr_t arg) -{ - // The ShutDown event SHOULD be emitted on a best-effort basis by a Node prior to any orderly shutdown sequence. - chip::DeviceLayer::PlatformManagerDelegate * platformManagerDelegate = chip::DeviceLayer::PlatformMgr().GetDelegate(); - if (platformManagerDelegate != nullptr) - { - platformManagerDelegate->OnShutDown(); - } -} - } // namespace namespace chip { @@ -270,6 +262,8 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint RejoinExistingMulticastGroups(); #endif // !CHIP_DEVICE_CONFIG_ENABLE_THREAD + PlatformMgr().HandleServerStarted(); + exit: if (err != CHIP_NO_ERROR) { @@ -317,27 +311,18 @@ void Server::RejoinExistingMulticastGroups() void Server::DispatchShutDownAndStopEventLoop() { - chip::DeviceLayer::PlatformMgr().ScheduleWork(DispatchShutDownEvent); - chip::DeviceLayer::PlatformMgr().ScheduleWork(StopEventLoop); + PlatformMgr().ScheduleWork([](intptr_t) { PlatformMgr().HandleServerShuttingDown(); }); + PlatformMgr().ScheduleWork(StopEventLoop); } void Server::ScheduleFactoryReset() { - chip::DeviceLayer::PlatformMgr().ScheduleWork(FactoryReset); -} - -void Server::FactoryReset(intptr_t arg) -{ - // Delete all fabrics and emit Leave event. - GetInstance().GetFabricTable().DeleteAllFabrics(); - - // Emit Shutdown event, as shutdown will come after factory reset. - DispatchShutDownEvent(0); - - // Flush all dispatched events. - chip::app::InteractionModelEngine::GetInstance()->GetReportingEngine().ScheduleUrgentEventDeliverySync(); - - chip::DeviceLayer::ConfigurationMgr().InitiateFactoryReset(); + PlatformMgr().ScheduleWork([](intptr_t) { + // Delete all fabrics and emit Leave event. + GetInstance().GetFabricTable().DeleteAllFabrics(); + PlatformMgr().HandleServerShuttingDown(); + ConfigurationMgr().InitiateFactoryReset(); + }); } void Server::Shutdown() diff --git a/src/app/server/Server.h b/src/app/server/Server.h index a0aab30f1e7e3d..642e7ea398551a 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -104,8 +104,6 @@ class Server void ScheduleFactoryReset(); - static void FactoryReset(intptr_t arg); - static Server & GetInstance() { return sServer; } private: diff --git a/src/include/platform/PlatformManager.h b/src/include/platform/PlatformManager.h index eacd0cbfa450e6..bbf9ce3ea8c000 100644 --- a/src/include/platform/PlatformManager.h +++ b/src/include/platform/PlatformManager.h @@ -117,6 +117,18 @@ class PlatformManager void SetDelegate(PlatformManagerDelegate * delegate) { mDelegate = delegate; } PlatformManagerDelegate * GetDelegate() const { return mDelegate; } + /** + * Should be called after initializing all layers of the Matter stack to + * run all needed post-startup actions. + */ + void HandleServerStarted(); + + /** + * Should be called before shutting down the Matter stack or restarting the + * application to run all needed pre-shutdown actions. + */ + void HandleServerShuttingDown(); + /** * ScheduleWork can be called after InitChipStack has been called. Calls * that happen before either StartEventLoopTask or RunEventLoop will queue @@ -342,6 +354,16 @@ inline void PlatformManager::RemoveEventHandler(EventHandlerFunct handler, intpt static_cast(this)->_RemoveEventHandler(handler, arg); } +inline void PlatformManager::HandleServerStarted() +{ + static_cast(this)->_HandleServerStarted(); +} + +inline void PlatformManager::HandleServerShuttingDown() +{ + static_cast(this)->_HandleServerShuttingDown(); +} + inline void PlatformManager::ScheduleWork(AsyncWorkFunct workFunct, intptr_t arg) { static_cast(this)->_ScheduleWork(workFunct, arg); diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.cpp b/src/include/platform/internal/GenericPlatformManagerImpl.cpp index e9251982f99ffd..cc14a287abba2e 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.cpp +++ b/src/include/platform/internal/GenericPlatformManagerImpl.cpp @@ -121,10 +121,6 @@ CHIP_ERROR GenericPlatformManagerImpl::_InitChipStack() SuccessOrExit(err); - // TODO Initialize the Software Update Manager object. - - _ScheduleWork(HandleDeviceRebooted, 0); - exit: return err; } @@ -195,6 +191,40 @@ void GenericPlatformManagerImpl::_RemoveEventHandler(PlatformManager: } } +template +void GenericPlatformManagerImpl::_HandleServerStarted() +{ + PlatformManagerDelegate * platformManagerDelegate = PlatformMgr().GetDelegate(); + GeneralDiagnosticsDelegate * generalDiagnosticsDelegate = GetDiagnosticDataProvider().GetGeneralDiagnosticsDelegate(); + + if (platformManagerDelegate != nullptr) + { + uint32_t softwareVersion; + + if (ConfigurationMgr().GetSoftwareVersion(softwareVersion) == CHIP_NO_ERROR) + platformManagerDelegate->OnStartUp(softwareVersion); + } + + if (generalDiagnosticsDelegate != nullptr) + { + uint8_t bootReason; + + if (GetDiagnosticDataProvider().GetBootReason(bootReason) == CHIP_NO_ERROR) + generalDiagnosticsDelegate->OnDeviceRebooted(static_cast(bootReason)); + } +} + +template +void GenericPlatformManagerImpl::_HandleServerShuttingDown() +{ + PlatformManagerDelegate * platformManagerDelegate = PlatformMgr().GetDelegate(); + + if (platformManagerDelegate != nullptr) + { + platformManagerDelegate->OnShutDown(); + } +} + template void GenericPlatformManagerImpl::_ScheduleWork(AsyncWorkFunct workFunct, intptr_t arg) { @@ -290,30 +320,6 @@ void GenericPlatformManagerImpl::HandleMessageLayerActivityChanged(bo } } -template -void GenericPlatformManagerImpl::HandleDeviceRebooted(intptr_t arg) -{ - PlatformManagerDelegate * platformManagerDelegate = PlatformMgr().GetDelegate(); - GeneralDiagnosticsDelegate * generalDiagnosticsDelegate = GetDiagnosticDataProvider().GetGeneralDiagnosticsDelegate(); - - if (generalDiagnosticsDelegate != nullptr) - { - uint8_t bootReason; - - if (GetDiagnosticDataProvider().GetBootReason(bootReason) == CHIP_NO_ERROR) - generalDiagnosticsDelegate->OnDeviceRebooted(static_cast(bootReason)); - } - - // The StartUp event SHALL be emitted by a Node after completing a boot or reboot process - if (platformManagerDelegate != nullptr) - { - uint32_t softwareVersion; - - if (ConfigurationMgr().GetSoftwareVersion(softwareVersion) == CHIP_NO_ERROR) - platformManagerDelegate->OnStartUp(softwareVersion); - } -} - // Fully instantiate the generic implementation class in whatever compilation unit includes this file. template class GenericPlatformManagerImpl; diff --git a/src/include/platform/internal/GenericPlatformManagerImpl.h b/src/include/platform/internal/GenericPlatformManagerImpl.h index d38ae34b60c7f4..e2b1944b9682f7 100644 --- a/src/include/platform/internal/GenericPlatformManagerImpl.h +++ b/src/include/platform/internal/GenericPlatformManagerImpl.h @@ -55,6 +55,8 @@ class GenericPlatformManagerImpl CHIP_ERROR _Shutdown(); CHIP_ERROR _AddEventHandler(PlatformManager::EventHandlerFunct handler, intptr_t arg); void _RemoveEventHandler(PlatformManager::EventHandlerFunct handler, intptr_t arg); + void _HandleServerStarted(); + void _HandleServerShuttingDown(); void _ScheduleWork(AsyncWorkFunct workFunct, intptr_t arg); void _DispatchEvent(const ChipDeviceEvent * event); @@ -78,7 +80,6 @@ class GenericPlatformManagerImpl private: bool mMsgLayerWasActive; - static void HandleDeviceRebooted(intptr_t arg); ImplClass * Impl() { return static_cast(this); } }; diff --git a/src/platform/fake/PlatformManagerImpl.h b/src/platform/fake/PlatformManagerImpl.h index 7ac17c3ff36bf9..b15a23d8a82e5a 100644 --- a/src/platform/fake/PlatformManagerImpl.h +++ b/src/platform/fake/PlatformManagerImpl.h @@ -49,6 +49,8 @@ class PlatformManagerImpl final : public PlatformManager CHIP_ERROR _AddEventHandler(EventHandlerFunct handler, intptr_t arg = 0) { return CHIP_ERROR_NOT_IMPLEMENTED; } void _RemoveEventHandler(EventHandlerFunct handler, intptr_t arg = 0) {} + void _HandleServerStarted() {} + void _HandleServerShuttingDown() {} void _ScheduleWork(AsyncWorkFunct workFunct, intptr_t arg = 0) {} void _RunEventLoop() diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index 047de04dfba017..8ddf607d5d8239 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -67,6 +67,12 @@ #define CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS 1000 #endif // CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS +#ifndef CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS +/// Time to sleep after running server shutdown actions to let lower layers complete the actions. +/// This may include transmitting packets created by the actions. +#define CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS 10 +#endif // CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS + // ========== Platform-specific Configuration Overrides ========= #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_PRIORITY diff --git a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp index f62c5578af3831..8dda149f3c44c4 100644 --- a/src/platform/nrfconnect/OTAImageProcessorImpl.cpp +++ b/src/platform/nrfconnect/OTAImageProcessorImpl.cpp @@ -61,9 +61,14 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() ReturnErrorOnFailure(System::MapErrorZephyr(dfu_target_done(true))); #ifdef CONFIG_CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY - return DeviceLayer::SystemLayer().StartTimer( + return SystemLayer().StartTimer( System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_OTA_REQUESTOR_REBOOT_DELAY_MS), - [](System::Layer *, void * /* context */) { sys_reboot(SYS_REBOOT_WARM); }, nullptr /* context */); + [](System::Layer *, void * /* context */) { + PlatformMgr().HandleServerShuttingDown(); + k_msleep(CHIP_DEVICE_CONFIG_SERVER_SHUTDOWN_ACTIONS_SLEEP_MS); + sys_reboot(SYS_REBOOT_WARM); + }, + nullptr /* context */); #else return CHIP_NO_ERROR; #endif From c49b115e47f041449e7bd67c73a2f46a81814847 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Thu, 10 Mar 2022 15:35:26 +0100 Subject: [PATCH 27/43] [pump-controller-app] Disable scenes cluster (#16058) Pump-controller-app has Scenes cluster enabled but all clusters used by Scenes like OnOff, LevelControl etc. are disabled. This causes a build failure due to an unused static function. --- .../pump-controller-app.matter | 105 --------- .../pump-controller-app.zap | 214 +++++++++--------- .../zap-generated/IMClusterCommandHandler.cpp | 94 -------- .../PluginApplicationCallbacks.h | 1 - .../zap-generated/callback-stub.cpp | 8 - .../zap-generated/endpoint_config.h | 128 ++++------- .../zap-generated/gen_config.h | 8 - 7 files changed, 151 insertions(+), 407 deletions(-) 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 index c2515effab992a..5e93a038dcae22 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -1024,110 +1024,6 @@ client cluster PumpConfigurationAndControl = 512 { readonly global attribute int16u clusterRevision = 65533; } -server cluster Scenes = 5 { - bitmap ScenesCopyMode : BITMAP8 { - kCopyAllScenes = 0x1; - } - - struct SceneExtensionFieldSet { - CLUSTER_ID clusterId = 0; - INT8U length = 1; - INT8U value = 2; - } - - readonly attribute int8u sceneCount = 0; - readonly attribute int8u currentScene = 1; - readonly attribute int16u currentGroup = 2; - readonly attribute boolean sceneValid = 3; - readonly attribute bitmap8 nameSupport = 4; - readonly global attribute 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 = 0; @@ -1377,7 +1273,6 @@ endpoint 0 { binding cluster OtaSoftwareUpdateProvider; server cluster OtaSoftwareUpdateRequestor; server cluster OperationalCredentials; - server cluster Scenes; server cluster SoftwareDiagnostics; server cluster ThreadNetworkDiagnostics; server cluster TimeFormatLocalization; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap index c135a242122ac4..c1c014767b7559 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.zap @@ -290,11 +290,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -305,11 +305,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -320,11 +320,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -339,7 +339,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -450,7 +450,7 @@ "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", - "enabled": 1, + "enabled": 0, "commands": [ { "name": "AddSceneResponse", @@ -587,7 +587,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -598,11 +598,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -613,11 +613,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -628,11 +628,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -647,7 +647,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -785,7 +785,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -800,7 +800,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -815,7 +815,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -942,7 +942,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -957,7 +957,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1354,7 +1354,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1369,7 +1369,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1384,7 +1384,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 1, "bounded": 0, "defaultValue": "", @@ -1469,7 +1469,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1552,7 +1552,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -1612,11 +1612,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1627,11 +1627,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1642,11 +1642,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1661,7 +1661,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1738,11 +1738,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1753,11 +1753,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1768,11 +1768,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1787,7 +1787,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1879,11 +1879,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1894,11 +1894,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1909,11 +1909,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1928,7 +1928,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1990,11 +1990,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2005,11 +2005,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2024,7 +2024,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2227,7 +2227,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2242,7 +2242,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2257,7 +2257,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2443,7 +2443,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2548,7 +2548,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2563,7 +2563,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2578,7 +2578,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2651,11 +2651,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2666,11 +2666,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2681,11 +2681,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2700,7 +2700,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -2898,7 +2898,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2913,7 +2913,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2928,7 +2928,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3079,11 +3079,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3094,11 +3094,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -3109,11 +3109,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4145,11 +4145,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4160,11 +4160,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4175,11 +4175,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -4342,7 +4342,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4357,7 +4357,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4372,7 +4372,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4665,7 +4665,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4680,7 +4680,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4695,7 +4695,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4842,7 +4842,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4857,7 +4857,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4902,7 +4902,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4917,7 +4917,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4932,7 +4932,7 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -5013,11 +5013,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5028,11 +5028,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5043,11 +5043,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5062,7 +5062,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5124,11 +5124,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5139,11 +5139,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5154,11 +5154,11 @@ "mfgCode": null, "side": "server", "included": 0, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5173,7 +5173,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "0", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -5969,4 +5969,4 @@ } ], "log": [] -} +} \ No newline at end of file diff --git a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp index b540a704309247..0ec60468e7dafa 100644 --- a/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/IMClusterCommandHandler.cpp @@ -628,97 +628,6 @@ void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandP } // namespace OperationalCredentials -namespace Scenes { - -void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) -{ - CHIP_ERROR TLVError = CHIP_NO_ERROR; - bool wasHandled = false; - { - switch (aCommandPath.mCommandId) - { - case Commands::AddScene::Id: { - Commands::AddScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterAddSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::GetSceneMembership::Id: { - Commands::GetSceneMembership::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterGetSceneMembershipCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RecallScene::Id: { - Commands::RecallScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterRecallSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveAllScenes::Id: { - Commands::RemoveAllScenes::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterRemoveAllScenesCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::RemoveScene::Id: { - Commands::RemoveScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterRemoveSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::StoreScene::Id: { - Commands::StoreScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterStoreSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - case Commands::ViewScene::Id: { - Commands::ViewScene::DecodableType commandData; - TLVError = DataModel::Decode(aDataTlv, commandData); - if (TLVError == CHIP_NO_ERROR) - { - wasHandled = emberAfScenesClusterViewSceneCallback(apCommandObj, aCommandPath, commandData); - } - break; - } - default: { - // Unrecognized command ID, error status will apply. - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::UnsupportedCommand); - ChipLogError(Zcl, "Unknown command " ChipLogFormatMEI " for cluster " ChipLogFormatMEI, - ChipLogValueMEI(aCommandPath.mCommandId), ChipLogValueMEI(aCommandPath.mClusterId)); - return; - } - } - } - - if (CHIP_NO_ERROR != TLVError || !wasHandled) - { - apCommandObj->AddStatus(aCommandPath, Protocols::InteractionModel::Status::InvalidCommand); - ChipLogProgress(Zcl, "Failed to dispatch command, TLVError=%" CHIP_ERROR_FORMAT, TLVError.Format()); - } -} - -} // namespace Scenes - namespace SoftwareDiagnostics { void DispatchServerCommand(CommandHandler * apCommandObj, const ConcreteCommandPath & aCommandPath, TLV::TLVReader & aDataTlv) @@ -828,9 +737,6 @@ void DispatchSingleClusterCommand(const ConcreteCommandPath & aCommandPath, TLV: case Clusters::OperationalCredentials::Id: Clusters::OperationalCredentials::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; - case Clusters::Scenes::Id: - Clusters::Scenes::DispatchServerCommand(apCommandObj, aCommandPath, aReader); - break; case Clusters::SoftwareDiagnostics::Id: Clusters::SoftwareDiagnostics::DispatchServerCommand(apCommandObj, aCommandPath, aReader); break; diff --git a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h index da1fe4f52a4645..54a173cc37d15c 100644 --- a/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/pump-controller-app/zap-generated/PluginApplicationCallbacks.h @@ -42,7 +42,6 @@ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPressureMeasurementPluginClientInitCallback(); \ MatterPumpConfigurationAndControlPluginClientInitCallback(); \ - MatterScenesPluginServerInitCallback(); \ MatterSoftwareDiagnosticsPluginServerInitCallback(); \ MatterTemperatureMeasurementPluginClientInitCallback(); \ MatterThreadNetworkDiagnosticsPluginServerInitCallback(); \ 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 a96c5dc52d959b..04794ba5a09128 100644 --- a/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/callback-stub.cpp @@ -89,9 +89,6 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) case ZCL_PUMP_CONFIG_CONTROL_CLUSTER_ID: emberAfPumpConfigurationAndControlClusterInitCallback(endpoint); break; - case ZCL_SCENES_CLUSTER_ID: - emberAfScenesClusterInitCallback(endpoint); - break; case ZCL_SOFTWARE_DIAGNOSTICS_CLUSTER_ID: emberAfSoftwareDiagnosticsClusterInitCallback(endpoint); break; @@ -216,11 +213,6 @@ void __attribute__((weak)) emberAfPumpConfigurationAndControlClusterInitCallback // To prevent warning (void) endpoint; } -void __attribute__((weak)) emberAfScenesClusterInitCallback(EndpointId endpoint) -{ - // To prevent warning - (void) endpoint; -} void __attribute__((weak)) emberAfSoftwareDiagnosticsClusterInitCallback(EndpointId endpoint) { // To prevent warning diff --git a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h index 8d99f63179e03e..740609742b68dc 100644 --- a/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/endpoint_config.h @@ -431,7 +431,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 175 +#define GENERATED_ATTRIBUTE_COUNT 169 #define GENERATED_ATTRIBUTES \ { \ \ @@ -445,14 +445,6 @@ { 0x00000000, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ \ - /* Endpoint: 0, Cluster: Scenes (server) */ \ - { 0x00000000, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene count */ \ - { 0x00000001, ZAP_TYPE(INT8U), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* current scene */ \ - { 0x00000002, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0000) }, /* current group */ \ - { 0x00000003, ZAP_TYPE(BOOLEAN), 1, 0, ZAP_SIMPLE_DEFAULT(0x00) }, /* scene valid */ \ - { 0x00000004, ZAP_TYPE(BITMAP8), 1, 0, ZAP_EMPTY_DEFAULT() }, /* name support */ \ - { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(3) }, /* ClusterRevision */ \ - \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ { 0x00000000, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* device list */ \ { 0x00000001, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* server list */ \ @@ -709,9 +701,6 @@ const EmberAfGenericClusterFunction chipFuncArrayGroupsServer[] = { \ (EmberAfGenericClusterFunction) emberAfGroupsClusterServerInitCallback, \ }; \ - const EmberAfGenericClusterFunction chipFuncArrayScenesServer[] = { \ - (EmberAfGenericClusterFunction) emberAfScenesClusterServerInitCallback, \ - }; \ const EmberAfGenericClusterFunction chipFuncArrayBasicServer[] = { \ (EmberAfGenericClusterFunction) emberAfBasicClusterServerInitCallback, \ }; \ @@ -750,24 +739,6 @@ 0x00000002 /* GetGroupMembershipResponse */, \ 0x00000003 /* RemoveGroupResponse */, \ chip::kInvalidCommandId /* end of list */, \ - /* Endpoint: 0, Cluster: Scenes (server) */\ - /* client_generated */ \ - 0x00000000 /* AddScene */, \ - 0x00000001 /* ViewScene */, \ - 0x00000002 /* RemoveScene */, \ - 0x00000003 /* RemoveAllScenes */, \ - 0x00000004 /* StoreScene */, \ - 0x00000005 /* RecallScene */, \ - 0x00000006 /* GetSceneMembership */, \ - chip::kInvalidCommandId /* end of list */, \ - /* server_generated */ \ - 0x00000000 /* AddSceneResponse */, \ - 0x00000001 /* ViewSceneResponse */, \ - 0x00000002 /* RemoveSceneResponse */, \ - 0x00000003 /* RemoveAllScenesResponse */, \ - 0x00000004 /* StoreSceneResponse */, \ - 0x00000006 /* GetSceneMembershipResponse */, \ - chip::kInvalidCommandId /* end of list */, \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */\ /* client_generated */ \ 0x00000000 /* AnnounceOtaProvider */, \ @@ -850,7 +821,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 28 +#define GENERATED_CLUSTER_COUNT 27 // clang-format off #define GENERATED_CLUSTERS { \ @@ -876,21 +847,10 @@ .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 6 ) ,\ .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 13 ) ,\ },\ - { \ - /* Endpoint: 0, Cluster: Scenes (server) */ \ - .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(5), \ - .attributeCount = 6, \ - .clusterSize = 8, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ - .functions = chipFuncArrayScenesServer, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 26 ) ,\ - },\ { \ /* Endpoint: 0, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(11), \ + .attributes = ZAP_ATTRIBUTE_INDEX(5), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -901,7 +861,7 @@ { \ /* Endpoint: 0, Cluster: Access Control (server) */ \ .clusterId = 0x0000001F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(16), \ + .attributes = ZAP_ATTRIBUTE_INDEX(10), \ .attributeCount = 3, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -912,7 +872,7 @@ { \ /* Endpoint: 0, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(19), \ + .attributes = ZAP_ATTRIBUTE_INDEX(13), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -923,7 +883,7 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Provider (client) */ \ .clusterId = 0x00000029, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(33), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -934,18 +894,18 @@ { \ /* Endpoint: 0, Cluster: OTA Software Update Requestor (server) */ \ .clusterId = 0x0000002A, \ - .attributes = ZAP_ATTRIBUTE_INDEX(39), \ + .attributes = ZAP_ATTRIBUTE_INDEX(33), \ .attributeCount = 4, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 33 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 18 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Localization Configuration (server) */ \ .clusterId = 0x0000002B, \ - .attributes = ZAP_ATTRIBUTE_INDEX(43), \ + .attributes = ZAP_ATTRIBUTE_INDEX(37), \ .attributeCount = 3, \ .clusterSize = 38, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -956,7 +916,7 @@ { \ /* Endpoint: 0, Cluster: Time Format Localization (server) */ \ .clusterId = 0x0000002C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(46), \ + .attributes = ZAP_ATTRIBUTE_INDEX(40), \ .attributeCount = 4, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ @@ -967,7 +927,7 @@ { \ /* Endpoint: 0, Cluster: Unit Localization (server) */ \ .clusterId = 0x0000002D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(50), \ + .attributes = ZAP_ATTRIBUTE_INDEX(44), \ .attributeCount = 3, \ .clusterSize = 7, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -978,40 +938,40 @@ { \ /* Endpoint: 0, Cluster: General Commissioning (server) */ \ .clusterId = 0x00000030, \ - .attributes = ZAP_ATTRIBUTE_INDEX(53), \ + .attributes = ZAP_ATTRIBUTE_INDEX(47), \ .attributeCount = 6, \ .clusterSize = 16, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 35 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 20 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 24 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Network Commissioning (server) */ \ .clusterId = 0x00000031, \ - .attributes = ZAP_ATTRIBUTE_INDEX(59), \ + .attributes = ZAP_ATTRIBUTE_INDEX(53), \ .attributeCount = 10, \ .clusterSize = 48, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 42 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 27 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 34 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Diagnostic Logs (server) */ \ .clusterId = 0x00000032, \ - .attributes = ZAP_ATTRIBUTE_INDEX(69), \ + .attributes = ZAP_ATTRIBUTE_INDEX(63), \ .attributeCount = 1, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 52 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 54 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 37 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\ },\ { \ /* Endpoint: 0, Cluster: General Diagnostics (server) */ \ .clusterId = 0x00000033, \ - .attributes = ZAP_ATTRIBUTE_INDEX(70), \ + .attributes = ZAP_ATTRIBUTE_INDEX(64), \ .attributeCount = 9, \ .clusterSize = 17, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1022,62 +982,62 @@ { \ /* Endpoint: 0, Cluster: Software Diagnostics (server) */ \ .clusterId = 0x00000034, \ - .attributes = ZAP_ATTRIBUTE_INDEX(79), \ + .attributes = ZAP_ATTRIBUTE_INDEX(73), \ .attributeCount = 6, \ .clusterSize = 30, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 56 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \ .clusterId = 0x00000035, \ - .attributes = ZAP_ATTRIBUTE_INDEX(85), \ + .attributes = ZAP_ATTRIBUTE_INDEX(79), \ .attributeCount = 65, \ .clusterSize = 247, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 58 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: AdministratorCommissioning (server) */ \ .clusterId = 0x0000003C, \ - .attributes = ZAP_ATTRIBUTE_INDEX(150), \ + .attributes = ZAP_ATTRIBUTE_INDEX(144), \ .attributeCount = 4, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 60 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 45 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ { \ /* Endpoint: 0, Cluster: Operational Credentials (server) */ \ .clusterId = 0x0000003E, \ - .attributes = ZAP_ATTRIBUTE_INDEX(154), \ + .attributes = ZAP_ATTRIBUTE_INDEX(148), \ .attributeCount = 7, \ .clusterSize = 4, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 74 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 49 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 59 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Group Key Management (server) */ \ .clusterId = 0x0000003F, \ - .attributes = ZAP_ATTRIBUTE_INDEX(161), \ + .attributes = ZAP_ATTRIBUTE_INDEX(155), \ .attributeCount = 5, \ .clusterSize = 6, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ - .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 79 ) ,\ - .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 84 ) ,\ + .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 64 ) ,\ + .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 69 ) ,\ },\ { \ /* Endpoint: 0, Cluster: Fixed Label (server) */ \ .clusterId = 0x00000040, \ - .attributes = ZAP_ATTRIBUTE_INDEX(166), \ + .attributes = ZAP_ATTRIBUTE_INDEX(160), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1088,7 +1048,7 @@ { \ /* Endpoint: 0, Cluster: User Label (server) */ \ .clusterId = 0x00000041, \ - .attributes = ZAP_ATTRIBUTE_INDEX(168), \ + .attributes = ZAP_ATTRIBUTE_INDEX(162), \ .attributeCount = 2, \ .clusterSize = 2, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1099,7 +1059,7 @@ { \ /* Endpoint: 1, Cluster: On/Off (client) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(170), \ + .attributes = ZAP_ATTRIBUTE_INDEX(164), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1110,7 +1070,7 @@ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ - .attributes = ZAP_ATTRIBUTE_INDEX(170), \ + .attributes = ZAP_ATTRIBUTE_INDEX(164), \ .attributeCount = 5, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ @@ -1121,7 +1081,7 @@ { \ /* Endpoint: 1, Cluster: Pump Configuration and Control (client) */ \ .clusterId = 0x00000200, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1132,7 +1092,7 @@ { \ /* Endpoint: 1, Cluster: Temperature Measurement (client) */ \ .clusterId = 0x00000402, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1143,7 +1103,7 @@ { \ /* Endpoint: 1, Cluster: Pressure Measurement (client) */ \ .clusterId = 0x00000403, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1154,7 +1114,7 @@ { \ /* Endpoint: 1, Cluster: Flow Measurement (client) */ \ .clusterId = 0x00000404, \ - .attributes = ZAP_ATTRIBUTE_INDEX(175), \ + .attributes = ZAP_ATTRIBUTE_INDEX(169), \ .attributeCount = 0, \ .clusterSize = 0, \ .mask = ZAP_CLUSTER_MASK(CLIENT), \ @@ -1168,12 +1128,12 @@ #define ZAP_CLUSTER_INDEX(index) (&generatedClusters[index]) -#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 22 +#define ZAP_FIXED_ENDPOINT_DATA_VERSION_COUNT 21 // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 487 }, { ZAP_CLUSTER_INDEX(22), 6, 0 }, \ + { ZAP_CLUSTER_INDEX(0), 21, 479 }, { ZAP_CLUSTER_INDEX(21), 6, 0 }, \ } // Largest attribute size is needed for various buffers @@ -1185,7 +1145,7 @@ static_assert(ATTRIBUTE_LARGEST <= CHIP_CONFIG_MAX_ATTRIBUTE_STORE_ELEMENT_SIZE, #define ATTRIBUTE_SINGLETONS_SIZE (39) // Total size of attribute storage -#define ATTRIBUTE_MAX_SIZE (487) +#define ATTRIBUTE_MAX_SIZE (479) // Number of fixed endpoints #define FIXED_ENDPOINT_COUNT (2) diff --git a/zzz_generated/pump-controller-app/zap-generated/gen_config.h b/zzz_generated/pump-controller-app/zap-generated/gen_config.h index c51ed0609752ee..aec8298a0051b0 100644 --- a/zzz_generated/pump-controller-app/zap-generated/gen_config.h +++ b/zzz_generated/pump-controller-app/zap-generated/gen_config.h @@ -49,7 +49,6 @@ #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PRESSURE_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_PUMP_CONFIG_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) -#define EMBER_AF_SCENES_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_TEMP_MEASUREMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_THREAD_NETWORK_DIAGNOSTICS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -154,13 +153,6 @@ #define ZCL_USING_PUMP_CONFIG_CONTROL_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_PUMP_CONFIGURATION_AND_CONTROL_CLIENT -// Use this macro to check if the server side of the Scenes cluster is included -#define ZCL_USING_SCENES_CLUSTER_SERVER -#define EMBER_AF_PLUGIN_SCENES_SERVER -#define EMBER_AF_PLUGIN_SCENES -// User options for server plugin Scenes -#define EMBER_AF_PLUGIN_SCENES_TABLE_SIZE 3 - // Use this macro to check if the server side of the Software Diagnostics cluster is included #define ZCL_USING_SOFTWARE_DIAGNOSTICS_CLUSTER_SERVER #define EMBER_AF_PLUGIN_SOFTWARE_DIAGNOSTICS_SERVER From 1105f3e93a068f4e71090d5ba7936cef4810705a Mon Sep 17 00:00:00 2001 From: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> Date: Thu, 10 Mar 2022 10:40:57 -0500 Subject: [PATCH 28/43] Fix PRId64 log message for efr32 devices (#15978) * fix mg24 light-switch * PR comments --- src/transport/SessionManager.cpp | 17 +++++++++-------- third_party/efr32_sdk/repo | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/transport/SessionManager.cpp b/src/transport/SessionManager.cpp index 2ccbe5bf3ab778..7fef5e0a5d537b 100644 --- a/src/transport/SessionManager.cpp +++ b/src/transport/SessionManager.cpp @@ -271,11 +271,11 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand ChipLogProgress(Inet, "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to %d" - " at monotonic time: %" PRId64 + " at monotonic time: " ChipLogFormatX64 " msec to Multicast IPV6 address : %s with GroupID of %d and fabric Id of %d", - "encrypted", &preparedMessage, preparedMessage.GetMessageCounter(), groupSession->GetGroupId(), - System::SystemClock().GetMonotonicMilliseconds64().count(), addressStr, groupSession->GetGroupId(), - groupSession->GetFabricIndex()); + "encrypted group", &preparedMessage, preparedMessage.GetMessageCounter(), groupSession->GetGroupId(), + ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count()), addressStr, + groupSession->GetGroupId(), groupSession->GetFabricIndex()); } break; case Transport::Session::SessionType::kSecure: { @@ -289,10 +289,10 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand ChipLogProgress(Inet, "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to 0x" ChipLogFormatX64 - " (%u) at monotonic time: %" PRId64 " msec", + " (%u) at monotonic time: " ChipLogFormatX64 " msec", "encrypted", &preparedMessage, preparedMessage.GetMessageCounter(), ChipLogValueX64(secure->GetPeerNodeId()), secure->GetFabricIndex(), - System::SystemClock().GetMonotonicMilliseconds64().count()); + ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count())); } break; case Transport::Session::SessionType::kUnauthenticated: { @@ -302,9 +302,10 @@ CHIP_ERROR SessionManager::SendPreparedMessage(const SessionHandle & sessionHand ChipLogProgress(Inet, "Sending %s msg %p with MessageCounter:" ChipLogFormatMessageCounter " to 0x" ChipLogFormatX64 - " at monotonic time: %" PRId64 " msec", + " at monotonic time: " ChipLogFormatX64 " msec", sessionHandle->GetSessionTypeString(), &preparedMessage, preparedMessage.GetMessageCounter(), - ChipLogValueX64(kUndefinedNodeId), System::SystemClock().GetMonotonicMilliseconds64().count()); + ChipLogValueX64(kUndefinedNodeId), + ChipLogValueX64(System::SystemClock().GetMonotonicMilliseconds64().count())); } break; default: diff --git a/third_party/efr32_sdk/repo b/third_party/efr32_sdk/repo index 4cf4906e3327ac..1f6ff3d05c9400 160000 --- a/third_party/efr32_sdk/repo +++ b/third_party/efr32_sdk/repo @@ -1 +1 @@ -Subproject commit 4cf4906e3327ac5c5fccdf9c500a85987c489ae3 +Subproject commit 1f6ff3d05c94003899f3599b2e3ca524c5aa5495 From c8a3dd3c3e3ade561d362e7cd2130895fb877c71 Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Thu, 10 Mar 2022 07:55:01 -0800 Subject: [PATCH 29/43] [OTA] Remove extraneous using-declaration of ProviderLocationType (#16054) --- src/app/clusters/ota-requestor/GenericOTARequestorDriver.h | 4 +--- src/app/clusters/ota-requestor/OTARequestor.h | 1 - src/app/clusters/ota-requestor/OTARequestorDriver.h | 6 +++--- src/app/clusters/ota-requestor/OTARequestorInterface.h | 5 ++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h index c4a65520504000..3601ec9f2c1a6f 100644 --- a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h @@ -71,8 +71,7 @@ class GenericOTARequestorDriver : public OTARequestorDriver void SendQueryImage() override; // Returns the next available Provider location - bool DetermineProviderLocation( - app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & providerLocation) override; + bool DetermineProviderLocation(ProviderLocationType & providerLocation) override; protected: void StartDefaultProviderTimer(); @@ -86,7 +85,6 @@ class GenericOTARequestorDriver : public OTARequestorDriver uint32_t mOtaStartDelaySec = 0; uint32_t mPeriodicQueryTimeInterval = (24 * 60 * 60); // Timeout for querying providers on the default OTA provider list - using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; Optional mLastUsedProvider; // Provider location used for the last query or update }; diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index 9b0cdc1e84be34..0706702f040644 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -80,7 +80,6 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe // Clear all entries with the specified fabric index in the default OTA provider list CHIP_ERROR ClearDefaultOtaProviderList(FabricIndex fabricIndex) override; - using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; void SetCurrentProviderLocation(ProviderLocationType providerLocation) override { mProviderLocation.SetValue(providerLocation); diff --git a/src/app/clusters/ota-requestor/OTARequestorDriver.h b/src/app/clusters/ota-requestor/OTARequestorDriver.h index 71d72f5a4751f3..f67e2b7eb92c67 100644 --- a/src/app/clusters/ota-requestor/OTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/OTARequestorDriver.h @@ -67,6 +67,8 @@ enum class UpdateNotFoundReason class OTARequestorDriver { public: + using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; + virtual ~OTARequestorDriver() = default; /// Return if the device provides UI for asking a user for consent before downloading a software image @@ -105,7 +107,6 @@ class OTARequestorDriver /// Inform the driver that the device commissioning has completed virtual void OTACommissioningCallback() = 0; - using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; virtual void /// Driver portion of the logic for processing the AnnounceOTAProviders command ProcessAnnounceOTAProviders(const ProviderLocationType & providerLocation, @@ -120,8 +121,7 @@ class OTARequestorDriver // Driver picks the OTA Provider that should be used for the next query and update. The Provider is picked according to // the driver's internal logic such as, for example, traversing the default providers list. // Returns true if there is a Provider available for the next query, returns false otherwise. - virtual bool - DetermineProviderLocation(app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & providerLocation) = 0; + virtual bool DetermineProviderLocation(ProviderLocationType & providerLocation) = 0; }; } // namespace chip diff --git a/src/app/clusters/ota-requestor/OTARequestorInterface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h index 82a319e81551fd..7a946bd38d87c5 100644 --- a/src/app/clusters/ota-requestor/OTARequestorInterface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -142,7 +142,8 @@ class ProviderLocationList class OTARequestorInterface { public: - using OTAUpdateStateEnum = chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum; + using OTAUpdateStateEnum = chip::app::Clusters::OtaSoftwareUpdateRequestor::OTAUpdateStateEnum; + using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; // Return value for various trigger-type APIs enum OTATriggerResult @@ -195,8 +196,6 @@ class OTARequestorInterface // Clear all entries with the specified fabric index in the default OTA provider list virtual CHIP_ERROR ClearDefaultOtaProviderList(FabricIndex fabricIndex) = 0; - using ProviderLocationType = app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type; - // Set the provider location to be used in the next query and OTA update process virtual void SetCurrentProviderLocation(ProviderLocationType providerLocation) = 0; From 09ce1404d9299f0ebb0ecfae379a624b83914b7b Mon Sep 17 00:00:00 2001 From: Kundok Park <97262718+kpark-apple@users.noreply.github.com> Date: Thu, 10 Mar 2022 07:58:49 -0800 Subject: [PATCH 30/43] Fix XPC connection failure handling (#16063) for Darwin CHIPDeviceController. --- .../CHIP/CHIPDeviceControllerXPCConnection.m | 1 + .../CHIPTests/CHIPXPCProtocolTests.m | 35 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/darwin/Framework/CHIP/CHIPDeviceControllerXPCConnection.m b/src/darwin/Framework/CHIP/CHIPDeviceControllerXPCConnection.m index 2af67652b89f82..ea34191e7081aa 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceControllerXPCConnection.m +++ b/src/darwin/Framework/CHIP/CHIPDeviceControllerXPCConnection.m @@ -93,6 +93,7 @@ - (void)getProxyHandleWithCompletion:(void (^)(dispatch_queue_t queue, if (!xpcConnection) { CHIP_LOG_ERROR("Cannot connect to XPC server for remote controller"); completion(self.workQueue, nil); + return; } xpcConnection.remoteObjectInterface = self.remoteDeviceServerProtocol; xpcConnection.exportedInterface = self.remoteDeviceClientProtocol; diff --git a/src/darwin/Framework/CHIPTests/CHIPXPCProtocolTests.m b/src/darwin/Framework/CHIPTests/CHIPXPCProtocolTests.m index 76177624dc08b6..fea62527b4eecd 100644 --- a/src/darwin/Framework/CHIPTests/CHIPXPCProtocolTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPXPCProtocolTests.m @@ -1823,4 +1823,39 @@ - (void)testReadAttributeCacheFailure XCTAssertNil(_xpcConnection); } +- (void)testXPCConnectionFailure +{ + uint64_t myNodeId = 9876543210; + NSUInteger myEndpointId = 100; + NSUInteger myClusterId = 200; + NSUInteger myAttributeId = 300; + XCTestExpectation * responseExpectation = [self expectationWithDescription:@"Read response received"]; + + // Test with a device controller which wouldn't connect to XPC listener successfully + __auto_type failingDeviceController = [CHIPDeviceController sharedControllerWithId:_controllerUUID + xpcConnectBlock:^NSXPCConnection * { + return nil; + }]; + + [failingDeviceController getConnectedDevice:myNodeId + queue:dispatch_get_main_queue() + completionHandler:^(CHIPDevice * _Nullable device, NSError * _Nullable error) { + XCTAssertNotNil(device); + XCTAssertNil(error); + NSLog(@"Device acquired. Reading..."); + [device readAttributeWithEndpointId:myEndpointId + clusterId:myClusterId + attributeId:myAttributeId + clientQueue:dispatch_get_main_queue() + completion:^(id _Nullable value, NSError * _Nullable error) { + NSLog(@"Read value: %@", value); + XCTAssertNil(value); + XCTAssertNotNil(error); + [responseExpectation fulfill]; + }]; + }]; + + [self waitForExpectations:@[ responseExpectation ] timeout:kTimeoutInSeconds]; +} + @end From 6b7d009ffa83ab2a7a16bbdf61dc9b14ffd6bdae Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Thu, 10 Mar 2022 09:23:27 -0800 Subject: [PATCH 31/43] [OTA] Set OTA Requestor server attributes in CHIP context (#16041) --- src/app/clusters/ota-requestor/OTARequestor.cpp | 12 ++++++++++++ src/app/clusters/ota-requestor/OTARequestor.h | 14 +++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index f45a1f1fdb8eb5..b1b91ff82932ba 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -20,6 +20,7 @@ * OTA Requestor logic is contained in this class. */ +#include #include #include #include @@ -101,6 +102,17 @@ OTARequestorInterface * GetRequestorInstance() return globalOTARequestorInstance; } +void OTARequestor::InitState(intptr_t context) +{ + OTARequestor * requestorCore = reinterpret_cast(context); + VerifyOrDie(requestorCore != nullptr); + + // This results in the initial periodic timer kicking off + requestorCore->RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); + + OtaRequestorServerSetUpdateStateProgress(app::DataModel::NullNullable); +} + void OTARequestor::OnQueryImageResponse(void * context, const QueryImageResponse::DecodableType & response) { LogQueryImageResponse(response); diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index 0706702f040644..537e51d1d7aa76 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -23,7 +23,6 @@ #pragma once #include -#include #include #include @@ -99,6 +98,8 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe app::Clusters::OtaSoftwareUpdateRequestor::OTAChangeReasonEnum reason) override; void OnUpdateProgressChanged(app::DataModel::Nullable percent) override; + //////////// OTARequestor public APIs /////////////// + /** * Called to perform some initialization including: * - Set server instance used to get access to the system resources necessary to open CASE sessions and drive @@ -119,11 +120,9 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe mCurrentVersion = version; storage.LoadDefaultProviders(mDefaultOtaProviderList); - OtaRequestorServerSetUpdateState(mCurrentUpdateState); - OtaRequestorServerSetUpdateStateProgress(app::DataModel::NullNullable); - // This results in the initial periodic timer kicking off - RecordNewUpdateState(OTAUpdateStateEnum::kIdle, OTAChangeReasonEnum::kSuccess); + // Schedule the initializations that needs to be performed in the CHIP context + DeviceLayer::PlatformMgr().ScheduleWork(InitState, reinterpret_cast(this)); return chip::DeviceLayer::PlatformMgrImpl().AddEventHandler(OnCommissioningCompleteRequestor, reinterpret_cast(this)); @@ -200,6 +199,11 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe chip::BDXDownloader * mDownloader; }; + /** + * Callback to initialize states and server attributes in the CHIP context + */ + static void InitState(intptr_t context); + /** * Record the new update state by updating the corresponding server attribute and logging a StateTransition event */ From abe0474d7a2510cdb25a6303c1403d95556fa1a1 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 10 Mar 2022 13:49:15 -0500 Subject: [PATCH 32/43] Fix misuse of serialized key capacity. (#16033) We were using Capacity() in various places where we should be using Length(). --- .../commands/common/CHIPToolKeypair.mm | 42 +++++++------------ .../ExampleOperationalCredentialsIssuer.cpp | 32 +++++++------- 2 files changed, 32 insertions(+), 42 deletions(-) diff --git a/examples/chip-tool-darwin/commands/common/CHIPToolKeypair.mm b/examples/chip-tool-darwin/commands/common/CHIPToolKeypair.mm index 220bcd16d4dda6..579b4095b75766 100644 --- a/examples/chip-tool-darwin/commands/common/CHIPToolKeypair.mm +++ b/examples/chip-tool-darwin/commands/common/CHIPToolKeypair.mm @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -108,11 +109,8 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage effectiveTime.Day = 1; ReturnErrorOnFailure(chip::Credentials::ASN1ToChipEpochTime(effectiveTime, _mNow)); - uint16_t keySize = static_cast(serializedKey.Capacity()); - value = [storage CHIPGetKeyValue:kOperationalCredentialsIssuerKeypairStorage]; err = [self decodeNSStringWithValue:value serializedKey:serializedKey]; - serializedKey.SetLength(keySize); if (err != CHIP_NO_ERROR) { // Storage doesn't have an existing keypair. Let's create one and add it to the storage. @@ -121,9 +119,8 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage } ReturnErrorOnFailure([self Serialize:serializedKey]); - keySize = static_cast(serializedKey.Capacity()); - std::string serializeString(serializedKey.Bytes(), serializedKey.Bytes() + serializedKey.Capacity()); - std::string base64Value = StringToBase64(serializeString); + std::string serializedString(chip::Uint8::to_const_char(serializedKey.Bytes()), serializedKey.Length()); + std::string base64Value = StringToBase64(serializedString); NSString * valueString = [NSString stringWithUTF8String:base64Value.c_str()]; [storage CHIPSetKeyValue:kOperationalCredentialsIssuerKeypairStorage value:valueString]; } else { @@ -134,30 +131,19 @@ - (CHIP_ERROR)createOrLoadKeys:(CHIPToolPersistentStorageDelegate *)storage - (CHIP_ERROR)decodeNSStringWithValue:(NSString *)value serializedKey:(chip::Crypto::P256SerializedKeypair &)serializedKey { - CHIP_ERROR err = CHIP_NO_ERROR; - uint16_t keySize = static_cast(serializedKey.Capacity()); - if (value != nil) { - std::string decoded = Base64ToString([value UTF8String]); - - if (decoded.length() > UINT16_MAX) { - err = CHIP_ERROR_BUFFER_TOO_SMALL; - } else { - if (serializedKey != nullptr) { - memcpy(serializedKey, decoded.data(), std::min(decoded.length(), keySize)); - if (keySize < decoded.length()) { - err = CHIP_ERROR_BUFFER_TOO_SMALL; - } - } else { - err = CHIP_ERROR_NO_MEMORY; - } - keySize = static_cast(decoded.length()); - } - } else { - err = CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; + if (value == nil) { + return CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND; } - serializedKey.SetLength(keySize); - return err; + std::string decoded = Base64ToString([value UTF8String]); + + if (serializedKey.Capacity() < decoded.length()) { + return CHIP_ERROR_BUFFER_TOO_SMALL; + } + + memcpy(serializedKey.Bytes(), decoded.data(), decoded.length()); + serializedKey.SetLength(decoded.length()); + return CHIP_NO_ERROR; } @end diff --git a/src/controller/ExampleOperationalCredentialsIssuer.cpp b/src/controller/ExampleOperationalCredentialsIssuer.cpp index 19db629fb5c803..34a823cb872065 100644 --- a/src/controller/ExampleOperationalCredentialsIssuer.cpp +++ b/src/controller/ExampleOperationalCredentialsIssuer.cpp @@ -52,11 +52,14 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(ASN1ToChipEpochTime(effectiveTime, mNow)); Crypto::P256SerializedKeypair serializedKey; - uint16_t keySize = static_cast(serializedKey.Capacity()); + { + // Scope for keySize, because we use it as an in/out param. + uint16_t keySize = static_cast(serializedKey.Capacity()); - PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIssuerKeypairStorage, key, - err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); - serializedKey.SetLength(keySize); + PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIssuerKeypairStorage, key, + err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); + serializedKey.SetLength(keySize); + } if (err != CHIP_NO_ERROR) { @@ -65,10 +68,9 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIssuer.Initialize()); ReturnErrorOnFailure(mIssuer.Serialize(serializedKey)); - keySize = static_cast(serializedKey.Capacity()); - PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIssuerKeypairStorage, key, - ReturnErrorOnFailure(storage.SyncSetKeyValue(key, serializedKey.Bytes(), keySize))); + ReturnErrorOnFailure( + storage.SyncSetKeyValue(key, serializedKey.Bytes(), static_cast(serializedKey.Length())))); } else { @@ -76,11 +78,14 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIssuer.Deserialize(serializedKey)); } - keySize = static_cast(serializedKey.Capacity()); + { + // Scope for keySize, because we use it as an in/out param. + uint16_t keySize = static_cast(serializedKey.Capacity()); - PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateIssuerKeypairStorage, key, - err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); - serializedKey.SetLength(keySize); + PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateIssuerKeypairStorage, key, + err = storage.SyncGetKeyValue(key, serializedKey.Bytes(), keySize)); + serializedKey.SetLength(keySize); + } if (err != CHIP_NO_ERROR) { @@ -90,10 +95,9 @@ CHIP_ERROR ExampleOperationalCredentialsIssuer::Initialize(PersistentStorageDele ReturnErrorOnFailure(mIntermediateIssuer.Initialize()); ReturnErrorOnFailure(mIntermediateIssuer.Serialize(serializedKey)); - keySize = static_cast(serializedKey.Capacity()); - PERSISTENT_KEY_OP(mIndex, kOperationalCredentialsIntermediateIssuerKeypairStorage, key, - ReturnErrorOnFailure(storage.SyncSetKeyValue(key, serializedKey.Bytes(), keySize))); + ReturnErrorOnFailure( + storage.SyncSetKeyValue(key, serializedKey.Bytes(), static_cast(serializedKey.Length())))); } else { From c1b56484c41c6c82b08ce27c2b8226d98b21a069 Mon Sep 17 00:00:00 2001 From: Evgeny Margolis Date: Thu, 10 Mar 2022 11:02:32 -0800 Subject: [PATCH 33/43] Updated Fabric ID Validation in Fabric Table (#15920) -- Updated logic that checks optional fabric id attribute in ICAC and RCAC to match fabric id attribute in NOC. -- According to spec there is no need to require fabric id in ICAC if it is present in RCAC. -- NOTE: validity check for NodeId, FabricId and other DN attributes is performed when loading certificates for validation (LoadCert()). So there is no need to check validity again in FabricInfo::VerifyCredentials(). -- Changed return value of ExtractNodeIdFabricIdFromOpCert() and ExtractFabricIdFromCert() to CHIP_ERROR_NOT_FOUND when requested element is not found in the certificate. --- src/credentials/CHIPCert.cpp | 4 ++-- src/credentials/CHIPCert.h | 4 ++-- src/credentials/FabricTable.cpp | 23 +++++++++++++++-------- src/credentials/tests/TestChipCert.cpp | 4 ++-- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/credentials/CHIPCert.cpp b/src/credentials/CHIPCert.cpp index ba802d41273fd2..130ede10847afb 100644 --- a/src/credentials/CHIPCert.cpp +++ b/src/credentials/CHIPCert.cpp @@ -1013,7 +1013,7 @@ CHIP_ERROR ExtractNodeIdFabricIdFromOpCert(const ChipCertificateData & opcert, N } if (!foundNodeId || !foundFabricId) { - return CHIP_ERROR_INVALID_ARGUMENT; + return CHIP_ERROR_NOT_FOUND; } *outNodeId = nodeId; @@ -1054,7 +1054,7 @@ CHIP_ERROR ExtractFabricIdFromCert(const ChipCertificateData & cert, FabricId * } } - return CHIP_ERROR_INVALID_ARGUMENT; + return CHIP_ERROR_NOT_FOUND; } CHIP_ERROR ExtractCATsFromOpCert(const ByteSpan & opcert, CATValues & cats) diff --git a/src/credentials/CHIPCert.h b/src/credentials/CHIPCert.h index 3e3b576d07108e..660d9e9c449ce4 100644 --- a/src/credentials/CHIPCert.h +++ b/src/credentials/CHIPCert.h @@ -781,7 +781,7 @@ CHIP_ERROR ConvertECDSASignatureDERToRaw(ASN1::ASN1Reader & reader, chip::TLV::T * These certificates may not contain a NodeID, so ExtractNodeIdFabricIdFromOpCert() * cannot be used for such certificates. * - * @return CHIP_ERROR_INVALID_ARGUMENT if the passed-in cert does not have RDN + * @return CHIP_ERROR_NOT_FOUND if the passed-in cert does not have RDN * corresponding to FabricID. */ CHIP_ERROR ExtractFabricIdFromCert(const ChipCertificateData & cert, FabricId * fabricId); @@ -790,7 +790,7 @@ CHIP_ERROR ExtractFabricIdFromCert(const ChipCertificateData & cert, FabricId * * Extract Node ID and Fabric ID from an operational certificate that has already been * parsed. * - * @return CHIP_ERROR_INVALID_ARGUMENT if the passed-in cert does not have at + * @return CHIP_ERROR_NOT_FOUND if the passed-in cert does not have at * least one NodeId RDN and one FabricId RDN in the Subject DN. No other * validation (e.g. checkign that there is exactly one RDN of each type) is * performed. diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 6d1187b079c51c..8eece2a614b0b5 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -312,25 +312,32 @@ CHIP_ERROR FabricInfo::VerifyCredentials(const ByteSpan & noc, const ByteSpan & NodeId nodeId; ReturnErrorOnFailure(ExtractNodeIdFabricIdFromOpCert(certificates.GetLastCert()[0], &nodeId, &fabricId)); + CHIP_ERROR err; FabricId icacFabricId = kUndefinedFabricId; if (!icac.empty()) { - if (ExtractFabricIdFromCert(certificates.GetCertSet()[1], &icacFabricId) == CHIP_NO_ERROR && - icacFabricId != kUndefinedFabricId) + err = ExtractFabricIdFromCert(certificates.GetCertSet()[1], &icacFabricId); + if (err == CHIP_NO_ERROR) { ReturnErrorCodeIf(icacFabricId != fabricId, CHIP_ERROR_FABRIC_MISMATCH_ON_ICA); } + // FabricId is optional field in ICAC and "not found" code is not treated as error. + else if (err != CHIP_ERROR_NOT_FOUND) + { + return err; + } } FabricId rcacFabricId = kUndefinedFabricId; - if (ExtractFabricIdFromCert(certificates.GetCertSet()[0], &rcacFabricId) == CHIP_NO_ERROR && rcacFabricId != kUndefinedFabricId) + err = ExtractFabricIdFromCert(certificates.GetCertSet()[0], &rcacFabricId); + if (err == CHIP_NO_ERROR) { ReturnErrorCodeIf(rcacFabricId != fabricId, CHIP_ERROR_WRONG_CERT_DN); - if (!icac.empty()) - { - // If FabricId attribute is present in RCAC then it SHOULD be present in ICAC as well. - ReturnErrorCodeIf(icacFabricId == kUndefinedFabricId, CHIP_ERROR_WRONG_CERT_DN); - } + } + // FabricId is optional field in RCAC and "not found" code is not treated as error. + else if (err != CHIP_ERROR_NOT_FOUND) + { + return err; } ReturnErrorOnFailure(GeneratePeerId(fabricId, nodeId, &nocPeerId)); diff --git a/src/credentials/tests/TestChipCert.cpp b/src/credentials/tests/TestChipCert.cpp index dceb46c3cbd8d0..ed14292b892706 100644 --- a/src/credentials/tests/TestChipCert.cpp +++ b/src/credentials/tests/TestChipCert.cpp @@ -1196,7 +1196,7 @@ static void TestChipCert_ExtractNodeIdFabricId(nlTestSuite * inSuite, void * inC FabricId fabricId; err = ExtractFabricIdFromCert(cert, &fabricId); - NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_NOT_FOUND); } // Test extraction from the parsed form of ICA Cert that doesn't have FabricId. @@ -1209,7 +1209,7 @@ static void TestChipCert_ExtractNodeIdFabricId(nlTestSuite * inSuite, void * inC FabricId fabricId; err = ExtractFabricIdFromCert(certSet.GetCertSet()[0], &fabricId); - NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_INVALID_ARGUMENT); + NL_TEST_ASSERT(inSuite, err == CHIP_ERROR_NOT_FOUND); certSet.Release(); } } From 244969f4cb18e64af189ed890a476248436c19b6 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 10 Mar 2022 14:37:02 -0500 Subject: [PATCH 34/43] Change fabric table persistence to not use a single blob per fabric. (#16032) * Change fabric table persistence to not use a single blob per fabric. This will let us do a better job of loading things on demand as needed, in followups, so we don't have to keep the certs in RAM all the time. * Address review comments --- src/credentials/FabricTable.cpp | 300 ++++++++++++------- src/credentials/FabricTable.h | 20 +- src/lib/support/DefaultStorageKeyAllocator.h | 7 +- 3 files changed, 200 insertions(+), 127 deletions(-) diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index 8eece2a614b0b5..0735f6579b1e97 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #if CHIP_CRYPTO_HSM #include @@ -41,145 +42,208 @@ CHIP_ERROR FabricInfo::SetFabricLabel(const CharSpan & fabricLabel) return CHIP_NO_ERROR; } +namespace { +// Tags for our metadata storage. +constexpr TLV::Tag kVendorIdTag = TLV::ContextTag(0); +constexpr TLV::Tag kFabricLabelTag = TLV::ContextTag(1); + +// Tags for our operational keypair storage. +constexpr TLV::Tag kOpKeyVersionTag = TLV::ContextTag(0); +constexpr TLV::Tag kOpKeyDataTag = TLV::ContextTag(1); + +// If this version grows beyond UINT16_MAX, adjust OpKeypairTLVMaxSize +// accordingly. +constexpr uint16_t kOpKeyVersion = 1; +} // anonymous namespace + CHIP_ERROR FabricInfo::CommitToStorage(PersistentStorageDelegate * storage) { - CHIP_ERROR err = CHIP_NO_ERROR; + DefaultStorageKeyAllocator keyAlloc; - char key[kKeySize]; - ReturnErrorOnFailure(GenerateKey(mFabric, key, sizeof(key))); + VerifyOrReturnError(mRootCert.size() <= kMaxCHIPCertLength && mICACert.size() <= kMaxCHIPCertLength && + mNOCCert.size() <= kMaxCHIPCertLength, + CHIP_ERROR_BUFFER_TOO_SMALL); + static_assert(kMaxCHIPCertLength <= UINT16_MAX, "Casting to uint16_t won't be safe"); - StorableFabricInfo * info = chip::Platform::New(); - ReturnErrorCodeIf(info == nullptr, CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure( + storage->SyncSetKeyValue(keyAlloc.FabricRCAC(mFabric), mRootCert.data(), static_cast(mRootCert.size()))); - info->mFabricIndex = mFabric; - info->mVendorId = Encoding::LittleEndian::HostSwap16(mVendorId); + // If we stop storing ICA certs when empty, update LoadFromStorage + // accordingly to check for CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND. + ReturnErrorOnFailure( + storage->SyncSetKeyValue(keyAlloc.FabricICAC(mFabric), mICACert.data(), static_cast(mICACert.size()))); - size_t stringLength = strnlen(mFabricLabel, kFabricLabelMaxLengthInBytes); - memcpy(info->mFabricLabel, mFabricLabel, stringLength); - info->mFabricLabel[stringLength] = '\0'; // Set null terminator + ReturnErrorOnFailure( + storage->SyncSetKeyValue(keyAlloc.FabricNOC(mFabric), mNOCCert.data(), static_cast(mNOCCert.size()))); - if (mOperationalKey != nullptr) { - SuccessOrExit(err = mOperationalKey->Serialize(info->mOperationalKey)); - } - else - { - P256Keypair keypair; - SuccessOrExit(err = keypair.Initialize()); - SuccessOrExit(err = keypair.Serialize(info->mOperationalKey)); - } + Crypto::P256SerializedKeypair serializedOpKey; + if (mOperationalKey != nullptr) + { + ReturnErrorOnFailure(mOperationalKey->Serialize(serializedOpKey)); + } + else + { + // Could we just not store it instead? What would deserialize need + // to do then? + P256Keypair keypair; + ReturnErrorOnFailure(keypair.Initialize()); + ReturnErrorOnFailure(keypair.Serialize(serializedOpKey)); + } - if (mRootCert.empty()) - { - info->mRootCertLen = 0; - } - else - { - VerifyOrExit(CanCastTo(mRootCert.size()), err = CHIP_ERROR_INVALID_ARGUMENT); - info->mRootCertLen = Encoding::LittleEndian::HostSwap16(static_cast(mRootCert.size())); - memcpy(info->mRootCert, mRootCert.data(), mRootCert.size()); - } + uint8_t buf[OpKeyTLVMaxSize()]; + TLV::TLVWriter writer; + writer.Init(buf); - if (mICACert.empty()) - { - info->mICACertLen = 0; - } - else - { - VerifyOrExit(CanCastTo(mICACert.size()), err = CHIP_ERROR_INVALID_ARGUMENT); - info->mICACertLen = Encoding::LittleEndian::HostSwap16(static_cast(mICACert.size())); - memcpy(info->mICACert, mICACert.data(), mICACert.size()); + TLV::TLVType outerType; + ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); + + ReturnErrorOnFailure(writer.Put(kOpKeyVersionTag, kOpKeyVersion)); + + ReturnErrorOnFailure(writer.Put(kOpKeyDataTag, ByteSpan(serializedOpKey.Bytes(), serializedOpKey.Length()))); + + ReturnErrorOnFailure(writer.EndContainer(outerType)); + + const auto opKeyLength = writer.GetLengthWritten(); + VerifyOrReturnError(CanCastTo(opKeyLength), CHIP_ERROR_BUFFER_TOO_SMALL); + ReturnErrorOnFailure(storage->SyncSetKeyValue(keyAlloc.FabricOpKey(mFabric), buf, static_cast(opKeyLength))); } - if (mNOCCert.empty()) { - info->mNOCCertLen = 0; + uint8_t buf[MetadataTLVMaxSize()]; + TLV::TLVWriter writer; + writer.Init(buf); + + TLV::TLVType outerType; + ReturnErrorOnFailure(writer.StartContainer(TLV::AnonymousTag(), TLV::kTLVType_Structure, outerType)); + + ReturnErrorOnFailure(writer.Put(kVendorIdTag, mVendorId)); + + ReturnErrorOnFailure(writer.PutString(kFabricLabelTag, CharSpan::fromCharString(mFabricLabel))); + + ReturnErrorOnFailure(writer.EndContainer(outerType)); + + const auto metadataLength = writer.GetLengthWritten(); + VerifyOrReturnError(CanCastTo(metadataLength), CHIP_ERROR_BUFFER_TOO_SMALL); + ReturnErrorOnFailure( + storage->SyncSetKeyValue(keyAlloc.FabricMetadata(mFabric), buf, static_cast(metadataLength))); } - else + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FabricInfo::LoadFromStorage(PersistentStorageDelegate * storage) +{ + DefaultStorageKeyAllocator keyAlloc; + + ChipLogProgress(Inet, "Loading from storage for fabric index %u", mFabric); + + // Scopes for "size" so we don't forget to re-initialize it between gets, + // since each get modifies it. { - VerifyOrExit(CanCastTo(mNOCCert.size()), err = CHIP_ERROR_INVALID_ARGUMENT); - info->mNOCCertLen = Encoding::LittleEndian::HostSwap16(static_cast(mNOCCert.size())); - memcpy(info->mNOCCert, mNOCCert.data(), mNOCCert.size()); + uint8_t buf[Credentials::kMaxCHIPCertLength]; + uint16_t size = sizeof(buf); + ReturnErrorOnFailure(storage->SyncGetKeyValue(keyAlloc.FabricRCAC(mFabric), buf, size)); + ReturnErrorOnFailure(SetRootCert(ByteSpan(buf, size))); } - err = storage->SyncSetKeyValue(key, info, sizeof(StorableFabricInfo)); - if (err != CHIP_NO_ERROR) { - ChipLogError(Discovery, "Error occurred calling SyncSetKeyValue: %s", chip::ErrorStr(err)); + uint8_t buf[Credentials::kMaxCHIPCertLength]; + uint16_t size = sizeof(buf); + // For now we always store an ICA cert buffer (possibly empty). If we + // stop doing that, check for + // CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND here. + ReturnErrorOnFailure(storage->SyncGetKeyValue(keyAlloc.FabricICAC(mFabric), buf, size)); + ReturnErrorOnFailure(SetICACert(ByteSpan(buf, size))); } -exit: - if (info != nullptr) { - chip::Platform::Delete(info); + uint8_t buf[Credentials::kMaxCHIPCertLength]; + uint16_t size = sizeof(buf); + ReturnErrorOnFailure(storage->SyncGetKeyValue(keyAlloc.FabricNOC(mFabric), buf, size)); + ByteSpan nocCert(buf, size); + NodeId nodeId; + ReturnErrorOnFailure(ExtractNodeIdFabricIdFromOpCert(nocCert, &nodeId, &mFabricId)); + // The compressed fabric ID doesn't change for a fabric over time. + // Computing it here will save computational overhead when it's accessed by other + // parts of the code. + ReturnErrorOnFailure(GeneratePeerId(mFabricId, nodeId, &mOperationalId)); + ReturnErrorOnFailure(SetNOCCert(nocCert)); } - return err; -} - -CHIP_ERROR FabricInfo::LoadFromStorage(PersistentStorageDelegate * storage) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - char key[kKeySize]; - ReturnErrorOnFailure(GenerateKey(mFabric, key, sizeof(key))); - - StorableFabricInfo * info = chip::Platform::New(); - ReturnErrorCodeIf(info == nullptr, CHIP_ERROR_NO_MEMORY); - uint16_t infoSize = sizeof(StorableFabricInfo); + { + uint8_t buf[OpKeyTLVMaxSize()]; + uint16_t size = sizeof(buf); + ReturnErrorOnFailure(storage->SyncGetKeyValue(keyAlloc.FabricOpKey(mFabric), buf, size)); + TLV::ContiguousBufferTLVReader reader; + reader.Init(buf, size); - FabricIndex id; - uint16_t rootCertLen, icaCertLen, nocCertLen; - size_t stringLength; - NodeId nodeId; + ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag())); + TLV::TLVType containerType; + ReturnErrorOnFailure(reader.EnterContainer(containerType)); - SuccessOrExit(err = storage->SyncGetKeyValue(key, info, infoSize)); + ReturnErrorOnFailure(reader.Next(kOpKeyVersionTag)); + uint16_t opKeyVersion; + ReturnErrorOnFailure(reader.Get(opKeyVersion)); + VerifyOrReturnError(opKeyVersion == kOpKeyVersion, CHIP_ERROR_VERSION_MISMATCH); - id = info->mFabricIndex; - mVendorId = Encoding::LittleEndian::HostSwap16(info->mVendorId); - rootCertLen = Encoding::LittleEndian::HostSwap16(info->mRootCertLen); - icaCertLen = Encoding::LittleEndian::HostSwap16(info->mICACertLen); - nocCertLen = Encoding::LittleEndian::HostSwap16(info->mNOCCertLen); + ReturnErrorOnFailure(reader.Next(kOpKeyDataTag)); + ByteSpan keyData; + ReturnErrorOnFailure(reader.GetByteView(keyData)); - stringLength = strnlen(info->mFabricLabel, kFabricLabelMaxLengthInBytes); - memcpy(mFabricLabel, info->mFabricLabel, stringLength); - mFabricLabel[stringLength] = '\0'; // Set null terminator + // Unfortunately, we have to copy the data into a P256SerializedKeypair. + Crypto::P256SerializedKeypair serializedOpKey; + VerifyOrReturnError(keyData.size() <= serializedOpKey.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); - VerifyOrExit(mFabric == id, err = CHIP_ERROR_INCORRECT_STATE); + memcpy(serializedOpKey.Bytes(), keyData.data(), keyData.size()); + serializedOpKey.SetLength(keyData.size()); - if (mOperationalKey == nullptr) - { + if (mOperationalKey == nullptr) + { #ifdef ENABLE_HSM_CASE_OPS_KEY - mOperationalKey = chip::Platform::New(); - mOperationalKey->SetKeyId(CASE_OPS_KEY); + mOperationalKey = chip::Platform::New(); + mOperationalKey->SetKeyId(CASE_OPS_KEY); #else - mOperationalKey = chip::Platform::New(); + mOperationalKey = chip::Platform::New(); #endif - } - VerifyOrExit(mOperationalKey != nullptr, err = CHIP_ERROR_NO_MEMORY); - SuccessOrExit(err = mOperationalKey->Deserialize(info->mOperationalKey)); + } + VerifyOrReturnError(mOperationalKey != nullptr, CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(mOperationalKey->Deserialize(serializedOpKey)); #ifdef ENABLE_HSM_CASE_OPS_KEY - // Set provisioned_key = true , so that key is not deleted from HSM. - mOperationalKey->provisioned_key = true; + // Set provisioned_key = true , so that key is not deleted from HSM. + mOperationalKey->provisioned_key = true; #endif - ChipLogProgress(Inet, "Loading certs from storage"); - SuccessOrExit(err = SetRootCert(ByteSpan(info->mRootCert, rootCertLen))); + ReturnErrorOnFailure(reader.ExitContainer(containerType)); + ReturnErrorOnFailure(reader.VerifyEndOfContainer()); + } - // The compressed fabric ID doesn't change for a fabric over time. - // Computing it here will save computational overhead when it's accessed by other - // parts of the code. - SuccessOrExit(err = ExtractNodeIdFabricIdFromOpCert(ByteSpan(info->mNOCCert, nocCertLen), &nodeId, &mFabricId)); - SuccessOrExit(err = GeneratePeerId(mFabricId, nodeId, &mOperationalId)); + { + uint8_t buf[MetadataTLVMaxSize()]; + uint16_t size = sizeof(buf); + ReturnErrorOnFailure(storage->SyncGetKeyValue(keyAlloc.FabricMetadata(mFabric), buf, size)); + TLV::ContiguousBufferTLVReader reader; + reader.Init(buf, size); - SuccessOrExit(err = SetICACert(ByteSpan(info->mICACert, icaCertLen))); - SuccessOrExit(err = SetNOCCert(ByteSpan(info->mNOCCert, nocCertLen))); + ReturnErrorOnFailure(reader.Next(TLV::kTLVType_Structure, TLV::AnonymousTag())); + TLV::TLVType containerType; + ReturnErrorOnFailure(reader.EnterContainer(containerType)); -exit: - if (info != nullptr) - { - chip::Platform::Delete(info); + ReturnErrorOnFailure(reader.Next(kVendorIdTag)); + ReturnErrorOnFailure(reader.Get(mVendorId)); + + ReturnErrorOnFailure(reader.Next(kFabricLabelTag)); + CharSpan label; + ReturnErrorOnFailure(reader.Get(label)); + + VerifyOrReturnError(label.size() <= kFabricLabelMaxLengthInBytes, CHIP_ERROR_BUFFER_TOO_SMALL); + Platform::CopyString(mFabricLabel, label); + + ReturnErrorOnFailure(reader.ExitContainer(containerType)); + ReturnErrorOnFailure(reader.VerifyEndOfContainer()); } - return err; + + return CHIP_NO_ERROR; } CHIP_ERROR FabricInfo::GeneratePeerId(FabricId fabricId, NodeId nodeId, PeerId * compressedPeerId) const @@ -212,26 +276,30 @@ CHIP_ERROR FabricInfo::GeneratePeerId(FabricId fabricId, NodeId nodeId, PeerId * CHIP_ERROR FabricInfo::DeleteFromStorage(PersistentStorageDelegate * storage, FabricIndex fabricIndex) { - CHIP_ERROR err = CHIP_NO_ERROR; + DefaultStorageKeyAllocator keyAlloc; + + // Try to delete all the state even if one of the deletes fails. + typedef const char * (DefaultStorageKeyAllocator::*KeyGetter)(FabricIndex); + constexpr KeyGetter keyGetters[] = { &DefaultStorageKeyAllocator::FabricNOC, &DefaultStorageKeyAllocator::FabricICAC, + &DefaultStorageKeyAllocator::FabricRCAC, &DefaultStorageKeyAllocator::FabricMetadata, + &DefaultStorageKeyAllocator::FabricOpKey }; - char key[kKeySize]; - ReturnErrorOnFailure(GenerateKey(fabricIndex, key, sizeof(key))); + CHIP_ERROR prevDeleteErr = CHIP_NO_ERROR; - err = storage->SyncDeleteKeyValue(key); - if (err != CHIP_NO_ERROR) + for (auto & keyGetter : keyGetters) { - ChipLogDetail(Discovery, "Fabric %d is not yet configured", fabricIndex); + CHIP_ERROR deleteErr = storage->SyncDeleteKeyValue((keyAlloc.*keyGetter)(fabricIndex)); + // Keys not existing is not really an error condition. + if (prevDeleteErr == CHIP_NO_ERROR && deleteErr != CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND) + { + prevDeleteErr = deleteErr; + } } - return err; -} - -CHIP_ERROR FabricInfo::GenerateKey(FabricIndex id, char * key, size_t len) -{ - VerifyOrReturnError(len >= kKeySize, CHIP_ERROR_INVALID_ARGUMENT); - int keySize = snprintf(key, len, "%s%x", kFabricTableKeyPrefix, id); - VerifyOrReturnError(keySize > 0, CHIP_ERROR_INTERNAL); - VerifyOrReturnError(len > (size_t) keySize, CHIP_ERROR_INTERNAL); - return CHIP_NO_ERROR; + if (prevDeleteErr != CHIP_NO_ERROR) + { + ChipLogDetail(Discovery, "Error deleting part of fabric %d: %" CHIP_ERROR_FORMAT, fabricIndex, prevDeleteErr.Format()); + } + return prevDeleteErr; } CHIP_ERROR FabricInfo::SetOperationalKeypair(const P256Keypair * keyPair) diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index 8a9ea3b4d3b813..3939ead901ed56 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -32,6 +32,7 @@ #endif #include #include +#include #include #include #include @@ -49,11 +50,6 @@ static constexpr uint8_t kFabricLabelMaxLengthInBytes = 32; static_assert(kUndefinedFabricIndex < chip::kMinValidFabricIndex, "Undefined fabric index should not be valid"); -// KVS store is sensitive to length of key strings, based on the underlying -// platform. Keeping them short. -constexpr char kFabricTableKeyPrefix[] = "Fabric"; -constexpr char kFabricTableCountKey[] = "NumFabrics"; - /** * Defines state of a pairing established by a fabric. * Node ID is only settable using the device operational credentials. @@ -213,6 +209,16 @@ class DLL_EXPORT FabricInfo friend class FabricTable; private: + static constexpr size_t MetadataTLVMaxSize() + { + return TLV::EstimateStructOverhead(sizeof(VendorId), kFabricLabelMaxLengthInBytes); + } + + static constexpr size_t OpKeyTLVMaxSize() + { + return TLV::EstimateStructOverhead(sizeof(uint16_t), Crypto::P256SerializedKeypair::Capacity()); + } + PeerId mOperationalId; FabricIndex mFabric = kUndefinedFabricIndex; @@ -231,10 +237,6 @@ class DLL_EXPORT FabricInfo FabricId mFabricId = 0; - static constexpr size_t kKeySize = sizeof(kFabricTableKeyPrefix) + 2 * sizeof(FabricIndex); - - static CHIP_ERROR GenerateKey(FabricIndex id, char * key, size_t len); - CHIP_ERROR CommitToStorage(PersistentStorageDelegate * storage); CHIP_ERROR LoadFromStorage(PersistentStorageDelegate * storage); static CHIP_ERROR DeleteFromStorage(PersistentStorageDelegate * storage, FabricIndex fabricIndex); diff --git a/src/lib/support/DefaultStorageKeyAllocator.h b/src/lib/support/DefaultStorageKeyAllocator.h index 865fb26aecbcab..b310f6451be665 100644 --- a/src/lib/support/DefaultStorageKeyAllocator.h +++ b/src/lib/support/DefaultStorageKeyAllocator.h @@ -34,8 +34,11 @@ class DefaultStorageKeyAllocator const char * KeyName() { return mKeyName; } // Fabric Table - - const char * FabricTable(chip::FabricIndex fabric) { return Format("f/%x/t", fabric); } + const char * FabricNOC(FabricIndex fabric) { return Format("f/%x/n", fabric); } + const char * FabricICAC(FabricIndex fabric) { return Format("f/%x/i", fabric); } + const char * FabricRCAC(FabricIndex fabric) { return Format("f/%x/r", fabric); } + const char * FabricMetadata(FabricIndex fabric) { return Format("f/%x/m", fabric); } + const char * FabricOpKey(FabricIndex fabric) { return Format("f/%x/o", fabric); } // Access Control List From 665a4aef423a0aca2c45872aa1952e14f547b3b1 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 10 Mar 2022 15:29:42 -0500 Subject: [PATCH 35/43] Allow runtime init of some `Server` members (1/2) (#16065) * Allow runtime init of some `Server` members (1/2) This PR is on the path towards having Server::Server no longer statically initialize its members with storage, and instead relying on Server::Init(). This will simplify organization of unit tests and also the convergence of Controller/Server storage to address issue #16028 Issue #16028 * Restyled by clang-format * Move a comment to the correct place Co-authored-by: Restyled.io --- .../DefaultAttributePersistenceProvider.cpp | 8 ++++++-- src/app/DefaultAttributePersistenceProvider.h | 20 +++++++++++++++---- src/app/server/CommissioningWindowManager.h | 12 ++++++++++- src/app/server/Server.cpp | 10 ++++++++-- 4 files changed, 41 insertions(+), 9 deletions(-) diff --git a/src/app/DefaultAttributePersistenceProvider.cpp b/src/app/DefaultAttributePersistenceProvider.cpp index c589c1d36c14c9..9b7c3a4538912b 100644 --- a/src/app/DefaultAttributePersistenceProvider.cpp +++ b/src/app/DefaultAttributePersistenceProvider.cpp @@ -25,6 +25,8 @@ namespace app { CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, const ByteSpan & aValue) { + VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); + // TODO: we may want to have a small cache for values that change a lot, so // we only write them once a bunch of changes happen or on timer or // shutdown. @@ -33,15 +35,17 @@ CHIP_ERROR DefaultAttributePersistenceProvider::WriteValue(const ConcreteAttribu { return CHIP_ERROR_BUFFER_TOO_SMALL; } - return mStorage.SyncSetKeyValue(key.AttributeValue(aPath), aValue.data(), static_cast(aValue.size())); + return mStorage->SyncSetKeyValue(key.AttributeValue(aPath), aValue.data(), static_cast(aValue.size())); } CHIP_ERROR DefaultAttributePersistenceProvider::ReadValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) { + VerifyOrReturnError(mStorage != nullptr, CHIP_ERROR_INCORRECT_STATE); + DefaultStorageKeyAllocator key; uint16_t size = static_cast(min(aValue.size(), static_cast(UINT16_MAX))); - ReturnErrorOnFailure(mStorage.SyncGetKeyValue(key.AttributeValue(aPath), aValue.data(), size)); + ReturnErrorOnFailure(mStorage->SyncGetKeyValue(key.AttributeValue(aPath), aValue.data(), size)); EmberAfAttributeType type = aMetadata->attributeType; if (emberAfIsStringAttributeType(type)) { diff --git a/src/app/DefaultAttributePersistenceProvider.h b/src/app/DefaultAttributePersistenceProvider.h index bc538ad6130261..41bb19b7a4f9a4 100644 --- a/src/app/DefaultAttributePersistenceProvider.h +++ b/src/app/DefaultAttributePersistenceProvider.h @@ -33,8 +33,20 @@ namespace app { class DefaultAttributePersistenceProvider : public AttributePersistenceProvider { public: - // aStorage must outlive this object. - DefaultAttributePersistenceProvider(PersistentStorageDelegate & aStorage) : mStorage(aStorage) {} + DefaultAttributePersistenceProvider() {} + + // Passed-in storage must outlive this object. + CHIP_ERROR Init(PersistentStorageDelegate * storage) + { + if (storage == nullptr) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + mStorage = storage; + return CHIP_NO_ERROR; + } + + void Shutdown() {} // AttributePersistenceProvider implementation. CHIP_ERROR WriteValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, @@ -42,8 +54,8 @@ class DefaultAttributePersistenceProvider : public AttributePersistenceProvider CHIP_ERROR ReadValue(const ConcreteAttributePath & aPath, const EmberAfAttributeMetadata * aMetadata, MutableByteSpan & aValue) override; -private: - PersistentStorageDelegate & mStorage; +protected: + PersistentStorageDelegate * mStorage; }; } // namespace app diff --git a/src/app/server/CommissioningWindowManager.h b/src/app/server/CommissioningWindowManager.h index 02dde6edeb77c9..86b360c38fd276 100644 --- a/src/app/server/CommissioningWindowManager.h +++ b/src/app/server/CommissioningWindowManager.h @@ -39,7 +39,17 @@ class Server; class CommissioningWindowManager : public SessionEstablishmentDelegate, public app::CommissioningModeProvider { public: - CommissioningWindowManager(Server * server) : mAppDelegate(nullptr), mServer(server) {} + CommissioningWindowManager() {} + + CHIP_ERROR Init(Server * server) + { + if (server == nullptr) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + mServer = server; + return CHIP_NO_ERROR; + } void SetAppDelegate(AppDelegate * delegate) { mAppDelegate = delegate; } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 137eb2cf974de2..c1d5da11a95653 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -107,8 +107,7 @@ Server::Server() : .devicePool = &mDevicePool, .dnsResolver = nullptr, }), - mCommissioningWindowManager(this), mGroupsProvider(mDeviceStorage), mAttributePersister(mDeviceStorage), - mAccessControl(Access::Examples::GetAccessControlDelegate(&mDeviceStorage)) + mGroupsProvider(mDeviceStorage), mAccessControl(Access::Examples::GetAccessControlDelegate(&mDeviceStorage)) {} CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint16_t unsecureServicePort, @@ -120,13 +119,16 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint CHIP_ERROR err = CHIP_NO_ERROR; + // TODO: Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryInit(); + SuccessOrExit(err = mCommissioningWindowManager.Init(this)); mCommissioningWindowManager.SetAppDelegate(delegate); mCommissioningWindowManager.SetSessionIDAllocator(&mSessionIDAllocator); // Set up attribute persistence before we try to bring up the data model // handler. + SuccessOrExit(mAttributePersister.Init(&mDeviceStorage)); SetAttributePersistenceProvider(&mAttributePersister); InitDataModelHandler(&mExchangeMgr); @@ -337,8 +339,12 @@ void Server::Shutdown() } mSessions.Shutdown(); mTransports.Close(); + + mAttributePersister.Shutdown(); mCommissioningWindowManager.Shutdown(); mCASESessionManager.Shutdown(); + + // TODO: Remove chip::Platform::MemoryInit() call from Server class, it belongs to outer code chip::Platform::MemoryShutdown(); } From 89b4bad63faf4e00cb5d943a9ceaf856d113921b Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 10 Mar 2022 18:17:56 -0500 Subject: [PATCH 36/43] Fix BLE commissioning with iOS CHIPTool. (#16075) Two changes: 1. Fix BLE commissioning by explicitly using EstablishPASESession so we get a chance to provide network credentials after that's done. 2. Fix the CHIPTool UI for the on-network case to not prompt for network credentials after the PASE session is established by exposing whether the device being commissioned is connected over BLE or not. We need a better plan for how to handle that last bit, but that will probably be part of the general PairingDelegate redesign. --- src/controller/CommissioneeDeviceProxy.h | 2 ++ .../QRCode/QRCodeViewController.m | 18 ++++++++++++---- .../Framework/CHIP/CHIPDeviceController.h | 6 ++++++ .../Framework/CHIP/CHIPDeviceController.mm | 21 +++++++++++++++++-- .../CHIP/CHIPDeviceControllerOverXPC.m | 6 ++++++ 5 files changed, 47 insertions(+), 6 deletions(-) diff --git a/src/controller/CommissioneeDeviceProxy.h b/src/controller/CommissioneeDeviceProxy.h index 14208d1f49da0e..a40a38eff91733 100644 --- a/src/controller/CommissioneeDeviceProxy.h +++ b/src/controller/CommissioneeDeviceProxy.h @@ -226,6 +226,8 @@ class CommissioneeDeviceProxy : public DeviceProxy, public SessionReleaseDelegat return LoadSecureSessionParametersIfNeeded(loadedSecureSession); }; + Transport::Type GetDeviceTransportType() const { return mDeviceAddress.GetTransportType(); } + private: enum class ConnectionState { diff --git a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m index aa6b3abd4de11f..ad87d2d4ce8fbd 100644 --- a/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m +++ b/src/darwin/CHIPTool/CHIPTool/View Controllers/QRCode/QRCodeViewController.m @@ -479,10 +479,20 @@ - (void)onPairingComplete:(NSError * _Nullable)error if (error != nil) { NSLog(@"Got pairing error back %@", error); } else { - dispatch_async(dispatch_get_main_queue(), ^{ - [self->_deviceList refreshDeviceList]; - [self retrieveAndSendWiFiCredentials]; - }); + CHIPDeviceController * controller = [CHIPDeviceController sharedController]; + uint64_t deviceId = CHIPGetLastPairedDeviceId(); + if ([controller deviceBeingCommissionedOverBLE:deviceId]) { + dispatch_async(dispatch_get_main_queue(), ^{ + [self->_deviceList refreshDeviceList]; + [self retrieveAndSendWiFiCredentials]; + }); + } else { + CHIPCommissioningParameters * params = [[CHIPCommissioningParameters alloc] init]; + NSError * error; + if (![controller commissionDevice:deviceId commissioningParams:params error:&error]) { + NSLog(@"Failed to commission Device %llu, with error %@", deviceId, error); + } + } } } diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.h b/src/darwin/Framework/CHIP/CHIPDeviceController.h index b91c5d430cf1cf..110af1bd3c497b 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.h +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.h @@ -70,6 +70,12 @@ typedef void (^CHIPDeviceConnectionCallback)(CHIPDevice * _Nullable device, NSEr setupPIN:(NSUInteger)setupPIN error:(NSError * __autoreleasing *)error; +/** + * Temporary until PairingDelegate is fixed to clearly communicate this + * information to consumers. + */ +- (BOOL)deviceBeingCommissionedOverBLE:(uint64_t)deviceId; + - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; diff --git a/src/darwin/Framework/CHIP/CHIPDeviceController.mm b/src/darwin/Framework/CHIP/CHIPDeviceController.mm index 14c8479245556a..8d4e54ae952f97 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceController.mm +++ b/src/darwin/Framework/CHIP/CHIPDeviceController.mm @@ -299,7 +299,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID } if ([self isRunning]) { _operationalCredentialsDelegate->SetDeviceID(deviceID); - errorCode = self.cppCommissioner->PairDevice(deviceID, manualPairingCode.c_str()); + errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, manualPairingCode.c_str()); } success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); @@ -350,7 +350,7 @@ - (BOOL)pairDevice:(uint64_t)deviceID onboardingPayload:(NSString *)onboardingPa dispatch_sync(_chipWorkQueue, ^{ if ([self isRunning]) { _operationalCredentialsDelegate->SetDeviceID(deviceID); - errorCode = self.cppCommissioner->PairDevice(deviceID, [onboardingPayload UTF8String]); + errorCode = self.cppCommissioner->EstablishPASEConnection(deviceID, [onboardingPayload UTF8String]); } success = ![self checkForError:errorCode logMsg:kErrorPairDevice error:error]; }); @@ -641,4 +641,21 @@ - (void)dealloc { } +- (BOOL)deviceBeingCommissionedOverBLE:(uint64_t)deviceId +{ + CHIP_ERROR errorCode = CHIP_ERROR_INCORRECT_STATE; + if (![self isRunning]) { + [self checkForError:errorCode logMsg:kErrorNotRunning error:nil]; + return NO; + } + + chip::CommissioneeDeviceProxy * deviceProxy; + errorCode = self->_cppCommissioner->GetDeviceBeingCommissioned(deviceId, &deviceProxy); + if (errorCode != CHIP_NO_ERROR) { + return NO; + } + + return deviceProxy->GetDeviceTransportType() == chip::Transport::Type::kBle; +} + @end diff --git a/src/darwin/Framework/CHIP/CHIPDeviceControllerOverXPC.m b/src/darwin/Framework/CHIP/CHIPDeviceControllerOverXPC.m index 7831d0c7313e2a..3c4ca4d586e704 100644 --- a/src/darwin/Framework/CHIP/CHIPDeviceControllerOverXPC.m +++ b/src/darwin/Framework/CHIP/CHIPDeviceControllerOverXPC.m @@ -103,6 +103,12 @@ - (nullable CHIPDevice *)getDeviceBeingCommissioned:(uint64_t)deviceId error:(NS return nil; } +- (BOOL)deviceBeingCommissionedOverBLE:(uint64_t)deviceId +{ + CHIP_LOG_ERROR("CHIPDevice doesn't support deviceBeingCommissionedOverBLE over XPC"); + return NO; +} + - (BOOL)getConnectedDevice:(uint64_t)deviceID queue:(dispatch_queue_t)queue completionHandler:(CHIPDeviceConnectionCallback)completionHandler From 10ab541c25ef66d0697c03d77cd3dd02c8ac4e16 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Thu, 10 Mar 2022 18:37:47 -0500 Subject: [PATCH 37/43] Allow runtime init of some `Server` members (2/2) (#16070) * Allow runtime init of some `Server` members (2/2) - This PR is on the path towards having Server::Server no longer statically initialize its members with storage, and instead relying on Server::Init(). This will simplify organization of unit tests and also the convergence of Controller/Server storage to address issue #16028 Issue #16028 This PR separates init of AccessControl so that the delegate need not be passed to the Constructor, which allows simpler splitting of storage init and decoupling from Server::Server() static inializer list. This is a structural, non-functional change, touching only AccessControl. Testing - Ran cert tests, still pass - Ran unit tests, still pass * Restyled by clang-format * Address review comments * Restyled by clang-format * Address review comments to remove mIsInitialized * Restyled by clang-format Co-authored-by: Restyled.io --- src/access/AccessControl.cpp | 32 ++++++++--- src/access/AccessControl.h | 57 ++++++++++++++----- .../examples/ExampleAccessControlDelegate.cpp | 4 +- .../examples/ExampleAccessControlDelegate.h | 4 +- .../PermissiveAccessControlDelegate.cpp | 4 +- .../PermissiveAccessControlDelegate.h | 2 +- src/access/tests/TestAccessControl.cpp | 5 +- src/app/server/Server.cpp | 9 ++- src/app/tests/AppTestContext.cpp | 6 +- 9 files changed, 86 insertions(+), 37 deletions(-) diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index b193b0fb0716be..44a880965b74ee 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -161,37 +161,53 @@ namespace Access { AccessControl::Entry::Delegate AccessControl::Entry::mDefaultDelegate; AccessControl::EntryIterator::Delegate AccessControl::EntryIterator::mDefaultDelegate; -AccessControl::Delegate AccessControl::mDefaultDelegate; -CHIP_ERROR AccessControl::Init() +CHIP_ERROR AccessControl::Init(AccessControl::Delegate * delegate) { + VerifyOrReturnError(!IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + VerifyOrReturnError(delegate != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + ChipLogProgress(DataManagement, "AccessControl: initializing"); - return mDelegate.Init(); + + // delegate can never be null. This was already checked + CHIP_ERROR retval = delegate->Init(); + if (retval == CHIP_NO_ERROR) + { + mDelegate = delegate; + } + + return retval; } CHIP_ERROR AccessControl::Finish() { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); ChipLogProgress(DataManagement, "AccessControl: finishing"); - return mDelegate.Finish(); + CHIP_ERROR retval = mDelegate->Finish(); + mDelegate = nullptr; + return retval; } CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, Privilege requestPrivilege) { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + #if CHIP_PROGRESS_LOGGING { - char buf[6 * kCharsPerCatForLogging]; + constexpr size_t kMaxCatsToLog = 6; + char catLogBuf[kMaxCatsToLog * kCharsPerCatForLogging]; ChipLogProgress(DataManagement, "AccessControl: checking f=%u a=%c s=0x" ChipLogFormatX64 " t=%s c=" ChipLogFormatMEI " e=%" PRIu16 " p=%c", subjectDescriptor.fabricIndex, GetAuthModeStringForLogging(subjectDescriptor.authMode), ChipLogValueX64(subjectDescriptor.subject), - GetCatStringForLogging(buf, sizeof(buf), subjectDescriptor.cats), ChipLogValueMEI(requestPath.cluster), - requestPath.endpoint, GetPrivilegeStringForLogging(requestPrivilege)); + GetCatStringForLogging(catLogBuf, sizeof(catLogBuf), subjectDescriptor.cats), + ChipLogValueMEI(requestPath.cluster), requestPath.endpoint, GetPrivilegeStringForLogging(requestPrivilege)); } #endif // TODO(#13867): this will go away - if (mDelegate.TemporaryCheckOverride()) + if (mDelegate->TemporaryCheckOverride()) { ChipLogProgress(DataManagement, "AccessControl: temporary check override (this will go away)"); return CHIP_NO_ERROR; diff --git a/src/access/AccessControl.h b/src/access/AccessControl.h index d6f7254fa52d0b..ce31345bb0256c 100644 --- a/src/access/AccessControl.h +++ b/src/access/AccessControl.h @@ -22,6 +22,7 @@ #include "RequestPath.h" #include "SubjectDescriptor.h" +#include "lib/support/CodeUtils.h" #include namespace chip { @@ -353,19 +354,27 @@ class AccessControl AccessControl() = default; - AccessControl(Delegate & delegate) : mDelegate(delegate) {} - AccessControl(const AccessControl &) = delete; AccessControl & operator=(const AccessControl &) = delete; - ~AccessControl() { mDelegate.Release(); } + ~AccessControl() + { + // Never-initialized AccessControl instances will not have the delegate set. + if (IsInitialized()) + { + mDelegate->Release(); + } + } /** * Initialize the access control module. Must be called before first use. * - * @retval various errors, probably fatal. + * @param delegate - The delegate to use for acces control + * + * @return CHIP_NO_ERROR on success, CHIP_ERROR_INCORRECT_STATE if called more than once, + * CHIP_ERROR_INVALID_ARGUMENT if delegate is null, or other fatal error. */ - CHIP_ERROR Init(); + CHIP_ERROR Init(AccessControl::Delegate * delegate); /** * Deinitialize the access control module. Must be called when finished. @@ -373,10 +382,18 @@ class AccessControl CHIP_ERROR Finish(); // Capabilities - CHIP_ERROR GetMaxEntryCount(size_t & value) const { return mDelegate.GetMaxEntryCount(value); } + CHIP_ERROR GetMaxEntryCount(size_t & value) const + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->GetMaxEntryCount(value); + } // Actualities - CHIP_ERROR GetEntryCount(size_t & value) const { return mDelegate.GetEntryCount(value); } + CHIP_ERROR GetEntryCount(size_t & value) const + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->GetEntryCount(value); + } /** * Prepares an entry. @@ -385,7 +402,11 @@ class AccessControl * * @param [in] entry Entry to prepare. */ - CHIP_ERROR PrepareEntry(Entry & entry) { return mDelegate.PrepareEntry(entry); } + CHIP_ERROR PrepareEntry(Entry & entry) + { + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->PrepareEntry(entry); + } /** * Creates an entry in the access control list. @@ -397,7 +418,8 @@ class AccessControl CHIP_ERROR CreateEntry(size_t * index, const Entry & entry, FabricIndex * fabricIndex = nullptr) { ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); - return mDelegate.CreateEntry(index, entry, fabricIndex); + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->CreateEntry(index, entry, fabricIndex); } /** @@ -409,7 +431,8 @@ class AccessControl */ CHIP_ERROR ReadEntry(size_t index, Entry & entry, const FabricIndex * fabricIndex = nullptr) const { - return mDelegate.ReadEntry(index, entry, fabricIndex); + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->ReadEntry(index, entry, fabricIndex); } /** @@ -422,7 +445,8 @@ class AccessControl CHIP_ERROR UpdateEntry(size_t index, const Entry & entry, const FabricIndex * fabricIndex = nullptr) { ReturnErrorCodeIf(!IsValid(entry), CHIP_ERROR_INVALID_ARGUMENT); - return mDelegate.UpdateEntry(index, entry, fabricIndex); + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->UpdateEntry(index, entry, fabricIndex); } /** @@ -433,7 +457,8 @@ class AccessControl */ CHIP_ERROR DeleteEntry(size_t index, const FabricIndex * fabricIndex = nullptr) { - return mDelegate.DeleteEntry(index, fabricIndex); + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->DeleteEntry(index, fabricIndex); } /** @@ -444,7 +469,8 @@ class AccessControl */ CHIP_ERROR Entries(EntryIterator & iterator, const FabricIndex * fabricIndex = nullptr) const { - return mDelegate.Entries(iterator, fabricIndex); + VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + return mDelegate->Entries(iterator, fabricIndex); } /** @@ -458,10 +484,11 @@ class AccessControl CHIP_ERROR Check(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, Privilege requestPrivilege); private: + bool IsInitialized() const { return (mDelegate != nullptr); } + bool IsValid(const Entry & entry); - static Delegate mDefaultDelegate; - Delegate & mDelegate = mDefaultDelegate; + Delegate * mDelegate = nullptr; }; /** diff --git a/src/access/examples/ExampleAccessControlDelegate.cpp b/src/access/examples/ExampleAccessControlDelegate.cpp index 53a83edbea48ad..95c659a493c155 100644 --- a/src/access/examples/ExampleAccessControlDelegate.cpp +++ b/src/access/examples/ExampleAccessControlDelegate.cpp @@ -1310,11 +1310,11 @@ namespace chip { namespace Access { namespace Examples { -AccessControl::Delegate & GetAccessControlDelegate(PersistentStorageDelegate * storageDelegate) +AccessControl::Delegate * GetAccessControlDelegate(PersistentStorageDelegate * storageDelegate) { static AccessControlDelegate accessControlDelegate; accessControlDelegate.SetStorageDelegate(storageDelegate); - return accessControlDelegate; + return &accessControlDelegate; } } // namespace Examples diff --git a/src/access/examples/ExampleAccessControlDelegate.h b/src/access/examples/ExampleAccessControlDelegate.h index a6d095905e027c..add53e3114e5d8 100644 --- a/src/access/examples/ExampleAccessControlDelegate.h +++ b/src/access/examples/ExampleAccessControlDelegate.h @@ -30,9 +30,9 @@ namespace Examples { * not manage lifecycle considerations. * * @param storageDelegate Storage instance to access persisted ACL data. - * @return a reference to the AccessControl::Delegate singleton. + * @return a pointer to the AccessControl::Delegate singleton. */ -AccessControl::Delegate & GetAccessControlDelegate(PersistentStorageDelegate * storageDelegate); +AccessControl::Delegate * GetAccessControlDelegate(PersistentStorageDelegate * storageDelegate); } // namespace Examples } // namespace Access diff --git a/src/access/examples/PermissiveAccessControlDelegate.cpp b/src/access/examples/PermissiveAccessControlDelegate.cpp index 3ce22908e2ec9f..ddee48a9f48e48 100644 --- a/src/access/examples/PermissiveAccessControlDelegate.cpp +++ b/src/access/examples/PermissiveAccessControlDelegate.cpp @@ -69,10 +69,10 @@ namespace chip { namespace Access { namespace Examples { -AccessControl::Delegate & GetPermissiveAccessControlDelegate() +AccessControl::Delegate * GetPermissiveAccessControlDelegate() { static AccessControlDelegate accessControlDelegate; - return accessControlDelegate; + return &accessControlDelegate; } } // namespace Examples diff --git a/src/access/examples/PermissiveAccessControlDelegate.h b/src/access/examples/PermissiveAccessControlDelegate.h index bea5f24e616d07..0734e38ff61fe7 100644 --- a/src/access/examples/PermissiveAccessControlDelegate.h +++ b/src/access/examples/PermissiveAccessControlDelegate.h @@ -22,7 +22,7 @@ namespace chip { namespace Access { namespace Examples { -AccessControl::Delegate & GetPermissiveAccessControlDelegate(); +AccessControl::Delegate * GetPermissiveAccessControlDelegate(); } // namespace Examples } // namespace Access diff --git a/src/access/tests/TestAccessControl.cpp b/src/access/tests/TestAccessControl.cpp index 4b180b91f8e86f..da1000aa41902c 100644 --- a/src/access/tests/TestAccessControl.cpp +++ b/src/access/tests/TestAccessControl.cpp @@ -33,7 +33,7 @@ using Entry = AccessControl::Entry; using EntryIterator = AccessControl::EntryIterator; using Target = Entry::Target; -AccessControl accessControl(Examples::GetAccessControlDelegate(nullptr)); +AccessControl accessControl; constexpr ClusterId kOnOffCluster = 0x0000'0006; constexpr ClusterId kLevelControlCluster = 0x0000'0008; @@ -2133,8 +2133,9 @@ void TestUpdateEntry(nlTestSuite * inSuite, void * inContext) int Setup(void * inContext) { + AccessControl::Delegate * delegate = Examples::GetAccessControlDelegate(nullptr); SetAccessControl(accessControl); - GetAccessControl().Init(); + VerifyOrDie(GetAccessControl().Init(delegate) == CHIP_NO_ERROR); return SUCCESS; } diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index c1d5da11a95653..0c755679559874 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -107,12 +107,14 @@ Server::Server() : .devicePool = &mDevicePool, .dnsResolver = nullptr, }), - mGroupsProvider(mDeviceStorage), mAccessControl(Access::Examples::GetAccessControlDelegate(&mDeviceStorage)) + mGroupsProvider(mDeviceStorage) {} CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint16_t unsecureServicePort, Inet::InterfaceId interfaceId) { + Access::AccessControl::Delegate * accessDelegate = nullptr; + mSecuredServicePort = secureServicePort; mUnsecuredServicePort = unsecureServicePort; mInterfaceId = interfaceId; @@ -145,7 +147,10 @@ CHIP_ERROR Server::Init(AppDelegate * delegate, uint16_t secureServicePort, uint SetGroupDataProvider(&mGroupsProvider); // Access control must be initialized after mDeviceStorage. - err = mAccessControl.Init(); + accessDelegate = Access::Examples::GetAccessControlDelegate(&mDeviceStorage); + VerifyOrExit(accessDelegate != nullptr, ChipLogError(AppServer, "Invalid access delegate found.")); + + err = mAccessControl.Init(accessDelegate); SuccessOrExit(err); Access::SetAccessControl(mAccessControl); diff --git a/src/app/tests/AppTestContext.cpp b/src/app/tests/AppTestContext.cpp index 817122c02f51ea..8fed737f995ff5 100644 --- a/src/app/tests/AppTestContext.cpp +++ b/src/app/tests/AppTestContext.cpp @@ -24,7 +24,7 @@ namespace { -chip::Access::AccessControl permissiveAccessControl(chip::Access::Examples::GetPermissiveAccessControlDelegate()); +chip::Access::AccessControl gPermissiveAccessControl; } // namespace @@ -36,8 +36,8 @@ CHIP_ERROR AppContext::Init() ReturnErrorOnFailure(Super::Init()); ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->Init(&GetExchangeManager())); - Access::SetAccessControl(permissiveAccessControl); - ReturnErrorOnFailure(Access::GetAccessControl().Init()); + Access::SetAccessControl(gPermissiveAccessControl); + ReturnErrorOnFailure(Access::GetAccessControl().Init(chip::Access::Examples::GetPermissiveAccessControlDelegate())); return CHIP_NO_ERROR; } From 8aa854c88fd9ce93487683768580b59558b3d8f0 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 10 Mar 2022 21:19:46 -0500 Subject: [PATCH 38/43] Fix code generation for Darwin tests. (#16084) This is temporary until we remove this code in favor of chip-tool-darwin, but for now we need to be regenerating code that we run, so it does not get out of sync with the XML. --- .../templates/CHIPTestClustersObjc-src.zapt | 2 +- .../Framework/CHIP/CHIPCallbackBridge_internal.h | 1 + src/darwin/Framework/CHIP/templates/templates.json | 10 ++++++++++ .../CHIP/zap-generated/CHIPTestClustersObjc.mm | 1 + .../zap-generated/cluster/CHIPTestClustersObjc.mm | 2 +- 5 files changed, 14 insertions(+), 2 deletions(-) create mode 120000 src/darwin/Framework/CHIP/CHIPCallbackBridge_internal.h diff --git a/examples/chip-tool-darwin/templates/CHIPTestClustersObjc-src.zapt b/examples/chip-tool-darwin/templates/CHIPTestClustersObjc-src.zapt index bfe2b051368e38..a535be1a73dfd3 100644 --- a/examples/chip-tool-darwin/templates/CHIPTestClustersObjc-src.zapt +++ b/examples/chip-tool-darwin/templates/CHIPTestClustersObjc-src.zapt @@ -3,7 +3,7 @@ #import #import -#import "CHIP/zap-generated/CHIPCallbackBridge_internal.h" +#import "CHIPCallbackBridge_internal.h" #import "CHIPCluster_internal.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" diff --git a/src/darwin/Framework/CHIP/CHIPCallbackBridge_internal.h b/src/darwin/Framework/CHIP/CHIPCallbackBridge_internal.h new file mode 120000 index 00000000000000..d0d61ee275c7e8 --- /dev/null +++ b/src/darwin/Framework/CHIP/CHIPCallbackBridge_internal.h @@ -0,0 +1 @@ +zap-generated/CHIPCallbackBridge_internal.h \ No newline at end of file diff --git a/src/darwin/Framework/CHIP/templates/templates.json b/src/darwin/Framework/CHIP/templates/templates.json index 3d32aa2cedca30..558e579e28e24a 100644 --- a/src/darwin/Framework/CHIP/templates/templates.json +++ b/src/darwin/Framework/CHIP/templates/templates.json @@ -87,6 +87,16 @@ "name": "Objc reflections of CHIP command payloads header", "output": "src/darwin/Framework/CHIP/zap-generated/CHIPCommandPayloadsObjc.mm" }, + { + "path": "../../../../../examples/chip-tool-darwin/templates/CHIPTestClustersObjc.zapt", + "name": "Test Objc API Header", + "output": "src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.h" + }, + { + "path": "../../../../../examples/chip-tool-darwin/templates/CHIPTestClustersObjc-src.zapt", + "name": "Test Objc API", + "output": "src/darwin/Framework/CHIP/zap-generated//CHIPTestClustersObjc.mm" + }, { "path": "CHIPAttributeTLVValueDecoder-src.zapt", "name": "Decode TLV attribute values into Objc objects", diff --git a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm index 28b624000f7f38..73e16e163c828f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/CHIPTestClustersObjc.mm @@ -16,6 +16,7 @@ */ // THIS FILE IS GENERATED BY ZAP +#import #import #import "CHIPCallbackBridge_internal.h" diff --git a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm index 975f3b2aac1760..73e16e163c828f 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm +++ b/zzz_generated/chip-tool-darwin/zap-generated/cluster/CHIPTestClustersObjc.mm @@ -19,7 +19,7 @@ #import #import -#import "CHIP/zap-generated/CHIPCallbackBridge_internal.h" +#import "CHIPCallbackBridge_internal.h" #import "CHIPCluster_internal.h" #import "CHIPDevice.h" #import "CHIPDevice_Internal.h" From d14d8bde10bf5461b03638ac61ac2619756c8c58 Mon Sep 17 00:00:00 2001 From: Sharad Binjola <31142146+sharadb-amazon@users.noreply.github.com> Date: Thu, 10 Mar 2022 18:29:12 -0800 Subject: [PATCH 39/43] Enabled Descriptor, OnOff and LevelControl cluster clients for tv-casting-app. (#16081) * Enabled client for Descriptor, OnOff, LevelControl for tv-casting-app * Regen tv-casting-app zzz files --- .../tv-casting-common/tv-casting-app.matter | 139 +++++++++++++++ .../tv-casting-common/tv-casting-app.zap | 160 +++++++++--------- .../zap-generated/CHIPClientCallbacks.h | 17 ++ .../zap-generated/CHIPClusters.h | 21 +++ .../PluginApplicationCallbacks.h | 3 + .../zap-generated/endpoint_config.h | 37 +++- .../tv-casting-app/zap-generated/gen_config.h | 15 ++ 7 files changed, 311 insertions(+), 81 deletions(-) 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 index 5c9013a55970a1..9dc39d2c85a8b0 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -667,6 +667,19 @@ client cluster ContentLauncher = 1290 { command LaunchURL(LaunchURLRequest): LaunchResponse = 1; } +client cluster Descriptor = 29 { + struct DeviceType { + DEVTYPE_ID type = 0; + INT16U revision = 1; + } + + readonly attribute DeviceType deviceList[] = 0; + readonly attribute CLUSTER_ID serverList[] = 1; + readonly attribute CLUSTER_ID clientList[] = 2; + readonly attribute ENDPOINT_NO partsList[] = 3; + readonly global attribute int16u clusterRevision = 65533; +} + server cluster Descriptor = 29 { struct DeviceType { DEVTYPE_ID type = 0; @@ -1674,6 +1687,92 @@ client cluster KeypadInput = 1289 { command SendKey(SendKeyRequest): SendKeyResponse = 0; } +client cluster LevelControl = 8 { + enum MoveMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + enum StepMode : ENUM8 { + kUp = 0; + kDown = 1; + } + + bitmap LevelControlFeature : BITMAP32 { + kOnOff = 0x1; + kLighting = 0x2; + kFrequency = 0x4; + } + + readonly attribute int8u currentLevel = 0; + readonly attribute int16u remainingTime = 1; + readonly attribute int8u minLevel = 2; + readonly attribute int8u maxLevel = 3; + readonly attribute int16u currentFrequency = 4; + readonly attribute int16u minFrequency = 5; + readonly attribute int16u maxFrequency = 6; + attribute bitmap8 options = 15; + attribute int16u onOffTransitionTime = 16; + attribute nullable int8u onLevel = 17; + attribute nullable int16u onTransitionTime = 18; + attribute nullable int16u offTransitionTime = 19; + attribute nullable int8u defaultMoveRate = 20; + attribute nullable int8u startUpCurrentLevel = 16384; + readonly global attribute 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 LevelControl = 8 { enum MoveMode : ENUM8 { kUp = 0; @@ -2052,6 +2151,43 @@ server cluster OccupancySensing = 1030 { readonly global attribute 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; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + bitmap OnOffFeature : BITMAP32 { + kLighting = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute int16u clusterRevision = 65533; + + command Off(): DefaultSuccess = 0; + command On(): DefaultSuccess = 1; + command Toggle(): DefaultSuccess = 2; +} + server cluster OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : enum8 { kFadeToOffIn0p8Seconds = 0; @@ -2943,6 +3079,7 @@ endpoint 1 { binding cluster Channel; server cluster ColorControl; binding cluster ContentLauncher; + binding cluster Descriptor; server cluster Descriptor; server cluster DoorLock; server cluster FixedLabel; @@ -2951,9 +3088,11 @@ endpoint 1 { server cluster IasZone; server cluster Identify; binding cluster KeypadInput; + binding cluster LevelControl; server cluster LevelControl; binding cluster MediaInput; binding cluster MediaPlayback; + binding cluster OnOff; server cluster OnOff; server cluster PressureMeasurement; server cluster RelativeHumidityMeasurement; 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 c14ceb4ad5e06d..cae2eb0493e534 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 @@ -854,7 +854,8 @@ "define": "BINDING_CLUSTER", "side": "client", "enabled": 0, - "commands": [] + "commands": [], + "attributes": [] }, { "name": "Binding", @@ -866,7 +867,7 @@ "commands": [], "attributes": [ { - "name": "binding list", + "name": "Binding", "code": 0, "mfgCode": null, "side": "server", @@ -875,7 +876,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -1929,7 +1930,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4222,7 +4223,7 @@ "reportableChange": 0 }, { - "name": "fabrics list", + "name": "Fabrics", "code": 1, "mfgCode": null, "side": "server", @@ -4349,12 +4350,12 @@ "commands": [], "attributes": [ { - "name": "groupKeyMap", + "name": "GroupKeyMap", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4364,12 +4365,12 @@ "reportableChange": 0 }, { - "name": "groupTable", + "name": "GroupTable", "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6707,7 +6708,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6722,7 +6723,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -6737,7 +6738,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -7252,7 +7253,7 @@ "mfgCode": null, "define": "ON_OFF_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "Off", @@ -7419,7 +7420,7 @@ "mfgCode": null, "define": "LEVEL_CONTROL_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "MoveToLevel", @@ -7858,7 +7859,7 @@ "mfgCode": null, "define": "DESCRIPTOR_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [], "attributes": [ { @@ -8000,7 +8001,7 @@ "commands": [], "attributes": [ { - "name": "binding list", + "name": "Binding", "code": 0, "mfgCode": null, "side": "server", @@ -8009,7 +8010,7 @@ "singleton": 0, "bounded": 0, "defaultValue": "", - "reportable": 0, + "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 @@ -8865,12 +8866,12 @@ "commands": [], "attributes": [ { - "name": "groupKeyMap", + "name": "GroupKeyMap", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8880,12 +8881,12 @@ "reportableChange": 0 }, { - "name": "groupTable", + "name": "GroupTable", "code": 1, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -8952,7 +8953,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12047,7 +12048,7 @@ "commands": [], "attributes": [ { - "name": "wake on lan mac address", + "name": "MACAddress", "code": 0, "mfgCode": null, "side": "server", @@ -12087,7 +12088,7 @@ "enabled": 1, "commands": [ { - "name": "ChangeChannelRequest", + "name": "ChangeChannel", "code": 0, "mfgCode": null, "source": "client", @@ -12095,7 +12096,7 @@ "outgoing": 1 }, { - "name": "ChangeChannelByNumberRequest", + "name": "ChangeChannelByNumber", "code": 2, "mfgCode": null, "source": "client", @@ -12103,7 +12104,7 @@ "outgoing": 1 }, { - "name": "SkipChannelRequest", + "name": "SkipChannel", "code": 3, "mfgCode": null, "source": "client", @@ -12154,12 +12155,12 @@ "commands": [], "attributes": [ { - "name": "channel list", + "name": "ChannelList", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12169,7 +12170,7 @@ "reportableChange": 0 }, { - "name": "channel lineup", + "name": "Lineup", "code": 1, "mfgCode": null, "side": "server", @@ -12184,7 +12185,7 @@ "reportableChange": 0 }, { - "name": "current channel", + "name": "CurrentChannel", "code": 2, "mfgCode": null, "side": "server", @@ -12224,7 +12225,7 @@ "enabled": 1, "commands": [ { - "name": "NavigateTargetRequest", + "name": "NavigateTarget", "code": 0, "mfgCode": null, "source": "client", @@ -12275,12 +12276,12 @@ "commands": [], "attributes": [ { - "name": "target navigator list", + "name": "TargetList", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12315,7 +12316,7 @@ "enabled": 1, "commands": [ { - "name": "PlayRequest", + "name": "Play", "code": 0, "mfgCode": null, "source": "client", @@ -12323,7 +12324,7 @@ "outgoing": 1 }, { - "name": "PauseRequest", + "name": "Pause", "code": 1, "mfgCode": null, "source": "client", @@ -12331,7 +12332,7 @@ "outgoing": 1 }, { - "name": "StopRequest", + "name": "StopPlayback", "code": 2, "mfgCode": null, "source": "client", @@ -12339,7 +12340,7 @@ "outgoing": 1 }, { - "name": "StartOverRequest", + "name": "StartOver", "code": 3, "mfgCode": null, "source": "client", @@ -12347,7 +12348,7 @@ "outgoing": 1 }, { - "name": "PreviousRequest", + "name": "Previous", "code": 4, "mfgCode": null, "source": "client", @@ -12355,7 +12356,7 @@ "outgoing": 1 }, { - "name": "NextRequest", + "name": "Next", "code": 5, "mfgCode": null, "source": "client", @@ -12363,7 +12364,7 @@ "outgoing": 1 }, { - "name": "RewindRequest", + "name": "Rewind", "code": 6, "mfgCode": null, "source": "client", @@ -12371,7 +12372,7 @@ "outgoing": 1 }, { - "name": "FastForwardRequest", + "name": "FastForward", "code": 7, "mfgCode": null, "source": "client", @@ -12379,7 +12380,7 @@ "outgoing": 1 }, { - "name": "SkipForwardRequest", + "name": "SkipForward", "code": 8, "mfgCode": null, "source": "client", @@ -12387,7 +12388,7 @@ "outgoing": 1 }, { - "name": "SkipBackwardRequest", + "name": "SkipBackward", "code": 9, "mfgCode": null, "source": "client", @@ -12395,7 +12396,7 @@ "outgoing": 1 }, { - "name": "SeekRequest", + "name": "Seek", "code": 11, "mfgCode": null, "source": "client", @@ -12471,7 +12472,7 @@ "enabled": 1, "commands": [ { - "name": "SelectInputRequest", + "name": "SelectInput", "code": 0, "mfgCode": null, "source": "client", @@ -12479,7 +12480,7 @@ "outgoing": 1 }, { - "name": "ShowInputStatusRequest", + "name": "ShowInputStatus", "code": 1, "mfgCode": null, "source": "client", @@ -12487,7 +12488,7 @@ "outgoing": 1 }, { - "name": "HideInputStatusRequest", + "name": "HideInputStatus", "code": 2, "mfgCode": null, "source": "client", @@ -12495,7 +12496,7 @@ "outgoing": 1 }, { - "name": "RenameInputRequest", + "name": "RenameInput", "code": 3, "mfgCode": null, "source": "client", @@ -12546,12 +12547,12 @@ "commands": [], "attributes": [ { - "name": "media input list", + "name": "InputList", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12586,7 +12587,7 @@ "enabled": 1, "commands": [ { - "name": "SendKeyRequest", + "name": "SendKey", "code": 0, "mfgCode": null, "source": "client", @@ -12662,7 +12663,7 @@ "enabled": 1, "commands": [ { - "name": "LaunchContentRequest", + "name": "LaunchContent", "code": 0, "mfgCode": null, "source": "client", @@ -12670,7 +12671,7 @@ "outgoing": 1 }, { - "name": "LaunchURLRequest", + "name": "LaunchURL", "code": 1, "mfgCode": null, "source": "client", @@ -12721,12 +12722,12 @@ "commands": [], "attributes": [ { - "name": "accept header list", + "name": "AcceptHeader", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12736,7 +12737,7 @@ "reportableChange": 0 }, { - "name": "supported streaming protocols", + "name": "SupportedStreamingProtocols", "code": 1, "mfgCode": null, "side": "server", @@ -12776,7 +12777,7 @@ "enabled": 1, "commands": [ { - "name": "SelectOutputRequest", + "name": "SelectOutput", "code": 0, "mfgCode": null, "source": "client", @@ -12784,7 +12785,7 @@ "outgoing": 1 }, { - "name": "RenameOutputRequest", + "name": "RenameOutput", "code": 1, "mfgCode": null, "source": "client", @@ -12835,12 +12836,12 @@ "commands": [], "attributes": [ { - "name": "audio output list", + "name": "OutputList", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -12875,7 +12876,7 @@ "enabled": 1, "commands": [ { - "name": "LaunchAppRequest", + "name": "LaunchApp", "code": 0, "mfgCode": null, "source": "client", @@ -12883,7 +12884,7 @@ "outgoing": 1 }, { - "name": "StopAppRequest", + "name": "StopApp", "code": 1, "mfgCode": null, "source": "client", @@ -12891,7 +12892,7 @@ "outgoing": 1 }, { - "name": "HideAppRequest", + "name": "HideApp", "code": 2, "mfgCode": null, "source": "client", @@ -12942,12 +12943,12 @@ "commands": [], "attributes": [ { - "name": "application launcher list", + "name": "CatalogList", "code": 0, "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13024,7 +13025,7 @@ "commands": [], "attributes": [ { - "name": "vendor name", + "name": "VendorName", "code": 0, "mfgCode": null, "side": "server", @@ -13039,7 +13040,7 @@ "reportableChange": 0 }, { - "name": "vendor id", + "name": "VendorID", "code": 1, "mfgCode": null, "side": "server", @@ -13054,7 +13055,7 @@ "reportableChange": 0 }, { - "name": "application name", + "name": "ApplicationName", "code": 2, "mfgCode": null, "side": "server", @@ -13069,7 +13070,7 @@ "reportableChange": 0 }, { - "name": "product id", + "name": "ProductID", "code": 3, "mfgCode": null, "side": "server", @@ -13084,7 +13085,7 @@ "reportableChange": 0 }, { - "name": "application status", + "name": "Status", "code": 5, "mfgCode": null, "side": "server", @@ -13099,7 +13100,7 @@ "reportableChange": 0 }, { - "name": "application version", + "name": "ApplicationVersion", "code": 6, "mfgCode": null, "side": "server", @@ -13139,7 +13140,7 @@ "enabled": 1, "commands": [ { - "name": "GetSetupPINRequest", + "name": "GetSetupPIN", "code": 0, "mfgCode": null, "source": "client", @@ -13147,7 +13148,7 @@ "outgoing": 1 }, { - "name": "LoginRequest", + "name": "Login", "code": 2, "mfgCode": null, "source": "client", @@ -13155,7 +13156,7 @@ "outgoing": 1 }, { - "name": "LogoutRequest", + "name": "Logout", "code": 3, "mfgCode": null, "source": "client", @@ -13529,7 +13530,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13544,7 +13545,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -13559,7 +13560,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -16667,5 +16668,6 @@ "endpointVersion": 1, "deviceIdentifier": 263 } - ] -} + ], + "log": [] +} \ No newline at end of file diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h index bd1f8a287dfb1b..91e0a3d72f8f48 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClientCallbacks.h @@ -51,6 +51,23 @@ void ContentLauncherClusterAcceptHeaderListAttributeFilter(chip::TLV::TLVReader chip::Callback::Cancelable * onFailureCallback); typedef void (*ContentLauncherAcceptHeaderListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); +void DescriptorClusterDeviceListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DescriptorDeviceListListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +void DescriptorClusterServerListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DescriptorServerListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void DescriptorClusterClientListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DescriptorClientListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); +void DescriptorClusterPartsListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, + chip::Callback::Cancelable * onFailureCallback); +typedef void (*DescriptorPartsListListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); void MediaInputClusterInputListListAttributeFilter(chip::TLV::TLVReader * data, chip::Callback::Cancelable * onSuccessCallback, chip::Callback::Cancelable * onFailureCallback); typedef void (*MediaInputInputListListAttributeCallback)( diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h index 08eb57afb372b9..028b5bee73925f 100644 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-casting-app/zap-generated/CHIPClusters.h @@ -72,6 +72,13 @@ class DLL_EXPORT ContentLauncherCluster : public ClusterBase ~ContentLauncherCluster() {} }; +class DLL_EXPORT DescriptorCluster : public ClusterBase +{ +public: + DescriptorCluster() : ClusterBase(app::Clusters::Descriptor::Id) {} + ~DescriptorCluster() {} +}; + class DLL_EXPORT KeypadInputCluster : public ClusterBase { public: @@ -79,6 +86,13 @@ class DLL_EXPORT KeypadInputCluster : public ClusterBase ~KeypadInputCluster() {} }; +class DLL_EXPORT LevelControlCluster : public ClusterBase +{ +public: + LevelControlCluster() : ClusterBase(app::Clusters::LevelControl::Id) {} + ~LevelControlCluster() {} +}; + class DLL_EXPORT MediaInputCluster : public ClusterBase { public: @@ -93,6 +107,13 @@ class DLL_EXPORT MediaPlaybackCluster : public ClusterBase ~MediaPlaybackCluster() {} }; +class DLL_EXPORT OnOffCluster : public ClusterBase +{ +public: + OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + ~OnOffCluster() {} +}; + class DLL_EXPORT TargetNavigatorCluster : public ClusterBase { public: diff --git a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h index 54bdd962cede6c..ceb5898617a5da 100644 --- a/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/tv-casting-app/zap-generated/PluginApplicationCallbacks.h @@ -35,6 +35,7 @@ MatterChannelPluginClientInitCallback(); \ MatterColorControlPluginServerInitCallback(); \ MatterContentLauncherPluginClientInitCallback(); \ + MatterDescriptorPluginClientInitCallback(); \ MatterDescriptorPluginServerInitCallback(); \ MatterDiagnosticLogsPluginServerInitCallback(); \ MatterDoorLockPluginServerInitCallback(); \ @@ -48,6 +49,7 @@ MatterIasZonePluginServerInitCallback(); \ MatterIdentifyPluginServerInitCallback(); \ MatterKeypadInputPluginClientInitCallback(); \ + MatterLevelControlPluginClientInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ MatterLocalizationConfigurationPluginServerInitCallback(); \ MatterMediaInputPluginClientInitCallback(); \ @@ -55,6 +57,7 @@ MatterNetworkCommissioningPluginServerInitCallback(); \ MatterOtaSoftwareUpdateProviderPluginServerInitCallback(); \ MatterOccupancySensingPluginServerInitCallback(); \ + MatterOnOffPluginClientInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ MatterPressureMeasurementPluginServerInitCallback(); \ 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 621626fac2e3de..ee9f8390cf7c48 100644 --- a/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/endpoint_config.h @@ -1507,7 +1507,7 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 57 +#define GENERATED_CLUSTER_COUNT 60 // clang-format off #define GENERATED_CLUSTERS { \ @@ -1786,6 +1786,17 @@ .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 67 ) ,\ .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 75 ) ,\ },\ + { \ + /* Endpoint: 1, Cluster: On/Off (client) */ \ + .clusterId = 0x00000006, \ + .attributes = ZAP_ATTRIBUTE_INDEX(195), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ @@ -1797,6 +1808,17 @@ .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ .serverGeneratedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Level Control (client) */ \ + .clusterId = 0x00000008, \ + .attributes = ZAP_ATTRIBUTE_INDEX(202), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ @@ -1819,6 +1841,17 @@ .clientGeneratedCommandList = nullptr ,\ .serverGeneratedCommandList = nullptr ,\ },\ + { \ + /* Endpoint: 1, Cluster: Descriptor (client) */ \ + .clusterId = 0x0000001D, \ + .attributes = ZAP_ATTRIBUTE_INDEX(221), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: Descriptor (server) */ \ .clusterId = 0x0000001D, \ @@ -2149,7 +2182,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 587 }, { ZAP_CLUSTER_INDEX(22), 32, 1649 }, { ZAP_CLUSTER_INDEX(54), 3, 8 }, \ + { ZAP_CLUSTER_INDEX(0), 22, 587 }, { ZAP_CLUSTER_INDEX(22), 35, 1649 }, { ZAP_CLUSTER_INDEX(57), 3, 8 }, \ } // Largest attribute size is needed for various buffers 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 bed8fcb541c401..7e5af32e33cf74 100644 --- a/zzz_generated/tv-casting-app/zap-generated/gen_config.h +++ b/zzz_generated/tv-casting-app/zap-generated/gen_config.h @@ -42,6 +42,7 @@ #define EMBER_AF_CHANNEL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_CONTENT_LAUNCH_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_DESCRIPTOR_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_DESCRIPTOR_CLUSTER_SERVER_ENDPOINT_COUNT (3) #define EMBER_AF_DIAGNOSTIC_LOGS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -55,6 +56,7 @@ #define EMBER_AF_IAS_ZONE_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_KEYPAD_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) +#define EMBER_AF_LEVEL_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LOCALIZATION_CONFIGURATION_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_MEDIA_INPUT_CLUSTER_CLIENT_ENDPOINT_COUNT (1) @@ -62,6 +64,7 @@ #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OTA_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_OCCUPANCY_SENSING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_PRESSURE_MEASUREMENT_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -146,6 +149,10 @@ #define ZCL_USING_CONTENT_LAUNCH_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_CONTENT_LAUNCHER_CLIENT +// Use this macro to check if the client side of the Descriptor cluster is included +#define ZCL_USING_DESCRIPTOR_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_DESCRIPTOR_CLIENT + // Use this macro to check if the server side of the Descriptor cluster is included #define ZCL_USING_DESCRIPTOR_CLUSTER_SERVER #define EMBER_AF_PLUGIN_DESCRIPTOR_SERVER @@ -212,6 +219,10 @@ #define ZCL_USING_KEYPAD_INPUT_CLUSTER_CLIENT #define EMBER_AF_PLUGIN_KEYPAD_INPUT_CLIENT +// Use this macro to check if the client side of the Level Control cluster is included +#define ZCL_USING_LEVEL_CONTROL_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_LEVEL_CONTROL_CLIENT + // Use this macro to check if the server side of the Level Control cluster is included #define ZCL_USING_LEVEL_CONTROL_CLUSTER_SERVER #define EMBER_AF_PLUGIN_LEVEL_CONTROL_SERVER @@ -249,6 +260,10 @@ #define EMBER_AF_PLUGIN_OCCUPANCY_SENSING_SERVER #define EMBER_AF_PLUGIN_OCCUPANCY_SENSING +// Use this macro to check if the client side of the On/Off cluster is included +#define ZCL_USING_ON_OFF_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_ON_OFF_CLIENT + // Use this macro to check if the server side of the On/Off cluster is included #define ZCL_USING_ON_OFF_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ON_OFF_SERVER From 10b80469620329c204a3c59d380d14fc3e7a3bb6 Mon Sep 17 00:00:00 2001 From: Wang Qixiang <43193572+wqx6@users.noreply.github.com> Date: Fri, 11 Mar 2022 13:43:00 +0800 Subject: [PATCH 40/43] Remove example connection option from menuconfig (#15955) --- examples/all-clusters-app/esp32/CMakeLists.txt | 2 +- examples/lighting-app/esp32/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/all-clusters-app/esp32/CMakeLists.txt b/examples/all-clusters-app/esp32/CMakeLists.txt index a29f5a5ad7f3ae..364f7720ef4336 100644 --- a/examples/all-clusters-app/esp32/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/CMakeLists.txt @@ -23,7 +23,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../../common/cmake/idf_flashing.cmake) set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" "${CMAKE_CURRENT_LIST_DIR}/../../common/QRCode" - "${IDF_PATH}/examples/common_components" + "${IDF_PATH}/examples/common_components/led_strip" ) if(${IDF_TARGET} STREQUAL "esp32") list(APPEND EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/../../common/m5stack-tft/repo/components/tft" diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index ad0a3a7b2b9294..dc191ad5659908 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -23,7 +23,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../../common/cmake/idf_flashing.cmake) set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" "${CMAKE_CURRENT_LIST_DIR}/../../common/QRCode" - "${IDF_PATH}/examples/common_components" + "${IDF_PATH}/examples/common_components/led_strip" ) project(chip-lighting-app) From ae514b6841b36642ff3f72ae0248905855b00fcc Mon Sep 17 00:00:00 2001 From: Carol Yang Date: Thu, 10 Mar 2022 23:36:59 -0800 Subject: [PATCH 41/43] [OTA] Consolidate provider location between requestor core and driver (#16088) --- .../ExtendedOTARequestorDriver.cpp | 11 +++--- .../GenericOTARequestorDriver.cpp | 35 +++++++++---------- .../ota-requestor/GenericOTARequestorDriver.h | 3 +- .../clusters/ota-requestor/OTARequestor.cpp | 12 +++---- src/app/clusters/ota-requestor/OTARequestor.h | 7 ++-- .../ota-requestor/OTARequestorInterface.h | 8 ++--- 6 files changed, 36 insertions(+), 40 deletions(-) diff --git a/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp index cce1b2f7bbda10..ca5acb389a67a1 100644 --- a/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/ExtendedOTARequestorDriver.cpp @@ -68,15 +68,16 @@ void ExtendedOTARequestorDriver::PollUserConsentState() CHIP_ERROR ExtendedOTARequestorDriver::GetUserConsentSubject(chip::ota::UserConsentSubject & subject, const UpdateDescription & update) { - if (mLastUsedProvider.HasValue()) + Optional lastUsedProvider; + mRequestor->GetProviderLocation(lastUsedProvider); + if (lastUsedProvider.HasValue()) { - // mLastUsedProvider has the provider fabric index and endpoint id - subject.fabricIndex = mLastUsedProvider.Value().fabricIndex; - subject.providerEndpointId = mLastUsedProvider.Value().endpoint; + subject.fabricIndex = lastUsedProvider.Value().fabricIndex; + subject.providerEndpointId = lastUsedProvider.Value().endpoint; } else { - ChipLogError(SoftwareUpdate, "mLastProvider is empty"); + ChipLogError(SoftwareUpdate, "Last used provider is empty"); return CHIP_ERROR_INTERNAL; } diff --git a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp index df842d80ee4678..ebf0f1890b090d 100644 --- a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.cpp @@ -69,7 +69,7 @@ void StartDelayTimerHandler(System::Layer * systemLayer, void * appState) static_cast(appState)->SendQueryImage(); } -bool ProviderLocationsEqual(const ProviderLocation::Type & a, const ProviderLocation::Type & b) +bool GenericOTARequestorDriver::ProviderLocationsEqual(const ProviderLocationType & a, const ProviderLocationType & b) { if ((a.fabricIndex == b.fabricIndex) && (a.providerNodeID == b.providerNodeID) && (a.endpoint == b.endpoint)) { @@ -104,7 +104,7 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst { VerifyOrDie(mRequestor != nullptr); - ProviderLocation::Type providerLocation; + ProviderLocationType providerLocation; bool willTryAnotherQuery = false; switch (reason) @@ -112,28 +112,27 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst case UpdateNotFoundReason::UpToDate: willTryAnotherQuery = false; break; - case UpdateNotFoundReason::Busy: willTryAnotherQuery = true; break; - case UpdateNotFoundReason::ConnectionFailed: - case UpdateNotFoundReason::NotAvailable: + case UpdateNotFoundReason::NotAvailable: { // IMPLEMENTATION CHOICE: // This implementation schedules a query only if a different provider is available + Optional lastUsedProvider; + mRequestor->GetProviderLocation(lastUsedProvider); if ((DetermineProviderLocation(providerLocation) != true) || - (mLastUsedProvider.HasValue() && ProviderLocationsEqual(providerLocation, mLastUsedProvider.Value()))) + (lastUsedProvider.HasValue() && ProviderLocationsEqual(providerLocation, lastUsedProvider.Value()))) { willTryAnotherQuery = false; } else { willTryAnotherQuery = true; + mRequestor->SetCurrentProviderLocation(providerLocation); } - mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider.SetValue(providerLocation); break; - + } default: willTryAnotherQuery = false; break; @@ -143,6 +142,7 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst { delay = kDefaultDelayedActionTime; } + if (willTryAnotherQuery == true) { ChipLogProgress(SoftwareUpdate, "UpdateNotFound, scheduling a retry"); @@ -151,7 +151,6 @@ void GenericOTARequestorDriver::UpdateNotFound(UpdateNotFoundReason reason, Syst else { ChipLogProgress(SoftwareUpdate, "UpdateNotFound, not scheduling further retries"); - mRequestor->ClearCurrentProviderLocation(); } } @@ -259,7 +258,6 @@ void GenericOTARequestorDriver::ProcessAnnounceOTAProviders( // Point the OTARequestor to the announced provider mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider.SetValue(providerLocation); ScheduleDelayedAction(System::Clock::Seconds32(secToStart), StartDelayTimerHandler, this); } @@ -283,7 +281,7 @@ void GenericOTARequestorDriver::DefaultProviderTimerHandler(System::Layer * syst ChipLogProgress(SoftwareUpdate, "Default Provider timer handler is invoked"); // Determine which provider to query next - ProviderLocation::Type providerLocation; + ProviderLocationType providerLocation; if (DetermineProviderLocation(providerLocation) != true) { StartDefaultProviderTimer(); @@ -291,7 +289,6 @@ void GenericOTARequestorDriver::DefaultProviderTimerHandler(System::Layer * syst } mRequestor->SetCurrentProviderLocation(providerLocation); - mLastUsedProvider.SetValue(providerLocation); SendQueryImage(); } @@ -301,8 +298,6 @@ void GenericOTARequestorDriver::StartDefaultProviderTimer() ChipLogProgress(SoftwareUpdate, "Starting the Default Provider timer, timeout: %u seconds", (unsigned int) mPeriodicQueryTimeInterval); - DeviceLayer::SystemLayer().ScheduleLambda([this] { mRequestor->ClearCurrentProviderLocation(); }); - ScheduleDelayedAction( System::Clock::Seconds32(mPeriodicQueryTimeInterval), [](System::Layer *, void * context) { @@ -325,14 +320,16 @@ void GenericOTARequestorDriver::StopDefaultProviderTimer() * Returns the next available Provider location. The algorithm is to simply loop through the list of DefaultOtaProviders and return * the next value (based on the last used provider). If no suitable candidate is found, FALSE is returned. */ - -bool GenericOTARequestorDriver::DetermineProviderLocation(ProviderLocation::Type & providerLocation) +bool GenericOTARequestorDriver::DetermineProviderLocation(ProviderLocationType & providerLocation) { + Optional lastUsedProvider; + mRequestor->GetProviderLocation(lastUsedProvider); + // Iterate through the default providers list and find the last used provider. If found, return the provider after it auto iterator = mRequestor->GetDefaultOTAProviderListIterator(); - while (mLastUsedProvider.HasValue() && iterator.Next()) + while (lastUsedProvider.HasValue() && iterator.Next()) { - if (ProviderLocationsEqual(iterator.GetValue(), mLastUsedProvider.Value())) + if (ProviderLocationsEqual(iterator.GetValue(), lastUsedProvider.Value())) { if (iterator.Next()) { diff --git a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h index 3601ec9f2c1a6f..68c3fe39010506 100644 --- a/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h +++ b/src/app/clusters/ota-requestor/GenericOTARequestorDriver.h @@ -79,13 +79,12 @@ class GenericOTARequestorDriver : public OTARequestorDriver void DefaultProviderTimerHandler(System::Layer * systemLayer, void * appState); void ScheduleDelayedAction(System::Clock::Seconds32 delay, System::TimerCompleteCallback action, void * aAppState); void CancelDelayedAction(System::TimerCompleteCallback action, void * aAppState); + bool ProviderLocationsEqual(const ProviderLocationType & a, const ProviderLocationType & b); OTARequestorInterface * mRequestor = nullptr; OTAImageProcessorInterface * mImageProcessor = nullptr; uint32_t mOtaStartDelaySec = 0; uint32_t mPeriodicQueryTimeInterval = (24 * 60 * 60); // Timeout for querying providers on the default OTA provider list - - Optional mLastUsedProvider; // Provider location used for the last query or update }; } // namespace DeviceLayer diff --git a/src/app/clusters/ota-requestor/OTARequestor.cpp b/src/app/clusters/ota-requestor/OTARequestor.cpp index b1b91ff82932ba..4fbc75c0d58742 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.cpp +++ b/src/app/clusters/ota-requestor/OTARequestor.cpp @@ -264,9 +264,9 @@ EmberAfStatus OTARequestor::HandleAnnounceOTAProvider(app::CommandHandler * comm return EMBER_ZCL_STATUS_FAILURE; } - ProviderLocation::Type providerLocation = { .providerNodeID = commandData.providerNodeId, - .endpoint = commandData.endpoint, - .fabricIndex = commandObj->GetAccessingFabricIndex() }; + ProviderLocationType providerLocation = { .providerNodeID = commandData.providerNodeId, + .endpoint = commandData.endpoint, + .fabricIndex = commandObj->GetAccessingFabricIndex() }; ChipLogDetail(SoftwareUpdate, " FabricIndex: %u", providerLocation.fabricIndex); ChipLogDetail(SoftwareUpdate, " ProviderNodeID: 0x" ChipLogFormatX64, ChipLogValueX64(providerLocation.providerNodeID)); @@ -474,7 +474,7 @@ void OTARequestor::TriggerImmediateQueryInternal() // Sends the QueryImage command to the next available Provider OTARequestorInterface::OTATriggerResult OTARequestor::TriggerImmediateQuery() { - ProviderLocation::Type providerLocation; + ProviderLocationType providerLocation; if (mOtaRequestorDriver->DetermineProviderLocation(providerLocation) != true) { ChipLogError(SoftwareUpdate, "No OTA Providers available"); @@ -539,13 +539,13 @@ CHIP_ERROR OTARequestor::ClearDefaultOtaProviderList(FabricIndex fabricIndex) return mStorage->StoreDefaultProviders(mDefaultOtaProviderList); } -CHIP_ERROR OTARequestor::AddDefaultOtaProvider(const ProviderLocation::Type & providerLocation) +CHIP_ERROR OTARequestor::AddDefaultOtaProvider(const ProviderLocationType & providerLocation) { // Look for an entry with the same fabric index indicated auto iterator = mDefaultOtaProviderList.Begin(); while (iterator.Next()) { - ProviderLocation::Type pl = iterator.GetValue(); + ProviderLocationType pl = iterator.GetValue(); if (pl.GetFabricIndex() == providerLocation.GetFabricIndex()) { ChipLogError(SoftwareUpdate, "Default OTA provider entry with fabric %d already exists", pl.GetFabricIndex()); diff --git a/src/app/clusters/ota-requestor/OTARequestor.h b/src/app/clusters/ota-requestor/OTARequestor.h index 537e51d1d7aa76..4c195732c39586 100644 --- a/src/app/clusters/ota-requestor/OTARequestor.h +++ b/src/app/clusters/ota-requestor/OTARequestor.h @@ -84,11 +84,10 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe mProviderLocation.SetValue(providerLocation); } - void ClearCurrentProviderLocation() override { mProviderLocation.ClearValue(); } + void GetProviderLocation(Optional & providerLocation) override { providerLocation = mProviderLocation; } // Add a default OTA provider to the cached list - CHIP_ERROR AddDefaultOtaProvider( - const app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & providerLocation) override; + CHIP_ERROR AddDefaultOtaProvider(const ProviderLocationType & providerLocation) override; // Retrieve an iterator to the cached default OTA provider list ProviderLocationList::Iterator GetDefaultOTAProviderListIterator(void) override { return mDefaultOtaProviderList.Begin(); } @@ -313,7 +312,7 @@ class OTARequestor : public OTARequestorInterface, public BDXDownloader::StateDe OTAUpdateStateEnum mCurrentUpdateState = OTAUpdateStateEnum::kUnknown; Server * mServer = nullptr; ProviderLocationList mDefaultOtaProviderList; - Optional mProviderLocation; // Provider location used for the current update in progress + Optional mProviderLocation; // Provider location used for the current/last update in progress }; } // namespace chip diff --git a/src/app/clusters/ota-requestor/OTARequestorInterface.h b/src/app/clusters/ota-requestor/OTARequestorInterface.h index 7a946bd38d87c5..6d1bade0494442 100644 --- a/src/app/clusters/ota-requestor/OTARequestorInterface.h +++ b/src/app/clusters/ota-requestor/OTARequestorInterface.h @@ -199,12 +199,12 @@ class OTARequestorInterface // Set the provider location to be used in the next query and OTA update process virtual void SetCurrentProviderLocation(ProviderLocationType providerLocation) = 0; - // Clear the provider location to indicate that no OTA update may be in progress - virtual void ClearCurrentProviderLocation() = 0; + // If there is an OTA update in progress, returns the provider location for the current OTA update, otherwise, returns the + // provider location that was last used + virtual void GetProviderLocation(Optional & providerLocation) = 0; // Add a default OTA provider to the cached list - virtual CHIP_ERROR - AddDefaultOtaProvider(const app::Clusters::OtaSoftwareUpdateRequestor::Structs::ProviderLocation::Type & providerLocation) = 0; + virtual CHIP_ERROR AddDefaultOtaProvider(const ProviderLocationType & providerLocation) = 0; // Retrieve an iterator to the cached default OTA provider list virtual ProviderLocationList::Iterator GetDefaultOTAProviderListIterator(void) = 0; From 388b4638b4fc2be5e8402956d30b7f19046651a7 Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Fri, 11 Mar 2022 05:04:02 -0800 Subject: [PATCH 42/43] Remove extra namespace scope identifier (#16082) --- examples/all-clusters-app/esp32/main/main.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/examples/all-clusters-app/esp32/main/main.cpp b/examples/all-clusters-app/esp32/main/main.cpp index b720dd44517bc1..1078d37bbde5ff 100644 --- a/examples/all-clusters-app/esp32/main/main.cpp +++ b/examples/all-clusters-app/esp32/main/main.cpp @@ -84,10 +84,8 @@ BDXDownloader gDownloader; OTAImageProcessorImpl gImageProcessor; #endif -namespace { app::Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(0 /* Endpoint Id */, &(NetworkCommissioning::ESPWiFiDriver::GetInstance())); -} // namespace class AppCallbacks : public AppDelegate { From 86a84443c7cda19e91ad5685ec86f2e5d60bc7e3 Mon Sep 17 00:00:00 2001 From: "Josh V [Apple]" Date: Fri, 11 Mar 2022 06:31:12 -0800 Subject: [PATCH 43/43] Add missing commands and attributes for CI (#16090) * Update simulated app to include missing clusters. * Generated code. --- .../placeholder/linux/apps/app1/config.matter | 65 +++++++++++++++++++ .../placeholder/linux/apps/app1/config.zap | 56 ++++++++++------ .../app1/zap-generated/CHIPClusters.h | 7 ++ .../PluginApplicationCallbacks.h | 1 + .../app1/zap-generated/endpoint_config.h | 55 +++++++++++----- .../app1/zap-generated/gen_config.h | 5 ++ 6 files changed, 152 insertions(+), 37 deletions(-) diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index e39670fda270d1..9b8ea2a04e399c 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -9,10 +9,16 @@ client cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationBasicApplication { + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; + } + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; + readonly attribute ApplicationBasicApplication application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; @@ -30,10 +36,16 @@ server cluster ApplicationBasic = 1293 { kActiveVisibleNotFocus = 3; } + struct ApplicationBasicApplication { + INT16U catalogVendorId = 0; + CHAR_STRING applicationId = 1; + } + readonly attribute char_string<32> vendorName = 0; readonly attribute int16u vendorID = 1; readonly attribute char_string<32> applicationName = 2; readonly attribute int16u productID = 3; + readonly attribute ApplicationBasicApplication application = 4; readonly attribute ApplicationStatusEnum status = 5; readonly attribute char_string<32> applicationVersion = 6; readonly attribute vendor_id allowedVendorList[] = 7; @@ -1122,6 +1134,57 @@ server cluster NetworkCommissioning = 49 { 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; + } + + bitmap OnOffControl : BITMAP8 { + kAcceptOnlyWhenOn = 0x1; + } + + bitmap OnOffFeature : BITMAP32 { + kLighting = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute boolean globalSceneControl = 16384; + attribute int16u onTime = 16385; + attribute int16u offWaitTime = 16386; + attribute enum8 startUpOnOff = 16387; + readonly global attribute bitmap32 featureMap = 65532; + readonly global attribute 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 OnOff = 6 { enum OnOffDelayedAllOffEffectVariant : enum8 { kFadeToOffIn0p8Seconds = 0; @@ -1833,6 +1896,7 @@ endpoint 0 { binding cluster KeypadInput; server cluster KeypadInput; server cluster NetworkCommissioning; + binding cluster OnOff; server cluster OnOff; binding cluster OperationalCredentials; server cluster OperationalCredentials; @@ -1851,6 +1915,7 @@ endpoint 1 { server cluster Groups; server cluster Identify; server cluster LevelControl; + binding cluster OnOff; server cluster OnOff; server cluster Scenes; } diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index b9bf12c600a628..b4d0c4f96f9626 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -42,7 +42,7 @@ "mfgCode": null, "define": "ON_OFF_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "Off", @@ -827,7 +827,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -842,7 +842,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -857,7 +857,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -2981,7 +2981,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3011,7 +3011,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3026,7 +3026,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3041,7 +3041,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3126,7 +3126,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3141,7 +3141,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3156,7 +3156,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3249,7 +3249,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3279,7 +3279,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3294,7 +3294,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3309,7 +3309,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3430,7 +3430,21 @@ "maxInterval": 65534, "reportableChange": 0 }, - + { + "name": "Application", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "Status", "code": 5, @@ -3467,7 +3481,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3482,7 +3496,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3497,7 +3511,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -3512,7 +3526,7 @@ "mfgCode": null, "side": "server", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "", @@ -4042,7 +4056,7 @@ "mfgCode": null, "define": "ON_OFF_CLUSTER", "side": "client", - "enabled": 0, + "enabled": 1, "commands": [ { "name": "Off", diff --git a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h index c59f0704744494..4399f8c0cf0432 100644 --- a/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h +++ b/zzz_generated/placeholder/app1/zap-generated/CHIPClusters.h @@ -58,6 +58,13 @@ class DLL_EXPORT KeypadInputCluster : public ClusterBase ~KeypadInputCluster() {} }; +class DLL_EXPORT OnOffCluster : public ClusterBase +{ +public: + OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} + ~OnOffCluster() {} +}; + class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase { public: diff --git a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h index c73db0e906ef14..950bcbaf3a4f8c 100644 --- a/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h +++ b/zzz_generated/placeholder/app1/zap-generated/PluginApplicationCallbacks.h @@ -38,6 +38,7 @@ MatterKeypadInputPluginServerInitCallback(); \ MatterLevelControlPluginServerInitCallback(); \ MatterNetworkCommissioningPluginServerInitCallback(); \ + MatterOnOffPluginClientInitCallback(); \ MatterOnOffPluginServerInitCallback(); \ MatterOperationalCredentialsPluginClientInitCallback(); \ MatterOperationalCredentialsPluginServerInitCallback(); \ diff --git a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h index 10d7785531b69e..3d9e7dc00606a8 100644 --- a/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/endpoint_config.h @@ -205,7 +205,7 @@ #define ZAP_ATTRIBUTE_MASK(mask) ATTRIBUTE_MASK_##mask // This is an array of EmberAfAttributeMetadata structures. -#define GENERATED_ATTRIBUTE_COUNT 187 +#define GENERATED_ATTRIBUTE_COUNT 188 #define GENERATED_ATTRIBUTES \ { \ \ @@ -430,11 +430,12 @@ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ \ /* Endpoint: 0, Cluster: Application Basic (server) */ \ - { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ - { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ - { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ - { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ - { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Status */ \ + { 0x00000000, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* VendorName */ \ + { 0x00000001, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* VendorID */ \ + { 0x00000002, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationName */ \ + { 0x00000003, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(0x0) }, /* ProductID */ \ + { 0x00000004, ZAP_TYPE(STRUCT), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* Application */ \ + { 0x00000005, ZAP_TYPE(ENUM8), 1, 0, ZAP_SIMPLE_DEFAULT(0x01) }, /* Status */ \ { 0x00000006, ZAP_TYPE(CHAR_STRING), 33, 0, ZAP_EMPTY_DEFAULT() }, /* ApplicationVersion */ \ { 0x00000007, ZAP_TYPE(ARRAY), 0, ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE), ZAP_EMPTY_DEFAULT() }, /* AllowedVendorList */ \ { 0x0000FFFD, ZAP_TYPE(INT16U), 2, 0, ZAP_SIMPLE_DEFAULT(1) }, /* ClusterRevision */ \ @@ -718,10 +719,21 @@ // clang-format on #define ZAP_CLUSTER_MASK(mask) CLUSTER_MASK_##mask -#define GENERATED_CLUSTER_COUNT 29 +#define GENERATED_CLUSTER_COUNT 31 // clang-format off #define GENERATED_CLUSTERS { \ + { \ + /* Endpoint: 0, Cluster: On/Off (client) */ \ + .clusterId = 0x00000006, \ + .attributes = ZAP_ATTRIBUTE_INDEX(0), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 0, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ @@ -957,7 +969,7 @@ /* Endpoint: 0, Cluster: Application Basic (server) */ \ .clusterId = 0x0000050D, \ .attributes = ZAP_ATTRIBUTE_INDEX(138), \ - .attributeCount = 8, \ + .attributeCount = 9, \ .clusterSize = 106, \ .mask = ZAP_CLUSTER_MASK(SERVER), \ .functions = NULL, \ @@ -967,7 +979,7 @@ { \ /* Endpoint: 1, Cluster: Identify (server) */ \ .clusterId = 0x00000003, \ - .attributes = ZAP_ATTRIBUTE_INDEX(146), \ + .attributes = ZAP_ATTRIBUTE_INDEX(147), \ .attributeCount = 3, \ .clusterSize = 5, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION), \ @@ -978,7 +990,7 @@ { \ /* Endpoint: 1, Cluster: Groups (server) */ \ .clusterId = 0x00000004, \ - .attributes = ZAP_ATTRIBUTE_INDEX(149), \ + .attributes = ZAP_ATTRIBUTE_INDEX(150), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -989,7 +1001,7 @@ { \ /* Endpoint: 1, Cluster: Scenes (server) */ \ .clusterId = 0x00000005, \ - .attributes = ZAP_ATTRIBUTE_INDEX(151), \ + .attributes = ZAP_ATTRIBUTE_INDEX(152), \ .attributeCount = 6, \ .clusterSize = 8, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -997,10 +1009,21 @@ .clientGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 82 ) ,\ .serverGeneratedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 90 ) ,\ },\ + { \ + /* Endpoint: 1, Cluster: On/Off (client) */ \ + .clusterId = 0x00000006, \ + .attributes = ZAP_ATTRIBUTE_INDEX(158), \ + .attributeCount = 0, \ + .clusterSize = 0, \ + .mask = ZAP_CLUSTER_MASK(CLIENT), \ + .functions = NULL, \ + .clientGeneratedCommandList = nullptr ,\ + .serverGeneratedCommandList = nullptr ,\ + },\ { \ /* Endpoint: 1, Cluster: On/Off (server) */ \ .clusterId = 0x00000006, \ - .attributes = ZAP_ATTRIBUTE_INDEX(157), \ + .attributes = ZAP_ATTRIBUTE_INDEX(158), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1011,7 +1034,7 @@ { \ /* Endpoint: 1, Cluster: Level Control (server) */ \ .clusterId = 0x00000008, \ - .attributes = ZAP_ATTRIBUTE_INDEX(159), \ + .attributes = ZAP_ATTRIBUTE_INDEX(160), \ .attributeCount = 2, \ .clusterSize = 3, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1022,7 +1045,7 @@ { \ /* Endpoint: 1, Cluster: Basic (server) */ \ .clusterId = 0x00000028, \ - .attributes = ZAP_ATTRIBUTE_INDEX(161), \ + .attributes = ZAP_ATTRIBUTE_INDEX(162), \ .attributeCount = 20, \ .clusterSize = 39, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1033,7 +1056,7 @@ { \ /* Endpoint: 1, Cluster: Color Control (server) */ \ .clusterId = 0x00000300, \ - .attributes = ZAP_ATTRIBUTE_INDEX(181), \ + .attributes = ZAP_ATTRIBUTE_INDEX(182), \ .attributeCount = 6, \ .clusterSize = 11, \ .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION), \ @@ -1052,7 +1075,7 @@ // This is an array of EmberAfEndpointType structures. #define GENERATED_ENDPOINT_TYPES \ { \ - { ZAP_CLUSTER_INDEX(0), 22, 383 }, { ZAP_CLUSTER_INDEX(22), 7, 72 }, \ + { ZAP_CLUSTER_INDEX(0), 23, 383 }, { ZAP_CLUSTER_INDEX(23), 8, 72 }, \ } // Largest attribute size is needed for various buffers diff --git a/zzz_generated/placeholder/app1/zap-generated/gen_config.h b/zzz_generated/placeholder/app1/zap-generated/gen_config.h index 6ae5cf0539b8e0..9c02dfd43083ce 100644 --- a/zzz_generated/placeholder/app1/zap-generated/gen_config.h +++ b/zzz_generated/placeholder/app1/zap-generated/gen_config.h @@ -45,6 +45,7 @@ #define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1) #define EMBER_AF_NETWORK_COMMISSIONING_CLUSTER_SERVER_ENDPOINT_COUNT (1) +#define EMBER_AF_ON_OFF_CLUSTER_CLIENT_ENDPOINT_COUNT (2) #define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (2) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_CLIENT_ENDPOINT_COUNT (1) #define EMBER_AF_OPERATIONAL_CREDENTIALS_CLUSTER_SERVER_ENDPOINT_COUNT (1) @@ -143,6 +144,10 @@ #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING_SERVER #define EMBER_AF_PLUGIN_NETWORK_COMMISSIONING +// Use this macro to check if the client side of the On/Off cluster is included +#define ZCL_USING_ON_OFF_CLUSTER_CLIENT +#define EMBER_AF_PLUGIN_ON_OFF_CLIENT + // Use this macro to check if the server side of the On/Off cluster is included #define ZCL_USING_ON_OFF_CLUSTER_SERVER #define EMBER_AF_PLUGIN_ON_OFF_SERVER