I think I'm going to become a bit of a pest! Sorry
I'd like to understand the best approach for writing a daemon as part of a bigger application. Specifically, I would like a process which performs a send/receive request at least every 1/10 seconds (preferably faster). This process must be running continuously in the background while the application is running and responding to user interaction or commands within a script file.
Some examples of the more fundamental things I would like to implement:
1. Basic commands like setting/reseting an output line.
2. Timed commands - setting an output line only for a specified amount of time (in 1/10 second increments or faster).
3. Keeping an output line set until an arbitrary number of pulses have been received on a specified input line.
4. Kicking off an arbitrary processes as soon as a specific input state is detected.
I imagine I need to read up on some game coding techniques. It would be useful if anyone could give me some ideas on specific things I should be studying or perhaps point me in the direction of some sample code I can digest?