10-01-2009 12:28 PM
I have (well, when I write it) a transmit/receive VI that I think will be running in a separate thread. It's supposed to listen for TCP/IP (rx) messages and "notify" (I use that generically here) a test that's waiting for this message. That test would access some Shared Variable, or user-defined data to extract/process the message. I will (possibly) then build a message (in another shared variable) response, and "notify" the tx routine that it has something to send. I (obviously) don't have all of this worked out, but my plan is to open, and keep open the TCP/IP socket because it' going to be a secure (https/ssl) channel. That's why I thought I would make this a separate thread.
With that in mind, I would like to send this handle/reference to the TCP/IP connection back to TestStand, but I don't know what type to use in TestStand to store it. Would it be an Object Reference, or would I need to create some custom container?
10-02-2009 11:43 AM
10-02-2009 01:10 PM
Mrbean,
After trying this out, it looks like the handle to the connection is passed as a number. If you're passing data between different threads you can use the queue step, there is an example here: C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.2\Examples\Synchronization . Also any time you have a resource that needs to be initalized, utilized and closed and will be sharing the resource between seperate threads, you should use lock steps to prevent race conditions, and deadlock. There is an example of using lock steps in that same folder.
10-02-2009 01:29 PM
10-02-2009 01:44 PM
http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
that shows the list of ports as assigned by the IANA.