blob: 8b3ae5dcdc2516a499b32e93827c221a03a6ebd3 [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#d0e201">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#d0e211">State machine, state, transition, event </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e241">Submachines, orthogonal regions, pseudostates </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e284">
History </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e298">Completion transitions / anonymous
transitions</a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e310"> Internal transitions </a></span></dt><dt><span class="sect2"><a href="ch02s02.html#d0e316">
Conflicting transitions </a></span></dt></dl></dd><dt><span class="sect1"><a href="ch02s03.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#d0e405">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#d0e424">A simple example</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e438">Transition table</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e486">Defining states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e499">What do you actually do inside actions / guards?</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e551">Defining a simple state machine</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e609">Defining a submachine</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e644">Orthogonal regions, terminate state, event deferring</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e735">History</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e780">Completion (anonymous) transitions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e807">Internal transitions</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e909">more row types</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e942">Explicit entry / entry and exit pseudo-state / fork</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1122">Flags</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1176">Event Hierarchy</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1197">Customizing a state machine / Getting more speed</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1246">Choosing the initial event</a></span></dt><dt><span class="sect2"><a href="ch03s02.html#d0e1259"> 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#d0e1298"> Transition table </a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1331">Defining states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1350">What do you actually do inside actions / guards (Part 2)?</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1362">Defining a simple state machine</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1370">Anonymous transitions</a></span></dt><dt><span class="sect2"><a href="ch03s03.html#d0e1396">Internal
transitions</a></span></dt></dl></dd><dt><span class="sect1"><a href="ch03s04.html">eUML (experimental)</a></span></dt><dd><dl><dt><span class="sect2"><a href="ch03s04.html#d0e1475">Transition table</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1516">A simple example: rewriting only our transition table</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1547">Defining events, actions and states with entry/exit actions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1660">Wrapping up a simple state machine and first complete examples</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1708">Defining a submachine</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1724">
Attributes / Function call</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1824">Orthogonal regions, flags, event deferring</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1936">
Customizing a state machine / Getting
more speed</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1971">Completion / Anonymous transitions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e1989">Internal transitions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2020">Other state types</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2084">Helper functions</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2181">Phoenix-like STL support</a></span></dt><dt><span class="sect2"><a href="ch03s04.html#d0e2234">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#d0e2293">Creation </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2302">Starting and stopping a state
machine</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2321">Event dispatching</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2330">Active state(s)</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2344">Serialization</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2397">Base state type </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2423">Visitor</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2466">Flags</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2479">Getting a state</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2492"> State machine constructor with arguments </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2532">Trading run-time speed for
better compile-time / multi-TU compilation</a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2614">Compile-time state machine analysis </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2658"> Enqueueing events for later
processing </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2678"> Customizing the message queues </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2693">Policy definition with Boost.Parameter </a></span></dt><dt><span class="sect2"><a href="ch03s05.html#d0e2701">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#d0e2782">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#d0e2995">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#d0e3290">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#d0e3337">From V2.20 to V2.21 (Boost 1.47)</a></span></dt><dt><span class="sect1"><a href="ch08s02.html">From V2.12 to V2.20 (Boost 1.46)</a></span></dt><dt><span class="sect1"><a href="ch08s03.html">From V2.10 to V2.12 (Boost 1.45)</a></span></dt><dt><span class="sect1"><a href="ch08s04.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. eUML operators and basic helpers</a></span></dt><dt><span class="chapter"><a href="ch10.html">10.
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>9.1. <a href="ch09.html#d0e3512">Operators and state machine helpers</a></dt><dt>10.1. <a href="ch10.html#d0e3867">STL algorithms</a></dt><dt>10.2. <a href="ch10.html#d0e3980">STL algorithms</a></dt><dt>10.3. <a href="ch10.html#d0e4008">STL algorithms</a></dt><dt>10.4. <a href="ch10.html#d0e4226">STL container methods</a></dt><dt>10.5. <a href="ch10.html#d0e4357">STL list methods</a></dt><dt>10.6. <a href="ch10.html#d0e4433">STL associative container methods </a></dt><dt>10.7. <a href="ch10.html#d0e4504">STL pair</a></dt><dt>10.8. <a href="ch10.html#d0e4530">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>