File isotp.c¶
Go to the source code of this file
#include <assert.h>#include <stdint.h>#include "isotp.h"
Public Static Functions¶
| Type | Name |
|---|---|
| int | isotp_receive_consecutive_frame (IsoTpLink * link, const IsoTpCanMessage * message, uint8_t len) Receive ISO-TP consecutive frame. |
| int | isotp_receive_first_frame (IsoTpLink * link, IsoTpCanMessage * message, uint8_t len) Receive ISO-TP first frame of multi-frame message. |
| int | isotp_receive_flow_control_frame (IsoTpLink * link, IsoTpCanMessage * message, uint8_t len) Receive ISO-TP flow control frame. |
| int | isotp_receive_single_frame (IsoTpLink * link, const IsoTpCanMessage * message, uint8_t len) Receive ISO-TP single frame. |
| int | isotp_send_consecutive_frame (IsoTpLink * link) Send ISO-TP consecutive frame. |
| int | isotp_send_first_frame (IsoTpLink * link, uint32_t id) Send ISO-TP first frame of multi-frame message. |
| int | isotp_send_flow_control (const IsoTpLink * link, uint8_t flow_status, uint8_t block_size, uint32_t st_min_us) Send ISO-TP flow control frame. |
| int | isotp_send_single_frame (const IsoTpLink * link, uint32_t id) Send ISO-TP single frame. |
| uint32_t | isotp_st_min_to_us (uint8_t st_min) Convert ST_min encoding format to microseconds. |
| uint8_t | isotp_us_to_st_min (uint32_t us) Convert microseconds to ST_min encoding format. |
Public Static Functions Documentation¶
function isotp_receive_consecutive_frame¶
Receive ISO-TP consecutive frame.
static int isotp_receive_consecutive_frame (
IsoTpLink * link,
const IsoTpCanMessage * message,
uint8_t len
)
Parameters:
link- ISO-TP link instancemessage- Received CAN messagelen- Message length in bytes
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_receive_first_frame¶
Receive ISO-TP first frame of multi-frame message.
static int isotp_receive_first_frame (
IsoTpLink * link,
IsoTpCanMessage * message,
uint8_t len
)
Parameters:
link- ISO-TP link instancemessage- Received CAN messagelen- Message length in bytes
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_receive_flow_control_frame¶
Receive ISO-TP flow control frame.
static int isotp_receive_flow_control_frame (
IsoTpLink * link,
IsoTpCanMessage * message,
uint8_t len
)
Parameters:
link- ISO-TP link instancemessage- Received CAN messagelen- Message length in bytes
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_receive_single_frame¶
Receive ISO-TP single frame.
static int isotp_receive_single_frame (
IsoTpLink * link,
const IsoTpCanMessage * message,
uint8_t len
)
Parameters:
link- ISO-TP link instancemessage- Received CAN messagelen- Message length in bytes
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_send_consecutive_frame¶
Send ISO-TP consecutive frame.
static int isotp_send_consecutive_frame (
IsoTpLink * link
)
Parameters:
link- ISO-TP link instance
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_send_first_frame¶
Send ISO-TP first frame of multi-frame message.
static int isotp_send_first_frame (
IsoTpLink * link,
uint32_t id
)
Parameters:
link- ISO-TP link instanceid- CAN arbitration ID
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_send_flow_control¶
Send ISO-TP flow control frame.
static int isotp_send_flow_control (
const IsoTpLink * link,
uint8_t flow_status,
uint8_t block_size,
uint32_t st_min_us
)
Parameters:
link- ISO-TP link instanceflow_status- Flow control statusblock_size- Block size for flow controlst_min_us- Minimum separation time in microseconds
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_send_single_frame¶
Send ISO-TP single frame.
static int isotp_send_single_frame (
const IsoTpLink * link,
uint32_t id
)
Parameters:
link- ISO-TP link instanceid- CAN arbitration ID
Returns:
ISOTP_RET_OK on success, error code on failure
function isotp_st_min_to_us¶
Convert ST_min encoding format to microseconds.
static uint32_t isotp_st_min_to_us (
uint8_t st_min
)
Parameters:
st_min- Encoded ST_min value
Returns:
Time in microseconds
function isotp_us_to_st_min¶
Convert microseconds to ST_min encoding format.
static uint8_t isotp_us_to_st_min (
uint32_t us
)
Parameters:
us- Time in microseconds
Returns:
Encoded ST_min value
The documentation for this class was generated from the following file src/isotp.c