diff --git a/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h index 89a3e69c5b8bed..4417f9f5a3ab4a 100644 --- a/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h +++ b/examples/all-clusters-app/all-clusters-common/include/rvc-operational-state-delegate-impl.h @@ -90,18 +90,6 @@ class RvcOperationalStateDelegate : public Delegate */ void HandleResumeStateCallback(OperationalState::GenericOperationalError & err) override; - /** - * Handle Command Callback in application: Start - * @param[out] get operational error after callback. - */ - void HandleStartStateCallback(OperationalState::GenericOperationalError & err) override; - - /** - * Handle Command Callback in application: Stop - * @param[out] get operational error after callback. - */ - void HandleStopStateCallback(OperationalState::GenericOperationalError & err) override; - /** * Handle the GoHome command. * @param err diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp index 946110bb18906c..e41ae2b863fa54 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-operational-state-delegate-impl.cpp @@ -70,34 +70,6 @@ void RvcOperationalStateDelegate::HandleResumeStateCallback(OperationalState::Ge } } -void RvcOperationalStateDelegate::HandleStartStateCallback(OperationalState::GenericOperationalError & err) -{ - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); - } -} - -void RvcOperationalStateDelegate::HandleStopStateCallback(OperationalState::GenericOperationalError & err) -{ - // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); - if (error == CHIP_NO_ERROR) - { - err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); - } - else - { - err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToCompleteOperation)); - } -} - void RvcOperationalStateDelegate::HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) { // placeholder implementation 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 400dfd67910234..e40ba64fbf7f3a 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 @@ -99,22 +99,6 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate */ void HandleResumeStateCallback(Clusters::OperationalState::GenericOperationalError & err) override; - /** - * Handle Command Callback in application: Start - * @param[out] get operational error after callback. - */ - void HandleStartStateCallback(Clusters::OperationalState::GenericOperationalError & err) override{ - // This command in not supported. - }; - - /** - * Handle Command Callback in application: Stop - * @param[out] get operational error after callback. - */ - void HandleStopStateCallback(Clusters::OperationalState::GenericOperationalError & err) override{ - // This command in not supported. - }; - void SetPauseCallback(HandleOpStateCommand aCallback, RvcDevice * aInstance) { mPauseCallback = aCallback; diff --git a/src/app/clusters/operational-state-server/operational-state-server.h b/src/app/clusters/operational-state-server/operational-state-server.h index e4ab6d981ca75a..5a461c272177ba 100644 --- a/src/app/clusters/operational-state-server/operational-state-server.h +++ b/src/app/clusters/operational-state-server/operational-state-server.h @@ -341,10 +341,32 @@ namespace RvcOperationalState { class Delegate : public OperationalState::Delegate { public: + /** + * Handle Command Callback in application: GoHome + * @param[out] err operational error after callback. + */ virtual void HandleGoHomeCommandCallback(OperationalState::GenericOperationalError & err) { err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnknownEnumValue)); }; + + /** + * The start command is not supported by the RvcOperationalState cluster hence this method should never be called. + * This is a dummy implementation of the handler method so the consumer of this class does not need to define it. + */ + void HandleStartStateCallback(OperationalState::GenericOperationalError & err) override + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnknownEnumValue)); + }; + + /** + * The stop command is not supported by the RvcOperationalState cluster hence this method should never be called. + * This is a dummy implementation of the handler method so the consumer of this class does not need to define it. + */ + void HandleStopStateCallback(OperationalState::GenericOperationalError & err) override + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnknownEnumValue)); + }; }; class Instance : public OperationalState::Instance