Skip to content

Commit

Permalink
Move a trace that was being spammed in low active/idle interval. Now …
Browse files Browse the repository at this point in the history
…only reported on ICD mode update calls
  • Loading branch information
jmartinez-silabs committed Jul 26, 2023
1 parent 1d49d9e commit 8bf406a
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/app/icd/ICDManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@ void ICDManager::UpdateIcdMode()
}
}
mICDMode = tempMode;

// When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec.
if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold())
{
ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32,
(GetSITPollingThreshold().count() / 1000));
}
}

void ICDManager::UpdateOperationState(OperationalState state)
Expand All @@ -108,14 +115,14 @@ void ICDManager::UpdateOperationState(OperationalState state)
DeviceLayer::SystemLayer().StartTimer(System::Clock::Timeout(idleModeInterval), OnIdleModeDone, this);

System::Clock::Milliseconds32 slowPollInterval = GetSlowPollingInterval();
// When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec.
if (mICDMode == ICDMode::SIT && slowPollInterval > GetSITPollingThreshold())

#if 0 // TODO ICD Spec to define this conformance as a SHALL
// When in SIT mode, the slow poll interval SHOULDN'T be greater than the SIT mode polling threshold, per spec.
if (mICDMode == ICDMode::SIT && GetSlowPollingInterval() > GetSITPollingThreshold())
{
ChipLogDetail(AppServer, "The Slow Polling Interval of an ICD in SIT mode should be <= %" PRIu32,
(GetSITPollingThreshold().count() / 1000));
// TODO Spec to define this conformance as a SHALL
// slowPollInterval = GetSITPollingThreshold();
slowPollInterval = GetSITPollingThreshold();
}
#endif

CHIP_ERROR err = DeviceLayer::ConnectivityMgr().SetPollingInterval(slowPollInterval);
if (err != CHIP_NO_ERROR)
Expand Down

0 comments on commit 8bf406a

Please sign in to comment.