Group isotp_user

Modules > isotp_user

User-implemented callbacks and platform hooks. More...

Public Functions

Type Name
void isotp_user_debug (const char * message, ...)
User implemented, print debug message.
uint32_t isotp_user_get_us (void)
User implemented, return a monotonically increasing timebase in microseconds.
int isotp_user_send_can (const uint32_t arbitration_id, const uint8_t * data, const uint8_t size)
User implemented, send CAN message.

Detailed Description

This group defines the platform abstraction points required by the ISO-TP core. Applications must provide these functions to integrate with their CAN driver, timing source, and optional debug output.

** **

Public Functions Documentation

function isotp_user_debug

User implemented, print debug message.

void isotp_user_debug (
    const char * message,
    ...
) 

Parameters:

  • message Debug message format string.

User implemented, print debug message.

Parameters:

  • message The message to print.

User implemented, print debug message.


function isotp_user_get_us

User implemented, return a monotonically increasing timebase in microseconds.

uint32_t isotp_user_get_us (
    void
) 

This function must provide a free-running timestamp in microseconds that increases monotonically over time. The ISO-TP core uses this value for timeout and delay calculations by performing arithmetic on the returned timestamp (for example, adding a timeout interval to it).

Natural wrap-around of the 32-bit counter is allowed and will be handled by the ISO-TP core, but the value must not jump backwards except for such wrap-around.

Returns:

Current timebase value in microseconds.

User implemented, return a monotonically increasing timebase in microseconds.

Returns:

uint32_t Current time in microseconds

User implemented, return a monotonically increasing timebase in microseconds.


function isotp_user_send_can

User implemented, send CAN message.

int isotp_user_send_can (
    const uint32_t arbitration_id,
    const uint8_t * data,
    const uint8_t size
) 

Should return ISOTP_RET_OK on success.

Parameters:

  • arbitration_id CAN message arbitration ID.
  • data Pointer to message data buffer.
  • size Size of message data in bytes.

Returns:

ISOTP_RET_OK on success, ISOTP_RET_NOSPACE if transfer should be retried later, or ISOTP_RET_ERROR on failure.

User implemented, send CAN message.

Parameters:

  • arbitration_id The CAN ID to send with.
  • data Pointer to the data buffer to send.
  • size Size of the data buffer (max 8 bytes).

Returns:

int ISOTP_RET_OK on success, ISOTP_RET_ERROR on failure.

User implemented, send CAN message.