Skip to content

Orthogonal Regions

Sergei Fedorov edited this page Nov 28, 2016 · 1 revision

A state containing orthogonal regions is a state containing one or more independent compound states.

To define a state machine with orthogonal regions you should define orthogonal_regions type as a type_tuple in a state machine. transitions and initial_state types will be ignored, the state machine will first pass the event to the contained regions (all of then than can handle the event), and then will check internal_transitions.

struct ortho_regions_def : ::afsm::def::state_machine<ortho_regions_def> {
    struct region_a : state_machine<region_a> {
        // Skip ...
    };
    struct region_b : state<region_b> {};

    using orthogonal_regions = type_tuple< region_a, region_b >;
};
Clone this wiki locally