NDEVR
API Documentation
NtpReply

Represents a parsed NTP reply received from an NTP server. More...

Public Member Functions

 NtpReply ()
 Default constructor, constructs a null NTP reply.
 NtpReply (NtpFullPacket packet, Time destinationTime)
 Constructs an NTP reply given an NTP packet and current time.
Time destinationTime () const
NtpLeapIndicator leapIndicator () const
NtpMode mode () const
Time originTime () const
qreal pollInterval () const
qreal precision () const
const NtpFullPacketrawData () const
Time receiveTime () const
Time referenceTime () const
quint8 stratum () const
Time transmitTime () const
quint8 versionNumber () const

Detailed Description

Represents a parsed NTP reply received from an NTP server.

Wraps an NtpFullPacket and the local destination time, providing convenience accessors for all standard NTP reply fields.

Definition at line 17 of file NtpReply.h.

Constructor & Destructor Documentation

◆ NtpReply()

NtpReply::NtpReply ( NtpFullPacket packet,
Time destinationTime )
inline

Constructs an NTP reply given an NTP packet and current time.

Parameters
packetNTP packet.
destinationTimeTime at the client when the reply arrived from the server.

Definition at line 30 of file NtpReply.h.

References destinationTime().

Member Function Documentation

◆ destinationTime()

Time NtpReply::destinationTime ( ) const
inline
Returns
Time at the client when the reply arrived from the server.

Definition at line 108 of file NtpReply.h.

Referenced by NtpReply().

◆ leapIndicator()

NtpLeapIndicator NtpReply::leapIndicator ( ) const
inline
Returns
Leap indicator.

Definition at line 38 of file NtpReply.h.

◆ mode()

NtpMode NtpReply::mode ( ) const
inline
Returns
Ntp mode.

Definition at line 52 of file NtpReply.h.

◆ originTime()

Time NtpReply::originTime ( ) const
inline
Returns
Time at the client when the request departed for the server.

Definition at line 87 of file NtpReply.h.

◆ pollInterval()

qreal NtpReply::pollInterval ( ) const
inline
Returns
Maximum interval between successive messages, in seconds.

Definition at line 66 of file NtpReply.h.

◆ precision()

qreal NtpReply::precision ( ) const
inline
Returns
Clock precision, in seconds.

Definition at line 73 of file NtpReply.h.

◆ rawData()

const NtpFullPacket & NtpReply::rawData ( ) const
inline
Returns
Raw NTP reply, for the curious user.

Definition at line 115 of file NtpReply.h.

◆ receiveTime()

Time NtpReply::receiveTime ( ) const
inline
Returns
Time at the server when the request arrived from the client.

Definition at line 94 of file NtpReply.h.

◆ referenceTime()

Time NtpReply::referenceTime ( ) const
inline
Returns
Time when the system clock was last set or corrected.

Definition at line 80 of file NtpReply.h.

◆ stratum()

quint8 NtpReply::stratum ( ) const
inline
Returns
Stratum.

Definition at line 59 of file NtpReply.h.

◆ transmitTime()

Time NtpReply::transmitTime ( ) const
inline
Returns
Time at the server when the response left for the client.

Definition at line 101 of file NtpReply.h.

◆ versionNumber()

quint8 NtpReply::versionNumber ( ) const
inline
Returns
NTP version number.

Definition at line 45 of file NtpReply.h.


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