Class for the "single-threaded version" of the state machine. It provides the methods to start the state machine, to fire events, to check the state machine for possible defects and to get the root state reference.
More...
|
| sync_state_machine (const std::string &_name, event_processing_callback *const _event_processing_callback=SX_NULLPTR) |
| Constructor. More...
|
|
virtual | ~sync_state_machine () SX_NOEXCEPT SX_OVERRIDE |
|
virtual bool | push (const event_sptr &_event) SX_OVERRIDE |
|
virtual bool | fire_event (const event_sptr &_event) SX_OVERRIDE |
| Fire the given event. More...
|
|
virtual bool | run () SX_OVERRIDE |
| Starts the state machine. More...
|
|
| state_machine_base (const std::string &_name, event_processing_callback *const _event_processing_callback=SX_NULLPTR) |
| Constructor. More...
|
|
virtual | ~state_machine_base () SX_NOEXCEPT SX_OVERRIDE |
|
composite_state & | get_root_state () const |
| Returns the root state of the state machine. Commonly used to add regions to the root state and to create transitions from and to the root state. More...
|
|
virtual transition & | add_transition (transition_uptr _transition) |
| Add a transition to the state machine. The state machine takes ownership of the transition. More...
|
|
virtual transition & | add_transition (const event_id _event_id, vertex &_source, vertex &_target, const sxy::transition_kind _kind=transition_kind::EXTERNAL, const constraint_function &_guard=constraint_function(), const behavior_function &_behavior=behavior_function()) |
| Creates a transition with the given name, kind, event, guard and behavior between the given source and target and adds it to the state machine. More...
|
|
virtual transition & | add_transition (const event_ids &_event_ids, vertex &_source, vertex &_target, const sxy::transition_kind _kind=transition_kind::EXTERNAL, const constraint_function &_guard=constraint_function(), const behavior_function &_behavior=behavior_function()) |
| Creates a transition with the given name, kind, event, guard and behavior between the given source and target and adds it to the state machine. More...
|
|
virtual transition & | add_transition (const event_id _event_id, vertex &_source, vertex &_target, const constraint_function &_guard, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, event, guard between the given source and target and adds it to the state machine. No behavior is provided. More...
|
|
virtual transition & | add_transition (const event_ids &_event_ids, vertex &_source, vertex &_target, const constraint_function &_guard, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, events, guard between the given source and target and adds it to the state machine. No behavior is provided. More...
|
|
virtual transition & | add_transition (const event_id _event_id, vertex &_source, vertex &_target, const constraint_function &_guard, const behavior_function &_behavior, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, event, guard and behavior between the given source and target and adds it to the state machine. More...
|
|
virtual transition & | add_transition (const event_ids &_event_ids, vertex &_source, vertex &_target, const constraint_function &_guard, const behavior_function &_behavior, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, events, guard and behavior between the given source and target and adds it to the state machine. More...
|
|
virtual transition & | add_transition (const event_id _event_id, vertex &_source, vertex &_target, const behavior_function &_behavior, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, event and behavior between the given source and target and adds it to the state machine. No guard is provided. More...
|
|
virtual transition & | add_transition (const event_ids &_event_ids, vertex &_source, vertex &_target, const behavior_function &_behavior, const sxy::transition_kind _kind=transition_kind::EXTERNAL) |
| Creates a transition with the given name, kind, events and behavior between the given source and target and adds it to the state machine. No guard is provided. More...
|
|
bool | check (state_machine_defects &_defects) const |
| Check the state machine for defects by checking the constraints of each component. More...
|
|
virtual void | halt () |
| Stops the state machine. It checks for active asynchronous simple states and stops their do behaviors. More...
|
|
virtual void | interrupt () |
| Set the internal flag of the state machine, to interrupt all processes inside the state machine and to stop the state machine. More...
|
|
virtual bool | is_interrupted () const SX_OVERRIDE |
| Get the internal flag of the state machine that specify if the run of state machine is interrupted. More...
|
|
virtual void | set_behavior_of_unhandled_event_handler (const behavior_function &_behavior) |
| Sets the behavior for handler of unhandled events. More...
|
|
virtual std::string | get_name () const |
| Get the name of the state machine. More...
|
|
| event_collector () |
|
virtual | ~event_collector () SX_NOEXCEPT |
|
Class for the "single-threaded version" of the state machine. It provides the methods to start the state machine, to fire events, to check the state machine for possible defects and to get the root state reference.