15 #ifndef DETECTORGRAPH_TEST_UTIL_TESTTIMEOUTPUBLISHERSERVICE_HPP_ 16 #define DETECTORGRAPH_TEST_UTIL_TESTTIMEOUTPUBLISHERSERVICE_HPP_ 22 #if defined(BUILD_FEATURE_DETECTORGRAPH_CONFIG_LITE) 24 #include "detectorgraphliteconfig.hpp" 44 #if defined(BUILD_FEATURE_DETECTORGRAPH_CONFIG_LITE) 45 struct TimeOffsetPairType
53 typedef std::map<TimeoutPublisherHandle, TimeOffset> TimeOffsetsContainer;
55 typedef TimeOffsetsContainer::iterator TimeOffsetsIterator;
78 TimeOffsetsIterator GetNextTimeout();
86 TimeOffsetsContainer mTimerDeadlines;
91 int64_t mWallClockOffset;
98 #endif // DETECTORGRAPH_TEST_UTIL_TESTTIMEOUTPUBLISHERSERVICE_HPP_ virtual void SetTimeout(const TimeOffset aMillisecondsFromNow, const TimeoutPublisherHandle aTimerId)
Should setup a timeout for the given handle.
Implements a graph of Topics & Detectors with Input/Output APIs.
Push data to a topic when timer expires.
virtual TimeOffset GetTime() const
Should return the time offset to Epoch.
virtual void Start(const TimeoutPublisherHandle aTimerId)
Should start a timer for the given handle.
A service that provides Timer function to DetectorGraph Detectors.
int TimeoutPublisherHandle
virtual TimeOffset GetMonotonicTime() const
Should return monotonic time since some unspecified starting point.
TimeOffset GetMetronomePeriod()
virtual void CancelMetronome()
Should stop the metronome.
void SetWallClockOffset(int64_t aWallClockOffset)
virtual void StartMetronome(const TimeOffset aPeriodInMilliseconds)
Should start the metronome (periodic timer) for the given period.
TestTimeoutPublisherService(Graph &arGraph)
bool ForwardTimeAndEvaluate(TimeOffset aFwdTime, Graph &aGraphToEvaluate)
virtual void Cancel(const TimeoutPublisherHandle aTimerId)
Should cancel the timer the given handle.