NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
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
31
#include "ns3/simulator.h"
32
33
namespace
nfd {
34
namespace
scheduler {
35
39
typedef
std::shared_ptr<ns3::EventId>
EventId
;
40
43
EventId
44
schedule
(
const
time::nanoseconds& after,
const
std::function<
void
()>& event);
45
48
void
49
cancel
(
const
EventId
& eventId);
50
53
class
ScopedEventId
: noncopyable
54
{
55
public
:
56
ScopedEventId
();
57
61
ScopedEventId
(
const
EventId
& event);
62
65
ScopedEventId
(
ScopedEventId
&& other);
66
72
ScopedEventId
&
73
operator=
(
const
EventId
& event);
74
77
~ScopedEventId
();
78
81
void
82
cancel
();
83
87
void
88
release
();
89
90
private
:
91
EventId
m_event;
92
};
93
94
}
// namespace scheduler
95
96
using
scheduler::EventId
;
97
98
}
// namespace nfd
99
100
#endif // NFD_CORE_SCHEDULER_HPP
nfd::scheduler::ScopedEventId::cancel
void cancel()
cancels the event manually
Definition:
scheduler.cpp:97
nfd::scheduler::ScopedEventId::operator=
ScopedEventId & operator=(const EventId &event)
assigns an event
Definition:
scheduler.cpp:82
nfd::scheduler::cancel
void cancel(const EventId &eventId)
cancel a scheduled event
Definition:
scheduler.cpp:58
nfd::scheduler::ScopedEventId::~ScopedEventId
~ScopedEventId()
cancels the event
Definition:
scheduler.cpp:91
nfd::scheduler::EventId
std::shared_ptr< ns3::EventId > EventId
Definition:
scheduler.hpp:39
common.hpp
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:103
nfd::scheduler::ScopedEventId
cancels an event automatically upon destruction
Definition:
scheduler.hpp:53
nfd::scheduler::ScopedEventId::ScopedEventId
ScopedEventId()
Definition:
scheduler.cpp:66
nfd::scheduler::schedule
EventId schedule(const time::nanoseconds &after, const std::function< void()> &event)
schedule an event
Definition:
scheduler.cpp:50
ndnSIM
NFD
core
scheduler.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7