Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

General Functions (Implementation Independent):

 PassThruScanForDevices: This function searches for J2534-compliant devices


connected to the system. Its specific implementation depends on the operating system
and communication methods.
 PassThruGetNextDevice: Once devices are found using PassThruScanForDevices,
this function allows iterating through them to identify the desired device.
 PassThruReadVersion: This function retrieves the version information of the J2534
library or device driver.
 PassThruGetLastError: This function retrieves the error code from the most recent
J2534 API call.

Device Management Functions:

 PassThruOpen: Initializes communication with a specific J2534 device. Referenced


from the SAE J2534-1 standard for detailed behavior.
 PassThruClose: Terminates communication with a J2534 device. Referenced from
the SAE J2534-1 standard for details.

Communication Functions:

 PassThruConnect: This function (as specified in TP2.0) is always supposed to return


an error because TP2.0 uses logical connections established through
PassThruLogicalConnect.
 PassThruDisconnect: This function terminates a logical connection established with
a J2534 device. Referenced from the SAE J2534-1 standard for details.
 PassThruLogicalConnect: Establishes a logical connection with a specific protocol
on the J2534 device. This replaces the PassThruConnect function for TP2.0.
 PassThruLogicalDisconnect: Terminates a logical connection established with a
specific protocol on the J2534 device. Referenced from the SAE J2534-1 standard for
details.
 PassThruSelect: Selects a specific communication channel or protocol on the J2534
device for further operations. Referenced from the SAE J2534-1 standard for details.

Message Transfer Functions:

 PassThruReadMsgs: Reads received messages from the J2534 device. Referenced


from the SAE J2534-1 standard for details.
 PassThruQueueMsgs: Queues messages for transmission on the J2534 device. A
new return value (ERR_NO_CONNECTION_ESTABLISHED) indicates the absence of an
established connection.
 PassThruStartPeriodicMsg: Initiates periodic transmission of a specific message at
defined intervals. A new return value (ERR_NO_CONNECTION_ESTABLISHED) indicates
the absence of an established connection.
 PassThruStopPeriodicMsg: Stops the periodic transmission of a previously started
message. Referenced from the SAE J2534-1 standard for details.

Unsupported Function (Due to TP2.0 Limitations):


 PassThruStartMsgFilter: TP2.0 doesn't support message filtering by ID or content.
This function always returns an error.

Voltage Control Function (Implementation Independent):

 PassThruSetProgrammingVoltage: This function allows setting the programming


voltage on the J2534 device (if supported). Its specific implementation depends on the
device capabilities.

Control Function (Enhanced for TP2.0):

 PassThruIoctl: This function provides extended control functionalities for TP2.0. It


includes a mechanism for device discovery, new control IDs, and configuration
parameters.

Message Structure (TP2.0 Specific):

 The document specifies that the PASSTHRU_MSG structure defined in SAE J2534-1 is
used for TP2.0 messages. It details the structure elements and their meanings:
o ProtocolID: Always set to TP2_0_LOGICAL for TP2.0 messages.
o MsgHandle: A handle assigned to the message for tracking purposes.
o RxStatus: Status of a received message (e.g., message received successfully,
error occurred).
o TxFlags: Flags specifying transmission behavior (e.g., request for
confirmation).
o Timestamp: Message timestamp indicating when it was received or
transmitted.
o DataLength: Length of the data portion of the message in bytes.
o ExtraDataIndex: Index for accessing additional message data (if applicable).
o DataBuffer: Pointer to the buffer containing the message data.
o DataBufferSize: Size of the allocated data buffer.

You might also like