LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket - handshaking

Hi everybody,

I'd like to use DataSocket to data passing between two processes. First of
them reads row data (up to 100kB/sec) from hardware and then pass them to
the second proccess. I have to be sure that no data packet is lost (by
overwriting).

So, I need data buffering in writing proccess and handshaking on DataSocket
level. How to do this? Are there any examples?

Jaroslaw Przywieczerski
0 Kudos
Message 1 of 2
(2,862 Views)
There is no built in handshaking features of DataSocket so you would have to implement it yourself. The best way would be with another datasocket item (integer flag) that is used to tell the writer when the read is complete. Unfortunately, we don't have a CVI example for this, but it shouldn't be too difficult to implement.

1) Writer writes data item.
2) Reader reads item and sets datasocket flag to 1.
3) Writer reads flag value and if = 1, sets it back to 0, and writes data item again.

Best Regards,

Chris Matthews
Measurement Studio Support Manager
0 Kudos
Message 2 of 2
(2,862 Views)