EthernetNetIf Compatibility.
Dependents: XBeeWiFi_SPI_example
Fork of NetServicesSource by
Diff: services/ntp/NTPClient.h
- Revision:
- 2:a4f97773c90f
- Parent:
- 0:632c9925f013
- Child:
- 5:dd63a1e02b1b
--- a/services/ntp/NTPClient.h Mon Jun 14 10:33:54 2010 +0000 +++ b/services/ntp/NTPClient.h Fri Jun 18 09:22:54 2010 +0000 @@ -38,7 +38,7 @@ NTP_DNS //Could not resolve DNS Addr }; -class NTPClient +class NTPClient : protected NetService { public: NTPClient(); @@ -66,10 +66,15 @@ m_pCbMeth = (void (CDummy::*)(NTPResult)) pMethod; } - void init(); void close(); +protected: + virtual void poll(); //Called by NetServices + private: + void init(); + void open(); + __packed struct NTPPacket //See RFC 4330 for Simple NTP { //WARN: We are in LE! Network is BE! @@ -119,12 +124,14 @@ NTPStep m_state; + NTPPacket m_pkt; + CDummy* m_pCbItem; void (CDummy::*m_pCbMeth)(NTPResult); void (*m_pCb)(NTPResult); - Timeout m_watchdog; + Timer m_watchdog; int m_timeout; bool m_closed;