NTP Client for the "old" NetServices libraries
Dependents: NTPClientExample server1 server2 RFID2Twitter ... more
NTPClient Class Reference
A NTP Client. More...
#include <NTPClient.h>
Public Member Functions | |
NTPClient () | |
Instantiates the NTP client. | |
NTPResult | setTime (const Host &host) |
Gets current time (blocking) | |
NTPResult | setTime (const Host &host, void(*pMethod)(NTPResult)) |
Gets current time (non-blocking) | |
template<class T > | |
NTPResult | setTime (const Host &host, T *pItem, void(T::*pMethod)(NTPResult)) |
Gets current time (non-blocking) | |
void | doSetTime (const Host &host) |
Gets current time (non-blocking) | |
void | setOnResult (void(*pMethod)(NTPResult)) |
Setups the result callback. | |
NTPClient () | |
Instantiates the NTP client. | |
NTPResult | setTime (const Host &host) |
Gets current time (blocking) | |
NTPResult | setTime (const Host &host, void(*pMethod)(NTPResult)) |
Gets current time (non-blocking) | |
template<class T > | |
NTPResult | setTime (const Host &host, T *pItem, void(T::*pMethod)(NTPResult)) |
Gets current time (non-blocking) | |
void | doSetTime (const Host &host) |
Gets current time (non-blocking) | |
void | setOnResult (void(*pMethod)(NTPResult)) |
Setups the result callback. |
Detailed Description
A NTP Client.
The NTP client is a simple UDP client that will update the mbed's RTC
Definition at line 51 of file LPC1768/services/ntp/NTPClient.h.
Constructor & Destructor Documentation
NTPClient | ( | ) |
Instantiates the NTP client.
NTPClient | ( | ) |
Instantiates the NTP client.
Member Function Documentation
void doSetTime | ( | const Host & | host ) |
Gets current time (non-blocking)
Updates the time using the server host The function returns immediately and calls the previously set callback on completion or error
- Parameters:
-
host : NTP server
void doSetTime | ( | const Host & | host ) |
Gets current time (non-blocking)
Updates the time using the server host The function returns immediately and calls the previously set callback on completion or error
- Parameters:
-
host : NTP server
void setOnResult | ( | void(*)(NTPResult) | pMethod ) |
Setups the result callback.
- Parameters:
-
pMethod : callback function
void setOnResult | ( | void(*)(NTPResult) | pMethod ) |
Setups the result callback.
- Parameters:
-
pMethod : callback function
NTPResult setTime | ( | const Host & | host ) |
Gets current time (blocking)
Updates the time using the server host Blocks until completion
- Parameters:
-
host : NTP server
Gets current time (non-blocking)
Updates the time using the server host The function returns immediately and calls the callback on completion or error
- Parameters:
-
host : NTP server pMethod : callback function
NTPResult setTime | ( | const Host & | host ) |
Gets current time (blocking)
Updates the time using the server host Blocks until completion
- Parameters:
-
host : NTP server
Gets current time (non-blocking)
Updates the time
- Parameters:
-
host : NTP server pItem : instance of class on which to execute the callback method pMethod : callback method The function returns immediately and calls the callback on completion or error
Definition at line 88 of file LPC1768/services/ntp/NTPClient.h.
Gets current time (non-blocking)
Updates the time using the server host The function returns immediately and calls the callback on completion or error
- Parameters:
-
host : NTP server pMethod : callback function
Gets current time (non-blocking)
Updates the time
- Parameters:
-
host : NTP server pItem : instance of class on which to execute the callback method pMethod : callback method The function returns immediately and calls the callback on completion or error
Definition at line 88 of file LPC2368/services/ntp/NTPClient.h.
Generated on Tue Jul 12 2022 20:39:54 by 1.7.2