Ndudsreportdtcbystatusmask, Ndudsreportdtcbystatusmask -94, Purpose – National Instruments CAN 372139B-01 User Manual

Page 258: Format, Input

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

Automotive Diagnostic Command Set User Manual

6-94

ni.com

ndUDSReportDTCByStatusMask

Purpose

Executes the ReportDTCByStatusMask subfunction of the UDS
ReadDiagnosticTroubleCodeInformation service. Reads selected Diagnostic Trouble Codes
(DTCs).

Format

long ndUDSReportDTCByStatusMask(

TD1 *diagRef,

unsigned char statusMask,

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.

statusMask

Defines the status of DTCs to be read. The values are application specific.

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