Innovate Motorsports OT-2 SDK User Manual
Page 47

47
Command ‘O’ – Output Data and (optionally) look for input
Sent:
Variable
{
U8 Cmd;
// ‘O’
U8 Timeout;
// Timeout (in mS) for responses
U8 Replies;
// Expected number of replies
// 16 max
U8 Len;
// Data length 1-32 (32 must
// include CRC)
// If the high bit is set, the
// firmware will calculate and
// append a CRC byte for you
U8 Data[(Len&0x7F)];
// Data Bytes to Send
}
Responds:
Variable (1 byte minimum)
{
// 0 to ‘Replies’ of
{
U8 Len;
// Bits 0-6:
// Data length of packet
// 32 bytes maximum, CRC is
// included in Len and Data
// (below)
//
// Bit 7:
// CRC test, 1=failed
U8 Data[(Len&0x7F)];
// Received Data
}
U8 End;
// Always 0xFF
}
Notes:
Replies is for J1850 packets.
If replies is set to 0, the message will be sent, but the
0xFF will immediately be returned, regardless of ‘Timeout’.
Timeout is per message. If replies is set, the 0xFF will be
returned after either a) the desired number of replies is
received or b) this time is reached without a new reply.
Timeout cannot be set to 0, doing do will default to a
timeout of 100 mS.