Skip to content

Commit

Permalink
[ICD] Fix comment mistakes from post-merge reviews (project-chip#33225)
Browse files Browse the repository at this point in the history
* Fix comment mistakes

* Update src/app/icd/server/ICDManager.h

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

* Update src/app/icd/server/ICDManager.h

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>

---------

Co-authored-by: Tennessee Carmel-Veilleux <[email protected]>
  • Loading branch information
mkardous-silabs and tcarmelveilleux authored Apr 29, 2024
1 parent dfe64ee commit 9db03ee
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/app/icd/server/ICDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ CHIP_ERROR ICDManager::HandleEventTrigger(uint64_t eventTrigger)
break;
#if CHIP_CONFIG_ENABLE_ICD_CIP
case ICDTestEventTriggerEvent::kInvalidateHalfCounterValues:
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCouterValues();
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateHalfCheckInCounterValues();
break;
case ICDTestEventTriggerEvent::kInvalidateAllCounterValues:
err = ICDConfigurationData::GetInstance().GetICDCounter().InvalidateAllCheckInCounterValues();
Expand Down
10 changes: 5 additions & 5 deletions src/app/icd/server/ICDManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
};

/**
* @brief This enum class represents to all ICDStateObserver callbacks available from the
* @brief This enum class represents all ICDStateObserver callbacks available from the
* mStateObserverPool for the ICDManager.
*
* EnterActiveMode, TransitionToIdle and EnterIdleMode will always be called as a trio in the same order.
Expand All @@ -85,12 +85,12 @@ class ICDManager : public ICDListener, public TestEventTriggerHandler
* When this event is called, the ICD is still in ActiveMode.
* If the ActiveMode timer is increased due to the TransitionToIdle event, the event will not be called a second time in
* a given cycle.
* OnEnterIdleMode will always the third when the ICD has transitioned to IdleMode.
* OnEnterIdleMode will always the third event and indicates that the ICD has transitioned to IdleMode.
*
* The ICDModeChange event can occur independently from the EnterActiveMode, TransitionToIdle and EnterIdleMode.
* It will typpically hapen at the ICDManager init when a client is already registered with the ICD before the
* OnEnterIdleMode event or when a client send a register command after the OnEnterActiveMode event. Nothing prevents the
* ICDModeChange event to happen multiple times per cycle or while the ICD is in IdleMode.
* It will typically happen at the ICDManager init when a client is already registered with the ICD before the
* OnEnterIdleMode event or when a client sends a register command after the OnEnterActiveMode event. Nothing prevents
* the ICDModeChange event from happening multiple times per cycle or while the ICD is in IdleMode.
*
* See src/app/icd/server/ICDStateObserver.h for more information on the APIs each event triggers
*/
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CheckInCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace chip {
namespace Protocols {
namespace SecureChannel {

CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCouterValues()
CHIP_ERROR CheckInCounter::InvalidateHalfCheckInCounterValues()
{
// Increases the current counter value by half of its maximum range and updates underlying counter storage.
// CheckInCounter is allowed to roll over.
Expand Down
2 changes: 1 addition & 1 deletion src/protocols/secure_channel/CheckInCounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CheckInCounter : public PersistedCounter<uint32_t>
*
* @return CHIP_ERROR Any error returned by a write to persisted storage.
*/
CHIP_ERROR InvalidateHalfCheckInCouterValues();
CHIP_ERROR InvalidateHalfCheckInCounterValues();

/**
* @brief Invalidates all the Check-In counter values. After this function is called, the new Check-In counter value will be
Expand Down
4 changes: 2 additions & 2 deletions src/protocols/secure_channel/tests/TestCheckInCounter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum class CheckInCounterOperations : uint8_t
* @brief Helper function that validates CheckInCounter value after an operation for configurable input values
*
* @param startValue Starting value of the Check-In counter
* @param expectedValue Expected value after the InvalidateHalfCheckInCouterValues call
* @param expectedValue Expected value after the InvalidateHalfCheckInCounterValues call
*/
void VerifyCheckInCounterValues(uint32_t startValue, uint32_t expectedValue, CheckInCounterOperations operation)
{
Expand All @@ -60,7 +60,7 @@ void VerifyCheckInCounterValues(uint32_t startValue, uint32_t expectedValue, Che
switch (operation)
{
case CheckInCounterOperations::kInvalidateHalf: {
EXPECT_EQ(counter.InvalidateHalfCheckInCouterValues(), CHIP_NO_ERROR);
EXPECT_EQ(counter.InvalidateHalfCheckInCounterValues(), CHIP_NO_ERROR);
break;
}
case CheckInCounterOperations::kInvalidateAll: {
Expand Down

0 comments on commit 9db03ee

Please sign in to comment.