Post 4 made on Wednesday September 8, 2010 at 20:40 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 13,006 |
|
|
But the reality is that without knowing the vendor nor the protocol, one cannot ascertain what a message might look like or how you might need to write the script.
For example, the example posted was to connect a socket and then do a write to the socket. If the socket is synchronous, as it is in the example, it might be so simple (but not likely or the best approach as there is likely a time lag waiting for data) to write the following:
// assumes previous connect completed. socket.write(command to query device); var data = socket.read(); socket.close();
However, asynchronous socket communication is the preferred way to do this and therefore, I pointed to several examples where this has indeed been done.
|
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|