I'm searching for a concept on howto realize the following: I have 4 devices connected via RS232 to a PC where I want to create some control application. I have already created classes for the 4 different devices that handle the communication and error handling.
In the main thread I now want to create some initialization sequence. For example one control parameter is temperature. So I set the temperature and then need to wait up to 10 minutes until the temperature is reached. When it is reached I want to set the output voltage of a power supply and so on. There are parameters that I need to control in parallel (while waiting for the temperature to get into a acceptable window I also need to monitor that the pressure is within some range).
So I am dreaming of something like this, but have no clue on howto best realize it:
Device1.setTemp(200); magic.Wait(function to get current value, object containing min/max levels, max time);
For the simple case. But I think once I know in which direction to go, I can extend it to allow monitoring of multiple values.
Please give me some into a good direction. I already looked into threads, BackgroudWorkers and so on. There are many different options available, but I have no clue on howto create it in a safe way from the beginning on.
Thank you, thefloe