|
The Boost Statechart Library
UML to Boost.Statechart mapping summary
|
Contents
- State machine
- States
- Normal state
- Initial pseudostate
- Final pseudostate
- Shallow history
pseudostate
- Deep history pseudostate
- Junction point
- Dynamic choice point
- Join and fork bars
- Events
- Call event
- Signal event
- Time event
- Change event
- Reactions
- Guard
- Transition
- Deferral
- Internal transition (in-state
reaction)
- Actions
- Entry action
- Exit action
- Transition action
- Do activity
- A state is defined by deriving a class from either the
simple_state or
state class
templates; example
- The position of a state in the state hierarchy is defined by what is
passed as the
Context template parameter. Outermost states pass the
state_machine<>
or asynchronous_state_machine<>
subtype they belong to, inner states pass their direct outer state;
example
- A state can be made a member of a particular orthogonal region by
passing an instantiation of the
orthogonal class template
nested in its outer state; example
- The state that is initially entered is identified by template
parameters rather than by a default transition from the initial
pseudostate (there is no such thing in Boost.Statechart)
- For
state_machine<>
and asynchronous_state_machine<>
the state that is initially entered needs to be specified with the
InitialState template parameter; example
- For
simple_state<>
and state<> the inner
state(s) that is/are initially entered can be specified with the
InnerInitial template parameter; example
- A shallow history transition target or shallow history inner initial
state can be specified with
shallow_history<>
- A deep history transition target or deep history inner initial state
can be specified with
deep_history<> ;
example
- Does not exist in Boost.Statechart; rationale
- Does not (yet?) exist in Boost.Statechart; rationale
- A event is defined by deriving a class from the
event class
template; example
- There is no distinction between signal and call events, see
below
- Does not exist in Boost.Statechart
- A time event can be simulated with an external timer that is started
in the entry action and stopped in the exit action of a particular state.
When starting the timer, it is instructed to call
fifo_scheduler<>::queue_event()
when the due time elapses
- Does not exist in Boost.Statechart
- A change event can be simulated by packing to be monitored variables
into an external wrapper with
get and set
methods. Whenever set is called the wrapper posts an
appropriate event
- A state entry action can be defined by adding a constructor to a
state class; example
- A state exit action can be defined by adding a destructor to a state
class; example
- Not supported in Boost.Statechart
- A do activity can be simulated with a separate thread that is started
in the entry action and cancelled (!) in the exit action of a particular
state
Revised
03 December, 2006
Copyright © 2003-2006
Andreas Huber Dönni
Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or
copy at http://www.boost.org/LICENSE_1_0.txt)
|