isotp-c
Platform-independent ISO 15765-2 transport for embedded C
Loading...
Searching...
No Matches
isotp_defines.h File Reference

Public result codes, CAN frame constants, and callback types. More...

#include <stdint.h>
#include "isotp_config.h"
Include dependency graph for isotp_defines.h:

Go to the source code of this file.

Macros

#define ISOTP_CAN_DL_CLASSIC   8
#define ISOTP_CAN_FRAME_FLAG_NONE   0x00
#define ISOTP_CAN_FRAME_FLAG_FD   0x01
#define ISOTP_CAN_FRAME_FLAG_BRS   0x02
#define ISOTP_SF_MAX_PAYLOAD(can_dl)
#define ISOTP_RET_OK   0
#define ISOTP_RET_ERROR   -1
#define ISOTP_RET_INPROGRESS   -2
#define ISOTP_RET_OVERFLOW   -3
#define ISOTP_RET_WRONG_SN   -4
#define ISOTP_RET_NO_DATA   -5
#define ISOTP_RET_TIMEOUT   -6
#define ISOTP_RET_LENGTH   -7
#define ISOTP_RET_NOSPACE   -8
#define ISOTP_PROTOCOL_RESULT_OK   0
#define ISOTP_PROTOCOL_RESULT_TIMEOUT_A   -1
#define ISOTP_PROTOCOL_RESULT_TIMEOUT_BS   -2
#define ISOTP_PROTOCOL_RESULT_TIMEOUT_CR   -3
#define ISOTP_PROTOCOL_RESULT_WRONG_SN   -4
#define ISOTP_PROTOCOL_RESULT_INVALID_FS   -5
#define ISOTP_PROTOCOL_RESULT_UNEXP_PDU   -6
#define ISOTP_PROTOCOL_RESULT_WFT_OVRN   -7
#define ISOTP_PROTOCOL_RESULT_BUFFER_OVFLW   -8
#define ISOTP_PROTOCOL_RESULT_ERROR   -9

Typedefs

typedef void(* isotp_tx_done_cb) (void *link, uint32_t tx_size, void *user_arg)
 Called after a complete payload has been transmitted successfully.
typedef 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.

Enumerations

enum  IsoTpSendStatusTypes { ISOTP_SEND_STATUS_IDLE , ISOTP_SEND_STATUS_INPROGRESS , ISOTP_SEND_STATUS_ERROR }
enum  IsoTpReceiveStatusTypes { ISOTP_RECEIVE_STATUS_IDLE , ISOTP_RECEIVE_STATUS_INPROGRESS , ISOTP_RECEIVE_STATUS_FULL }

Detailed Description

Public result codes, CAN frame constants, and callback types.

Definition in file isotp_defines.h.

Typedef Documentation

◆ isotp_rx_done_cb

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

Parameters
linkLink that received the payload. Cast to IsoTpLink* when needed.
dataLink-owned payload, valid only for the duration of the callback.
sizePayload size in bytes.
user_argValue registered with isotp_set_rx_done_cb().

Definition at line 350 of file isotp_defines.h.

◆ isotp_tx_done_cb

typedef void(* isotp_tx_done_cb) (void *link, uint32_t tx_size, void *user_arg)

Called after a complete payload has been transmitted successfully.

Parameters
linkLink that completed transmission. Cast to IsoTpLink* when needed.
tx_sizeSize of the completed ISO-TP payload in bytes.
user_argValue registered with isotp_set_tx_done_cb().

Definition at line 338 of file isotp_defines.h.