Periodic HK helper simplification #136
@ -250,9 +250,8 @@ void LocalPoolDataSetBase::setReportingEnabled(bool reportingEnabled) {
|
|||||||
bool LocalPoolDataSetBase::getReportingEnabled() const { return reportingEnabled; }
|
bool LocalPoolDataSetBase::getReportingEnabled() const { return reportingEnabled; }
|
||||||
|
|
||||||
void LocalPoolDataSetBase::initializePeriodicHelper(float collectionInterval,
|
void LocalPoolDataSetBase::initializePeriodicHelper(float collectionInterval,
|
||||||
dur_millis_t minimumPeriodicInterval,
|
dur_millis_t minimumPeriodicInterval) {
|
||||||
uint8_t nonDiagIntervalFactor) {
|
periodicHelper->initialize(collectionInterval, minimumPeriodicInterval);
|
||||||
periodicHelper->initialize(collectionInterval, minimumPeriodicInterval, nonDiagIntervalFactor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LocalPoolDataSetBase::setChanged(bool changed) { this->changed = changed; }
|
void LocalPoolDataSetBase::setChanged(bool changed) { this->changed = changed; }
|
||||||
|
@ -191,8 +191,7 @@ class LocalPoolDataSetBase : public PoolDataSetBase, public MarkChangedIF {
|
|||||||
*/
|
*/
|
||||||
bool reportingEnabled = false;
|
bool reportingEnabled = false;
|
||||||
|
|
||||||
void initializePeriodicHelper(float collectionInterval, dur_millis_t minimumPeriodicInterval,
|
void initializePeriodicHelper(float collectionInterval, dur_millis_t minimumPeriodicInterval);
|
||||||
uint8_t nonDiagIntervalFactor = 5);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If the valid state of a dataset is always relevant to the whole
|
* If the valid state of a dataset is always relevant to the whole
|
||||||
|
@ -12,10 +12,8 @@ class LocalPoolDataSetAttorney {
|
|||||||
static bool isDiagnostics(LocalPoolDataSetBase& set) { return set.isDiagnostics(); }
|
static bool isDiagnostics(LocalPoolDataSetBase& set) { return set.isDiagnostics(); }
|
||||||
|
|
||||||
static void initializePeriodicHelper(LocalPoolDataSetBase& set, float collectionInterval,
|
static void initializePeriodicHelper(LocalPoolDataSetBase& set, float collectionInterval,
|
||||||
uint32_t minimumPeriodicIntervalMs,
|
uint32_t minimumPeriodicIntervalMs) {
|
||||||
uint8_t nonDiagIntervalFactor = 5) {
|
set.initializePeriodicHelper(collectionInterval, minimumPeriodicIntervalMs);
|
||||||
set.initializePeriodicHelper(collectionInterval, minimumPeriodicIntervalMs,
|
|
||||||
nonDiagIntervalFactor);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setReportingEnabled(LocalPoolDataSetBase& set, bool enabled) {
|
static void setReportingEnabled(LocalPoolDataSetBase& set, bool enabled) {
|
||||||
|
@ -34,7 +34,6 @@ uint32_t PeriodicHousekeepingHelper::intervalSecondsToIntervalTicks(
|
|||||||
if (owner == nullptr) {
|
if (owner == nullptr) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
bool isDiagnostics = owner->isDiagnostics();
|
|
||||||
|
|
||||||
/* Avoid division by zero */
|
/* Avoid division by zero */
|
||||||
if (minimumPeriodicInterval == 0) {
|
if (minimumPeriodicInterval == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user