A minor bugfix. It prevents the library from entering an endless loop in case the NTP server droppes the request rather than sending a kiss of death message.
Dependents: STM32F746_iothub_client_sample_mqtt Iot_LCD_EC iothub_client_sample_mqtt simplesample_mqtt ... more
NTPClient Class Reference
NTP Client to update the mbed's RTC using a remote time server. More...
#include <NTPClient.h>
Public Member Functions | |
NTPClient () | |
Instantiate the NTP client. | |
NTPResult | setTime (const char *host, uint16_t port=NTP_DEFAULT_PORT, uint32_t timeout=NTP_DEFAULT_TIMEOUT) |
Get current time (blocking) Update the time using the server host Blocks until completion. |
Detailed Description
NTP Client to update the mbed's RTC using a remote time server.
Definition at line 51 of file NTPClient.h.
Constructor & Destructor Documentation
NTPClient | ( | ) |
Instantiate the NTP client.
Definition at line 47 of file NTPClient.cpp.
Member Function Documentation
NTPResult setTime | ( | const char * | host, |
uint16_t | port = NTP_DEFAULT_PORT , |
||
uint32_t | timeout = NTP_DEFAULT_TIMEOUT |
||
) |
Get current time (blocking) Update the time using the server host Blocks until completion.
- Parameters:
-
host NTP server IPv4 address or hostname (will be resolved via DNS) port port to use; defaults to 123 timeout waiting timeout in ms (osWaitForever for blocking function, not recommended)
- Returns:
- 0 on success, NTP error code (<0) on failure
Definition at line 53 of file NTPClient.cpp.
Generated on Mon Jul 18 2022 19:52:47 by
