NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
scheduler.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_CORE_SCHEDULER_HPP
27 #define NFD_CORE_SCHEDULER_HPP
28 
29 #include "common.hpp"
30 #include <ndn-cxx/util/scheduler.hpp>
31 
32 namespace nfd {
33 namespace scheduler {
34 
35 using ndn::Scheduler;
36 
40 using ndn::EventId;
41 
44 EventId
45 schedule(const time::nanoseconds& after, const Scheduler::Event& event);
46 
49 void
50 cancel(const EventId& eventId);
51 
52 Scheduler&
54 
57 class ScopedEventId : noncopyable
58 {
59 public:
60  ScopedEventId();
61 
65  ScopedEventId(const EventId& event);
66 
70 
77  operator=(const EventId& event);
78 
82 
85  void
86  cancel();
87 
91  void
92  release();
93 
94 private:
95  EventId m_event;
96 };
97 
98 } // namespace scheduler
99 
100 } // namespace nfd
101 
102 #endif // NFD_CORE_SCHEDULER_HPP
void cancel()
cancels the event manually
Definition: scheduler.cpp:95
ScopedEventId & operator=(const EventId &event)
assigns an event
Definition: scheduler.cpp:80
void cancel(const EventId &eventId)
cancel a scheduled event
Definition: scheduler.cpp:53
~ScopedEventId()
cancels the event
Definition: scheduler.cpp:89
std::shared_ptr< ns3::EventId > EventId
Definition: scheduler.hpp:39
Opaque type (shared_ptr) representing ID of a scheduled event.
void release()
releases the event so that it won&#39;t be disconnected when this ScopedEventId is destructed ...
Definition: scheduler.cpp:101
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
cancels an event automatically upon destruction
Definition: scheduler.hpp:57
EventId schedule(const time::nanoseconds &after, const Scheduler::Event &event)
schedule an event
Definition: scheduler.cpp:47
Scheduler & getGlobalScheduler()
Definition: scheduler.cpp:37