I am writing a program to do data logging via a GPIB interface card, using Linux and the drivers/library from the linux-gpib.sourceforge.net project (but don't let that scare you off... my question isn't related to the details of GPIB).
What I need to do is keep my program running as a daemon at all times, but be able to communicate with it to control the instruments on the GPIB bus, start and stop writing to log files, etc.
I'm envisioning something that I could telnet to and issue a basic set of commands with verification that the command has been accepted.
On top of that, I *think* (but am not sure) that this would be a good application for threads, as this program will be communicating with three or four different devices on the bus, each of which is doing its thing independently of the others. The thread would handle sending commands to the instrument, reading the response, massaging the data, then writing it to a log file.
I wonder if someone would be kind enough to help me put together at least a skeleton of what a program like this might look like -- in particular, how to launch and manage threads via a telnet interface. I'm happy to fill in the blanks, but I'm not sure how to lay the program out at a high level.
Thanks!
John
In reply to Controllable daemon, threads, and other things by n8ur
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |