|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
33 namespace measurements {
36 : m_nameTree(nameTree)
44 if (entry !=
nullptr) {
62 return this->
get(nte);
69 return this->
get(nte);
76 return this->
get(nte);
88 BOOST_ASSERT(nte !=
nullptr);
89 return &this->
get(*nte);
94 Measurements::findLongestPrefixMatchImpl(
const K& key,
const EntryPredicate& pred)
const
99 return entry !=
nullptr && pred(*entry);
101 if (match !=
nullptr) {
129 BOOST_ASSERT(m_nameTree.
getEntry(entry) !=
nullptr);
132 if (entry.m_expiry >= expiry) {
138 entry.m_expiry = expiry;
139 entry.m_cleanup =
getScheduler().schedule(lifetime, [&] { cleanup(entry); });
143 Measurements::cleanup(
Entry& entry)
146 BOOST_ASSERT(nte !=
nullptr);
An entry in the name tree.
Entry * getEntry(const EntryT &tableEntry) const
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
Measurements(NameTree &nameTree)
static time_point now() noexcept
NDN_CXX_NODISCARD bool empty() const
Checks if the name is empty, i.e.
size_t eraseIfEmpty(Entry *entry, bool canEraseAncestors=true)
Delete the entry if it is empty.
void cancel() const
Cancel the operation.
Entry & get(const Name &name)
Find or insert an entry by name.
Entry & lookup(const Name &name, size_t prefixLen)
Find or insert an entry by name.
static constexpr size_t getMaxDepth()
maximum depth of a Measurements entry
std::function< bool(const Entry &)> EntryPredicate
A predicate that accepts or rejects an entry.
Entry * findExactMatch(const Name &name, size_t prefixLen=std::numeric_limits< size_t >::max()) const
Exact match lookup.
Entry * findExactMatch(const Name &name) const
Perform an exact match.
Represents an absolute name.
const Name & getName() const
const Name & getName() const
Copyright (c) 2011-2015 Regents of the University of California.
void setMeasurementsEntry(unique_ptr< measurements::Entry > measurementsEntry)
Scheduler & getScheduler()
Returns the global Scheduler instance for the calling thread.
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
Extend lifetime of an entry.
const Name & getName() const
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
Perform a longest prefix match for name.
measurements::Entry * getMeasurementsEntry() const
Entry * getParent(const Entry &child)
Find or insert a parent entry.
static constexpr size_t getMaxDepth()
Maximum depth of the name tree.
Represents a Measurements entry.
Entry * findLongestPrefixMatch(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
Longest prefix matching.
Entry * getParent() const
static time::nanoseconds getInitialLifetime()