2018-08-06

Instead of doing real work I was messing around with Dia to see what kind of perdy additions to the documentation I could create. Well here is the glory that took me almost an hour to produce. To be fair I haven’t used Dia in close to a decade and my new mouse pad realllly sucks.

Lets unpack that image in the most logical way – starting from the bottom left and then meandering around.

The client HMI processes is the “client” processes that interface with the “server”. The client HMI process may be a touch screen interface, a data logger, some sort of gateway to a web/mobile application, etc. Initially the client HMI connects to the Shim Listener Thread which in turn spawns a new thread – Server Thread – and from that point on the client HMI communicates with that Server Thread.

The Serial IO Thread is what performs all of the communication with the physical IO board. All of the commands and the results of those commands go through this thread. Each IO thread has a single lock in it. All interactions with this thread revolve around this one lock.

The Watchdog Thread monitors the whole magic pile for extra hinky shit. If the watchdog thread is not reset every so often it will terminate the whole server process.

The Logic Thread is where the actual logic to turn stuff on and off in response to inputs is performed.

The Magic hexadecagon is where all of the magic happens. Duh. This is the stuff that figures out what thread is dead and needs to be purged. When a lock has been held too long. When to free resources of a hung thread. And so forth.

Leave a Reply