WPILibC++ 2024.3.2
nt::TimeSyncEventData Class Reference

NetworkTables time sync event data. More...

#include <ntcore_cpp.h>

Public Member Functions

 TimeSyncEventData ()=default
 
 TimeSyncEventData (int64_t serverTimeOffset, int64_t rtt2, bool valid)
 

Public Attributes

int64_t serverTimeOffset
 Offset between local time and server time, in microseconds. More...
 
int64_t rtt2
 Measured round trip time divided by 2, in microseconds. More...
 
bool valid
 If serverTimeOffset and RTT are valid. More...
 

Detailed Description

NetworkTables time sync event data.

Constructor & Destructor Documentation

◆ TimeSyncEventData() [1/2]

nt::TimeSyncEventData::TimeSyncEventData ( )
default

◆ TimeSyncEventData() [2/2]

nt::TimeSyncEventData::TimeSyncEventData ( int64_t  serverTimeOffset,
int64_t  rtt2,
bool  valid 
)
inline

Member Data Documentation

◆ rtt2

int64_t nt::TimeSyncEventData::rtt2

Measured round trip time divided by 2, in microseconds.

◆ serverTimeOffset

int64_t nt::TimeSyncEventData::serverTimeOffset

Offset between local time and server time, in microseconds.

Add this value to local time to get the estimated equivalent server time.

◆ valid

bool nt::TimeSyncEventData::valid

If serverTimeOffset and RTT are valid.

An event with this set to false is sent when the client disconnects.


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