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

Timestamped float measurement container. More...

#include <DataPoint.h>

Collaboration diagram for DataPoint:
Collaboration graph

Public Member Functions

 DataPoint ()
 Default construct an empty data point.
 DataPoint (uint32_t timestamp_ms, float data)
 Construct a populated data point.

Public Attributes

uint32_t timestamp_ms
float data

Friends

bool operator> (const DataPoint &lhs, const DataPoint &rhs)
bool operator>= (const DataPoint &lhs, const DataPoint &rhs)
bool operator< (const DataPoint &lhs, const DataPoint &rhs)
bool operator<= (const DataPoint &lhs, const DataPoint &rhs)

Detailed Description

Timestamped float measurement container.

Note
When to use: represent a single sensor or derived value tagged with the millisecond timestamp at which it was produced.

Definition at line 11 of file DataPoint.h.

Constructor & Destructor Documentation

◆ DataPoint() [1/2]

DataPoint::DataPoint ( )
inline

Default construct an empty data point.

Note
When to use: create a placeholder value before assigning real readings.

Definition at line 21 of file DataPoint.h.

◆ DataPoint() [2/2]

DataPoint::DataPoint ( uint32_t timestamp_ms,
float data )
inline

Construct a populated data point.

Parameters
timestamp_msMeasurement time in milliseconds.
dataScalar value associated with the timestamp.
Note
When to use: wrap a raw reading for storage, transport, or comparison.

Definition at line 31 of file DataPoint.h.

◆ operator<

bool operator< ( const DataPoint & lhs,
const DataPoint & rhs )
friend

Definition at line 45 of file DataPoint.h.

◆ operator<=

bool operator<= ( const DataPoint & lhs,
const DataPoint & rhs )
friend

Definition at line 50 of file DataPoint.h.

◆ operator>

bool operator> ( const DataPoint & lhs,
const DataPoint & rhs )
friend

Definition at line 35 of file DataPoint.h.

◆ operator>=

bool operator>= ( const DataPoint & lhs,
const DataPoint & rhs )
friend

Definition at line 40 of file DataPoint.h.

Member Data Documentation

◆ data

float DataPoint::data

Definition at line 14 of file DataPoint.h.

◆ timestamp_ms

uint32_t DataPoint::timestamp_ms

Definition at line 13 of file DataPoint.h.


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