rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
serial_can.cpp File Reference

Detailed Description

This code is a bridge between a serial streaming used by TS and a packet-frame CAN-bus, using the ISO-TP protocol. ISO 15765-2, or ISO-TP (Transport Layer), which is an international standard for sending data packets over a CAN-Bus. https://en.wikipedia.org/wiki/ISO_15765-2

Date
Aug 1, 2020
Author
andreika prome.nosp@m.theP.nosp@m.RINTu.nosp@m.s.pc.nosp@m.b@gma.nosp@m.il.c.nosp@m.om
Andrey Belomutskiy, (c) 2012-2020

Definition in file serial_can.cpp.

Functions

void tsOverCanInit ()
 
msg_t canStreamAddToTxTimeout (size_t *np, const uint8_t *txbuf, sysinterval_t timeout)
 
msg_t canStreamFlushTx (sysinterval_t timeout)
 
msg_t canStreamReceiveTimeout (size_t *np, uint8_t *rxbuf, sysinterval_t timeout)
 

Variables

static CanTsListener g_listener
 
static CanStreamerState statetransport
 
static int isoTpPacketCounter = 0
 

Function Documentation

◆ canStreamAddToTxTimeout()

msg_t canStreamAddToTxTimeout ( size_t np,
const uint8_t *  txbuf,
sysinterval_t  timeout 
)

Definition at line 76 of file serial_can.cpp.

76 {
77 return state.streamAddToTxTimeout(np, txbuf, timeout);
78}
state("state", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1879, 1.0, -1.0, -1.0, "")
Here is the call graph for this function:

◆ canStreamFlushTx()

msg_t canStreamFlushTx ( sysinterval_t  timeout)

Definition at line 80 of file serial_can.cpp.

80 {
81 return state.streamFlushTx(timeout);
82}
Here is the call graph for this function:

◆ canStreamReceiveTimeout()

msg_t canStreamReceiveTimeout ( size_t np,
uint8_t *  rxbuf,
sysinterval_t  timeout 
)

Definition at line 87 of file serial_can.cpp.

87 {
88 return state.streamReceiveTimeout(np, rxbuf, timeout);
89}
Here is the call graph for this function:

◆ tsOverCanInit()

void tsOverCanInit ( )

Definition at line 72 of file serial_can.cpp.

72 {
73 transport.init();
74}
static CanStreamerState state & transport

Referenced by startCanConsole().

Here is the caller graph for this function:

Variable Documentation

◆ g_listener

static CanTransport transport & g_listener
static

Definition at line 25 of file serial_can.cpp.

Referenced by CanTransport::init().

◆ isoTpPacketCounter

int isoTpPacketCounter = 0
static

Definition at line 34 of file serial_can.cpp.

Referenced by CanTsListener::decodeFrame().

◆ transport

CanStreamerState state& transport
static

Go to the source code of this file.