SAE Teensy ECU
IIT SAE Microcontroller programming
Loading...
Searching...
No Matches
Echo Namespace Reference

This Module can be used to echo a CAN message over a network of two ECUs. More...

Functions

void echo (uint32_t delay, const uint32_t address, uint8_t buf[8])
 Send a can message to the back ECU from the front to then echo the same message at a set delay.
 
void echo (uint32_t delay, const uint32_t address, const uint8_t buf_0=0, const uint8_t buf_1=0, const uint8_t buf_2=0, const uint8_t buf_3=0, const uint8_t buf_4=0, const uint8_t buf_5=0, const uint8_t buf_6=0, const uint8_t buf_7=0)
 Send a can message to the back ECU from the front to then echo the same message at a set delay.
 
void setup ()
 Initialize on receiving ECU to echo messages.
 

Detailed Description

This Module can be used to echo a CAN message over a network of two ECUs.

Echo::echo is called when a serial command from the companion app sends a valid canbus message to relay

This modules is only used for testing

See also
SerialCommand.h for more info on how Echo functions are called over serial

Function Documentation

◆ echo() [1/2]

void Echo::echo ( uint32_t  delay,
const uint32_t  address,
const uint8_t  buf_0 = 0,
const uint8_t  buf_1 = 0,
const uint8_t  buf_2 = 0,
const uint8_t  buf_3 = 0,
const uint8_t  buf_4 = 0,
const uint8_t  buf_5 = 0,
const uint8_t  buf_6 = 0,
const uint8_t  buf_7 = 0 
)

Send a can message to the back ECU from the front to then echo the same message at a set delay.

Parameters
delayThe delay to echo the message back
addressThe outgoing address
buf_0byte 0 of the buffer
buf_1byte 1 of the buffer
buf_2byte 2 of the buffer
buf_3byte 3 of the buffer
buf_4byte 4 of the buffer
buf_5byte 5 of the buffer
buf_6byte 6 of the buffer
buf_7byte 7 of the buffer

◆ echo() [2/2]

void Echo::echo ( uint32_t  delay,
const uint32_t  address,
uint8_t  buf[8] 
)

Send a can message to the back ECU from the front to then echo the same message at a set delay.

Parameters
delayThe delay to echo the message back
addressThe outgoing address
bufThe buffer array to be echoed