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.theu.nosp@m.s.pcb.nosp@m.@gma.nosp@m.il.co.nosp@m.m
Andrey Belomutskiy, (c) 2012-2020

Definition in file serial_can.cpp.

Functions

void canStreamInit (void)
 
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 CanStreamer streamer
 
static CanTsListener listener
 
static int isoTpPacketCounter = 0
 

Function Documentation

◆ canStreamAddToTxTimeout()

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

Definition at line 398 of file serial_can.cpp.

398 {
399 return state.streamAddToTxTimeout(np, txbuf, timeout);
400}
state("state", SensorCategory.SENSOR_INPUTS, FieldType.INT8, 1871, 1.0, -1.0, -1.0, "")
Here is the call graph for this function:

◆ canStreamFlushTx()

msg_t canStreamFlushTx ( sysinterval_t  timeout)

Definition at line 402 of file serial_can.cpp.

402 {
403 return state.streamFlushTx(timeout);
404}
Here is the call graph for this function:

◆ canStreamInit()

void canStreamInit ( void  )

Definition at line 394 of file serial_can.cpp.

394 {
395 streamer.init();
396}
static CanStreamer streamer

Referenced by startCanConsole().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ canStreamReceiveTimeout()

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

Definition at line 409 of file serial_can.cpp.

409 {
410 return state.streamReceiveTimeout(np, rxbuf, timeout);
411}
Here is the call graph for this function:

Variable Documentation

◆ isoTpPacketCounter

int isoTpPacketCounter = 0
static

Definition at line 356 of file serial_can.cpp.

Referenced by CanTsListener::decodeFrame().

◆ listener

CanTsListener listener
static

◆ streamer

static CanStreamerState state & streamer
static

Definition at line 33 of file serial_can.cpp.

Referenced by canStreamInit().

Go to the source code of this file.