Class HsmEventDispatcherArduino
Defined in File HsmEventDispatcherArduino.hpp
Public Member Functions
virtual bool | start () |
See IHsmEventDispatcher::start() | |
virtual void | emitEvent (const HandlerID_t handlerID) |
See IHsmEventDispatcher::emitEvent() | |
void | dispatchEvents () |
Dispatch pending events. | |
static std::shared_ptr<HsmEventDispatcherArduino> | create (const size_t eventsCacheSize = (10)) |
Create dispatcher instance. | |
Inheritance Relationships
Base Type
public hsmcpp::HsmEventDispatcherBase
(Class HsmEventDispatcherBase)
Class Documentation
-
class HsmEventDispatcherArduino : public hsmcpp::HsmEventDispatcherBase
HsmEventDispatcherArduino provides dispatcher for Arduino platform.
Clients are supposed to call HsmEventDispatcherArduino::dispatchEvents() in loop() method of the application. See HsmEventDispatcherArduino for details.
Public Functions
-
virtual bool start() override
See IHsmEventDispatcher::start()
Concurrency
thread-safe, interrupt-safe
-
virtual void emitEvent(const HandlerID_t handlerID) override
See IHsmEventDispatcher::emitEvent()
Concurrency
thread-safe
-
void dispatchEvents()
Dispatch pending events.
Applications must call this method in Android’s loop() function as often as possible. It does nothing and returns quickly if there are no pending events.
Concurrency
thread-safe
Public Static Functions
-
static std::shared_ptr<HsmEventDispatcherArduino> create(const size_t eventsCacheSize = (10))
Create dispatcher instance.
Concurrency
- thread-safe
Instance can be safely created and destroyed from any thread.
- Parameters
eventsCacheSize – size of the queue preallocated for delayed events
- Returns
New dispatcher instance.
-
virtual bool start() override