NDEVR
API Documentation
TimeRequestabstract

A request to get the time from the network. More...

Inheritance diagram for TimeRequest:
[legend]

Public Member Functions

void errorOccurredSignal (int error)
 Emitted when an error occurs, with the error code.
void finishedSignal ()
 Emitted when the time request has finished.
TimeSpan localClockOffset () const
 Calculates the offset between the local clock and the server clock.
TimeSpan roundTripDelay () const
 Calculates the round-trip delay of the time request.
virtual Time rxTime () const =0
 Returns the time the response was received.
virtual Time serverTime () const =0
 Returns the time reported by the server.
virtual Time txTime () const =0
 Returns the time the request was transmitted.

Detailed Description

A request to get the time from the network.


Definition at line 92 of file ItemDownloader.h.

Member Function Documentation

◆ localClockOffset()

TimeSpan TimeRequest::localClockOffset ( ) const
inline

Calculates the offset between the local clock and the server clock.

Returns
The local clock offset as a TimeSpan.

Definition at line 123 of file ItemDownloader.h.

References rxTime(), serverTime(), and txTime().

◆ roundTripDelay()

TimeSpan TimeRequest::roundTripDelay ( ) const
inline

Calculates the round-trip delay of the time request.

Returns
The round-trip delay as a TimeSpan.

Definition at line 115 of file ItemDownloader.h.

References rxTime(), and txTime().

◆ rxTime()

virtual Time TimeRequest::rxTime ( ) const
pure virtual

Returns the time the response was received.

Returns
The receive time.

Implemented in NtpClient.

Referenced by localClockOffset(), and roundTripDelay().

◆ serverTime()

virtual Time TimeRequest::serverTime ( ) const
pure virtual

Returns the time reported by the server.

Returns
The server time.

Implemented in NtpClient.

Referenced by localClockOffset().

◆ txTime()

virtual Time TimeRequest::txTime ( ) const
pure virtual

Returns the time the request was transmitted.

Returns
The transmit time.

Implemented in NtpClient.

Referenced by localClockOffset(), and roundTripDelay().


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