Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
Telemetry Class Reference

Packetizes telemetry streams and sends them out over a Stream. More...

#include <Telemetry.h>

Collaboration diagram for Telemetry:
Collaboration graph

Public Member Functions

template<std::size_t N>
 Telemetry (const std::array< SendableSensorData *, N > &streams, Stream &rfdSerialConnection, CommandLine *commandLine=nullptr)
 Construct from std::array (convenient and compile-time sized). The std::array must outlive the Telemetry instance.
bool tick (std::uint32_t currentTime_ms)
 Call every loop to send due telemetry streams.
bool isInCommandMode () const
 True if telemetry is currently paused for radio command mode.
void setCommandLine (CommandLine *newCommandLine)
 Optional command line interface to drive while telemetry manages command mode.
void lockCommandModeTimeout (std::uint32_t lockDuration_ms)
 Temporarily disable command-mode inactivity timeout.
void unlockCommandModeTimeout ()
 Re-enable command-mode inactivity timeout immediately.
void forceExitCommandMode ()
 Immediately exit command mode if currently active.

Detailed Description

Packetizes telemetry streams and sends them out over a Stream.

Usage pattern:

Lifetime rule:

  • Telemetry stores a pointer to the provided list of streams (non-owning). The list must outlive Telemetry.

Definition at line 190 of file Telemetry.h.

Constructor & Destructor Documentation

◆ Telemetry()

template<std::size_t N>
Telemetry::Telemetry ( const std::array< SendableSensorData *, N > & streams,
Stream & rfdSerialConnection,
CommandLine * commandLine = nullptr )
inline

Construct from std::array (convenient and compile-time sized). The std::array must outlive the Telemetry instance.

Definition at line 198 of file Telemetry.h.

Member Function Documentation

◆ forceExitCommandMode()

void Telemetry::forceExitCommandMode ( )

Immediately exit command mode if currently active.

Definition at line 100 of file Telemetry.cpp.

◆ isInCommandMode()

bool Telemetry::isInCommandMode ( ) const
inline

True if telemetry is currently paused for radio command mode.

Definition at line 217 of file Telemetry.h.

◆ lockCommandModeTimeout()

void Telemetry::lockCommandModeTimeout ( std::uint32_t lockDuration_ms)

Temporarily disable command-mode inactivity timeout.

Parameters
lockDuration_msDuration before auto-unlock fallback.

Definition at line 80 of file Telemetry.cpp.

◆ setCommandLine()

void Telemetry::setCommandLine ( CommandLine * newCommandLine)
inline

Optional command line interface to drive while telemetry manages command mode.

Definition at line 222 of file Telemetry.h.

◆ tick()

bool Telemetry::tick ( std::uint32_t currentTime_ms)

Call every loop to send due telemetry streams.

Parameters
currentTime_msCurrent time in milliseconds.
Returns
true if a packet was sent on this tick.

Definition at line 240 of file Telemetry.cpp.

◆ unlockCommandModeTimeout()

void Telemetry::unlockCommandModeTimeout ( )

Re-enable command-mode inactivity timeout immediately.

Definition at line 91 of file Telemetry.cpp.


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