NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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
42
using
ndn::util::scheduler::EventCallback
;
43
46
EventId
47
schedule
(time::nanoseconds after,
const
EventCallback
& event);
48
51
void
52
cancel
(
const
EventId
& eventId);
53
54
Scheduler&
55
getGlobalScheduler
();
56
59
class
ScopedEventId
: noncopyable
60
{
61
public
:
62
ScopedEventId
();
63
67
ScopedEventId
(
const
EventId
& event);
68
71
ScopedEventId
(
ScopedEventId
&& other);
72
78
ScopedEventId
&
79
operator=
(
const
EventId
& event);
80
83
~ScopedEventId
();
84
87
void
88
cancel
();
89
93
void
94
release
();
95
96
private
:
97
EventId
m_event;
98
};
99
100
}
// namespace scheduler
101
102
}
// namespace nfd
103
104
#endif // NFD_CORE_SCHEDULER_HPP
ndn::util::scheduler::EventCallback
function< void()> EventCallback
Definition:
scheduler.hpp:46
nfd::scheduler::ScopedEventId::cancel
void cancel()
cancels the event manually
Definition:
scheduler.cpp:95
ndn::util::scheduler::Scheduler
Generic scheduler.
Definition:
scheduler.hpp:56
nfd::scheduler::ScopedEventId::operator=
ScopedEventId & operator=(const EventId &event)
assigns an event
Definition:
scheduler.cpp:80
nfd::scheduler::cancel
void cancel(const EventId &eventId)
cancel a scheduled event
Definition:
scheduler.cpp:53
nfd::scheduler::ScopedEventId::~ScopedEventId
~ScopedEventId()
cancels the event
Definition:
scheduler.cpp:89
common.hpp
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:51
nfd::scheduler::ScopedEventId::release
void release()
releases the event so that it won't be disconnected when this ScopedEventId is destructed ...
Definition:
scheduler.cpp:101
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::scheduler::ScopedEventId
cancels an event automatically upon destruction
Definition:
scheduler.hpp:59
nfd::scheduler::ScopedEventId::ScopedEventId
ScopedEventId()
Definition:
scheduler.cpp:64
nfd::scheduler::schedule
EventId schedule(time::nanoseconds after, const EventCallback &event)
schedule an event
Definition:
scheduler.cpp:47
nfd::scheduler::getGlobalScheduler
Scheduler & getGlobalScheduler()
Definition:
scheduler.cpp:37
ndnSIM
NFD
core
scheduler.hpp
Generated on Sun Feb 25 2018 13:27:05 for ndnSIM by
1.8.14