Skip to content

Commit 829c098

Browse files
Address comments and update comments
1 parent 86ebfaa commit 829c098

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

src/app/icd/server/ICDManager.h

+23-4
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
7676
/**
7777
* @brief This enum class represents to all ICDStateObserver callbacks available from the
7878
* 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
7996
*/
8097
enum class ObserverEventType : uint8_t
8198
{
@@ -184,10 +201,12 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
184201
private:
185202
friend class TestICDManager;
186203
/**
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.
191210
*/
192211
void UpdateICDMode();
193212

0 commit comments

Comments
 (0)