
Practical UML statecharts in C/C++
by Miro Samek · first published 2008
8mentions
6recommended by
7HN commenters
2012–2023first – last mentioned
86% recommend14% neutral
Why HN recommends it
Covers implementation strategies for statecharts and why you would pick each, with a worked, excellent codebase for embedded systems; suits developers building event-driven or reactive embedded software.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.
This book[1] seems to really help people (don't be put off by the title): Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems In particular, it discusses the main implementation strategies and why you'd want to use them. Also, the specific codebase described in the book is excellent.…
on “What is the enlightenment I'm supposed to attain after studying finite automata?” ↗Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems by Miro Samek. https://www.amazon.com/Practical-UML-Statecharts-Event-Drive...
on “Ask HN: What books had the greatest effect on how you structure your code?” ↗There's an excellent book (and associated open source project) on using state machines for reactive systems or embedded systems in general: "Practical UML Statecharts in C/C++, 2nd Edition: Event-Driven Programming for Embedded Systems" by Miro Samek. Here's a link to the site where you can download it from (https://www.state-machine.com/psicc2).
on “C++ State Machines” ↗To these links I would also add Miro Samek's book "Practical UML Statecharts in C/C++," which covers details of implementing (hierarchical) statecharts. The book includes a chapter that analyses different ways of encoding extended state machines (Miro concludes a function pointer, with…
on “State Machines in Rust” ↗I like the approach of "Practical UML Statecharts in C/C++", at least the simple one. More or less, keep the state on a function pointer, each state is represented by a function which gets incoming messages or events and returns the next state. I used it for…
on “State Machines” ↗I read this awesome book and multi threading embedded systems. "Practical UML Statecharts in C/C++: Event-Driven Programming for Embedded Systems" The author has an amazing stack for psuedo real time scheduling on seriously limited hardware, http://www.state-machine.com/ . QP-nano brings async real…
on “Reactive Manifesto” ↗Would you recommend Miro Samek's Practical UML Statecharts in C/C++ a good book to learn this technique from ?
on “Ask HN: What are the best papers you read in your life?” ↗…I've started buying technical books from ages past. I'm working my way through Algorithms + Data Structures = Programs by Niklaus Wirth, Constructing user interfaces with statecharts by Ian Horrocks and Practical UML Statecharts in C/C++, Event-Driven Programming for Embedded Systems. The last one has been especially enlightening. Do you have any suggestions for which 'better wheels' people should be looking at?
on ““It's The Future”” ↗