Home AMX User Forum NetLinx Studio

Extracting a multitude of individual data from a UDP stream

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

Comments

  • yuriyuri Posts: 861
    .2 second intervals seem awfully short...
    Isn't there some sort of handshaking involved?
  • zooeylzooeyl Posts: 13
    It's UDP, so it's just sending information and doesn't care if there is a response. The .2 seconds is short and that's part of the annoying part. I've thought about writing something so I just look at it every second instead.
  • yuriyuri Posts: 861
    didn't read the UDP part :p

    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?)
  • zooeylzooeyl Posts: 13
    There is a header that I look for. I'm guessing I would have to set up some Arrays of some sort for comparing the previous to the current table.
Sign In or Register to comment.