jkflying / usm

Micro State Machine library for C++11 with directly compiled transitions and auto-generated state transition diagrams

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

usm

Micro State Machine for C++11

This is a lightweight state machine, or more some tools to help you make your own classes into well organized state machines. The state transition design is specified in a declarative manner, allowing humans to have a quick overview of all of the states, transitions and fallbacks configured.

Performance

It is configured entirely at compile time, requires no dynamic memory allocations or vtable lookups, and should be extremely fast and lightweight.

Helpers

There is also the capability to generate .dot files for visualizing the state flow transitions, by parsing the configuration table out of C++ code. Check out what it looks like here!

Sounds good, how do I use it?

There is a full example in the tests. Otherwise you can check out PX4/Avoidance where it is used in several places.

About

Micro State Machine library for C++11 with directly compiled transitions and auto-generated state transition diagrams

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:C++ 57.1%Language:Python 42.3%Language:CMake 0.7%