|
Avionics
Core avionics package for CURE flight computers
|
Declares one telemetry "stream" to include in packets. More...
#include <Telemetry.h>

Public Member Functions | |
| SendableSensorData (SensorDataHandler *sdh, std::uint16_t sendFrequencyHz) | |
| Create a single SDH stream. | |
| template<std::size_t M> | |
| SendableSensorData (const std::array< SensorDataHandler *, M > &sdhList, std::uint8_t label, std::uint16_t sendFrequencyHz) | |
| Create a multi SDH stream from a std::array. | |
| bool | shouldBeSent (std::uint32_t now) const |
| Return true if enough time has elapsed such that this stream wants to be sent again. | |
| void | markWasSent (std::uint32_t now) |
| Update internal state after sending. | |
| bool | isSingle () const |
| Convenience: true if configured as a single SDH stream. | |
| bool | isMulti () const |
| Convenience: true if configured as a multi SDH stream. | |
Public Attributes | |
| SensorDataHandler * | singleSDH |
| SensorDataHandler *const * | multiSDH |
| const std::size_t | multiSDHLength |
| std::uint8_t | multiSDHDataLabel |
| std::uint16_t | periodMs |
| std::uint32_t | lastSentTimestamp |
Declares one telemetry "stream" to include in packets.
A stream can be either:
This type does not own any SensorDataHandler objects. Pointers must remain valid while Telemetry uses them.
For multi groups, you can provide either:
Definition at line 105 of file Telemetry.h.
|
inline |
Create a single SDH stream.
| sdh | SensorDataHandler to send (non-owning). |
| sendFrequencyHz | Desired send rate in Hz. |
Definition at line 135 of file Telemetry.h.
|
inline |
Create a multi SDH stream from a std::array.
This is convenient when the group size is fixed at compile time. The std::array passed in must outlive this SendableSensorData object.
Definition at line 150 of file Telemetry.h.
|
inline |
Convenience: true if configured as a multi SDH stream.
Definition at line 178 of file Telemetry.h.
|
inline |
Convenience: true if configured as a single SDH stream.
Definition at line 175 of file Telemetry.h.
|
inline |
Update internal state after sending.
Definition at line 170 of file Telemetry.h.
|
inline |
Return true if enough time has elapsed such that this stream wants to be sent again.
Definition at line 163 of file Telemetry.h.
| std::uint32_t SendableSensorData::lastSentTimestamp |
Last send time in ms (same time base as tick()).
Definition at line 128 of file Telemetry.h.
| SensorDataHandler* const* SendableSensorData::multiSDH |
Multi-value group. Pointer to an external array of SDHs.
Definition at line 112 of file Telemetry.h.
| std::uint8_t SendableSensorData::multiSDHDataLabel |
Label written once before the multi SDH values.
Definition at line 120 of file Telemetry.h.
| const std::size_t SendableSensorData::multiSDHLength |
Length of multiSDH array.
Definition at line 117 of file Telemetry.h.
| std::uint16_t SendableSensorData::periodMs |
Minimum time between sends for this stream.
Definition at line 125 of file Telemetry.h.
| SensorDataHandler* SendableSensorData::singleSDH |
Single-value stream. If non-null, this stream will send this SDH.
Definition at line 109 of file Telemetry.h.