Extracting a multitude of individual data from a UDP stream
zooeyl
Posts: 13
I don't have the exact string in front of me, but I have an application where a video matrix is sending me a string probably about every .2 seconds. I have to take that string, which is essentially a Table of inputs and outputs, and look to see if anything has changed. If it has changed than I take the change and re-translate it for an audio matrix. It's a hex string with about 92 characters at the beginning I can just junk. Then it gets to the table, which is in this format:
0x00 0x01 0x01 0x20 0X00 0x02 0x00 0x09...
It works in sections of 4 hex numbers. In the above example 0x00 0x01 would indicate Output 1 and 0x01 0x20 would indicate Input 132. The table continues for 32 outputs and about 300 inputs. So, every .2 seconds I have to look at this string of 32 outputs and see if any of the inputs have changed. There are start and end bits. I just don't know how to take that much data and efficiently process it. Any help would be appreciated in processing and comparing a large table
0x00 0x01 0x01 0x20 0X00 0x02 0x00 0x09...
It works in sections of 4 hex numbers. In the above example 0x00 0x01 would indicate Output 1 and 0x01 0x20 would indicate Input 132. The table continues for 32 outputs and about 300 inputs. So, every .2 seconds I have to look at this string of 32 outputs and see if any of the inputs have changed. There are start and end bits. I just don't know how to take that much data and efficiently process it. Any help would be appreciated in processing and comparing a large table
0
Comments
Isn't there some sort of handshaking involved?
i hope you aren't using the full 32 outputs. If not, you could just check for the outputs you are using. That should decrease the length of the data you have to check.
If you are only checking once a second, you might miss parts of the data stream (of is there a header involved?)