From: Juan C. R. F. <jc...@ca...> - 2002-09-30 07:52:15
|
Hi Gord >stupid question time again :) I need to do some testing on the >autostar driver and don't seem to be able to get spiderd to accept any >commands. I start up spiderd and telnet to the port and get the following: >.... >How do I enter commands? > [] Please use spiderclient, it is a test client, and modify it (to delete my probes)!!. If you do not want to make any modification, only push the return key when asked for a file and then send commands. Spiderd it is not prepared to support telnet, each message has a header to support the diferent message types (plain text request, binary data, etc..), and the message system is asynchronous, that means you must have a thread waiting for the answer or to have a loop pooling, or any other technique. Spiderclient has examples of all message types. The other problem, the double call to handler_startup() in the autostar driver, is because you have defined the driver two times, one for the xy motion and another one for the focus. There is no problem with this. You can call the same driver to support more than one device, but I recomend you to atomize the drivers, transferring the common code to a library. If you wish to maintain all together, there is no problem, you only must know clearly the commands you want to process. In your case, if you codify together both the xy and focus devices you must deal with both command sets within your code, of course!. A final note: each execution of the driver runs in its own address space because they are independent threads, so there are not common vars. If you are using the same port for both devices we will have a problem because this is not supported, tell me if this is the case to try to find out a solution. Cheers Juan Carlos |