Class HsmEventDispatcherQt
Defined in File HsmEventDispatcherQt.hpp
Public Member Functions
virtual bool | start () |
See IHsmEventDispatcher::start() | |
virtual void | stop () |
Stop dispatching events. | |
virtual void | emitEvent (const HandlerID_t handlerID) |
See IHsmEventDispatcher::emitEvent() | |
static std::shared_ptr<HsmEventDispatcherQt> | create (const size_t eventsCacheSize = (10)) |
Create dispatcher instance. | |
Inheritance Relationships
Base Types
public QObject
public hsmcpp::HsmEventDispatcherBase
(Class HsmEventDispatcherBase)
Class Documentation
-
class HsmEventDispatcherQt : public QObject, public hsmcpp::HsmEventDispatcherBase
HsmEventDispatcherQt provides dispatcher implementation based on Qt framework.
See HsmEventDispatcherQt for details.
Public Functions
-
virtual bool start() override
See IHsmEventDispatcher::start()
Not Thread Safe
Thread safety is not required by HierarchicalStateMachine::initialize() which uses this API.
-
virtual void stop() override
Stop dispatching events.
Future calls to dispatchEvents() will have no effect.
Remark
Operation is performed asynchronously. It does not interrupt currently handled event, but will cancel all other pending events.
Not Thread Safe
TODO: Current timers implementation is not thread-safe
-
virtual void emitEvent(const HandlerID_t handlerID) override
See IHsmEventDispatcher::emitEvent()
Concurrency
thread-safe
Public Static Functions
-
static std::shared_ptr<HsmEventDispatcherQt> 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