WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::nt::TimestampedUnit< T > Struct Template Reference

Timestamped unit. More...

#include <wpi/nt/UnitTopic.hpp>

Public Member Functions

 TimestampedUnit ()=default
 TimestampedUnit (int64_t time, int64_t serverTime, T value)

Public Attributes

int64_t time = 0
 Time in local time base.
int64_t serverTime = 0
 Time in server time base.
value = {}
 Value.

Detailed Description

template<typename T>
struct wpi::nt::TimestampedUnit< T >

Timestamped unit.

Template Parameters
Tunit type, e.g. wpi::units::meter_t

Constructor & Destructor Documentation

◆ TimestampedUnit() [1/2]

template<typename T>
wpi::nt::TimestampedUnit< T >::TimestampedUnit ( )
default

◆ TimestampedUnit() [2/2]

template<typename T>
wpi::nt::TimestampedUnit< T >::TimestampedUnit ( int64_t time,
int64_t serverTime,
T value )
inline

Member Data Documentation

◆ serverTime

template<typename T>
int64_t wpi::nt::TimestampedUnit< T >::serverTime = 0

Time in server time base.

May be 0 or 1 for locally set values.

◆ time

template<typename T>
int64_t wpi::nt::TimestampedUnit< T >::time = 0

Time in local time base.

◆ value

template<typename T>
T wpi::nt::TimestampedUnit< T >::value = {}

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