Output – National Instruments CAN 372139B-01 User Manual

Page 256

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

Automotive Diagnostic Command Set User Manual

6-92

ni.com

AddDataByteLength

indicates the number of bytes the ECU sends for each DTC’s

additional data. For this subfunction, the default is 2.

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

statusAvailMask

An application-specific value returned for all DTCs.

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

ndDTCToString

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.

Advertising