Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
  • Loading branch information
mkardous-silabs and bzbarsky-apple authored Jul 26, 2024
1 parent ca9e27f commit 4755d13
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/app/icd/server/DefaultICDCheckInBackOffStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ class DefaultICDCheckInBackOffStrategy : public ICDCheckInBackOffStrategy
/**
* @brief Function checks if the entry is a permanent or ephemeral client.
* If the client is permanent, we should send a Check-In message.
* If the cliet is ephemerakl, we should not send a Check-In message.
* If the client is ephemeral, we should not send a Check-In message.
*
* @param entry Entry for which we are deciding if we need to send a Check-In message or not.
* @param entry Entry for which we are deciding whether we need to send a Check-In message or not.
* @return true If the client is permanent, return true.
* @return false If the client is not permanent, ephemeral or invalid, return false.
*/
bool ShouldSendCheckInMessage(const ICDMonitoringEntry & entry)
bool ShouldSendCheckInMessage(const ICDMonitoringEntry & entry) override
{
return (entry.clientType == Clusters::IcdManagement::ClientTypeEnum::kPermanent);
}
Expand All @@ -56,7 +56,7 @@ class DefaultICDCheckInBackOffStrategy : public ICDCheckInBackOffStrategy
* As such, we don't need to execute anything to force the maximum Check-In BackOff.
*
*/
CHIP_ERROR ForceMaximumCheckInBackoff() { return CHIP_NO_ERROR; }
CHIP_ERROR ForceMaximumCheckInBackoff() override { return CHIP_NO_ERROR; }
};

} // namespace app
Expand Down
4 changes: 2 additions & 2 deletions src/app/icd/server/ICDCheckInBackOffStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ class ICDCheckInBackOffStrategy
* @brief Function is used by the ICDManager to determine if a Check-In message should be sent to the given entry based on the
* Check-In BackOff strategy.
*
* There are no requirements on how the Check-In BackOff strategy should behave.
* There are no requirements on how the Check-In BackOff strategy should behave.
* The only specified requirement is the maximum time between to Check-In message, MaximumCheckInBackOff.
* All strategies must respect this requirement.
*
* @param entry ICDMonitoringEntry for which we are about to send a Check-In message to.
*
* @return true ICDCheckInBackOffStrategy determines that we SHOULD send a Check-In message to the given entry
* @return falseI CDCheckInBackOffStrategy determines that we SHOULD NOT send a Check-In message to the given entry
* @return false ICDCheckInBackOffStrategy determines that we SHOULD NOT send a Check-In message to the given entry
*/
virtual bool ShouldSendCheckInMessage(const ICDMonitoringEntry & entry) = 0;

Expand Down
4 changes: 2 additions & 2 deletions src/app/server/Server.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ struct ServerInitParams
Credentials::OperationalCertificateStore * opCertStore = nullptr;
// Required, if not provided, the Server::Init() WILL fail.
app::reporting::ReportScheduler * reportScheduler = nullptr;
// Optionnal. Support for the ICD Check-In BackOff strategy. Must be initialized before being provided.
// If the ICD Check-In protocol use-case is supported and no strategy is prprovided, server will use the default strategy.
// Optional. Support for the ICD Check-In BackOff strategy. Must be initialized before being provided.
// If the ICD Check-In protocol use-case is supported and no strategy is provided, server will use the default strategy.
app::ICDCheckInBackOffStrategy * icdCheckInBackOffStrategy = nullptr;
};

Expand Down

0 comments on commit 4755d13

Please sign in to comment.