hsm
HFSM2
Our great sponsors
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
hsm
-
Is it ok to have state-wide conditions in a Finite State Machine? Or does that defeat the purpose?
Finally you can make a more complete Hierarchical (or Nested) State Machine, which allows you to have states within states. This is what we've done in several games I've worked on. This can allow reusing states in multiple contexts, such as being in an Idle state that pushes a Targeting state, or in a Running state that also pushes the Targeting state. You are then considered in all of the states on your state stack. This is tricky to implement right though and needs careful design, but used correctly can be extremely powerful. I'm aware of a C++ HSM library that I can recommend ( https://github.com/amaiorano/hsm ), but there's probably other good ones out there.
HFSM2
- State machine library for portable embedded application (C++11)
- HFSM2 development might slow down
-
Introducing FFSM2 and HFSM2 state machine libraries
Here is a gist showing a 3 level hierarchy using sml. https://gist.github.com/indiosmo/08ab24181770125d5a2448d27f6ae99f. Comparing the two, esp. when anything related to *hierarchical* state machines are involved, I strongly prefer HFSM2. Even when comparing the source code, I prefer HFSM2 https://github.com/andrew-gresyk/HFSM2/blob/master/include/hfsm2/machine.hpp to boost::sml https://github.com/boost-ext/sml/blob/master/include/boost/sml.hpp.
What are some alternatives?
sml - C++14 State Machine library
roost-hsm - Hierarchical State Machines in C++. A (sane) alternative to Boost MSM.
ehsm - An End-to-End Distributed and Scalable Cloud KMS (Key Management System) built on top of Intel SGX enclave-based HSM (Hardware Security Module), aka eHSM.
napkinXC - Extremely simple and fast extreme multi-class and multi-label classifiers.
amp-embedded-infra-lib - amp-embedded-infra-lib is a set of C++ libraries and headers that provide heap-less, STL like, infrastructure for embedded software development
lizardfs - LizardFS is an Open Source Distributed File System licensed under GPLv3.
csv2 - Fast CSV parser and writer for Modern C++
hsmcpp - C++ based Hierarchical / Finite State Machine library oriented for embedded and RTOS systems.
BackportCpp - Library of backported modern C++ types to work with C++11
hfst - Helsinki Finite-State Technology (library and application suite)
entt - Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more