Class HsmEventDispatcherBase

Public Member Functions

 
virtual voidstop ()
 See IHsmEventDispatcher::stop()
 
virtual HandlerID_tregisterEventHandler (const EventHandlerFunc_t &handler)
 See IHsmEventDispatcher::registerEventHandler()
 
virtual voidunregisterEventHandler (const HandlerID_t handlerID)
 See IHsmEventDispatcher::unregisterEventHandler()
 
virtual voidemitEvent (const HandlerID_t handlerID)
 See IHsmEventDispatcher::emitEvent()
 
virtual boolenqueueEvent (const HandlerID_t handlerID, const EventID_t event)
 See IHsmEventDispatcher::enqueueEvent()
 
virtual voidenqueueAction (ActionHandlerFunc_t actionCallback)
 See IHsmEventDispatcher::enqueueAction()
 
virtual HandlerID_tregisterEnqueuedEventHandler (const EnqueuedEventHandlerFunc_t &handler)
 See IHsmEventDispatcher::registerEnqueuedEventHandler()
 
virtual voidunregisterEnqueuedEventHandler (const HandlerID_t handlerID)
 See IHsmEventDispatcher::unregisterEnqueuedEventHandler()
 
virtual HandlerID_tregisterTimerHandler (const TimerHandlerFunc_t &handler)
 See IHsmEventDispatcher::registerTimerHandler()
 
virtual voidunregisterTimerHandler (const HandlerID_t handlerID)
 See IHsmEventDispatcher::unregisterTimerHandler()
 
virtual voidstartTimer (const HandlerID_t handlerID, const TimerID_t timerID, const unsigned int intervalMs, const bool isSingleShot)
 See IHsmEventDispatcher::startTimer()
 
virtual voidrestartTimer (const TimerID_t timerID)
 See IHsmEventDispatcher::restartTimer()
 
virtual voidstopTimer (const TimerID_t timerID)
 See IHsmEventDispatcher::stopTimer()
 
virtual boolisTimerRunning (const TimerID_t timerID)
 See IHsmEventDispatcher::isTimerRunning()
 

Inheritance Relationships

Base Type

Derived Types

Class Documentation

class HsmEventDispatcherBase : public hsmcpp::IHsmEventDispatcher

HsmEventDispatcherBase provides common implementation for all dispatchers.

Class contains all platform/framework independent logic for dispatchers. Even though it’s not mandatory to use HsmEventDispatcherBase when implementing your own dispatcher, it’s highly probable that this class will be a better choice than directly subclassing from IHsmEventDispatcher.

Subclassed by hsmcpp::HsmEventDispatcherArduino, hsmcpp::HsmEventDispatcherFreeRTOS, hsmcpp::HsmEventDispatcherGLib, hsmcpp::HsmEventDispatcherGLibmm, hsmcpp::HsmEventDispatcherQt, hsmcpp::HsmEventDispatcherSTD

Public Functions


virtual void stop() override

See IHsmEventDispatcher::stop()

Concurrency

thread-safe


virtual HandlerID_t registerEventHandler(const EventHandlerFunc_t &handler) override

See IHsmEventDispatcher::registerEventHandler()

Concurrency

thread-safe


virtual void unregisterEventHandler(const HandlerID_t handlerID) override

See IHsmEventDispatcher::unregisterEventHandler()

Concurrency

thread-safe


virtual void emitEvent(const HandlerID_t handlerID) override = 0

See IHsmEventDispatcher::emitEvent()

Concurrency

thread-safe


virtual bool enqueueEvent(const HandlerID_t handlerID, const EventID_t event) override

See IHsmEventDispatcher::enqueueEvent()

Concurrency

thread-safe, interrupt-safe


virtual void enqueueAction(ActionHandlerFunc_t actionCallback) override

See IHsmEventDispatcher::enqueueAction()

Concurrency

thread-safe


virtual HandlerID_t registerEnqueuedEventHandler(const EnqueuedEventHandlerFunc_t &handler) override

See IHsmEventDispatcher::registerEnqueuedEventHandler()

Concurrency

thread-safe


virtual void unregisterEnqueuedEventHandler(const HandlerID_t handlerID) override

See IHsmEventDispatcher::unregisterEnqueuedEventHandler()

Concurrency

thread-safe


virtual HandlerID_t registerTimerHandler(const TimerHandlerFunc_t &handler) override

See IHsmEventDispatcher::registerTimerHandler()

Concurrency

thread-safe


virtual void unregisterTimerHandler(const HandlerID_t handlerID) override

See IHsmEventDispatcher::unregisterTimerHandler()

Concurrency

thread-safe


virtual void startTimer(const HandlerID_t handlerID, const TimerID_t timerID, const unsigned int intervalMs, const bool isSingleShot) override

See IHsmEventDispatcher::startTimer()

Concurrency

thread-safe


virtual void restartTimer(const TimerID_t timerID) override

See IHsmEventDispatcher::restartTimer()

Concurrency

thread-safe


virtual void stopTimer(const TimerID_t timerID) override

See IHsmEventDispatcher::stopTimer()

Concurrency

thread-safe


virtual bool isTimerRunning(const TimerID_t timerID) override

See IHsmEventDispatcher::isTimerRunning()

Concurrency

thread-safe