File tree 3 files changed +6
-11
lines changed
clusters/icd-management-server
3 files changed +6
-11
lines changed Original file line number Diff line number Diff line change @@ -425,15 +425,9 @@ bool emberAfIcdManagementClusterUnregisterClientCallback(CommandHandler * comman
425
425
bool emberAfIcdManagementClusterStayActiveRequestCallback (CommandHandler * commandObj, const ConcreteCommandPath & commandPath,
426
426
const Commands::StayActiveRequest::DecodableType & commandData)
427
427
{
428
- #if CHIP_CONFIG_ENABLE_ICD_SERVER
429
428
IcdManagement::Commands::StayActiveResponse::Type response;
430
429
response.promisedActiveDuration = Server::GetInstance ().GetICDManager ().StayActiveRequest (commandData.stayActiveDuration );
431
430
commandObj->AddResponse (commandPath, response);
432
- #else
433
- // Note: We only keep this line around for platforms examples that enable the ICD management server without building the sample
434
- // as an ICD.
435
- commandObj->AddStatus (commandPath, InteractionModel::Status::UnsupportedCommand);
436
- #endif // CHIP_CONFIG_ENABLE_ICD_SERVER
437
431
return true ;
438
432
}
439
433
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ class ICDConfigurationData
61
61
62
62
System::Clock::Milliseconds16 GetActiveModeThreshold () { return mActiveThreshold ; }
63
63
64
- System::Clock::Milliseconds32 GetMaxStayActiveDuration () { return kMaxStayActiveDuration ; }
64
+ System::Clock::Milliseconds32 GetMaxStayActiveDuration () { return kMaxGuaranteedStayActiveDuration ; }
65
65
66
66
Protocols::SecureChannel::CheckInCounter & GetICDCounter () { return mICDCounter ; }
67
67
@@ -125,8 +125,9 @@ class ICDConfigurationData
125
125
126
126
static constexpr System::Clock::Seconds32 kMaxIdleModeDuration = System::Clock::Seconds32(18 * kSecondsPerHour );
127
127
static constexpr System::Clock::Seconds32 kMinIdleModeDuration = System::Clock::Seconds32(1 );
128
- // As defined in the spec, the maximum duration for the StayActiveDuration is 30s (spec 7.5.1)
129
- static constexpr System::Clock::Milliseconds32 kMaxStayActiveDuration = System::Clock::Milliseconds32(30000 );
128
+ // As defined in the spec, the maximum guaranteed duration for the StayActiveDuration is 30s "Matter Application
129
+ // Clusters: 9.17.7.5.1. PromisedActiveDuration Field"
130
+ static constexpr System::Clock::Milliseconds32 kMaxGuaranteedStayActiveDuration = System::Clock::Milliseconds32(30000 );
130
131
131
132
static_assert ((CHIP_CONFIG_ICD_IDLE_MODE_DURATION_SEC) <= kMaxIdleModeDuration.count(),
132
133
"Spec requires the IdleModeDuration to be equal or inferior to 64800s.");
Original file line number Diff line number Diff line change @@ -110,8 +110,8 @@ class ICDManager : public ICDListener
110
110
OperationalState GetOperationalState () { return mOperationalState ; }
111
111
112
112
/* *
113
- * @brief Extends the Active Mode duration for whichever is smallest between 30000 milliseconds and stayActiveDuration, taking
114
- * in account the remaining active time.
113
+ * @brief Ensures that the remaining Active Mode duration is at least the smaller of 30000 milliseconds and stayActiveDuration.
114
+ *
115
115
* @param stayActiveDuration The duration (in milliseconds) requested by the client to stay in Active Mode
116
116
* @return The duration (in milliseconds) the device will stay in Active Mode
117
117
*/
You can’t perform that action at this time.
0 commit comments