NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: 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&
53
getGlobalScheduler
();
54
57
class
ScopedEventId
: noncopyable
58
{
59
public
:
60
ScopedEventId
();
61
65
ScopedEventId
(
const
EventId
& event);
66
69
ScopedEventId
(
ScopedEventId
&& other);
70
76
ScopedEventId
&
77
operator=
(
const
EventId
& event);
78
81
~ScopedEventId
();
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
nfd::scheduler::ScopedEventId::cancel
void cancel()
cancels the event manually
Definition:
scheduler.cpp:95
ndn::util::scheduler::Scheduler
Generic scheduler.
Definition:
scheduler.hpp:44
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
ndn::util::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
EventId
Opaque type (shared_ptr) representing ID of a scheduled event.
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:57
nfd::scheduler::ScopedEventId::ScopedEventId
ScopedEventId()
Definition:
scheduler.cpp:64
nfd::scheduler::schedule
EventId schedule(const time::nanoseconds &after, const Scheduler::Event &event)
schedule an event
Definition:
scheduler.cpp:47
nfd::scheduler::getGlobalScheduler
Scheduler & getGlobalScheduler()
Definition:
scheduler.cpp:37
ndnSIM
NFD
core
scheduler.hpp
Generated on Sat Nov 12 2016 16:02:53 for ndnSIM by
1.8.12