From 8423257eb0ee8ede482cd0485ca5c689461305ec Mon Sep 17 00:00:00 2001 From: Nivi Sarkar <55898241+nivi-apple@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:16:46 -0700 Subject: [PATCH 1/3] =?UTF-8?q?Update=20the=20cluster=20revision=20of=20th?= =?UTF-8?q?e=20thermostat=20cluster=20to=207=20(including=E2=80=A6=20(#348?= =?UTF-8?q?90)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update the cluster revision of the thermostat cluster to 7 (including Presets feature) - Update the YAML file accordingly * Fix the PICS condition for reading Presets and schedules attribute - Disable the PICS code for Schedules feature and attribute since it is not implemented yet. * Add PICS code for schedules feature to PICS.yaml * Update the PICs code for atomic request from TSTAT.S.CFE.Rsp to TSTAT.S.Cfe.Rsp to follow convention --------- Co-authored-by: Justin Wood --- .../all-clusters-app.matter | 2 +- .../all-clusters-common/all-clusters-app.zap | 2 +- .../thermostat-common/thermostat.matter | 2 +- .../thermostat-common/thermostat.zap | 2 +- src/app/tests/suites/certification/PICS.yaml | 7 +++++-- .../certification/Test_TC_TSTAT_1_1.yaml | 2 +- .../certification/Test_TC_TSTAT_4_1.yaml | 10 ++++----- .../tests/suites/certification/ci-pics-values | 7 ++++--- src/python_testing/TC_TSTAT_4_2.py | 21 ++++++++++--------- 9 files changed, 30 insertions(+), 25 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 58bce0390915f7..46debb8a6cd363 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 @@ -9071,7 +9071,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; ram attribute featureMap default = 0x0123; - ram attribute clusterRevision default = 6; + ram attribute clusterRevision default = 7; handle command SetpointRaiseLower; handle command SetActiveScheduleRequest; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index f817d147160ef9..9a736eea56fa30 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -16918,7 +16918,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "7", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index a53e3cdc692952..c53651c537894e 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -2801,7 +2801,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x123; - ram attribute clusterRevision default = 6; + ram attribute clusterRevision default = 7; handle command SetpointRaiseLower; handle command SetActiveScheduleRequest; diff --git a/examples/thermostat/thermostat-common/thermostat.zap b/examples/thermostat/thermostat-common/thermostat.zap index 8b2fe4f5c82318..ffb9da2b136de9 100644 --- a/examples/thermostat/thermostat-common/thermostat.zap +++ b/examples/thermostat/thermostat-common/thermostat.zap @@ -5088,7 +5088,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "6", + "defaultValue": "7", "reportable": 1, "minInterval": 0, "maxInterval": 65344, diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 917429f466792a..1fc182bd9ba867 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -6525,7 +6525,7 @@ PICS: - label: "Does the device implement receiving the AtomicRequest command for Thermostat?" - id: TSTAT.S.CFE.Rsp + id: TSTAT.S.Cfe.Rsp # # server / commandsGenerated @@ -6567,6 +6567,9 @@ PICS: - label: "Supports a local temperature not exposed" id: TSTAT.S.F06 + - label: "Supports enhanced schedules" + id: TSTAT.S.F07 + - label: "Supports setpoint presets" id: TSTAT.S.F08 @@ -6616,7 +6619,7 @@ PICS: id: TSTAT.C.C06.Tx - label: "Does the device implement sending the AtomicRequest command?" - id: TSTAT.C.CFE.Tx + id: TSTAT.C.Cfe.Tx # # client / manually diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index fe6b89ae930517..789f477667010b 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -37,7 +37,7 @@ tests: command: "readAttribute" attribute: "ClusterRevision" response: - value: 6 + value: 7 constraints: type: int16u diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_4_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_4_1.yaml index aa12c7bec5e6f0..50037d682d9faa 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_4_1.yaml @@ -70,7 +70,7 @@ tests: saveAs: SchedulesValue - label: "Step 2: TH reads the PresetTypes attribute from the DUT" - PICS: TSTAT.S.F08 & TSTAT.S.A0048 + PICS: TSTAT.S.F08 && TSTAT.S.A0048 command: "readAttribute" attribute: "PresetTypes" response: @@ -78,7 +78,7 @@ tests: type: list - label: "Step 3: TH reads the NumberOfPresets attribute from the DUT" - PICS: TSTAT.S.F08 & TSTAT.S.A004a + PICS: TSTAT.S.F08 && TSTAT.S.A004a command: "readAttribute" attribute: "NumberOfPresets" response: @@ -86,7 +86,7 @@ tests: type: int8u - label: "Step 4: TH reads the ActivePresetHandle attribute from the DUT" - PICS: TSTAT.S.F08 & TSTAT.S.A004e + PICS: TSTAT.S.F08 && TSTAT.S.A004e command: "readAttribute" attribute: "ActivePresetHandle" response: @@ -94,7 +94,7 @@ tests: type: octstr - label: "Step 5: TH reads the Presets attribute from the DUT" - PICS: TSTAT.S.F08 & TSTAT.S.A0050 + PICS: TSTAT.S.F08 && TSTAT.S.A0050 command: "readAttribute" attribute: "Presets" response: @@ -102,7 +102,7 @@ tests: type: list - label: "Step 6: TH reads the Schedules attribute from the DUT" - PICS: TSTAT.S.F07 & TSTAT.S.A0051 + PICS: TSTAT.S.F07 && TSTAT.S.A0051 command: "readAttribute" attribute: "Schedules" response: diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index bedc062d553b25..f64941bb688890 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1931,6 +1931,7 @@ TSTAT.S.F03=0 TSTAT.S.F04=0 TSTAT.S.F05=1 TSTAT.S.F06=0 +TSTAT.S.F07=0 TSTAT.S.F08=1 TSTAT.S.A0000=1 @@ -1987,7 +1988,7 @@ TSTAT.S.A0048=1 TSTAT.S.A004a=1 TSTAT.S.A004e=1 TSTAT.S.A0050=1 -TSTAT.S.A0051=1 +TSTAT.S.A0051=0 TSTAT.S.M.MinSetpointDeadBandWritable=1 TSTAT.S.M.HVACSystemTypeConfigurationWritable=0 @@ -1999,7 +2000,7 @@ TSTAT.S.C02.Rsp=0 TSTAT.S.C03.Rsp=0 TSTAT.S.C04.Rsp=0 TSTAT.S.C06.Rsp=1 -TSTAT.S.CFE.Rsp=1 +TSTAT.S.Cfe.Rsp=1 TSTAT.S.CFD.Tx=1 # Client @@ -2016,7 +2017,7 @@ TSTAT.C.C03.Tx=0 TSTAT.S.C00.Tx=0 TSTAT.S.C01.Tx=0 TSTAT.C.C06.Tx=1 -TSTAT.C.CFE.Tx=1 +TSTAT.C.Cfe.Tx=1 # Client Commands TSTAT.C.C00.Tx=1 diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index 9cb7336212b1e5..2b3169af9ae3bc 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -219,6 +219,7 @@ async def test_TC_TSTAT_4_2(self): await self.write_presets(endpoint=endpoint, presets=new_presets, expected_status=Status.InvalidInState) self.step("3") + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): await self.send_atomic_request_begin_command() @@ -239,7 +240,7 @@ async def test_TC_TSTAT_4_2(self): asserts.assert_equal(presets, initial_presets, "Presets were updated which is not expected") self.step("4") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -256,7 +257,7 @@ async def test_TC_TSTAT_4_2(self): asserts.assert_equal(presets, new_presets_with_handle, "Presets were not updated which is not expected") self.step("5") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -270,7 +271,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.ConstraintError) self.step("6") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C06.Rsp") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C06.Rsp") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the SetActivePresetRequest command await self.send_set_active_preset_handle_request_command(value=b'\x03') @@ -292,7 +293,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.InvalidInState) self.step("7") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -307,7 +308,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("8") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -323,7 +324,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("9") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -339,7 +340,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("10") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -355,7 +356,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("11") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -370,7 +371,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("12") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() @@ -385,7 +386,7 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_rollback_command() self.step("13") - if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.CFE.Rsp")): + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): # Send the AtomicRequest begin command await self.send_atomic_request_begin_command() From 78d4020a890e78ac58dad5b1bf846714fb5f334c Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Thu, 8 Aug 2024 22:47:59 -0700 Subject: [PATCH 2/3] Fix CommissionNode comand alway return failure (#34898) --- .../commissioner-control-server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp index 98616f9e0e281b..25f6153959a22e 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp @@ -236,15 +236,15 @@ bool emberAfCommissionerControlClusterCommissionNodeCallback( // Set IP address and port in the CommissionNodeInfo struct commissionNodeInfo->port = commandData.port; err = commissionNodeInfo->ipAddress.SetIPAddress(commandData.ipAddress); - SuccessOrExit(err == CHIP_NO_ERROR); + SuccessOrExit(err); // Validate the commission node command. err = delegate->ValidateCommissionNodeCommand(sourceNodeId, requestId); - SuccessOrExit(err == CHIP_NO_ERROR); + SuccessOrExit(err); // Populate the parameters for the commissioning window err = delegate->GetCommissioningWindowParams(commissionNodeInfo->params); - SuccessOrExit(err == CHIP_NO_ERROR); + SuccessOrExit(err); // Add the response for the commissioning window. AddReverseOpenCommissioningWindowResponse(commandObj, commandPath, commissionNodeInfo->params); From 304df86c9300ecfdfb1e6424565867d9dc6ad359 Mon Sep 17 00:00:00 2001 From: Marius Tache <102153746+marius-alex-tache@users.noreply.github.com> Date: Fri, 9 Aug 2024 09:41:25 +0300 Subject: [PATCH 3/3] [platform] Add empty platform_base source set (#34883) * [platform] Add empty platform_base source set When cross-compiling on Windows, bootstrap would fail because of some targets that are depending on platform_base source set, which is not defined for chip_device_platform None. Signed-off-by: marius-alex-tache * Restyled by gn --------- Signed-off-by: marius-alex-tache Co-authored-by: Restyled.io --- src/platform/BUILD.gn | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/platform/BUILD.gn b/src/platform/BUILD.gn index 38becc7ede7471..fc68f13a3ab4bf 100644 --- a/src/platform/BUILD.gn +++ b/src/platform/BUILD.gn @@ -611,6 +611,9 @@ if (chip_device_platform != "none") { group("platform") { public_deps = [ ":platform_buildconfig" ] } + + source_set("platform_base") { + } } source_set("syscalls_stub") {