- Notifications
You must be signed in to change notification settings - Fork25
Event Deferring
Any state or a state machine can declare that it 'defers' an event. That means that the state cannot handle the event straight away, but the event should be saved for processing later, by a state that can handle it. To achieve it, a state or a state machine should define data typedeferred_events that is a type alias for a::psst::meta::type_tuple variadic template containing event types. There istype_tuple type alias inside::afsm::def::state and::afsm::def::state_machine templates.
structmy_state : state<my_state> {using deferred_events = type_tuple< event_a, event_b >;};
Deferred events will be stored by the outermost state machine in deferred queue and they will be checked for processing after each state transition (event handled without a state transition won't provide conditions to process the events). The events will be copied to the event queue. Move construction will be used if applicable.
- Home
- Tutorial
- Concepts
- State Hierarchy
- Entry/Exit Actions
- Transition Actions
- Transition Guards
- Internal Transitions
- Default Transitions
- Event Deferring
- History
- Orthogonal Regions
- Event Priority
- Common Base
- Thread Safety
- Exception Safety Guarantees
- Under the Hood
- Event Processing
- Performance