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 ndOpenDiagnosticOnCANFD 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.