NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

maintaining a TCP/IP reference

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?

0 Kudos
Message 1 of 5
(4,339 Views)
An additional piece to my first question.  When this channel becomes secure, does the "handle" change types.  Can I even store something like that since it's secure in nature?
0 Kudos
Message 2 of 5
(4,312 Views)

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. 

 

 

2009-10-02_130128.jpg

 

 

 

 

2009-10-02_130159.jpg

 

Richard S -- National Instruments -- (former) Applications Engineer -- Data Acquisition with TestStand
0 Kudos
Message 3 of 5
(4,306 Views)
Not having worked too much with TCP/IP, how do I determine the remote port or service name I need to use (since it's a required input). 
0 Kudos
Message 4 of 5
(4,302 Views)
I found this link

http://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers

 

that shows the list of ports as assigned by the IANA.

0 Kudos
Message 5 of 5
(4,298 Views)