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
measurements.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_TABLE_MEASUREMENTS_HPP
27
#define NFD_DAEMON_TABLE_MEASUREMENTS_HPP
28
29
#include "
measurements-entry.hpp
"
30
#include "
name-tree.hpp
"
31
32
namespace
nfd {
33
34
namespace
fib {
35
class
Entry;
36
}
37
38
namespace
pit {
39
class
Entry;
40
}
41
42
46
class
Measurements
: noncopyable
47
{
48
public
:
49
explicit
50
Measurements
(
NameTree
& nametree);
51
54
shared_ptr<measurements::Entry>
55
get
(
const
Name
& name);
56
59
shared_ptr<measurements::Entry>
60
get
(
const
fib::Entry
& fibEntry);
61
64
shared_ptr<measurements::Entry>
65
get
(
const
pit::Entry
& pitEntry);
66
70
shared_ptr<measurements::Entry>
71
getParent
(
const
measurements::Entry
& child);
72
75
shared_ptr<measurements::Entry>
76
findLongestPrefixMatch
(
const
Name
& name)
const
;
77
80
shared_ptr<measurements::Entry>
81
findExactMatch
(
const
Name
& name)
const
;
82
83
static
time::nanoseconds
84
getInitialLifetime
();
85
90
void
91
extendLifetime
(
measurements::Entry
& entry,
const
time::nanoseconds& lifetime);
92
93
size_t
94
size
()
const
;
95
96
private
:
97
void
98
cleanup(
measurements::Entry
& entry);
99
100
shared_ptr<measurements::Entry>
101
get
(
name_tree::Entry
& nte);
102
103
private
:
104
NameTree
& m_nameTree;
105
size_t
m_nItems;
106
static
const
time::nanoseconds s_defaultLifetime;
107
};
108
109
inline
time::nanoseconds
110
Measurements::getInitialLifetime
()
111
{
112
return
time::seconds(4);
113
}
114
115
inline
size_t
116
Measurements::size
()
const
117
{
118
return
m_nItems;
119
}
120
121
}
// namespace nfd
122
123
#endif // NFD_DAEMON_TABLE_MEASUREMENTS_HPP
nfd::Measurements::getParent
shared_ptr< measurements::Entry > getParent(const measurements::Entry &child)
find or insert a Measurements entry for child's parent
Definition:
measurements.cpp:79
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:53
nfd::Measurements
Definition:
measurements.hpp:46
nfd::measurements::Entry
represents a Measurements entry
Definition:
measurements-entry.hpp:47
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
nfd::pit::Entry
represents a PIT entry
Definition:
pit-entry.hpp:67
nfd::NameTree
Class Name Tree.
Definition:
name-tree.hpp:79
nfd::Measurements::findExactMatch
shared_ptr< measurements::Entry > findExactMatch(const Name &name) const
perform an exact match
Definition:
measurements.cpp:103
measurements-entry.hpp
nfd::Measurements::getInitialLifetime
static time::nanoseconds getInitialLifetime()
Definition:
measurements.hpp:110
nfd::Measurements::findLongestPrefixMatch
shared_ptr< measurements::Entry > findLongestPrefixMatch(const Name &name) const
perform a longest prefix match
Definition:
measurements.cpp:92
nfd::Measurements::Measurements
Measurements(NameTree &nametree)
Definition:
measurements.cpp:33
name-tree.hpp
nfd::Measurements::extendLifetime
void extendLifetime(measurements::Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
Definition:
measurements.cpp:112
nfd::Measurements::size
size_t size() const
Definition:
measurements.hpp:116
nfd::name_tree::Entry
Name Tree Entry Class.
Definition:
name-tree-entry.hpp:65
ndnSIM
NFD
daemon
table
measurements.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7