Output – National Instruments CAN 372139B-01 User Manual
Page 220

Chapter 6
Automotive Diagnostic Command Set API for C
Automotive Diagnostic Command Set User Manual
6-56
ni.com
StatusByteLength
indicates the number of bytes the ECU sends for each DTC’s
status. The default is 1.
AddDataByteLength
indicates the number of bytes the ECU sends for each DTC’s
additional data. Usually, there are no additional data, so the default is 0.
ByteOrder
indicates the byte ordering for multibyte items:
0: MSB_FIRST (Motorola), default
1: LSB_FIRST (Intel)
This function interprets the response byte stream according to this description and
returns the resulting DTC records in the
DTCs
struct array.
Output
DTCs
Returns the resulting DTCs as an array of structs:
typedef struct {
unsigned long DTC;
unsigned long Status;
unsigned long AddData;
} TD4;
DTC
is the resulting Diagnostic Trouble Code. For the default 2-byte DTCs, use
to convert this code to readable format as defined by SAE J2012.
Status
is the DTC status. Usually, this is a bit field with following meaning:
Bit
Meaning
0
testFailed
1
testFailedThisMonitoringCycle
2
pendingDTC
3
confirmedDTC
4
testNotCompletedSinceLastClear
5
testFailedSinceLastClear
6
testNotCompletedThisMonitoringCycle
7
warningIndicatorRequested
AddData
contains optional additional data for this DTC. Usually, this does not
contain valid information (refer to
).