Ndvwtpdisconnect, Ndvwtpdisconnect -35 – National Instruments CAN 372139B-01 User Manual

Page 199

Advertising
background image

Chapter 6

Automotive Diagnostic Command Set API for C

© National Instruments Corporation

6-35

Automotive Diagnostic Command Set User Manual

ndVWTPDisconnect

Purpose

Terminates a connection channel to an ECU using the VW TP 2.0.

Format

long ndVWTPDisconnect(

TD1 *diagRef);

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.

Output

Return Value

The return value indicates the function call status as a signed 32-bit integer. Zero means the
function executed successfully. A negative value specifies an error, which means the function
did not perform the expected behavior. A positive value specifies a warning, which means the
function performed as expected, but a condition arose that may require attention.

Use the

ndStatusToString

function to obtain a descriptive string for the return value.

Description

For the VW TP 2.0, you must disconnect the ECU connection link to properly terminate
communication to the ECU. This function sends the proper disconnect messages and unlinks
the communication.

Use

ndVWTPConnect

the create a new connection to the same ECU.

There is no equivalent for the ISO TP (ISO 15765-2), as the ISO TP does not use a special
communication link.

Advertising