State machine design problem
Posted: Tue Oct 25, 2011 11:42 pm
Hi guys,
I'm having trouble in designing an application used to control several devices (tanning beds) connected through some relays to the control unit.
I have a state machine (state pattern) for the control unit itself (the Netburner), which has different states like "Initialization", "Idle", ...
In addition to that, for each device there has to be a state machine (containing states like "idle", "lead time", "running", "follow up").
There are also some shared resources like a RFID reader (which is not a problem) and a touch display which is being updated by the the control
unit state machine itself and the device state machine(s).
My first idea is to use some sort of message queue for the touch display. The touch display is being fed with the messages
by the control unit state machine ONLY. The device's state machines store their messages (synchronized access) to the display into
this queue.
Does the Netburner allow to create multiple threads (one thread per device connected)? I've read about tasks, which are
differently prioritized. Could this be a problem, since my devices have to run a specific time and have also to be turned off nearly in realtime?
Do you guys have a better idea concerning this design problem (of multiple state machines inside a state machine)? The application shall be
implemented in OO C++.
Thanks in advance!
I'm having trouble in designing an application used to control several devices (tanning beds) connected through some relays to the control unit.
I have a state machine (state pattern) for the control unit itself (the Netburner), which has different states like "Initialization", "Idle", ...
In addition to that, for each device there has to be a state machine (containing states like "idle", "lead time", "running", "follow up").
There are also some shared resources like a RFID reader (which is not a problem) and a touch display which is being updated by the the control
unit state machine itself and the device state machine(s).
My first idea is to use some sort of message queue for the touch display. The touch display is being fed with the messages
by the control unit state machine ONLY. The device's state machines store their messages (synchronized access) to the display into
this queue.
Does the Netburner allow to create multiple threads (one thread per device connected)? I've read about tasks, which are
differently prioritized. Could this be a problem, since my devices have to run a specific time and have also to be turned off nearly in realtime?
Do you guys have a better idea concerning this design problem (of multiple state machines inside a state machine)? The application shall be
implemented in OO C++.
Thanks in advance!