Ndudsroutinecontrol, Ndudsroutinecontrol -105 – National Instruments CAN 372139B-01 User Manual

Page 269

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

© National Instruments Corporation

6-105

Automotive Diagnostic Command Set User Manual

ndUDSRoutineControl

Purpose

Executes the UDS RoutineControl service. Executes a routine on the ECU.

Format

long ndUDSRoutineControl(

TD1 *diagRef,

unsigned short ID,

unsigned char mode,

unsigned char dataIn[],

long len,

unsigned char dataOut[],

long *len2,

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.

ID

Defines the identifier of the routine to be started. The values are application specific.

mode

Defines the operation mode for this service:

1: Start Routine

2: Stop Routine

3: Request Routine Results

Other values are application specific.

dataIn

Defines application-specific input parameters for the routine.

len

Must contain the number of valid data bytes in

dataIn

.

Advertising