|
NetBurner 3.5.7
PDF Version |
#include <NTPServer.h>
Public Member Functions | |
| bool | SetFrom (uint32_t tt, uint32_t From1588) |
| NtpTimeStamp () | |
| NtpTimeStamp & | operator= (UDPPacket &upkt) |
| NtpTimeStamp & | operator= (const NtpTimeStamp &src) |
| bool | operator< (const NtpTimeStamp &other) const |
| bool | operator> (const NtpTimeStamp &other) const |
| bool | operator<= (const NtpTimeStamp &other) const |
| bool | operator>= (const NtpTimeStamp &other) const |
| bool | operator== (const NtpTimeStamp &other) const |
| bool | operator!= (const NtpTimeStamp &other) const |
Static Public Member Functions | |
| static NtpTimeStamp | Now () |
Public Attributes | |
| beuint32_t | sec |
| Seconds since NTP epoch (big endian) | |
| beuint32_t | frac |
| Fractional seconds (big endian) | |
NtpTimeStamp struct - Represents an NTP timestamp
NTP timestamps are 64-bit values with 32-bit seconds and 32-bit fraction The epoch is January 1, 1900 00:00:00 UTC
|
inline |
Default constructor - initializes to zero
|
static |
Create timestamp for current time
|
inline |
Inequality operator
| other | Timestamp to compare against |
|
inline |
Less than operator
| other | Timestamp to compare against |
|
inline |
Less than or equal operator
| other | Timestamp to compare against |
| NTPServer::NtpTimeStamp & NTPServer::NtpTimeStamp::operator= | ( | const NtpTimeStamp & | src | ) |
Copy assignment operator
| src | Source timestamp to copy |
| NTPServer::NtpTimeStamp & NTPServer::NtpTimeStamp::operator= | ( | UDPPacket & | upkt | ) |
Extract timestamp from UDP packet Uses packet timing information to create precise timestamp
| upkt | Reference to UDP packet |
|
inline |
Equality operator
| other | Timestamp to compare against |
|
inline |
Greater than operator
| other | Timestamp to compare against |
|
inline |
Greater than or equal operator
| other | Timestamp to compare against |
| bool NTPServer::NtpTimeStamp::SetFrom | ( | uint32_t | tt, |
| uint32_t | From1588 ) |
Set timestamp from OS tick and 1588 timer values
| tt | OS tick count |
| From1588 | 1588 timer value |