Red Bird Racing VCU v2
 
Loading...
Searching...
No Matches
Telemetry Class Reference

Telemetry class for managing telemetry data transmission over CAN bus Grabs and sends telemetry frames in fixed order based on scheduling logic. More...

#include <Telemetry.hpp>

Collaboration diagram for Telemetry:

Public Member Functions

 Telemetry (MCP2515 &mcp2515_, CarState &car_)
 Construct a new Telemetry object.
 
void sendPedal ()
 Internal helper to get and send the Pedal telemetry frame.
 
void sendMotor ()
 Internal helper to get and send the motor telemetry frame.
 
void sendBms ()
 Internal helper to get and send the BMS telemetry frame.
 

Private Attributes

MCP2515 & mcp2515
 
CarStatecar
 

Detailed Description

Telemetry class for managing telemetry data transmission over CAN bus Grabs and sends telemetry frames in fixed order based on scheduling logic.

Definition at line 26 of file Telemetry.hpp.

Constructor & Destructor Documentation

◆ Telemetry()

Telemetry::Telemetry ( MCP2515 &  mcp2515_,
CarState car_ 
)

Construct a new Telemetry object.

Parameters
mcp2515_Reference to MCP2515 for sending CAN messages
car_Reference to CarState

Definition at line 17 of file Telemetry.cpp.

Member Function Documentation

◆ sendBms()

void Telemetry::sendBms ( )

Internal helper to get and send the BMS telemetry frame.

Definition at line 43 of file Telemetry.cpp.

References CarState::bms, car, mcp2515, and TelemetryFrameBms::toCanFrame().

Referenced by schedulerTelemetryBms().

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

◆ sendMotor()

void Telemetry::sendMotor ( )

Internal helper to get and send the motor telemetry frame.

Definition at line 34 of file Telemetry.cpp.

References car, mcp2515, CarState::motor, and TelemetryFrameMotor::toCanFrame().

Referenced by schedulerTelemetryMotor().

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

◆ sendPedal()

void Telemetry::sendPedal ( )

Internal helper to get and send the Pedal telemetry frame.

Definition at line 25 of file Telemetry.cpp.

References car, mcp2515, CarState::pedal, and TelemetryFramePedal::toCanFrame().

Referenced by schedulerTelemetryPedal().

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

Member Data Documentation

◆ car

CarState& Telemetry::car
private

Reference to CarState

Definition at line 36 of file Telemetry.hpp.

Referenced by sendBms(), sendMotor(), and sendPedal().

◆ mcp2515

MCP2515& Telemetry::mcp2515
private

Reference to MCP2515 for sending CAN messages

Definition at line 35 of file Telemetry.hpp.

Referenced by sendBms(), sendMotor(), and sendPedal().


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