esp8266ndn
NDN Arduino library for ESP8266 and more
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
6 namespace esp8266ndn {
7 
23 public:
24  explicit UnixTime(ndnph::Face& face);
25 
30  void begin(int interval = 60000);
31 
32 private:
33  void loop() final;
34 
35  bool processData(ndnph::Data data) final;
36 
37 private:
38  OutgoingPendingInterest m_pending;
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
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
@ Data
Definition: an.hpp:41
port_clock_ino::Clock Clock
Definition: ino.hpp:59
Definition: fs.hpp:33