esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
unix-time.hpp
Go to the documentation of this file.
1#ifndef ESP8266NDN_UNIX_TIME_HPP
2#define ESP8266NDN_UNIX_TIME_HPP
3
4#include "../port/port.hpp"
5
6namespace esp8266ndn {
7
23public:
24 explicit UnixTime(ndnph::Face& face);
25
30 void begin(int interval = 60000);
31
32private:
33 void loop() final;
34
35 bool processData(ndnph::Data data) final;
36
37private:
39 int m_interval = 0;
40 ndnph::port::Clock::Time m_lastRequest;
41 ndnph::port::Clock::Time m_nextRequest;
42};
43
44} // namespace esp8266ndn
45
46#endif // ESP8266NDN_UNIX_TIME_HPP
Retrieve and maintain UnixTime clock.
Definition unix-time.hpp:22
void loop() final
Override to be invoked periodically.
bool processData(ndnph::Data data) final
Override to receive Data packets.
UnixTime(ndnph::Face &face)
void begin(int interval=60000)
Enable UnixTime requests.
Network layer face.
Definition face.hpp:12
Helper to keep track an outgoing pending Interest.
Definition packet-handler.hpp:125
Base class to receive packets from Face.
Definition packet-handler.hpp:10
Definition autoconfig.hpp:24
Definition fs.hpp:33