@@ -76,6 +76,23 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
76
76
/* *
77
77
* @brief This enum class represents to all ICDStateObserver callbacks available from the
78
78
* mStateObserverPool for the ICDManager.
79
+ *
80
+ * EnterActiveMode, TransitionToIdle and EnterIdleMode will always be called as a trio in the same order.
81
+ * Each event will only be called once per cycle.
82
+ * EnterActiveMode will always be called first, when the ICD has transitioned to ActiveMode.
83
+ * TransitionToIdle will always be second. This event will only be called the first time there is
84
+ * `ICD_ACTIVE_TIME_JITTER_MS` remaining to the ActiveMode timer.
85
+ * When this event is called, the ICD is still in ActiveMode.
86
+ * If the ActiveMode timer is increased due to the TransitionToIdle event, the event will not be called a second time in
87
+ * a given cycle.
88
+ * OnEnterIdleMode will always the third when the ICD has transitioned to IdleMode.
89
+ *
90
+ * The ICDModeChange event can occur independently from the EnterActiveMode, TransitionToIdle and EnterIdleMode.
91
+ * It will typpically hapen at the ICDManager init when a client is already registered with the ICD before the
92
+ * OnEnterIdleMode event or when a client send a register command after the OnEnterActiveMode event. Nothing prevents the
93
+ * ICDModeChange event to happen multiple times per cycle or while the ICD is in IdleMode.
94
+ *
95
+ * See src/app/icd/server/ICDStateObserver.h for more information on the APIs each event triggers
79
96
*/
80
97
enum class ObserverEventType : uint8_t
81
98
{
@@ -184,10 +201,12 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
184
201
private:
185
202
friend class TestICDManager ;
186
203
/* *
187
- * @brief UpdateICDMode checks in which ICDMode (SIT or LIT) the ICD can go to and updates the mode if necessary.
188
- * For a SIT ICD, the function does nothing.
189
- * For a LIT ICD, the function checks if the ICD has a registration in the ICDMonitoringTable to determine which
190
- * ICDMode the ICD must be in.
204
+ * @brief UpdateICDMode evaluates in which mode the ICD can be in; SIT or LIT mode.
205
+ * If the current operating mode does not match the evaluated operating mode, function updates the ICDMode and triggers
206
+ * all necessary operations.
207
+ * For a SIT ICD, this function does nothing.
208
+ * For a LIT ICD, the function checks if the ICD has a registration in the ICDMonitoringTable to determine which ICDMode
209
+ * the ICD must be in.
191
210
*/
192
211
void UpdateICDMode ();
193
212
0 commit comments