All Projects → p-groarke → fea_state_machines

p-groarke / fea_state_machines

Licence: BSD-3-Clause License
A Buffet Of C++17 State Machines

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to fea state machines

xstate-cpp-generator
C++ State Machine generator for Xstate
Stars: ✭ 33 (+73.68%)
Mutual labels:  fsm, state-machine, fsm-library
kstatemachine
KStateMachine is a Kotlin DSL library for creating finite state machines (FSM) and hierarchical state machines (HSM).
Stars: ✭ 63 (+231.58%)
Mutual labels:  fsm, state-machine, fsm-library
HFSM
Hierarchical Finite State Machine Framework
Stars: ✭ 73 (+284.21%)
Mutual labels:  fsm, fsm-library, hfsm
qm
QM model-based design tool and code generator based on UML state machines
Stars: ✭ 54 (+184.21%)
Mutual labels:  fsm, state-machine
remachine
[WIP] Reason pattern matching viz
Stars: ✭ 44 (+131.58%)
Mutual labels:  fsm, state-machine
tsm
A Hierarchical State Machine Framework in C++
Stars: ✭ 30 (+57.89%)
Mutual labels:  state-machine, state-charts
FiniteStateMachine
This project is a finite state machine designed to be used in games.
Stars: ✭ 45 (+136.84%)
Mutual labels:  fsm, state-machine
xstate
State machines and statecharts for the modern web.
Stars: ✭ 21,286 (+111931.58%)
Mutual labels:  fsm, state-machine
use-state-machine
Use Finite State Machines with React Hooks
Stars: ✭ 28 (+47.37%)
Mutual labels:  fsm, state-machine
simple-state-machine
A simple Java state machine for Spring Boot projects
Stars: ✭ 25 (+31.58%)
Mutual labels:  fsm, state-machine
statemachine-go
🚦 Declarative Finite-State Machines in Go
Stars: ✭ 47 (+147.37%)
Mutual labels:  fsm, state-machine
guile-smc
GNU Guile State Machine Compiler
Stars: ✭ 15 (-21.05%)
Mutual labels:  fsm, state-machines
stateless
Finite State Machine porting from Stateless C#
Stars: ✭ 25 (+31.58%)
Mutual labels:  fsm, state-machine
qp-arduino
QP real-time embedded frameworks/RTOS for Arduino (AVR and SAM)
Stars: ✭ 37 (+94.74%)
Mutual labels:  fsm, state-machine
flow
A Statically Type Checked State Machine DSL for Kotlin
Stars: ✭ 74 (+289.47%)
Mutual labels:  fsm, state-machine
kuafu
This is a tool library that includes log, fsm, state machine...
Stars: ✭ 83 (+336.84%)
Mutual labels:  fsm, state-machine
Fluent State Machine
Fluent API for creating state machines in C#
Stars: ✭ 195 (+926.32%)
Mutual labels:  fsm, state-machine
Stateless
Go library for creating state machines
Stars: ✭ 247 (+1200%)
Mutual labels:  fsm, state-machine
pastafarian
A tiny event-based finite state machine
Stars: ✭ 20 (+5.26%)
Mutual labels:  fsm, state-machine
UnityHFSM
A simple yet powerful class based hierarchical finite state machine for Unity3D
Stars: ✭ 243 (+1178.95%)
Mutual labels:  fsm, state-machine

This repository is inactive and kept for posterity's sake.

Any further development will happen in fea_libs. Cheers.



fea_state_machines

Build status Build Status

A buffet of state machines.

Available Machines

Each header contains a more detailed explanation of the state machine's features, design and limitations. Here is a quick overview.

fsm.hpp

This is a stack based state machine. It is very fast and supports the most essential fsm features. Under the hood, it uses std::array and std::function. This is a great fsm if you need many machines running concurrently, or you need a very fast runtime machine. The design is very simple, making it robust and easy to debug.

hfsm.hpp

This is the "big boi". A full implementation of a hierarchical finite state machine (aka state chart). It is a heap fsm, evaluation uses a queue to process your events. It has all the bells and whistles : transition guards, auto transition guards, history state, parallel states, parent/children states, etc. Use this for very complex behavior you need to manage.

constexpr_fsm.hpp

This is a compile-time executable state machine. It is mostly a novel design to experiment with the possibilities opened up when creating a truly constexpr state machine. The features are quite limited, though you have the added benefit of compile-time validation. For experimentation only, a thorough deep-dive is available in this blog post.

inlined_fsm

TODO: This will be a mirror state machine to fsm.hpp. It should have a reasonable amount of features, with less overhead using std::tuple and storing your functions directly without the need of std::function or C pointers. If this gains feature parity with fsm.hpp, it will replace it.

Build

fea_state_machines is a header only state machine lib with no dependencies other than the stl.

The unit tests depend on gtest. They are not built by default.

Install recent conan, cmake and compiler.

mkdir build && cd build
cmake .. -DBUILD_TESTING=On && cmake --build . --config debug
bin/fea_state_machines_tests.exe

// Optionally
cmake --build . --target install
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].