blob: b05991b593d547bb1e70b28f8a610d6cac34c9ac [file] [log] [blame]
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Meta State Machine (MSM)</title><link rel="stylesheet" href="boostbook.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.75.2"><link rel="home" href="index.html" title="Meta State Machine (MSM)"><link rel="next" href="pr01.html" title="Preface"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Meta State Machine (MSM)</th></tr><tr><td width="20%" align="left">&nbsp;</td><th width="60%" align="center">&nbsp;</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="pr01.html">Next</a></td></tr></table><hr></div><div class="book" title="Meta State Machine (MSM)"><div class="titlepage"><div><div><h1 class="title"><a name="d0e2"></a>Meta State Machine (MSM)</h1></div><div><div class="author"><h3 class="author">Christophe Henry</h3><code class="email">&lt;<a class="email" href="mailto:christophe.j.henry@googlemail.com">christophe.j.henry@googlemail.com</a>&gt;</code></div></div><div><p class="copyright">Copyright &copy; 2008-2010
<span> Distributed under the Boost Software License, Version 1.0. (See
accompanying file LICENSE_1_0.txt or copy at <a class="link" href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a> ) </span>
</p></div></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="preface"><a href="pr01.html">Preface</a></span></dt><dt><span class="part"><a href="pt01.html">I. User' guide</a></span></dt><dd><dl><dt><span class="chapter"><a href="ch01.html">1. Founding idea</a></span></dt><dt><span class="chapter"><a href="ch02.html">2. UML Short Guide</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch02.html#d0e111">What are state machines?</a></span></dt><dt><span class="sect1"><a href="ch02s02.html">Concepts</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch02s02.html#d0e121">State machine, state, transition, event </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e151">Submachines, orthogonal regions, pseudostates </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e194">
History </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e208">Completion transitions / anonymous
transitions</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e220"> Internal transitions </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e226">
Conflicting transitions </a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s03.html">Added concepts</a></span></dt><dt><span class="sect1"><a href="ch02s04.html">State machine glossary</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch03.html">3. Tutorial</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch03.html#d0e325">Design</a></span></dt><dt><span class="sect1"><a href="ch03s02.html">Basic front-end</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s02.html#d0e344">A simple example</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e358">Transition table</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e406">Defining states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e419">What do you actually do inside actions / guards?</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e471">Defining a simple state machine</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e529">Defining a submachine</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e577">Orthogonal regions, terminate state, event deferring</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e668">History</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e713">Completion (anonymous) transitions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e740">Internal transitions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e842">more row types</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e875">Explicit entry / entry and exit pseudo-state / fork</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1064">Flags</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1126">Event Hierarchy</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1147">Customizing a state machine / Getting more speed</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1196">Choosing the initial event</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1209"> Containing state machine (deprecated)</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s03.html">Functor front-end</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s03.html#d0e1248"> Transition table </a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1281">Defining states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1300">What do you actually do inside actions / guards (Part 2)?</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1312">Defining a simple state machine</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1320">Anonymous transitions</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1346">Internal
transitions</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1392">Kleene (any) event</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">eUML</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s04.html#d0e1462">Transition table</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1503">A simple example: rewriting only our transition table </a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1536">Defining events, actions and states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1649">Wrapping up a simple state machine and first complete examples</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1697">Defining a submachine</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1713">
Attributes / Function call</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1813">Orthogonal regions, flags, event deferring</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1925">
Customizing a state machine / Getting
more speed</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1960">Completion / Anonymous transitions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1978">Internal transitions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2009">Kleene(any) event)</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2024">Other state types</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2088">Helper functions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2191">Phoenix-like STL support</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2244">Writing actions with Boost.Phoenix (in development)</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s05.html">Back-end</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s05.html#d0e2303">Creation </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2312">Starting and stopping a state
machine</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2331">Event dispatching</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2340">Active state(s)</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2354">Serialization</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2407">Base state type </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2433">Visitor</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2476">Flags</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2489">Getting a state</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2502"> State machine constructor with arguments </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2542">Trading run-time speed for
better compile-time / multi-TU compilation</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2624">Compile-time state machine analysis </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2668"> Enqueueing events for later
processing </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2691"> Customizing the message queues </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2706">Policy definition with Boost.Parameter </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2714">Choosing when to switch active
states </a></span></dt></dl></dd></dl></dd><dt><span class="chapter"><a href="ch04.html">4. Performance / Compilers</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch04.html#d0e2795">Speed</a></span></dt><dt><span class="sect1"><a href="ch04s02.html">Executable size</a></span></dt><dt><span class="sect1"><a href="ch04s03.html">Supported compilers</a></span></dt><dt><span class="sect1"><a href="ch04s04.html"> Limitations </a></span></dt><dt><span class="sect1"><a href="ch04s05.html"> Compilers corner </a></span></dt></dl></dd><dt><span class="chapter"><a href="ch05.html">5. Questions &amp; Answers, tips</a></span></dt><dt><span class="chapter"><a href="ch06.html">6. Internals</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch06.html#d0e3013">Backend: Run To Completion</a></span></dt><dt><span class="sect1"><a href="ch06s02.html">Frontend / Backend
interface</a></span></dt><dt><span class="sect1"><a href="ch06s03.html"> Generated state ids </a></span></dt><dt><span class="sect1"><a href="ch06s04.html">Metaprogramming tools</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch07.html">7. Acknowledgements</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch07.html#d0e3308">MSM v2</a></span></dt><dt><span class="sect1"><a href="ch07s02.html"> MSM v1</a></span></dt></dl></dd><dt><span class="chapter"><a href="ch08.html">8. Version history</a></span></dt><dd><dl><dt><span class="sect1"><a href="ch08.html#d0e3355">From V2.27 to V2.28 (Boost 1.57)</a></span></dt><dt><span class="sect1"><a href="ch08s02.html">From V2.26 to V2.27 (Boost 1.56)</a></span></dt><dt><span class="sect1"><a href="ch08s03.html">From V2.25 to V2.26 (Boost 1.55)</a></span></dt><dt><span class="sect1"><a href="ch08s04.html">From V2.24 to V2.25 (Boost 1.54)</a></span></dt><dt><span class="sect1"><a href="ch08s05.html">From V2.23 to V2.24 (Boost 1.51)</a></span></dt><dt><span class="sect1"><a href="ch08s06.html">From V2.22 to V2.23 (Boost 1.50)</a></span></dt><dt><span class="sect1"><a href="ch08s07.html">From V2.21 to V2.22 (Boost 1.48)</a></span></dt><dt><span class="sect1"><a href="ch08s08.html">From V2.20 to V2.21 (Boost 1.47)</a></span></dt><dt><span class="sect1"><a href="ch08s09.html">From V2.12 to V2.20 (Boost 1.46)</a></span></dt><dt><span class="sect1"><a href="ch08s10.html">From V2.10 to V2.12 (Boost 1.45)</a></span></dt><dt><span class="sect1"><a href="ch08s11.html">From V2.0 to V2.12 (Boost 1.44)</a></span></dt></dl></dd></dl></dd><dt><span class="part"><a href="pt02.html">II. Reference</a></span></dt><dd><dl><dt><span class="chapter"><a href="ch09.html">9. External references to MSM</a></span></dt><dt><span class="chapter"><a href="ch10.html">10. eUML operators and basic helpers</a></span></dt><dt><span class="chapter"><a href="ch11.html">11.
Functional programming </a></span></dt><dt><span class="refentrytitle"><a href="re01.html">Common headers</a></span><span class="refpurpose"> &#8212; The common types used by front- and back-ends</span></dt><dt><span class="refentrytitle"><a href="re02.html">Back-end</a></span><span class="refpurpose"> &#8212; The back-end headers</span></dt><dt><span class="refentrytitle"><a href="re03.html">Front-end</a></span><span class="refpurpose"> &#8212; The front-end headers</span></dt></dl></dd></dl></div><div class="list-of-tables"><p><b>List of Tables</b></p><dl><dt>10.1. <a href="ch10.html#d0e3712">Operators and state machine helpers</a></dt><dt>11.1. <a href="ch11.html#d0e4067">STL algorithms</a></dt><dt>11.2. <a href="ch11.html#d0e4180">STL algorithms</a></dt><dt>11.3. <a href="ch11.html#d0e4208">STL algorithms</a></dt><dt>11.4. <a href="ch11.html#d0e4426">STL container methods</a></dt><dt>11.5. <a href="ch11.html#d0e4557">STL list methods</a></dt><dt>11.6. <a href="ch11.html#d0e4633">STL associative container methods </a></dt><dt>11.7. <a href="ch11.html#d0e4704">STL pair</a></dt><dt>11.8. <a href="ch11.html#d0e4730">STL string</a></dt></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right">&nbsp;<a accesskey="n" href="pr01.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">&nbsp;</td><td width="20%" align="center">&nbsp;</td><td width="40%" align="right" valign="top">&nbsp;Preface</td></tr></table></div></body></html>