Dawn Framework 1.0
Universal data acquisition framework for embedded systems
Static Public Member Functions | Static Public Attributes | List of all members
dawn::CIsoTp Class Reference

ISO-TP (ISO 15765-2) transport protocol helper. More...

#include <isotp.hxx>

Static Public Member Functions

static int receive (const porting::canmsg_s &msg, State &state, void *data_buf, size_t buf_size, uint64_t now, uint64_t timeout)
 Process incoming ISO-TP frame.
 
static int receiveCustom (const porting::canmsg_s &msg, State &state, void *data_buf, size_t buf_size, uint8_t seg_no, bool seg_last, uint64_t now, uint64_t timeout)
 Process incoming Custom Segmented frame (Dawn specific).
 

Static Public Attributes

static uint8_t FRAME_CF = 0x20
 Consecutive Frame (0x2N)
 
static uint8_t FRAME_FC = 0x30
 Flow Control (0x3N)
 
static uint8_t FRAME_FF = 0x10
 First Frame (0x1N)
 
static uint8_t FRAME_SF = 0x00
 Single Frame (0x0N)
 

Detailed Description

ISO-TP (ISO 15765-2) transport protocol helper.

Minimal ISO-TP implementation for CAN segmented transfers. Uses standard ISO-TP frame format but without flow control. Relies on CAN hardware reliability instead of flow control.

This class will be replaced by NuttX ISO-TP implementation in the future.

Definition at line 31 of file isotp.hxx.

Member Function Documentation

◆ receive()

int CIsoTp::receive ( const porting::canmsg_s msg,
State &  state,
void *  data_buf,
size_t  buf_size,
uint64_t  now,
uint64_t  timeout 
)
static

Process incoming ISO-TP frame.

Handles FF/CF, manages state and timeouts. Returns -ENOMSG if frame is not an ISO-TP FF/CF.

Returns
0 on success (in progress), 1 on complete, negative error.

Definition at line 178 of file isotp.cxx.

References FRAME_CF, and FRAME_FF.

◆ receiveCustom()

int CIsoTp::receiveCustom ( const porting::canmsg_s msg,
State &  state,
void *  data_buf,
size_t  buf_size,
uint8_t  seg_no,
bool  seg_last,
uint64_t  now,
uint64_t  timeout 
)
static

Process incoming Custom Segmented frame (Dawn specific).

Used for INDEXED_WRITE and WRITE_ALL segmented transfers.

Returns
0 on success (in progress), 1 on complete, negative error.

Definition at line 242 of file isotp.cxx.


The documentation for this class was generated from the following files: