Station API

Dependents:   GMCStation

Embed: (wiki syntax)

« Back to documentation index

NTPClient Class Reference

NTP Client interface to adjust RTC. More...

#include <NTPClient.h>

Public Member Functions

 NTPClient (char *server="pool.ntp.org", float timeout=3.0)
 creates an NTPClient object
bool setTime ()
 adjusts RTC

Static Public Member Functions

static NTPClient create (char *filename, bool verbose=false)
 creates an NTPClient object from a config file

Detailed Description

NTP Client interface to adjust RTC.

Definition at line 29 of file NTPClient.h.


Constructor & Destructor Documentation

NTPClient ( char *  server = "pool.ntp.org",
float  timeout = 3.0 
)

creates an NTPClient object

Parameters:
serverNTP server host name
timeoutmax wait time for connection

Definition at line 37 of file NTPClient.h.


Member Function Documentation

static NTPClient create ( char *  filename,
bool  verbose = false 
) [static]

creates an NTPClient object from a config file

Parameters:
filenamename for the configuration file containing server host name and timeout
verboseif true display debug info

Definition at line 47 of file NTPClient.h.

bool setTime (  )

adjusts RTC

Returns:
true if succeeded

Definition at line 74 of file NTPClient.h.