Time Shield Library
C++ library for working with time
Loading...
Searching...
No Matches
time_shield::NtpSample Struct Reference

NTP measurement sample (one server response). More...

#include <ntp_client_pool.hpp>

Public Attributes

std::string host
 Server host name.
 
int port = 123
 Server port.
 
bool is_ok = false
 Indicates successful response parsing.
 
int error_code = 0
 Error code when query or parsing failed.
 
int stratum = -1
 NTP stratum level reported by server.
 
int64_t offset_us = 0
 Offset between UTC and local realtime, microseconds.
 
int64_t delay_us = 0
 Estimated round-trip delay, microseconds.
 
int64_t max_delay_us = 0
 Maximum acceptable delay for this sample.
 

Detailed Description

NTP measurement sample (one server response).

Definition at line 27 of file ntp_client_pool.hpp.

Member Data Documentation

◆ delay_us

int64_t time_shield::NtpSample::delay_us = 0

Estimated round-trip delay, microseconds.

Definition at line 34 of file ntp_client_pool.hpp.

◆ error_code

int time_shield::NtpSample::error_code = 0

Error code when query or parsing failed.

Definition at line 31 of file ntp_client_pool.hpp.

◆ host

std::string time_shield::NtpSample::host

Server host name.

Definition at line 28 of file ntp_client_pool.hpp.

◆ is_ok

bool time_shield::NtpSample::is_ok = false

Indicates successful response parsing.

Definition at line 30 of file ntp_client_pool.hpp.

◆ max_delay_us

int64_t time_shield::NtpSample::max_delay_us = 0

Maximum acceptable delay for this sample.

Definition at line 35 of file ntp_client_pool.hpp.

◆ offset_us

int64_t time_shield::NtpSample::offset_us = 0

Offset between UTC and local realtime, microseconds.

Definition at line 33 of file ntp_client_pool.hpp.

◆ port

int time_shield::NtpSample::port = 123

Server port.

Definition at line 29 of file ntp_client_pool.hpp.

◆ stratum

int time_shield::NtpSample::stratum = -1

NTP stratum level reported by server.

Definition at line 32 of file ntp_client_pool.hpp.


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