Innovate Motorsports OT-2 SDK User Manual
Page 58
58
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
U8 ByteDelay;
// Time to delay (in mS) between
// each byte sent
U8 Len;
// Data length (32 Max)
U8 Data[Len];
// Data Bytes to Send
}
Responds:
Variable (1 byte minimum)
{
// Optional
{
U8 Len;
// Data length of data received
U8 Data[Len];
// Received Data
}
U8 End;
// Always 0xFF
}
Notes:
Replies is for BYTES, not packets. This expert mode has no
understanding of packets, it leaves that entirely up to
you. Unlike J1850, which will calculate CRC for you,
checksum bytes, etc., are entirely your responsibility (CRC
is a pain, but we figured you can add!)
If replies is set to 0, the message will be sent, but the
0xFF will immediately be returned, regardless of ‘Timeout’.
Timeout is per byte received. If replies is set, the 0xFF
will be returned after either a) the desired number of
bytes is received or b) this time is reached without a
received byte.
Timeout cannot be set to 0, doing do will default to a
timeout of 150 mS.
ByteDelay can be set to zero, but the ISO 9141 and KWP 2000
protocols require 5 (we’ve found that 6 helps with older
Japanese vehicles).