15 #ifndef DETECTORGRAPH_INCLUDE_TIMEOUTPUBLISHER_HPP_ 16 #define DETECTORGRAPH_INCLUDE_TIMEOUTPUBLISHER_HPP_ 133 #endif // DETECTORGRAPH_INCLUDE_TIMEOUTPUBLISHER_HPP_ Push data to a topic when timer expires.
bool HasTimeoutExpired(const TimeoutPublisherHandle aTimerHandle) const
Returns weather the timeout for a given handle has expired/fired already.
void CancelPublishOnTimeout(const TimeoutPublisherHandle aTimerHandle)
Cancels a timeout and deletes the stored TopicState.
TimeoutPublisherHandle GetUniqueTimerHandle()
Returns a unique id/handle for a new timer.
A service that provides Timer function to DetectorGraph Detectors.
void PublishOnTimeout(const T &aData, const uint64_t aMillisecondsFromNow, TimeoutPublisherHandle aTimerId=kInvalidTimeoutPublisherHandle)
Schedules a TopicState for Publishing after a timeout.
int TimeoutPublisherHandle
void ScheduleTimeout(const T &aData, const TimeOffset aMillisecondsFromNow, const TimeoutPublisherHandle aTimerHandle)
Schedules a TopicState for Publishing after a timeout.
void SetTimeoutService(TimeoutPublisherService *apTimeoutPublisherService)
Sets the timeout service and acquires a TimerHandle to be used by the default/simple API...
TimeoutPublisherHandle mDefaultHandle
void CancelPublishOnTimeout(TimeoutPublisherHandle aTimerId=kInvalidTimeoutPublisherHandle)
Cancels the Scheduled PublishOnTimeout.
virtual ~TimeoutPublisher()
Empty Virtual Destructor.
bool HasTimeoutExpired(TimeoutPublisherHandle aTimerId=kInvalidTimeoutPublisherHandle) const
Returns weather a timeout has expired or not.
TimeoutPublisher()
Basic Constructor.
TimeoutPublisherService * mpTimeoutPublisherService