ISOTP-C
A platform-agnostic ISOTP implementation in C.
isotp_defines.h File Reference
#include <stdint.h>
Include dependency graph for isotp_defines.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  IsoTpPciType
 
struct  IsoTpSingleFrame
 
struct  IsoTpFirstFrame
 
struct  IsoTpConsecutiveFrame
 
struct  IsoTpFlowControl
 
struct  IsoTpDataArray
 
struct  IsoTpCanMessage
 

Macros

#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 IsoTpTimeAfter(a, b)   ((int32_t)((int32_t)(b) - (int32_t)(a)) < 0)
 
#define ISOTP_INVALID_BS   0xFFFF
 
#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
 

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 }
 
enum  IsoTpProtocolControlInformation { ISOTP_PCI_TYPE_SINGLE = 0x0 , ISOTP_PCI_TYPE_FIRST_FRAME = 0x1 , TSOTP_PCI_TYPE_CONSECUTIVE_FRAME = 0x2 , ISOTP_PCI_TYPE_FLOW_CONTROL_FRAME = 0x3 }
 
enum  IsoTpFlowStatus { PCI_FLOW_STATUS_CONTINUE = 0x0 , PCI_FLOW_STATUS_WAIT = 0x1 , PCI_FLOW_STATUS_OVERFLOW = 0x2 }
 

Macro Definition Documentation

◆ ISOTP_INVALID_BS

#define ISOTP_INVALID_BS   0xFFFF

Definition at line 51 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_BUFFER_OVFLW

#define ISOTP_PROTOCOL_RESULT_BUFFER_OVFLW   -8

Definition at line 225 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_ERROR

#define ISOTP_PROTOCOL_RESULT_ERROR   -9

Definition at line 226 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_INVALID_FS

#define ISOTP_PROTOCOL_RESULT_INVALID_FS   -5

Definition at line 222 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_OK

#define ISOTP_PROTOCOL_RESULT_OK   0

Definition at line 217 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_TIMEOUT_A

#define ISOTP_PROTOCOL_RESULT_TIMEOUT_A   -1

Definition at line 218 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_TIMEOUT_BS

#define ISOTP_PROTOCOL_RESULT_TIMEOUT_BS   -2

Definition at line 219 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_TIMEOUT_CR

#define ISOTP_PROTOCOL_RESULT_TIMEOUT_CR   -3

Definition at line 220 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_UNEXP_PDU

#define ISOTP_PROTOCOL_RESULT_UNEXP_PDU   -6

Definition at line 223 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_WFT_OVRN

#define ISOTP_PROTOCOL_RESULT_WFT_OVRN   -7

Definition at line 224 of file isotp_defines.h.

◆ ISOTP_PROTOCOL_RESULT_WRONG_SN

#define ISOTP_PROTOCOL_RESULT_WRONG_SN   -4

Definition at line 221 of file isotp_defines.h.

◆ ISOTP_RET_ERROR

#define ISOTP_RET_ERROR   -1

Definition at line 38 of file isotp_defines.h.

◆ ISOTP_RET_INPROGRESS

#define ISOTP_RET_INPROGRESS   -2

Definition at line 39 of file isotp_defines.h.

◆ ISOTP_RET_LENGTH

#define ISOTP_RET_LENGTH   -7

Definition at line 44 of file isotp_defines.h.

◆ ISOTP_RET_NO_DATA

#define ISOTP_RET_NO_DATA   -5

Definition at line 42 of file isotp_defines.h.

◆ ISOTP_RET_NOSPACE

#define ISOTP_RET_NOSPACE   -8

Definition at line 45 of file isotp_defines.h.

◆ ISOTP_RET_OK

#define ISOTP_RET_OK   0

Definition at line 37 of file isotp_defines.h.

◆ ISOTP_RET_OVERFLOW

#define ISOTP_RET_OVERFLOW   -3

Definition at line 40 of file isotp_defines.h.

◆ ISOTP_RET_TIMEOUT

#define ISOTP_RET_TIMEOUT   -6

Definition at line 43 of file isotp_defines.h.

◆ ISOTP_RET_WRONG_SN

#define ISOTP_RET_WRONG_SN   -4

Definition at line 41 of file isotp_defines.h.

◆ IsoTpTimeAfter

#define IsoTpTimeAfter (   a,
 
)    ((int32_t)((int32_t)(b) - (int32_t)(a)) < 0)

Definition at line 48 of file isotp_defines.h.

Enumeration Type Documentation

◆ IsoTpFlowStatus

Enumerator
PCI_FLOW_STATUS_CONTINUE 
PCI_FLOW_STATUS_WAIT 
PCI_FLOW_STATUS_OVERFLOW 

Definition at line 209 of file isotp_defines.h.

209 {
IsoTpFlowStatus
@ PCI_FLOW_STATUS_OVERFLOW
@ PCI_FLOW_STATUS_WAIT
@ PCI_FLOW_STATUS_CONTINUE

◆ IsoTpProtocolControlInformation

Enumerator
ISOTP_PCI_TYPE_SINGLE 
ISOTP_PCI_TYPE_FIRST_FRAME 
TSOTP_PCI_TYPE_CONSECUTIVE_FRAME 
ISOTP_PCI_TYPE_FLOW_CONTROL_FRAME 

Definition at line 200 of file isotp_defines.h.

200 {
IsoTpProtocolControlInformation
@ TSOTP_PCI_TYPE_CONSECUTIVE_FRAME
@ ISOTP_PCI_TYPE_SINGLE
@ ISOTP_PCI_TYPE_FIRST_FRAME
@ ISOTP_PCI_TYPE_FLOW_CONTROL_FRAME

◆ IsoTpReceiveStatusTypes

Enumerator
ISOTP_RECEIVE_STATUS_IDLE 
ISOTP_RECEIVE_STATUS_INPROGRESS 
ISOTP_RECEIVE_STATUS_FULL 

Definition at line 61 of file isotp_defines.h.

61 {
IsoTpReceiveStatusTypes
Definition: isotp_defines.h:61
@ ISOTP_RECEIVE_STATUS_FULL
Definition: isotp_defines.h:64
@ ISOTP_RECEIVE_STATUS_IDLE
Definition: isotp_defines.h:62
@ ISOTP_RECEIVE_STATUS_INPROGRESS
Definition: isotp_defines.h:63

◆ IsoTpSendStatusTypes

Enumerator
ISOTP_SEND_STATUS_IDLE 
ISOTP_SEND_STATUS_INPROGRESS 
ISOTP_SEND_STATUS_ERROR 

Definition at line 54 of file isotp_defines.h.

54 {
IsoTpSendStatusTypes
Definition: isotp_defines.h:54
@ ISOTP_SEND_STATUS_ERROR
Definition: isotp_defines.h:57
@ ISOTP_SEND_STATUS_IDLE
Definition: isotp_defines.h:55
@ ISOTP_SEND_STATUS_INPROGRESS
Definition: isotp_defines.h:56