tinverse / tsm

A Typed Hierarchical State Machine Framework in C++

Home Page:https://tinverse.github.io/tsm/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expand OrthogonalHsmExecutor support to arbitrary number of Hsms

kernd opened this issue · comments

Expand OrthogonalHsmExecutor support to arbitrary number of Hsms

First off, very nice library @dibsonmuad . I am trying to use your library to create a state machine that has 7 independently running state machines, so having the feature to support an arbitrary number of Hsms would be useful. Let me know if you have any suggestions on how you planned to implement this. I could try to do the work and create a pull request.

Good one! I was putting this off.
a. I will gladly accept pull requests! The https://github.com/tinverse/tsm/blob/master/include/OrthogonalHsmExecutor.h has to accept variadic template arguments. I can spend a few hours on it this week.
b. Also, take a look at HFSM2 on github. tsm is simpler in some respects, but HFSM2 probably has support already for what you need. It blows the socks off of any other C++ state machine library that is out there.

I'll be happy to help whichever way you go.

I have modified OrthogonalHsmExecutor to support an arbitrary number of HSMs. The existing tests pass. Please submit a PR with your simplified use case as an example/test.