05-27-2010 11:20 AM
Hi
In UDP protocol checksum is optional.
Does LabView UDP write.vi calculate a checksum?
Regards Vt
05-28-2010 02:47 AM
LabVIEW does nothing related to the UDP layer itself. It simply takes your data message and passes it on to the underlaying socket library (Berkely sockets on Mac and Linux and Winsock on Windows) and lets them do the packaging, CRC calculation and sending of.
So the CRC handling will be whatever is the default for your underlaying socket library, which as far as I understand is to do CRC for all three mentioned platforms.
There seems no direct method of enabling or disabling CRC generation, maybe there is a registry setting for this but since it would be global, that might be rather undesirable.
I believe that the standard method of doing non CRC calculation would be to set the IP_HDRINCL option on the socket and then you have to calculate the entire protocol header too and send it yourself in front of the actual data load to the socket.
Changing socket options in LabVIEW is however not trivial as you will have to retrieve the native socket handle from a LabVIEW network refnum (there is a VI in vi.lib/Utility/tcp.llb/UDP Get Raw Net Object.vi to do that) and then call the platform socket library API setscockopt() through a Call Library Node to change a socket option. Look for some discussion over the TCP_NODELAY option here on this board to get a better idea how that would need to be done.