From fd8d616e2188ae88d9727496921777369fadac16 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Thu, 15 Aug 2024 16:05:30 +0100 Subject: [PATCH 1/5] Updated the rvc-example PICS XML files. --- .../pics/RVC Clean Mode Cluster Test Plan.xml | 66 +++-- ...VC Operational State Cluster Test Plan.xml | 92 ++++--- .../pics/RVC Run Mode Cluster Test Plan.xml | 83 +++--- .../pics/Service Area Cluster Test Plan.xml | 243 ++++++++++++++++++ 4 files changed, 377 insertions(+), 107 deletions(-) create mode 100644 examples/rvc-app/rvc-common/pics/Service Area Cluster Test Plan.xml diff --git a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml index ce0ddaa38b5307..fa0b258557745c 100644 --- a/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml +++ b/examples/rvc-app/rvc-common/pics/RVC Clean Mode Cluster Test Plan.xml @@ -1,13 +1,20 @@ - + RVC Clean Mode Cluster Test Plan @@ -16,7 +23,7 @@ Draft RVCCLEANM.S Does the device implement the RVCCLEANM cluster as a server? - 89.1. Role - allclusters.html[pdf] + 99.1. Role - allclusters.html[pdf] O true @@ -26,16 +33,14 @@ Draft PIXIT.RVCCLEANM.MODE_CHANGE_FAIL Id of mode the device will fail to transition to, given its current state - 90. PIXIT Definition - allclusters.html[pdf] - O - 0x01 + 100. PIXIT Definition - allclusters.html[pdf] + On/a PIXIT.RVCCLEANM.MODE_CHANGE_OK Id of mode the device will successfully transition to, given its current state - 90. PIXIT Definition - allclusters.html[pdf] - O - 0x01 + 100. PIXIT Definition - allclusters.html[pdf] + On/a @@ -45,31 +50,17 @@ Draft RVCCLEANM.S.A0000 Does the device implement the SupportedModes attribute? - 89.2.2. Attributes - allclusters.html[pdf] + 99.2.1. Attributes - allclusters.html[pdf] M true RVCCLEANM.S.A0001 Does the device implement the CurrentMode attribute? - 89.2.2. Attributes - allclusters.html[pdf] + 99.2.1. Attributes - allclusters.html[pdf] M true - - RVCCLEANM.S.A0002 - Does the device implement the StartUpMode attribute? - 89.2.2. Attributes - allclusters.html[pdf] - O - false - - - RVCCLEANM.S.A0003 - Does the device implement the OnMode attribute? - 89.2.2. Attributes - allclusters.html[pdf] - M - false - @@ -78,7 +69,7 @@ Draft RVCCLEANM.S.C01.Tx Does the device implement sending the ChangeToModeResponse command? - 89.2.4. Commands generated - allclusters.html[pdf] + 99.2.3. Commands generated - allclusters.html[pdf] M true @@ -88,7 +79,7 @@ Draft RVCCLEANM.S.C00.Rsp Does the device implement receiving the ChangeToMode command? - 89.2.3. Commands received - allclusters.html[pdf] + 99.2.2. Commands received - allclusters.html[pdf] M true @@ -96,9 +87,9 @@ Draft - RVCCLEANM.S.F00 - Does the device support depending on an On/Off cluster implemented on the same endpoint? - 89.2.1. Features - allclusters.html[pdf] + RVCCLEANM.S.F16 + Does the device support changing clean modes from non-Idle states? + 101.1. Features - allclusters.html[pdf] O false @@ -108,10 +99,17 @@ Draft RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE Does the DUT support testing the failed ChangeToMode command? - 89.2.5. Manual controllable - allclusters.html[pdf] + 99.2.4. Manual controllable - allclusters.html[pdf] O true + + RVCCLEANM.S.M.CAN_MANUALLY_CONTROLLED + Can the mode change be manually controlled? + 99.2.4. Manual controllable - allclusters.html[pdf] + O + false + diff --git a/examples/rvc-app/rvc-common/pics/RVC Operational State Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/RVC Operational State Cluster Test Plan.xml index c600445a35964a..59028fa95e2822 100644 --- a/examples/rvc-app/rvc-common/pics/RVC Operational State Cluster Test Plan.xml +++ b/examples/rvc-app/rvc-common/pics/RVC Operational State Cluster Test Plan.xml @@ -1,11 +1,11 @@ RVC Operational State Cluster Test Plan @@ -15,8 +15,8 @@ Draft RVCOPSTATE.S - Does the device implement the RVC Operational State cluster as a server? - 223.1. Role - allclusters.html[pdf] + Does the device implement the RVC Operational State Cluster as a server? + 238.1. Role - allclusters.html[pdf] O true @@ -30,42 +30,42 @@ Draft RVCOPSTATE.S.A0000 Does the device implement the PhaseList attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] M true RVCOPSTATE.S.A0001 Does the device implement the CurrentPhase attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] M true RVCOPSTATE.S.A0002 Does the device implement the CountdownTime attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] O false RVCOPSTATE.S.A0003 Does the device implement the OperationalStateList attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] M true RVCOPSTATE.S.A0004 Does the device implement the OperationalState attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] M true RVCOPSTATE.S.A0005 Does the device implement the OperationalError attribute? - 223.2.1. Attributes - allclusters.html[pdf] + 238.2.1. Attributes - allclusters.html[pdf] M true @@ -75,14 +75,14 @@ Draft RVCOPSTATE.S.E00 Does the device implement the OperationalError Event ? - 223.2.4. Events - allclusters.html[pdf] + 238.2.4. Events - allclusters.html[pdf] M true RVCOPSTATE.S.E01 Does the device implement the OperationCompletion Event ? - 223.2.4. Events - allclusters.html[pdf] + 238.2.4. Events - allclusters.html[pdf] O true @@ -92,8 +92,8 @@ Draft RVCOPSTATE.S.C04.Tx Does the device implement generating the OperationalCommandResponse command? - 223.2.3. Commands generated - allclusters.html[pdf] - M + 238.2.3. Commands generated - allclusters.html[pdf] + M true @@ -102,28 +102,35 @@ Draft RVCOPSTATE.S.C00.Rsp Does the device implement receiving the Pause command? - 223.2.2. Commands received - allclusters.html[pdf] + 238.2.2. Commands received - allclusters.html[pdf] O true RVCOPSTATE.S.C01.Rsp Does the device implement receiving the Stop command? - 223.2.2. Commands received - allclusters.html[pdf] + 238.2.2. Commands received - allclusters.html[pdf] O false RVCOPSTATE.S.C02.Rsp Does the device implement receiving the Start command? - 223.2.2. Commands received - allclusters.html[pdf] + 238.2.2. Commands received - allclusters.html[pdf] O false RVCOPSTATE.S.C03.Rsp Does the device implement receiving the Resume command? - 223.2.2. Commands received - allclusters.html[pdf] + 238.2.2. Commands received - allclusters.html[pdf] + O + true + + + RVCOPSTATE.S.C80.Rsp + Does the device implement receiving the GoHome command? + 238.2.2. Commands received - allclusters.html[pdf] O true @@ -135,136 +142,143 @@ Draft RVCOPSTATE.S.M.ST_STOPPED Does the DUT support testing the Stopped(0x00) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_RUNNING Does the DUT support testing the Running(0x01) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_PAUSED Does the DUT support testing the Paused(0x02) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_ERROR Does the DUT support testing the Error(0x03) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_SEEKING_CHARGER Does the DUT support testing the SeekingCharger(0x40) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_CHARGING Does the DUT support testing the Charging(0x41) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ST_DOCKED Does the DUT support testing the Docked(0x42) operational state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_NO_ERROR Does the DUT support testing the NoError(0x00) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_UNABLE_TO_START_OR_RESUME Does the DUT support testing the UnableToStartOrResume(0x01) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_UNABLE_TO_COMPLETE_OPERATION Does the DUT support testing the UnableToCompleteOperation(0x02) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_COMMAND_INVALID_IN_STATE Does the DUT support testing the CommandInvalidInState(0x03) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_FAILED_TO_FIND_CHARGING_DOCK Does the DUT support testing the FailedToFindChargingDock(0x40) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_STUCK Does the DUT support testing the Stuck(0x41) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_DUST_BIN_MISSING Does the DUT support testing the DustBinMissing(0x42) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_DUST_BIN_FULL Does the DUT support testing the DustBinFull(0x43) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_WATER_TANK_EMPTY Does the DUT support testing the WaterTankEmpty(0x44) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_WATER_TANK_MISSING Does the DUT support testing the WaterTankMissing(0x45) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_WATER_TANK_LID_OPEN Does the DUT support testing the WaterTankLidOpen(0x46) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING Does the DUT support testing the MopCleaningPadMissing(0x47) error state? - 223.2.5. Manual controllable - allclusters.html[pdf] + 238.2.5. Manual controllable - allclusters.html[pdf] O true + + RVCOPSTATE.S.M.RESUME_AFTER_ERR + Does the DUT support testing the Resume command after cleared error? + 238.2.5. Manual controllable - allclusters.html[pdf] + O + false + diff --git a/examples/rvc-app/rvc-common/pics/RVC Run Mode Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/RVC Run Mode Cluster Test Plan.xml index 0bdd95322e213b..a3305b8b92de51 100644 --- a/examples/rvc-app/rvc-common/pics/RVC Run Mode Cluster Test Plan.xml +++ b/examples/rvc-app/rvc-common/pics/RVC Run Mode Cluster Test Plan.xml @@ -1,13 +1,19 @@ - + RVC Run Mode Cluster Test Plan @@ -16,7 +22,7 @@ Draft RVCRUNM.S Does the device implement the RVCRUNM cluster as a server? - 84.1. Role - allclusters.html[pdf] + 93.1. Role - allclusters.html[pdf] O true @@ -26,16 +32,26 @@ Draft PIXIT.RVCRUNM.MODE_CHANGE_FAIL Id of mode the device will fail to transition to, given its current state - 85. PIXIT Definition - allclusters.html[pdf] - O - 0x02 + 95. PIXIT Definition - allclusters.html[pdf] + O PIXIT.RVCRUNM.MODE_CHANGE_OK Id of mode the device will successfully transition to, given its current state - 85. PIXIT Definition - allclusters.html[pdf] - O - 0x00 + 95. PIXIT Definition - allclusters.html[pdf] + O + + + PIXIT.RVCRUNM.MODE_A + Id of non-Idle mode the device can successfully switch to, given its current state + 95. PIXIT Definition - allclusters.html[pdf] + O0x01 + + + PIXIT.RVCRUNM.MODE_B + Id of non-Idle mode the device can successfully switch to, given its current state + 95. PIXIT Definition - allclusters.html[pdf] + O0x02 @@ -45,31 +61,17 @@ Draft RVCRUNM.S.A0000 Does the device implement the SupportedModes attribute? - 84.2.2. Attributes - allclusters.html[pdf] + 93.2.1. Attributes - allclusters.html[pdf] M true RVCRUNM.S.A0001 Does the device implement the CurrentMode attribute? - 84.2.2. Attributes - allclusters.html[pdf] + 93.2.1. Attributes - allclusters.html[pdf] M true - - RVCRUNM.S.A0002 - Does the device implement the StartUpMode attribute? - 84.2.2. Attributes - allclusters.html[pdf] - O - false - - - RVCRUNM.S.A0003 - Does the device implement the OnMode attribute? - 84.2.2. Attributes - allclusters.html[pdf] - M - false - @@ -78,7 +80,7 @@ Draft RVCRUNM.S.C01.Tx Does the device implement sending the ChangeToModeResponse command? - 84.2.4. Commands generated - allclusters.html[pdf] + 93.2.3. Commands generated - allclusters.html[pdf] M true @@ -88,7 +90,7 @@ Draft RVCRUNM.S.C00.Rsp Does the device implement receiving the ChangeToMode command? - 84.2.3. Commands received - allclusters.html[pdf] + 93.2.2. Commands received - allclusters.html[pdf] M true @@ -96,9 +98,9 @@ Draft - RVCRUNM.S.F00 - Does the device support depending on an On/Off cluster implemented on the same endpoint? - 84.2.1. Features - allclusters.html[pdf] + RVCRUNM.S.F16 + Does the device support support changing run modes from non-Idle states? + 94.1. Features - allclusters.html[pdf] O false @@ -108,10 +110,23 @@ Draft RVCRUNM.S.M.CAN_TEST_MODE_FAILURE Does the DUT support testing the failed ChangeToMode command? - 84.2.5. Manual controllable - allclusters.html[pdf] + 93.2.4. Manual controllable - allclusters.html[pdf] O true + + RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED + Can the mode change be manually controlled? + 93.2.4. Manual controllable - allclusters.html[pdf] + O + true + + + RVCOPSTATE.M.ST_STOPPED | RVCOPSTATE.M.ST_PAUSED | RVCOPSTATE.M.ST_CHARGING | RVCOPSTATE.M.ST_DOCKED + 97.2.2. [TC-RVCRUNM-2.2] Change to Mode restrictions with DUT as Server - allclusters.html[pdf] + O + true + diff --git a/examples/rvc-app/rvc-common/pics/Service Area Cluster Test Plan.xml b/examples/rvc-app/rvc-common/pics/Service Area Cluster Test Plan.xml new file mode 100644 index 00000000000000..665504f1a2a6bb --- /dev/null +++ b/examples/rvc-app/rvc-common/pics/Service Area Cluster Test Plan.xml @@ -0,0 +1,243 @@ + + + Service Area Cluster Test Plan + + + + + + SEAR.S + Does the device implement the Service Area cluster as a server? + 306.1. Role - allclusters.html[pdf] + O + true + + + + + + + + + + SEAR.S.A0000 + Does the device implement the SupportedAreas attribute? + 306.2.2. Attributes - allclusters.html[pdf] + M + true + + + SEAR.S.A0001 + Does the device implement the SupportedMaps attribute? + 306.2.2. Attributes - allclusters.html[pdf] + M + true + + + SEAR.S.A0002 + Does the device implement the SelectedAreas attribute? + 306.2.2. Attributes - allclusters.html[pdf] + M + true + + + SEAR.S.A0003 + Does the device implement the CurrentArea attribute? + 306.2.2. Attributes - allclusters.html[pdf] + O + true + + + SEAR.S.A0004 + Does the device implement the EstimatedEndTime attribute? + 306.2.2. Attributes - allclusters.html[pdf] + O + true + + + SEAR.S.A0005 + Does the device implement the Progress attribute? + 306.2.2. Attributes - allclusters.html[pdf] + M + true + + + + + + + + SEAR.S.C01.Tx + Does the device implement generating the SelectAreasResponse command? + 306.2.4. Commands generated - allclusters.html[pdf] + M + true + + + SEAR.S.C03.Tx + Does the device implement generating the SkipAreaResponse command? + 306.2.4. Commands generated - allclusters.html[pdf] + M + true + + + + + + SEAR.S.C00.Rsp + Does the device implement receiving the SelectAreas command? + 306.2.3. Commands received - allclusters.html[pdf] + M + true + + + SEAR.S.C02.Rsp + Does the device implement receiving the SkipArea command? + 306.2.3. Commands received - allclusters.html[pdf] + O + true + + + + + + SEAR.S.F00 + Does the device support changing the selected areas while running? + 306.2.1. Features - allclusters.html[pdf] + O + false + + + SEAR.S.F01 + Does the device support reporting the progress? + 306.2.1. Features - allclusters.html[pdf] + O + true + + + SEAR.S.F02 + Does the device support the maps feature? + 306.2.1. Features - allclusters.html[pdf] + O + true + + + + + + SEAR.S.M.REMOVE_AREA + Does the DUT support testing the effects of removing a SupportedAreas entry? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.ADD_AREA + Does the DUT support testing the effects of adding a SupportedAreas entry? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.REMOVE_MAP + Does the DUT support testing the effects of removing a SupportedMaps entry? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.ADD_MAP + Does the DUT support testing the effects of adding a SupportedMaps entry? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.INVALID_STATE_FOR_SELECT_AREAS + Does the DUT support testing the selecting areas while the device doesn’t allow that? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.VALID_STATE_FOR_SELECT_AREAS + Does the DUT support testing the selecting areas while the device allows that? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + false + + + SEAR.S.M.SELECT_AREAS_WHILE_NON_IDLE + Does the DUT support testing the selecting areas while the device is a non-idle state? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL + Can the device state affecting SelectAreas be manually controlled? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.HAS_MANUAL_SKIP_STATE_CONTROL + Can the device state affecting SkipArea be manually controlled? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.INVALID_STATE_FOR_SKIP + Does the DUT support testing the SkipArea command while the device doesn’t allow that? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.NO_SELAREA_FOR_SKIP + Does the DUT support testing the SkipArea command while SelectedAreas is null? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.VALID_STATE_FOR_SKIP + Does the DUT support testing the SkipArea command while the device allows that? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + SEAR.S.M.HAS_MANUAL_OPERATING_STATE_CONTROL + Can the device operating state (idle, operating, terminate operating) be manually controlled? + 306.2.5. Manual controllable - allclusters.html[pdf] + O + true + + + + + + + + + + + + + + + + + + + \ No newline at end of file From a000e437d613c7345fb42ca04538896db17f3a73 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Thu, 15 Aug 2024 16:07:26 +0100 Subject: [PATCH 2/5] update the handling of the SkipArea command to match the latest spec. --- .../clusters/service-area-server/service-area-server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/clusters/service-area-server/service-area-server.cpp b/src/app/clusters/service-area-server/service-area-server.cpp index 0e562c78754d5b..01db46da22a9e9 100644 --- a/src/app/clusters/service-area-server/service-area-server.cpp +++ b/src/app/clusters/service-area-server/service-area-server.cpp @@ -369,11 +369,11 @@ void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::Sk ctx.mCommandHandler.AddResponse(ctx.mRequestPath, response); }; - // If the SelectedAreas attribute is null, the response status should be set to InvalidAreaList. + // The SkippedArea field SHALL match an entry in the SupportedAreas list. // If the Status field is set to InvalidAreaList, the StatusText field SHALL be an empty string. - if (mDelegate->GetNumberOfSelectedAreas() == 0) + if (!IsSupportedArea(req.skippedArea)) { - ChipLogError(Zcl, "Selected Areas attribute is null"); + ChipLogError(Zcl, "SkippedArea (%u) is not in the SupportedAreas attribute.", req.skippedArea); exitResponse(SkipAreaStatus::kInvalidAreaList, ""_span); return; } From 61dc5b48b2bb4f5027a19441f9a341bff3b25e6a Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Thu, 15 Aug 2024 16:18:47 +0100 Subject: [PATCH 3/5] Updated the name of SkipCurrentArea to SkipArea in the Instance and Delegate classes. --- .../rvc-common/include/rvc-service-area-delegate.h | 2 +- .../rvc-common/src/rvc-service-area-delegate.cpp | 2 +- .../service-area-server/service-area-delegate.h | 2 +- .../service-area-server/service-area-server.cpp | 10 +++++----- .../clusters/service-area-server/service-area-server.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h index 4c13fcd493d7eb..6be8f215c2af09 100644 --- a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h @@ -82,7 +82,7 @@ class RvcServiceAreaDelegate : public Delegate bool IsValidSelectAreasSet(const ServiceArea::Commands::SelectAreas::DecodableType & req, ServiceArea::SelectAreasStatus & areaStatus, MutableCharSpan & statusText) override; - bool HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) override; + bool HandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) override; //************************************************************************* // Supported Areas accessors diff --git a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp index 984472977a0356..7de25e2fc19670 100644 --- a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp @@ -180,7 +180,7 @@ bool RvcServiceAreaDelegate::IsValidSelectAreasSet(const Commands::SelectAreas:: return true; }; -bool RvcServiceAreaDelegate::HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) +bool RvcServiceAreaDelegate::HandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) { return (mHandleSkipCurrentAreaDeviceInstance->*mHandleSkipCurrentAreaCallback)(skippedArea, skipStatusText); }; diff --git a/src/app/clusters/service-area-server/service-area-delegate.h b/src/app/clusters/service-area-server/service-area-delegate.h index 01df2faeb06488..2e9422840aa847 100644 --- a/src/app/clusters/service-area-server/service-area-delegate.h +++ b/src/app/clusters/service-area-server/service-area-delegate.h @@ -120,7 +120,7 @@ class Delegate * InvalidInMode, the StatusText field SHOULD indicate why the request is not allowed, given the current mode of the * device, which may involve other clusters. */ - virtual bool HandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) + virtual bool HandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) { // device support of this command is optional CopyCharSpanToMutableCharSpan("Skip Current Area command not supported by device"_span, skipStatusText); diff --git a/src/app/clusters/service-area-server/service-area-server.cpp b/src/app/clusters/service-area-server/service-area-server.cpp index 01db46da22a9e9..a7e81278838ae6 100644 --- a/src/app/clusters/service-area-server/service-area-server.cpp +++ b/src/app/clusters/service-area-server/service-area-server.cpp @@ -123,7 +123,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) case Commands::SkipArea::Id: return CommandHandlerInterface::HandleCommand( - handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipCurrentAreaCmd(ctx, req); }); + handlerContext, [this](HandlerContext & ctx, const auto & req) { HandleSkipAreaCmd(ctx, req); }); } } @@ -356,11 +356,11 @@ void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::Select exitResponse(SelectAreasStatus::kSuccess, ""_span); } -void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req) +void Instance::HandleSkipAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req) { - ChipLogDetail(Zcl, "Service Area: HandleSkipCurrentArea"); + ChipLogDetail(Zcl, "Service Area: HandleSkipArea"); - // On receipt of this command the device SHALL respond with a SkipCurrentAreaResponse command. + // On receipt of this command the device SHALL respond with a SkipAreaResponse command. auto exitResponse = [ctx](SkipAreaStatus status, CharSpan statusText) { Commands::SkipAreaResponse::Type response{ .status = status, @@ -394,7 +394,7 @@ void Instance::HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::Sk char skipStatusBuffer[kMaxSizeStatusText]; MutableCharSpan skipStatusText(skipStatusBuffer); - if (!mDelegate->HandleSkipCurrentArea(req.skippedArea, skipStatusText)) + if (!mDelegate->HandleSkipArea(req.skippedArea, skipStatusText)) { exitResponse(SkipAreaStatus::kInvalidInMode, skipStatusText); return; diff --git a/src/app/clusters/service-area-server/service-area-server.h b/src/app/clusters/service-area-server/service-area-server.h index 811499f3ff7fb2..e023f24d129261 100644 --- a/src/app/clusters/service-area-server/service-area-server.h +++ b/src/app/clusters/service-area-server/service-area-server.h @@ -124,7 +124,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface * If the input value is invalid, returns the Interaction Model status code of INVALID_COMMAND. * @param[in] req the command parameters. */ - void HandleSkipCurrentAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req); + void HandleSkipAreaCmd(HandlerContext & ctx, const Commands::SkipArea::DecodableType & req); //************************************************************************* // attribute notifications From e639f1baea28ce3eb020e50b8b2807713be7c1a4 Mon Sep 17 00:00:00 2001 From: William Hicklin Date: Thu, 15 Aug 2024 16:25:06 +0100 Subject: [PATCH 4/5] Refactored SkipCurrentArea names to SkipArea in the RVC example app. --- examples/rvc-app/rvc-common/include/rvc-device.h | 4 ++-- .../rvc-common/include/rvc-service-area-delegate.h | 12 ++++++------ examples/rvc-app/rvc-common/src/rvc-device.cpp | 2 +- .../rvc-common/src/rvc-service-area-delegate.cpp | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h index b66ce3251feba6..e2011f6c83e196 100644 --- a/examples/rvc-app/rvc-common/include/rvc-device.h +++ b/examples/rvc-app/rvc-common/include/rvc-device.h @@ -61,7 +61,7 @@ class RvcDevice mOperationalStateDelegate.SetGoHomeCallback(&RvcDevice::HandleOpStateGoHomeCallback, this); mServiceAreaDelegate.SetIsSetSelectedAreasAllowedCallback(&RvcDevice::SaIsSetSelectedAreasAllowed, this); - mServiceAreaDelegate.SetHandleSkipCurrentAreaCallback(&RvcDevice::SaHandleSkipCurrentArea, this); + mServiceAreaDelegate.SetHandleSkipAreaCallback(&RvcDevice::SaHandleSkipArea, this); mServiceAreaDelegate.SetIsSupportedAreasChangeAllowedCallback(&RvcDevice::SaIsSupportedAreasChangeAllowed, this); mServiceAreaDelegate.SetIsSupportedMapChangeAllowedCallback(&RvcDevice::SaIsSupportedMapChangeAllowed, this); } @@ -104,7 +104,7 @@ class RvcDevice bool SaIsSetSelectedAreasAllowed(MutableCharSpan & statusText); - bool SaHandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan & skipStatusText); + bool SaHandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText); bool SaIsSupportedAreasChangeAllowed(); diff --git a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h index 6be8f215c2af09..5e6d7b33f69700 100644 --- a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h @@ -30,7 +30,7 @@ namespace Clusters { class RvcDevice; typedef bool (RvcDevice::*IsSetSelectedAreasAllowedCallback)(MutableCharSpan & statusText); -typedef bool (RvcDevice::*HandleSkipCurrentAreaCallback)(uint32_t skippedArea, MutableCharSpan & skipStatusText); +typedef bool (RvcDevice::* HandleSkipAreaCallback)(uint32_t skippedArea, MutableCharSpan & skipStatusText); typedef bool (RvcDevice::*IsChangeAllowedSimpleCallback)(); namespace ServiceArea { @@ -46,8 +46,8 @@ class RvcServiceAreaDelegate : public Delegate RvcDevice * mIsSetSelectedAreasAllowedDeviceInstance; IsSetSelectedAreasAllowedCallback mIsSetSelectedAreasAllowedCallback; - RvcDevice * mHandleSkipCurrentAreaDeviceInstance; - HandleSkipCurrentAreaCallback mHandleSkipCurrentAreaCallback; + RvcDevice * mHandleSkipAreaDeviceInstance; + HandleSkipAreaCallback mHandleSkipAreaCallback; RvcDevice * mIsSupportedAreasChangeAllowedDeviceInstance; IsChangeAllowedSimpleCallback mIsSupportedAreasChangeAllowedCallback; RvcDevice * mIsSupportedMapChangeAllowedDeviceInstance; @@ -169,10 +169,10 @@ class RvcServiceAreaDelegate : public Delegate mIsSetSelectedAreasAllowedDeviceInstance = instance; } - void SetHandleSkipCurrentAreaCallback(HandleSkipCurrentAreaCallback callback, RvcDevice * instance) + void SetHandleSkipAreaCallback(HandleSkipAreaCallback callback, RvcDevice * instance) { - mHandleSkipCurrentAreaCallback = callback; - mHandleSkipCurrentAreaDeviceInstance = instance; + mHandleSkipAreaCallback = callback; + mHandleSkipAreaDeviceInstance = instance; } void SetIsSupportedAreasChangeAllowedCallback(IsChangeAllowedSimpleCallback callback, RvcDevice * instance) diff --git a/examples/rvc-app/rvc-common/src/rvc-device.cpp b/examples/rvc-app/rvc-common/src/rvc-device.cpp index 623c95963f8834..dac7db9e43708e 100644 --- a/examples/rvc-app/rvc-common/src/rvc-device.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-device.cpp @@ -174,7 +174,7 @@ bool RvcDevice::SaIsSetSelectedAreasAllowed(MutableCharSpan & statusText) return true; } -bool RvcDevice::SaHandleSkipCurrentArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) +bool RvcDevice::SaHandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) { if (mServiceAreaInstance.GetCurrentArea() != skippedArea) { diff --git a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp index 7de25e2fc19670..9041efd3d9105b 100644 --- a/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-service-area-delegate.cpp @@ -182,7 +182,7 @@ bool RvcServiceAreaDelegate::IsValidSelectAreasSet(const Commands::SelectAreas:: bool RvcServiceAreaDelegate::HandleSkipArea(uint32_t skippedArea, MutableCharSpan & skipStatusText) { - return (mHandleSkipCurrentAreaDeviceInstance->*mHandleSkipCurrentAreaCallback)(skippedArea, skipStatusText); + return (mHandleSkipAreaDeviceInstance->*mHandleSkipAreaCallback)(skippedArea, skipStatusText); }; //************************************************************************* From d72223efeebad585bffeda7c3672625c4923f388 Mon Sep 17 00:00:00 2001 From: "Restyled.io" Date: Thu, 15 Aug 2024 15:30:20 +0000 Subject: [PATCH 5/5] Restyled by clang-format --- .../rvc-app/rvc-common/include/rvc-service-area-delegate.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h index 5e6d7b33f69700..8ac6f5c5f99b06 100644 --- a/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-service-area-delegate.h @@ -30,7 +30,7 @@ namespace Clusters { class RvcDevice; typedef bool (RvcDevice::*IsSetSelectedAreasAllowedCallback)(MutableCharSpan & statusText); -typedef bool (RvcDevice::* HandleSkipAreaCallback)(uint32_t skippedArea, MutableCharSpan & skipStatusText); +typedef bool (RvcDevice::*HandleSkipAreaCallback)(uint32_t skippedArea, MutableCharSpan & skipStatusText); typedef bool (RvcDevice::*IsChangeAllowedSimpleCallback)(); namespace ServiceArea { @@ -171,8 +171,8 @@ class RvcServiceAreaDelegate : public Delegate void SetHandleSkipAreaCallback(HandleSkipAreaCallback callback, RvcDevice * instance) { - mHandleSkipAreaCallback = callback; - mHandleSkipAreaDeviceInstance = instance; + mHandleSkipAreaCallback = callback; + mHandleSkipAreaDeviceInstance = instance; } void SetIsSupportedAreasChangeAllowedCallback(IsChangeAllowedSimpleCallback callback, RvcDevice * instance)