Brother, this is exactly what i wanna do, I have a 600Mb TDMS file and i need to transfer it as fast as possible. now i understand that the maximum data packet size is 65Kb, which implies that i must devide my 600Mb file into packets of 65Kb each and then send those packets using UDP. My question is: how can i devide my file into packets??
Just read 65k bytes (or 1500 bytes is better for the reasons Rolf outlined) from the file at a time and write it using the UDP write. However. As GregR stated. It is not guaranteed to be recieved in the correct order, or indeed a chunk to be received at all! So that's not a lot of good for files, but usually acceptable for audio or video where a lost frame or two doesn't matter too much.
The easy solution, as others are saying, is to use TCPIP where all the ordering and receiving reassembly is handled for you (as well as other things UDP doesn't do out-of-the-box such as congestion control, re-transmission of lost packets etc). If you really must use UDP then you will have to code all that yourself (unless missing or incorrectly ordered file chunks is acceptable-for TDMS it wouldn't be). There are a few examples of reliable UDP (
RDP). Noteably
UDT and
NORM. I am not aware of anyone doing this in Labview however, since it is just easier to use TCPIP.
Edited by ShaunR, 21 April 2012 - 02:49 PM.
A positive attitude may not solve all your problems, but it will annoy enough people to make it worth the effort. (Herm Albright 1876-1944).
Founder and general mischief maker on
www.labview-tools.com.
SQlite aficionado and
websocket zealot.
If it 'aint in LabVIEW, then you 'aint got a clue!