04-15-2005 03:00 PM
04-16-2005 12:58 PM
04-18-2005 11:21 AM
@tst wrote:
I don't know about the second part, but about the first part - reading different parts of the file is unrecommended unless the file is very large. As long as it can be held in memory, it's better to have one read, because the read operation is slower.
Then, instead of doing the conversions, have the UDP write in a while loop, and use String Subset with a shift register on the original data to extract and send as many bytes as you like. As far as I know, you have to manage UDP comm, so you may want to use TCP instead. You can find example with LV to show how to know how many bytes the other side is should be receiving.
You may wish to search google for information about streaming video.
04-18-2005 12:59 PM
04-18-2005 01:29 PM
@tst wrote:
I wasn't suggesting that you read the file in the loop but that you read it once before the loop and then use a shift register and String Subset to decide which part of the string to send. One way to do this would be to place to String Subset VIs inside the loop, wire the string into them and wire the number of bytes to send into both of them, in one into the length and in one into the offset. The length one is wired into the send and the offset one is wired back into the shift register. You can stop the loop when there is an error, a manual stop or when the string you're using is empty.
I didn't say you need to use TCP, just that as far as I know, UDP offers no mechanism to make sure your data gets to the other side, unlike TCP. If your network is good, the data will probably get there, but you can't trust it. I haven't worked with UDP, but I think that since this a basic part of the protocol, there is nothing LV does about it automatically. If you can have some data lost, there is no problem. If you can't, use TCP or make sure your packets reach their destination. You should look for more material about UDP and\or UDP in LV to find out.
04-18-2005 01:51 PM