51 uint32_t send_arbitration_id;
55 uint32_t send_buf_size;
60 uint32_t send_bs_remain;
61 uint32_t send_st_min_us;
62 uint8_t send_wtf_count;
63 uint32_t send_timer_st;
64 uint32_t send_timer_bs;
73 uint32_t receive_arbitration_id;
76 uint8_t* receive_buffer;
77 uint32_t receive_buf_size;
78 uint32_t receive_size;
79 uint32_t receive_offset;
82 uint8_t receive_bs_count;
83 uint32_t receive_timer_cr;
91#ifdef ISO_TP_ENABLE_STREAMING
92 uint32_t receive_stream_size;
93 uint8_t receive_streaming;
94 uint8_t receive_stream_carry_size;
95 uint8_t receive_stream_carry[ISO_TP_MAX_CAN_FRAME_SIZE - 1];
99#if defined(ISO_TP_USER_SEND_CAN_ARG)
110#ifdef ISO_TP_TRANSMIT_COMPLETE_CALLBACK
112 void* tx_done_cb_arg;
115#ifdef ISO_TP_RECEIVE_COMPLETE_CALLBACK
117 void* rx_done_cb_arg;
144void isotp_init_link(
IsoTpLink* link, uint32_t sendid, uint8_t* sendbuf, uint32_t sendbufsize, uint8_t* recvbuf, uint32_t recvbufsize);
163int isotp_set_tx_dl(
IsoTpLink* link, uint8_t tx_dl);
271#ifdef ISO_TP_ENABLE_STREAMING
291int isotp_receive_streaming(
IsoTpLink* link, uint8_t* payload,
const uint32_t payload_size, uint32_t* out_size,
bool* is_complete);
294#ifdef ISO_TP_TRANSMIT_COMPLETE_CALLBACK
309#ifdef ISO_TP_RECEIVE_COMPLETE_CALLBACK
int isotp_send_with_id(IsoTpLink *link, uint32_t id, const uint8_t payload[], uint32_t size)
Start transmitting with a one-time CAN identifier override.
uint8_t isotp_get_tx_dl(const IsoTpLink *link)
Return the effective transmit data length for a link.
int isotp_send(IsoTpLink *link, const uint8_t payload[], uint32_t size)
Start transmitting a payload with the link's configured CAN identifier.
void isotp_init_link(IsoTpLink *link, uint32_t sendid, uint8_t *sendbuf, uint32_t sendbufsize, uint8_t *recvbuf, uint32_t recvbufsize)
Initialise an ISO-TP link and its caller-owned buffers.
int isotp_receive(IsoTpLink *link, uint8_t *payload, const uint32_t payload_size, uint32_t *out_size)
Copy and consume one completed, non-streaming message.
void isotp_on_can_message(IsoTpLink *link, const uint8_t *data, uint8_t len)
Process one CAN frame already routed to this link.
void isotp_set_tx_done_cb(IsoTpLink *link, isotp_tx_done_cb cb, void *arg)
Register or clear the successful-transmission callback.
void isotp_destroy_link(IsoTpLink *link)
Clear a link's state and callback registrations.
Compile-time transport configuration and defaults.
Public result codes, CAN frame constants, and callback types.
void(* isotp_rx_done_cb)(void *link, const uint8_t *data, uint32_t size, void *user_arg)
Called after a complete payload has been received successfully.
void(* isotp_tx_done_cb)(void *link, uint32_t tx_size, void *user_arg)
Called after a complete payload has been transmitted successfully.
Application-provided platform hooks.
State for one independent, full-duplex ISO-TP conversation.
int32_t send_protocol_result
int receive_protocol_result