Skip to content

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
endurodave committed Dec 10, 2024
1 parent 62aecd4 commit 865c8f7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ A compact C finite state machine (FSM) implementation that's easy to use on embe
- [No heap usage](#no-heap-usage)
- [CentrifugeTest example](#centrifugetest-example)
- [Multithread safety](#multithread-safety)
- [Star History](#star-history)
- [Conclusion](#conclusion)
- [References](#references)


# Preface

Originally published on CodeProject at: <a href="https://www.codeproject.com/Articles/1275479/State-Machine-Design-in-C"><strong>State Machine Design in C</strong></a>
Expand Down Expand Up @@ -794,6 +794,12 @@ GUARD_DEFINE(StartTest, NoEventData)
<ul>
</ul>

# Star History

Find this repository useful? Consider giving it a star!

[![Star History Chart](https://api.star-history.com/svg?repos=endurodave/C_StateMachine&type=Date)](https://star-history.com/#endurodave/C_StateMachine&Date)

# Conclusion

<p>Implementing a state machine using this method as opposed to the old switch statement style may seem like extra effort. However, the payoff is in a more robust design that is capable of being employed uniformly over an entire multithreaded system. Having each state in its own function provides easier reading than a single huge <code>switch</code> statement, and allows unique event data to be sent to each state. In addition, validating state transitions prevents client misuse by eliminating the side effects caused by unwanted state transitions.</p>
Expand Down

0 comments on commit 865c8f7

Please sign in to comment.