NTP Client

Library

Import libraryNTPClient

NTP Client for the mbed networking libraries

Architecture

The NTP client is a simple UDP client that will update the mbed's RTC.

Includes

#include "NTPClient.h"

Reference

Import library

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.

Examples

This example updates the RTC over a 3G connection.

Import programVodafoneUSBModemNTPClientTest

NTP Client Test with the Vodafone USB Modem library

This is the same example using Ethernet.

Import programNTPClient_HelloWorld

Simple example demonstrating how to use the NTP Client to set the time


Please log in to post comments.