Skip to content

Commit

Permalink
Restyled by clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and lpbeliveau-silabs committed Jul 25, 2023
1 parent a6d1048 commit 1038959
Showing 1 changed file with 10 additions and 40 deletions.
50 changes: 10 additions & 40 deletions src/app/reporting/ReportScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,8 @@ class ReportScheduler : public ReadHandler::Observer
MinIntervalElapsed = (1 << 0),
MaxIntervalElapsed = (1 << 1),
};
void SetTestFlags(TestFlags aFlag, bool aValue)
{
mFlags.Set(aFlag, aValue);
}
bool GetTestFlags(TestFlags aFlag) const
{
return mFlags.Has(aFlag);
}
void SetTestFlags(TestFlags aFlag, bool aValue) { mFlags.Set(aFlag, aValue); }
bool GetTestFlags(TestFlags aFlag) const { return mFlags.Has(aFlag); }
#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST

ReadHandlerNode(ReadHandler * aReadHandler, TimerDelegate * aTimerDelegate, ReportScheduler * aScheduler) :
Expand All @@ -89,10 +83,7 @@ class ReportScheduler : public ReadHandler::Observer
mReadHandler = aReadHandler;
SetIntervalTimeStamps(aReadHandler);
}
ReadHandler * GetReadHandler() const
{
return mReadHandler;
}
ReadHandler * GetReadHandler() const { return mReadHandler; }

/// @brief Check if the Node is reportable now, meaning its readhandler was made reportable by attribute dirtying and
/// handler state, and minimal time interval since last report has elapsed, or the maximal time interval since last
Expand All @@ -111,10 +102,7 @@ class ReportScheduler : public ReadHandler::Observer
#endif // CONFIG_BUILD_FOR_HOST_UNIT_TEST
}

bool IsEngineRunScheduled() const
{
return mEngineRunScheduled;
}
bool IsEngineRunScheduled() const { return mEngineRunScheduled; }
void SetEngineRunScheduled(bool aEngineRunScheduled)
{
mEngineRunScheduled = aEngineRunScheduled;
Expand Down Expand Up @@ -152,18 +140,9 @@ class ReportScheduler : public ReadHandler::Observer
mSyncTimestamp = aSyncTimestamp;
}

System::Clock::Timestamp GetMinTimestamp() const
{
return mMinTimestamp;
}
System::Clock::Timestamp GetMaxTimestamp() const
{
return mMaxTimestamp;
}
System::Clock::Timestamp GetSyncTimestamp() const
{
return mSyncTimestamp;
}
System::Clock::Timestamp GetMinTimestamp() const { return mMinTimestamp; }
System::Clock::Timestamp GetMaxTimestamp() const { return mMaxTimestamp; }
System::Clock::Timestamp GetSyncTimestamp() const { return mSyncTimestamp; }

private:
#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST
Expand Down Expand Up @@ -202,21 +181,12 @@ class ReportScheduler : public ReadHandler::Observer

/// @brief Check whether a ReadHandler is reportable right now, taking into account its minimum and maximum intervals.
/// @param aReadHandler read handler to check
bool IsReportableNow(ReadHandler * aReadHandler)
{
return FindReadHandlerNode(aReadHandler)->IsReportableNow();
}
bool IsReportableNow(ReadHandler * aReadHandler) { return FindReadHandlerNode(aReadHandler)->IsReportableNow(); }
/// @brief Check if a ReadHandler is reportable without considering the timing
bool IsReadHandlerReportable(ReadHandler * aReadHandler) const
{
return aReadHandler->IsReportable();
}
bool IsReadHandlerReportable(ReadHandler * aReadHandler) const { return aReadHandler->IsReportable(); }

/// @brief Get the number of ReadHandlers registered in the scheduler's node pool
size_t GetNumReadHandlers() const
{
return mNodesPool.Allocated();
}
size_t GetNumReadHandlers() const { return mNodesPool.Allocated(); }

#ifdef CONFIG_BUILD_FOR_HOST_UNIT_TEST
void RunNodeCallbackForHandler(const ReadHandler * aReadHandler)
Expand Down

0 comments on commit 1038959

Please sign in to comment.