0
Answered
32-bit decoding for incoming UDP packets
Emery Anderson 10 years ago
in Products / AV & Custom Systems
•
updated by Sergey (expert) 10 years ago •
6
Ashly NE Ethernet protocol I'd like to setup audio level meters for an 8-channel DSP device but the incoming data is formatted as 32-bit (via four 1-byte packets). How would I decode this data to a multilevel graphic? I've attached the ethernet protocol for the device. Also, what is the max range for the multilevel items?
Customer support service by UserEcho
You can get bytes from the received packet with the IR.EVENT_RECEIVE_DATA. Subscribe function to this event of the UDP drive and write a parser to change bytes to decimal values. After this in the function set the decimal value to the item property value.
Read example on the wiki documentation:
http://wiki2.iridiummobile.net/IRidium_DDK
http://wiki2.iridiummobile.net/GUI_API#IR.GetItem
For this driver I summed 4 consecutive single byte values (0-255 for each byte). A JS summing function is matching the 0-1023 data range output from the device. Everything looks good in terms of parsing but I still need to work out the timing of the data stream to get the best graphic effect as there are 8-simultaneous audio channels to monitor. Thanks again for the response.
Best Regards,
Emery