NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::measurements::Measurements Class Reference

represents the Measurements table More...

#include <measurements.hpp>

Inheritance diagram for nfd::measurements::Measurements:
Collaboration diagram for nfd::measurements::Measurements:

Public Member Functions

 Measurements (NameTree &nametree)
 
Entryget (const Name &name)
 find or insert a Measurements entry for name More...
 
Entryget (const fib::Entry &fibEntry)
 find or insert a Measurements entry for fibEntry.getPrefix() More...
 
Entryget (const pit::Entry &pitEntry)
 find or insert a Measurements entry for pitEntry.getName() More...
 
EntrygetParent (const Entry &child)
 find or insert a Measurements entry for child's parent More...
 
EntryfindLongestPrefixMatch (const Name &name, const EntryPredicate &pred=AnyEntry()) const
 perform a longest prefix match for name More...
 
EntryfindLongestPrefixMatch (const pit::Entry &pitEntry, const EntryPredicate &pred=AnyEntry()) const
 perform a longest prefix match for pitEntry.getName() More...
 
EntryfindExactMatch (const Name &name) const
 perform an exact match More...
 
void extendLifetime (Entry &entry, const time::nanoseconds &lifetime)
 extend lifetime of an entry More...
 
size_t size () const
 

Static Public Member Functions

static time::nanoseconds getInitialLifetime ()
 

Detailed Description

represents the Measurements table

Definition at line 75 of file measurements.hpp.

Constructor & Destructor Documentation

Member Function Documentation

Entry & nfd::measurements::Measurements::get ( const Name name)

find or insert a Measurements entry for name

Definition at line 60 of file measurements.cpp.

Referenced by Measurements().

Entry & nfd::measurements::Measurements::get ( const fib::Entry fibEntry)

find or insert a Measurements entry for fibEntry.getPrefix()

Definition at line 67 of file measurements.cpp.

Entry & nfd::measurements::Measurements::get ( const pit::Entry pitEntry)

find or insert a Measurements entry for pitEntry.getName()

Definition at line 74 of file measurements.cpp.

Entry * nfd::measurements::Measurements::getParent ( const Entry child)

find or insert a Measurements entry for child's parent

Return values
nullptrif child is the root entry

Definition at line 81 of file measurements.cpp.

References ndn::Name::empty(), nfd::name_tree::Entry::getMeasurementsEntry(), nfd::measurements::Entry::getName(), and nfd::name_tree::Entry::getParent().

Entry * nfd::measurements::Measurements::findLongestPrefixMatch ( const Name name,
const EntryPredicate pred = AnyEntry() 
) const

perform a longest prefix match for name

Definition at line 109 of file measurements.cpp.

Entry * nfd::measurements::Measurements::findLongestPrefixMatch ( const pit::Entry pitEntry,
const EntryPredicate pred = AnyEntry() 
) const

perform a longest prefix match for pitEntry.getName()

Definition at line 115 of file measurements.cpp.

Entry * nfd::measurements::Measurements::findExactMatch ( const Name name) const

perform an exact match

Definition at line 121 of file measurements.cpp.

References nfd::name_tree::Entry::getMeasurementsEntry().

time::nanoseconds nfd::measurements::Measurements::getInitialLifetime ( )
inlinestatic

Definition at line 151 of file measurements.hpp.

Referenced by Measurements().

void nfd::measurements::Measurements::extendLifetime ( Entry entry,
const time::nanoseconds &  lifetime 
)

extend lifetime of an entry

The entry will be kept until at least now()+lifetime.

Definition at line 128 of file measurements.cpp.

References nfd::scheduler::cancel(), ndn::time::steady_clock::now(), nfd::scheduler::schedule(), and nfd::name_tree::Entry::setMeasurementsEntry().

size_t nfd::measurements::Measurements::size ( ) const
inline

Definition at line 157 of file measurements.hpp.


The documentation for this class was generated from the following files: