Grass Valley Switcher Products User Manual
Page 40
Advertising
40
Switcher Products — Protocols Manual
Section 1 — Tally Protocol
Message code recognition and parsing can use the following algorithm:
thisByte = 0;
LOOP (forever)
{
lastByte = thisByte;
thisByte = read();
if ((thisByte & lastByte & 0xF0) == 0xF0)
{
commandCode = lastByte & 0xF;
instanceID = thisByte & 0xF;
// check for update/initialize
if (commandCode == 0xD) && (instanceID == 0x1)
clear all data.
// check for update/data consistent
if (commandCode == 0xD) && (instanceID == 0x2)
processTally()
// read in message according to commandCode
else
read message data bytes for specified instance.
}
}
Advertising