05-07-2013 02:36 PM - edited 05-07-2013 02:39 PM
Hello everyone,
I'm playing around with DataSockets (specifically DSTP, although OLE is an option) and I was wondering if there was a way to list all the Data Items on a given server.
For example, say I have 3 programs each make their own data item on the Data Socket server, DSserver:
dstp://DSserver/data1
dstp://DSserver/data2
dstp://DSserver/data3
If I know the data item names, I can very easily get the data from them with an array. However, with my application I'm not guanenteed to know the data item names - or, more precisely, I'm not guarenteed that the data item will have been created by the publishing program (computer might be turned off, for example).
What I want is to be able to query dstp://DSserver/ for all the data names that exist. Is this possible?
My application is:
I'm running 8 computers all with the same code, running tests on parts. I want to create a status monitor program that tells me if a part is running and information about it (what part it's on, how many left, etc). My plan was to have each test program create and write to a data item on the DSserver, and then have the monitor program read from the DSserver. I want to be able to query the data names so that I my monitor program is scalable to more test computers and so that it doesn't attempt to read data if the data item does not exist.
EDIT 1: 2013-05-07 12:39 PDT
I know that this is possible because DataSocket Select URL.vi can list the items on the DSserver. However, I don't want the popup window - I just want an array of data items returned.
05-07-2013 05:06 PM
I've looked through all the ActiveX classes referencing data sockets, and haven't been able to find anything so far. 😞
The closest I've got is the ActiveX class CWDSLib.INIDSCtl which has a SelectURL method - the same thing that DataSocket Select URL.vi calls.
05-07-2013 05:09 PM
Also, there's a typo in my original post.
"(specifically DSTP, although OLE is an option)" should say "(specifically DSTP, although OPC is an option)"
05-08-2013 11:40 AM
I've decided I'm just going to multicast a UDP signal from each test computer. This will allow N monitor programs to run and I don't have to worry about setting up the DataSocket server.