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
cs-entry.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
30
#ifndef NFD_DAEMON_TABLE_CS_ENTRY_HPP
31
#define NFD_DAEMON_TABLE_CS_ENTRY_HPP
32
33
#include "
common.hpp
"
34
35
namespace
nfd {
36
namespace
cs {
37
38
class
Entry;
39
42
class
Entry
: noncopyable
43
{
44
public
:
45
Entry
();
46
50
const
Name
&
51
getName
()
const
;
52
57
const
Name
&
58
getFullName
()
const
;
59
64
bool
65
isUnsolicited
()
const
;
66
69
const
Data&
70
getData
()
const
;
71
74
void
75
setData
(
const
Data& data,
bool
isUnsolicited);
76
80
const
time::steady_clock::TimePoint&
81
getStaleTime
()
const
;
82
86
void
87
updateStaleTime
();
88
91
bool
92
isStale
()
const
;
93
97
void
98
reset
();
99
100
private
:
101
time::steady_clock::TimePoint m_staleAt;
102
shared_ptr<const Data> m_dataPacket;
103
104
bool
m_isUnsolicited;
105
};
106
107
inline
const
Name
&
108
Entry::getName
()
const
109
{
110
BOOST_ASSERT(m_dataPacket !=
nullptr
);
111
return
m_dataPacket->getName();
112
}
113
114
inline
const
Name
&
115
Entry::getFullName
()
const
116
{
117
BOOST_ASSERT(m_dataPacket !=
nullptr
);
118
return
m_dataPacket->getFullName();
119
}
120
121
inline
const
Data&
122
Entry::getData
()
const
123
{
124
BOOST_ASSERT(m_dataPacket !=
nullptr
);
125
return
*m_dataPacket;
126
}
127
128
inline
bool
129
Entry::isUnsolicited
()
const
130
{
131
return
m_isUnsolicited;
132
}
133
134
inline
const
time::steady_clock::TimePoint&
135
Entry::getStaleTime
()
const
136
{
137
return
m_staleAt;
138
}
139
140
}
// namespace cs
141
}
// namespace nfd
142
143
#endif // NFD_DAEMON_TABLE_CS_ENTRY_HPP
nfd::cs::Entry::reset
void reset()
clears CS entry After reset, *this == Entry()
Definition:
cs-entry.cpp:65
nfd::cs::Entry::isStale
bool isStale() const
checks if the stored Data is stale
Definition:
cs-entry.cpp:59
nfd::cs::Entry::getName
const Name & getName() const
returns the name of the Data packet stored in the CS entry
Definition:
cs-entry.hpp:108
common.hpp
nfd::cs::Entry::getData
const Data & getData() const
returns the Data packet stored in the CS entry
Definition:
cs-entry.hpp:122
nfd::cs::Entry::getFullName
const Name & getFullName() const
returns the full name (including implicit digest) of the Data packet stored in the CS entry ...
Definition:
cs-entry.hpp:115
ns3::ndn::Name
Name
Definition:
ndn-common.cpp:25
nfd::cs::Entry::setData
void setData(const Data &data, bool isUnsolicited)
changes the content of CS entry and recomputes digest
Definition:
cs-entry.cpp:44
nfd::cs::Entry
represents a base class for CS entry
Definition:
cs-entry.hpp:42
nfd::cs::Entry::isUnsolicited
bool isUnsolicited() const
Data packet is unsolicited if this particular NDN node did not receive an Interest packet for it...
Definition:
cs-entry.hpp:129
nfd::cs::Entry::getStaleTime
const time::steady_clock::TimePoint & getStaleTime() const
returns the absolute time when Data becomes expired
Definition:
cs-entry.hpp:135
nfd::cs::Entry::updateStaleTime
void updateStaleTime()
refreshes the time when Data becomes expired according to the current absolute time.
Definition:
cs-entry.cpp:53
nfd::cs::Entry::Entry
Entry()
Definition:
cs-entry.cpp:38
ndnSIM
NFD
daemon
table
cs-entry.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7