File tree 4 files changed +22
-56
lines changed
all-clusters-app/all-clusters-common
rvc-app/rvc-common/include
src/app/clusters/operational-state-server
4 files changed +22
-56
lines changed Original file line number Diff line number Diff line change @@ -90,18 +90,6 @@ class RvcOperationalStateDelegate : public Delegate
90
90
*/
91
91
void HandleResumeStateCallback (OperationalState::GenericOperationalError & err) override ;
92
92
93
- /* *
94
- * Handle Command Callback in application: Start
95
- * @param[out] get operational error after callback.
96
- */
97
- void HandleStartStateCallback (OperationalState::GenericOperationalError & err) override ;
98
-
99
- /* *
100
- * Handle Command Callback in application: Stop
101
- * @param[out] get operational error after callback.
102
- */
103
- void HandleStopStateCallback (OperationalState::GenericOperationalError & err) override ;
104
-
105
93
/* *
106
94
* Handle the GoHome command.
107
95
* @param err
Original file line number Diff line number Diff line change @@ -70,34 +70,6 @@ void RvcOperationalStateDelegate::HandleResumeStateCallback(OperationalState::Ge
70
70
}
71
71
}
72
72
73
- void RvcOperationalStateDelegate::HandleStartStateCallback (OperationalState::GenericOperationalError & err)
74
- {
75
- // placeholder implementation
76
- auto error = GetInstance ()->SetOperationalState (to_underlying (OperationalState::OperationalStateEnum::kRunning ));
77
- if (error == CHIP_NO_ERROR)
78
- {
79
- err.Set (to_underlying (OperationalState::ErrorStateEnum::kNoError ));
80
- }
81
- else
82
- {
83
- err.Set (to_underlying (OperationalState::ErrorStateEnum::kUnableToCompleteOperation ));
84
- }
85
- }
86
-
87
- void RvcOperationalStateDelegate::HandleStopStateCallback (OperationalState::GenericOperationalError & err)
88
- {
89
- // placeholder implementation
90
- auto error = GetInstance ()->SetOperationalState (to_underlying (OperationalState::OperationalStateEnum::kStopped ));
91
- if (error == CHIP_NO_ERROR)
92
- {
93
- err.Set (to_underlying (OperationalState::ErrorStateEnum::kNoError ));
94
- }
95
- else
96
- {
97
- err.Set (to_underlying (OperationalState::ErrorStateEnum::kUnableToCompleteOperation ));
98
- }
99
- }
100
-
101
73
void RvcOperationalStateDelegate::HandleGoHomeCommandCallback (OperationalState::GenericOperationalError & err)
102
74
{
103
75
// placeholder implementation
Original file line number Diff line number Diff line change @@ -99,22 +99,6 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate
99
99
*/
100
100
void HandleResumeStateCallback (Clusters::OperationalState::GenericOperationalError & err) override ;
101
101
102
- /* *
103
- * Handle Command Callback in application: Start
104
- * @param[out] get operational error after callback.
105
- */
106
- void HandleStartStateCallback (Clusters::OperationalState::GenericOperationalError & err) override {
107
- // This command in not supported.
108
- };
109
-
110
- /* *
111
- * Handle Command Callback in application: Stop
112
- * @param[out] get operational error after callback.
113
- */
114
- void HandleStopStateCallback (Clusters::OperationalState::GenericOperationalError & err) override {
115
- // This command in not supported.
116
- };
117
-
118
102
void SetPauseCallback (HandleOpStateCommand aCallback, RvcDevice * aInstance)
119
103
{
120
104
mPauseCallback = aCallback;
Original file line number Diff line number Diff line change @@ -341,10 +341,32 @@ namespace RvcOperationalState {
341
341
class Delegate : public OperationalState ::Delegate
342
342
{
343
343
public:
344
+ /* *
345
+ * Handle Command Callback in application: GoHome
346
+ * @param[out] err operational error after callback.
347
+ */
344
348
virtual void HandleGoHomeCommandCallback (OperationalState::GenericOperationalError & err)
345
349
{
346
350
err.Set (to_underlying (OperationalState::ErrorStateEnum::kUnknownEnumValue ));
347
351
};
352
+
353
+ /* *
354
+ * The start command is not supported by the RvcOperationalState cluster hence this method should never be called.
355
+ * This is a dummy implementation of the handler method so the consumer of this class does not need to define it.
356
+ */
357
+ void HandleStartStateCallback (OperationalState::GenericOperationalError & err) override
358
+ {
359
+ err.Set (to_underlying (OperationalState::ErrorStateEnum::kUnknownEnumValue ));
360
+ };
361
+
362
+ /* *
363
+ * The stop command is not supported by the RvcOperationalState cluster hence this method should never be called.
364
+ * This is a dummy implementation of the handler method so the consumer of this class does not need to define it.
365
+ */
366
+ void HandleStopStateCallback (OperationalState::GenericOperationalError & err) override
367
+ {
368
+ err.Set (to_underlying (OperationalState::ErrorStateEnum::kUnknownEnumValue ));
369
+ };
348
370
};
349
371
350
372
class Instance : public OperationalState ::Instance
You can’t perform that action at this time.
0 commit comments