ISO TP high level interface. More...

Detailed Description

ISO TP high level interface.

Author
Vincent Dupont vince.nosp@m.nt@o.nosp@m.takey.nosp@m.s.co.nosp@m.m

Definition in file isotp.h.

#include "can/can.h"
#include "can/common.h"
#include "thread.h"
#include "xtimer.h"
#include "net/gnrc/pktbuf.h"
+ Include dependency graph for isotp.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  isotp_fc_options
 The isotp_fc_options struct. More...
 
struct  isotp_options
 The isotp_options struct. More...
 
struct  tpcon
 The tpcon struct. More...
 
struct  isotp
 The isotp struct. More...
 

Macros

#define CAN_ISOTP_BS   (10)
 Default Block Size for RX Flow Control frames.
 
#define CAN_ISOTP_STMIN   (5)
 Default STmin for RX Flow Control frames.
 
#define CAN_ISOTP_WFTMAX   (1)
 Default maximum WFT for TX Flow Control.
 

Functions

kernel_pid_t isotp_init (char *stack, int stacksize, char priority, const char *name)
 Initialize the isotp layer. More...
 
int isotp_send (struct isotp *isotp, const void *buf, int len, int flags)
 Send data through an isotp channel. More...
 
int isotp_bind (struct isotp *isotp, can_reg_entry_t *entry, void *arg, struct isotp_fc_options *fc_options)
 Bind an isotp channel. More...
 
int isotp_release (struct isotp *isotp)
 Release a bound isotp channel. More...
 
void isotp_free_rx (can_rx_data_t *rx)
 Free a received buffer. More...
 

flags for isotp behaviour

#define CAN_ISOTP_RX_FLAGS_MASK   0x0000FFFF
 rx flags mask
 
#define CAN_ISOTP_LISTEN_MODE   0x0001
 listen only flag (do not send FC)
 
#define CAN_ISOTP_EXTEND_ADDR   0x0002
 enable extended addressing
 
#define CAN_ISOTP_TX_PADDING   0x0004
 enable CAN frame padding tx path
 
#define CAN_ISOTP_HALF_DUPLEX   0x0040
 half duplex error state handling
 
#define CAN_ISOTP_RX_EXT_ADDR   0x0200
 different rx extended addressing
 
#define CAN_ISOTP_TX_FLAGS_MASK   0xFFFF0000
 tx flags mask
 
#define CAN_ISOTP_TX_DONT_WAIT   0x00010000
 do not send a tx confirmation msg
 

default configuration values

#define CAN_ISOTP_DEFAULT_FLAGS   0
 
#define CAN_ISOTP_DEFAULT_EXT_ADDRESS   0x00
 
#define CAN_ISOTP_DEFAULT_PAD_CONTENT   0xCC /* prevent bit-stuffing */
 
#define CAN_ISOTP_DEFAULT_FRAME_TXTIME   0
 
#define CAN_ISOTP_DEFAULT_RECV_BS   0
 
#define CAN_ISOTP_DEFAULT_RECV_STMIN   0x00
 
#define CAN_ISOTP_DEFAULT_RECV_WFTMAX   0