|
NetBurner 3.5.6
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) |
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
| 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 |
| 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 |