Description: Trial code integration web page update with analogue data and ntp support
NTPClient Class Reference
A NTP Client. More...
#include <NTPClient.h>
Inherits NetService.
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. | |
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 NTPClient.h.
Constructor & Destructor Documentation
| 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 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
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 NTPClient.h.
