Smart Trains 2

  • ST 15 Seeing Statecharts Run

    Software development is fun when the system works exactly as designed, including both nominal and off-nominal paths. It would be less so if something didn’t work and we had to reconstruct a mental…

  • ST 14 Keeping Edge Cases at the Center

    In an earlier post, we looked at the stopping mechanism of the Train state machine. In particular, the substate AutoMotorRest stops the train gradually by sending the event MOTOR_RUN_REQ with the target speed…

  • ST 12 A Neat Diagram Yields a Neat Design

    We are continuing our journey on this garden model train named Hierarki to explore model-based software design. In this post, we illustrate some cool features of statecharts with GpioIn, a state-based driver for…