Hello all
I have trouble receiving AMP messages from my GV K2 videoserver. I explain:
K2 'answers' to AMP command with next formula:
CMD type (2 bytes) - total length in hex(2 bytes) - rest of response. Here is message example:
820f0009000764656661756c74 = while first 2 bytes '820f' is cmd type, 0009 its an total bytes length in hex, and then the rest of variable messages. Its always same formula.
I want to configure the listener to read length bytes (bytes 5-8) and receive whole message.
In this point, my only success to capture something was with 'fixed length' delimiter. So i can receive data byte by byte, as a different messages. I guess right way of delimiter type should be 'variable length' but i dont know how to set first 2 bytes offset... So:
1. Is it possible to configure listener to 'understand' the length of that kind of messages and get it one piece?
2. If it is impossible in native way, is there an trick to collect those 1 bytes message to 1 message string (maybe separate by timeout, longest messages is reach maximum 3 sec to recieve)?
Thank you,
Alex.