Smart Trains 1
-
ST 10 The Simplest Model-based Device Driver
Our journey on model-based software design continues with the Hierarki model train. In previous post, we explained how we partition the embedded software into multiple hierarchical state machines (HSMs) and looked into the…
-
ST 9 An Objected-oriented Architecture for Embedded Systems
This is the object diagram showing the main software components, or objects, of this G-scale model train. For embedded systems, an object-oriented architecture is very useful in encapsulating hardware resources. To a microcontroller,…
-
ST 8 Dual Roles of Hierarchy in Software Architecture
In the previous post we looked at the state hierarchy of the Train state machine which automatically drives a model train between two stations. It receives an ARRIVING event from the hall-effect sensor…
-
ST 7 Hierarchical State Design as a Recursive Partitioning Problem
The first step of statechart design is to identify states of a component. You need a distinct state when: The second point is particularly interesting. For algorithm design, the focus is on the…
-
ST 6 Stop the Train – A Case Study of the Power of Visual Language
In the previous post, we introduced statechart as a method for designing asynchronous systems such as this G-scale model train named Hierarki. To see why statecharts are useful, let’s look at two safety-critical…
-
ST 5 Statechart as a Universal Language for Asynchronous Software
Asynchronous software design has always been tricky since it goes against our natural sequential thought process using basic constructs like if-then-else, do-while, wait-for-signal, etc. Different languages have their own attempts to tame this…
-
ST 4 Taking a Ride on Hierarki Fully Driven by Statecharts
Let’s take a ride on this G-scale hobby train named Hierarki shuttling between the Upper Garden and Lower Garden stations. It is battery-powered and controlled by an onboard STM32L4S5 discovery board. Apart from…
-
ST 3 A Showcase of Concurrent Hierarchical State Machines
This G-scale 3D-printed hobby train is equipped with two 320×240 LCD modules, one on each side of the powered unit. They display itinerary information as well as a scrolling banner for some self-promotion!…
-
ST 2 Hierarki – A Concept Hydrogen Train for the Future
Have you noticed quite a few terms we use in development projects are related to trains? If things didn’t go well, software might crash, projects might get off track or even derailed. On…
-
ST 1 Hello World, Hello Train
I like model-based software design, and I love model trains. Why not combine them together? I’ve designed and built this functional G-Scale model train for my hobby projects. It is fully modeled with…