diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index a3f2937276d4a9..1b36447f308ba8 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -256,7 +256,7 @@ jobs: - name: Check for use of %zu, which are not supported on some libcs. if: always() run: | - git grep -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 + git grep -I -n "%zu" -- './*' ':(exclude).github/workflows/lint.yml' && exit 1 || exit 0 # Comments like '{{! ... }}' should be used in zap files - name: Do not allow TODO in generated files diff --git a/examples/rvc-app/README.md b/examples/rvc-app/README.md index fa723f24d35712..2943f54103f828 100644 --- a/examples/rvc-app/README.md +++ b/examples/rvc-app/README.md @@ -48,16 +48,14 @@ Below are the PIXIT definitions required for the different python tests. #### TC 1.2 -PIXIT: `PIXIT_ENDPOINT:1` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_1_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_1_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint=1"` #### TC 2.1 -PIXIT: -`PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2` +PIXIT: `PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --int-arg PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"` When asked "Manually put the device in a state from which it will FAIL to transition to mode 1", set the `RvcRunMode` to 1. @@ -67,24 +65,23 @@ When asked "Manually put the device in a state from which it will SUCCESSFULLY transition to mode 2", set the `RvcRunMode` to 0. `chip-tool rvcrunmode change-to-mode 0` -#### TC 3.2 +#### TC 2.2 -This is not applicable because this RVC device does not support the -`StartUpMode` attribute. +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint=1"` ### RVC Run Mode cluster #### TC 1.2 -PIXIT: `PIXIT_ENDPOINT:1` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCRUNM_1_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCRUNM_1_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint=1"` #### TC 2.1 -PIXIT: -`PIXIT_ENDPOINT:1 PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2 PIXIT.RVCRUNM.MODE_CHANGE_OK:0` +PIXIT: `PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2 PIXIT.RVCRUNM.MODE_CHANGE_OK:0` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCRUNM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2 PIXIT.RVCRUNM.MODE_CHANGE_OK:0"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCRUNM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --int-arg PIXIT.RVCRUNM.MODE_CHANGE_OK:0 PIXIT.RVCRUNM.MODE_CHANGE_FAIL:2"` When asked "Manually put the device in a state from which it will FAIL to transition to mode 2", set the `RvcRunMode` to 1. @@ -93,27 +90,34 @@ transition to mode 2", set the `RvcRunMode` to 1. When asked "Manually put the device in a state from which it will SUCCESSFULLY transition to mode 0", do nothing. -#### TC 3.2 +#### TC 2.2 -This is not applicable because this RVC device does not support the -`StartUpMode` attribute. +PIXIT: `PIXIT.RVCRUNM.MODE_A:1 PIXIT.RVCRUNM.MODE_B:2` +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCRUNM_2_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --int-arg PIXIT.RVCRUNM.MODE_A:1 PIXIT.RVCRUNM.MODE_B:2"` ### RVC Operational State cluster #### TC 2.1 -PIXIT: `PIXIT_ENDPOINT:1` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCOPSTATE_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCOPSTATE_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1"` Use the out-of-band messages, chip-tool messages and the state machine diagram to navigate to the required states. #### TC 2.3 -PIXIT: `PIXIT_ENDPOINT:1` Example command: -`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCOPSTATE_2_3.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"` +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCOPSTATE_2_3.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1"` + +Use the out-of-band messages, chip-tool messages and the state machine diagram +to transition to the required states. + +#### TC 2.4 + +Example command: +`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCOPSTATE_2_4.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1"` Use the out-of-band messages, chip-tool messages and the state machine diagram to transition to the required states. diff --git a/examples/rvc-app/RVC_app_state_diagram.png b/examples/rvc-app/RVC_app_state_diagram.png index a7cf3175aa87ba..dcef2ed731f18b 100644 Binary files a/examples/rvc-app/RVC_app_state_diagram.png and b/examples/rvc-app/RVC_app_state_diagram.png differ diff --git a/examples/rvc-app/RVC_app_state_diagram_drawio.xml b/examples/rvc-app/RVC_app_state_diagram_drawio.xml index d4f9479b557658..52c256b79ccefa 100644 --- a/examples/rvc-app/RVC_app_state_diagram_drawio.xml +++ b/examples/rvc-app/RVC_app_state_diagram_drawio.xml @@ -1,2 +1,2 @@ -7V1bd6I6G/41XevbF7og4XhZrc7uTNvpsjOzp9/NXgiodFAs0NrOr98JJAghKGpQpzpzUUkgHN7zkzdvLmB3+vYptOaT28Bx/QsgOW8X8OoCAGCaEP3BLe9pi6qAtGEcek7aJC8bHrzfLmmUSOuL57hR4cQ4CPzYmxcb7WA2c+240GaFYbAonjYK/OJd59aY3FFaNjzYlu+WTvvHc+JJ2moAfdn+t+uNJ/TOsmamPVOLnkwGjiaWEyxyTbB3AbthEMTpr+lb1/Xxx6PfJb2uX9GbPVjozuI6F7zri+7TpDv95b4p3c7g8ful9W+LPOyr5b+QFyYPG7/TLxAGLzPHxYNIF7CzmHix+zC3bNy7QDRHbZN46qMjGf0sPxR5zlc3jN23XBN5yE9uMHXj8B2dQns1hXwxwjJA0kjDYkkB1SBtk9zXB6baVgntCd3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1+nLX9ynMGrQbzfOm2gWPDtHOidME7CEY8wxrtiLnJS6gOka33IdTE5qSSTk7dIdVZ1pS67R1QiJagtAWVnsU7P3j72Y+oSTNe3kub0vlJVbfYgzqsWmcOlkgxVTC6lzG4Iyjp7aPxGa71+0V1XeZpzFTfqaWGzBTQNlDNfRYhxLsyLg8fO5uvZfE2Ha6dKwa6v/rp/WVVImlV4vdYSEy8kyzTwiK3sKTz5LPckyk+2tgIrPGOT5NosldBl4GOsS4Yjpj7GQaR4xP8B \ No newline at end of file diff --git a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp index da2908cf65e6ec..87eb1ee0f75e0b 100644 --- a/examples/rvc-app/linux/RvcAppCommandDelegate.cpp +++ b/examples/rvc-app/linux/RvcAppCommandDelegate.cpp @@ -91,6 +91,10 @@ void RvcAppCommandHandler::HandleCommand(intptr_t context) { self->OnClearErrorHandler(); } + else if (name == "Reset") + { + self->OnResetHandler(); + } else { ChipLogError(NotSpecified, "Unhandled command: Should never happens"); @@ -145,6 +149,11 @@ void RvcAppCommandHandler::OnClearErrorHandler() mRvcDevice->HandleClearErrorMessage(); } +void RvcAppCommandHandler::OnResetHandler() +{ + mRvcDevice->HandleResetMessage(); +} + void RvcAppCommandDelegate::SetRvcDevice(chip::app::Clusters::RvcDevice * aRvcDevice) { mRvcDevice = aRvcDevice; diff --git a/examples/rvc-app/linux/RvcAppCommandDelegate.h b/examples/rvc-app/linux/RvcAppCommandDelegate.h index 8be8943172b37a..ad7c283bb85f59 100644 --- a/examples/rvc-app/linux/RvcAppCommandDelegate.h +++ b/examples/rvc-app/linux/RvcAppCommandDelegate.h @@ -56,6 +56,8 @@ class RvcAppCommandHandler void OnErrorEventHandler(const std::string & error); void OnClearErrorHandler(); + + void OnResetHandler(); }; class RvcAppCommandDelegate : public NamedPipeCommandDelegate diff --git a/examples/rvc-app/run_all_yaml_tests.sh b/examples/rvc-app/run_all_yaml_tests.sh index 4bf9e7261a7f9e..82f3461492f207 100755 --- a/examples/rvc-app/run_all_yaml_tests.sh +++ b/examples/rvc-app/run_all_yaml_tests.sh @@ -8,7 +8,7 @@ NODEID=$1 RVC_DEVICE_ENDPOINT=1 -RVC_DEVICE_PICS="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt" +RVC_DEVICE_PICS="examples/rvc-app/rvc-common/pics/rvc-app-pics-values" if [ -z "$NODEID" ]; then echo "Usage: run_all_yaml_tests [Node ID]" @@ -20,7 +20,6 @@ fi # RVC Operational State cluster ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && - ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && # RVC Run Mode cluster ./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" && diff --git a/examples/rvc-app/rvc-common/include/rvc-device.h b/examples/rvc-app/rvc-common/include/rvc-device.h index e77c86aa6a1fb2..f2db0a75a5a23e 100644 --- a/examples/rvc-app/rvc-common/include/rvc-device.h +++ b/examples/rvc-app/rvc-common/include/rvc-device.h @@ -48,6 +48,7 @@ class RvcDevice mCleanModeDelegate.SetHandleChangeToMode(&RvcDevice::HandleRvcCleanChangeToMode, this); mOperationalStateDelegate.SetPauseCallback(&RvcDevice::HandleOpStatePauseCallback, this); mOperationalStateDelegate.SetResumeCallback(&RvcDevice::HandleOpStateResumeCallback, this); + mOperationalStateDelegate.SetGoHomeCallback(&RvcDevice::HandleOpStateGoHomeCallback, this); } /** @@ -81,6 +82,11 @@ class RvcDevice */ void HandleOpStateResumeCallback(Clusters::OperationalState::GenericOperationalError & err); + /** + * Handles the RvcOperationalState GoHome command. + */ + void HandleOpStateGoHomeCallback(Clusters::OperationalState::GenericOperationalError & err); + /** * Updates the state machine when the device becomes fully-charged. */ @@ -105,6 +111,8 @@ class RvcDevice void HandleErrorEvent(const std::string & error); void HandleClearErrorMessage(); + + void HandleResetMessage(); }; } // namespace Clusters diff --git a/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h index f1c3d7b22586a7..af5e2c451abb83 100644 --- a/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h +++ b/examples/rvc-app/rvc-common/include/rvc-mode-delegates.h @@ -45,7 +45,7 @@ class RvcRunModeDelegate : public ModeBase::Delegate using ModeTagStructType = detail::Structs::ModeTagStruct::Type; ModeTagStructType ModeTagsIdle[1] = { { .value = to_underlying(ModeTag::kIdle) } }; ModeTagStructType ModeTagsCleaning[1] = { { .value = to_underlying(ModeTag::kCleaning) } }; - ModeTagStructType ModeTagsMapping[1] = { { .mfgCode = MakeOptional(TestVendor1), .value = 0x8001 } }; + ModeTagStructType ModeTagsMapping[1] = { { .value = to_underlying(ModeTag::kMapping) } }; const detail::Structs::ModeOptionStruct::Type kModeOptions[3] = { detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Idle"), diff --git a/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h index e40ba64fbf7f3a..3081a27ea3e625 100644 --- a/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h +++ b/examples/rvc-app/rvc-common/include/rvc-operational-state-delegate.h @@ -53,6 +53,8 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate HandleOpStateCommand mPauseCallback; RvcDevice * mResumeRvcDeviceInstance; HandleOpStateCommand mResumeCallback; + RvcDevice * mGoHomeRvcDeviceInstance; + HandleOpStateCommand mGoHomeCallback; public: /** @@ -99,6 +101,12 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate */ void HandleResumeStateCallback(Clusters::OperationalState::GenericOperationalError & err) override; + /** + * Handle Command Callback in application: GoHome + * @param[out] get operational error after callback. + */ + void HandleGoHomeCommandCallback(Clusters::OperationalState::GenericOperationalError & err) override; + void SetPauseCallback(HandleOpStateCommand aCallback, RvcDevice * aInstance) { mPauseCallback = aCallback; @@ -110,6 +118,12 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate mResumeCallback = aCallback; mResumeRvcDeviceInstance = aInstance; }; + + void SetGoHomeCallback(HandleOpStateCommand aCallback, RvcDevice * aInstance) + { + mGoHomeCallback = aCallback; + mGoHomeRvcDeviceInstance = aInstance; + }; }; void Shutdown(); diff --git a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt b/examples/rvc-app/rvc-common/pics/rvc-app-pics-values similarity index 88% rename from examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt rename to examples/rvc-app/rvc-common/pics/rvc-app-pics-values index d0c8529a83d2e0..6b094132ed5c22 100644 --- a/examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt +++ b/examples/rvc-app/rvc-common/pics/rvc-app-pics-values @@ -1,10 +1,8 @@ RVCCLEANM.S=1 RVCCLEANM.S.A0000=1 RVCCLEANM.S.A0001=1 -RVCCLEANM.S.A0002=0 -RVCCLEANM.S.A0003=0 -RVCCLEANM.S.C01.Tx=1 RVCCLEANM.S.C00.Rsp=1 +RVCCLEANM.S.C01.Tx=1 RVCCLEANM.S.F00=0 RVCCLEANM.S.M.CAN_TEST_MODE_FAILURE=1 @@ -17,11 +15,10 @@ RVCOPSTATE.S.A0004=1 RVCOPSTATE.S.A0005=1 RVCOPSTATE.S.E00=1 RVCOPSTATE.S.E01=1 -RVCOPSTATE.S.C04.Tx=1 RVCOPSTATE.S.C00.Rsp=1 -RVCOPSTATE.S.C01.Rsp=0 -RVCOPSTATE.S.C02.Rsp=0 RVCOPSTATE.S.C03.Rsp=1 +RVCOPSTATE.S.C04.Tx=1 +RVCOPSTATE.S.C128.Rsp=1 RVCOPSTATE.S.M.ST_STOPPED=1 RVCOPSTATE.S.M.ST_RUNNING=1 RVCOPSTATE.S.M.ST_PAUSED=1 @@ -45,9 +42,8 @@ RVCOPSTATE.S.M.ERR_MOP_CLEANING_PAD_MISSING=1 RVCRUNM.S=1 RVCRUNM.S.A0000=1 RVCRUNM.S.A0001=1 -RVCRUNM.S.A0002=0 -RVCRUNM.S.A0003=0 -RVCRUNM.S.C01.Tx=1 RVCRUNM.S.C00.Rsp=1 +RVCRUNM.S.C01.Tx=1 RVCRUNM.S.F00=0 -RVCRUNM.S.M.CAN_TEST_MODE_FAILURE=1 \ No newline at end of file +RVCRUNM.S.M.CAN_TEST_MODE_FAILURE=1 +RVCRUNM.S.M.CAN_MANUALLY_CONTROLLED=1 diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 937e342b7e2624..2de29e1783296b 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -1240,6 +1240,10 @@ endpoint 0 { callback attribute windowStatus; callback attribute adminFabricIndex; callback attribute adminVendorId; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; ram attribute featureMap default = 0; ram attribute clusterRevision default = 0x0001; diff --git a/examples/rvc-app/rvc-common/rvc-app.zap b/examples/rvc-app/rvc-common/rvc-app.zap index d5c1431dded75b..95baba55bc5986 100644 --- a/examples/rvc-app/rvc-common/rvc-app.zap +++ b/examples/rvc-app/rvc-common/rvc-app.zap @@ -1484,6 +1484,70 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -2831,5 +2895,6 @@ "endpointId": 1, "networkId": 0 } - ] + ], + "log": [] } \ No newline at end of file diff --git a/examples/rvc-app/rvc-common/src/rvc-device.cpp b/examples/rvc-app/rvc-common/src/rvc-device.cpp index 3e62b5f1e6f701..b4e79d673880be 100644 --- a/examples/rvc-app/rvc-common/src/rvc-device.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-device.cpp @@ -41,7 +41,7 @@ void RvcDevice::HandleRvcRunChangeToMode(uint8_t newMode, ModeBase::Commands::Ch { response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); response.statusText.SetValue( - chip::CharSpan::fromCharString("Change to the mapping or cleaning mode is only allowed from idle.")); + chip::CharSpan::fromCharString("Change to the mapping or cleaning mode is only allowed from idle")); return; } @@ -58,7 +58,7 @@ void RvcDevice::HandleRvcRunChangeToMode(uint8_t newMode, ModeBase::Commands::Ch { response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); response.statusText.SetValue( - chip::CharSpan::fromCharString("Change to the mapping or cleaning mode is only allowed from idle.")); + chip::CharSpan::fromCharString("Change to the mapping or cleaning mode is only allowed from idle")); return; } @@ -72,7 +72,7 @@ void RvcDevice::HandleRvcRunChangeToMode(uint8_t newMode, ModeBase::Commands::Ch // If we fall through at any point, it's because the change is not supported in the current state. response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); - response.statusText.SetValue(chip::CharSpan::fromCharString("This change is not allowed at this time.")); + response.statusText.SetValue(chip::CharSpan::fromCharString("This change is not allowed at this time")); } void RvcDevice::HandleRvcCleanChangeToMode(uint8_t newMode, ModeBase::Commands::ChangeToModeResponse::Type & response) @@ -81,7 +81,7 @@ void RvcDevice::HandleRvcCleanChangeToMode(uint8_t newMode, ModeBase::Commands:: if (rvcRunCurrentMode != RvcRunMode::ModeIdle) { - response.status = to_underlying(RvcCleanMode::StatusCode::kCleaningInProgress); + response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); response.statusText.SetValue(chip::CharSpan::fromCharString("Change of the cleaning mode is only allowed in Idle.")); return; } @@ -123,7 +123,7 @@ void RvcDevice::HandleOpStateResumeCallback(Clusters::OperationalState::GenericO break; default: // This method is only called if the device is in a resume-compatible state, i.e. `Charging`, `Docked` or - // `Paused`. Therefor, we do not expect to ever enter this branch. + // `Paused`. Therefore, we do not expect to ever enter this branch. err.Set(to_underlying(OperationalState::ErrorStateEnum::kCommandInvalidInState)); return; } @@ -134,6 +134,30 @@ void RvcDevice::HandleOpStateResumeCallback(Clusters::OperationalState::GenericO : to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); } +void RvcDevice::HandleOpStateGoHomeCallback(Clusters::OperationalState::GenericOperationalError & err) +{ + switch (mOperationalStateInstance.GetCurrentOperationalState()) + { + case to_underlying(OperationalState::OperationalStateEnum::kStopped): { + if (mRunModeInstance.GetCurrentMode() != RvcRunMode::ModeIdle) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kCommandInvalidInState)); + return; + } + + auto error = mOperationalStateInstance.SetOperationalState( + to_underlying(RvcOperationalState::OperationalStateEnum::kSeekingCharger)); + + err.Set((error == CHIP_NO_ERROR) ? to_underlying(OperationalState::ErrorStateEnum::kNoError) + : to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); + } + break; + default: + err.Set(to_underlying(OperationalState::ErrorStateEnum::kCommandInvalidInState)); + return; + } +} + void RvcDevice::HandleChargedMessage() { if (mOperationalStateInstance.GetCurrentOperationalState() != @@ -301,3 +325,10 @@ void RvcDevice::HandleClearErrorMessage() mRunModeInstance.UpdateCurrentMode(RvcRunMode::ModeIdle); SetDeviceToIdleState(); } + +void RvcDevice::HandleResetMessage() +{ + mRunModeInstance.UpdateCurrentMode(RvcRunMode::ModeIdle); + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); + mCleanModeInstance.UpdateCurrentMode(RvcCleanMode::ModeQuick); +} diff --git a/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp b/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp index 568fa870a9e860..496d6b178cb936 100644 --- a/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp +++ b/examples/rvc-app/rvc-common/src/rvc-operational-state-delegate.cpp @@ -51,3 +51,8 @@ void RvcOperationalStateDelegate::HandleResumeStateCallback(OperationalState::Ge { (mResumeRvcDeviceInstance->*mResumeCallback)(err); } + +void RvcOperationalStateDelegate::HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) +{ + (mGoHomeRvcDeviceInstance->*mGoHomeCallback)(err); +}