|
waterlinkedsonar
C++ client library for the Water Linked Sonar 3D-15
|
Single SNTP query for checking an NTP server. More...
#include <chrono>#include <cstdint>#include <optional>#include <string>Go to the source code of this file.
Functions | |
| std::optional< std::chrono::system_clock::time_point > | waterlinked::sonar::sntp_query (const std::string &server, std::chrono::milliseconds timeout, std::uint16_t port=123) |
| Asks an NTP server for its time with one SNTP (RFC 4330) request, e.g. | |
Single SNTP query for checking an NTP server.
| std::optional< std::chrono::system_clock::time_point > waterlinked::sonar::sntp_query | ( | const std::string & | server, |
| std::chrono::milliseconds | timeout, | ||
| std::uint16_t | port = 123 |
||
| ) |
Asks an NTP server for its time with one SNTP (RFC 4330) request, e.g.
to check a server before configuring it on the sonar.
| server | Hostname or IPv4 address. |
| timeout | Limit for the response. |
| port | UDP port of the server. |
timeout, or the server is not synchronized (leap indicator 3, stratum outside 1-15, or zero transmit time).