Ndudsreportsupporteddtcs, Ndudsreportsupporteddtcs -100, Purpose – National Instruments CAN 372139B-01 User Manual

Page 264: Format, Input

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

Automotive Diagnostic Command Set User Manual

6-100

ni.com

ndUDSReportSupportedDTCs

Purpose

Executes the ReportSupportedDTCs subfunction of the UDS
ReadDiagnosticTroubleCodeInformation service. Reads all supported Diagnostic Trouble
Codes (DTCs).

Format

long ndUDSReportSupportedDTCs(

TD1 *diagRef,

TD3 *DTCDescriptor,

unsigned char *statusAvailMask,

TD4 DTCs[],

long *len,

LVBoolean *success);

Input

diagRef

Specifies the diagnostic session handle, obtained from

ndOpenDiagnostic

and passed

to subsequent diagnostic functions. Normally, it is not necessary to manually manipulate
the elements of this struct.

DTCDescriptor

A struct that describes the DTC records the ECU delivers:

typedef struct {

long DTCByteLength;

long StatusByteLength;

long AddDataByteLength;

unsigned short ByteOrder;

} TD3;

DTCByteLength

indicates the number of bytes the ECU sends for each DTC. The

default is 3 for UDS.

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.

Advertising