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

allows Strategy to access portion of Measurements table under its namespace More...

#include <measurements-accessor.hpp>

Inheritance diagram for nfd::MeasurementsAccessor:
Collaboration diagram for nfd::MeasurementsAccessor:

Public Member Functions

 MeasurementsAccessor (Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)
 
 ~MeasurementsAccessor ()
 
shared_ptr< measurements::Entryget (const Name &name)
 find or insert a Measurements entry for name More...
 
shared_ptr< measurements::Entryget (const fib::Entry &fibEntry)
 find or insert a Measurements entry for fibEntry->getPrefix() More...
 
shared_ptr< measurements::Entryget (const pit::Entry &pitEntry)
 find or insert a Measurements entry for pitEntry->getName() More...
 
shared_ptr< measurements::EntrygetParent (const measurements::Entry &child)
 find or insert a Measurements entry for child's parent More...
 
shared_ptr< measurements::EntryfindLongestPrefixMatch (const Name &name, const measurements::EntryPredicate &pred=measurements::AnyEntry()) const
 perform a longest prefix match for name More...
 
shared_ptr< measurements::EntryfindLongestPrefixMatch (const pit::Entry &pitEntry, const measurements::EntryPredicate &pred=measurements::AnyEntry()) const
 perform a longest prefix match for pitEntry.getName() More...
 
shared_ptr< measurements::EntryfindExactMatch (const Name &name) const
 perform an exact match More...
 
void extendLifetime (measurements::Entry &entry, const time::nanoseconds &lifetime)
 extend lifetime of an entry More...
 

Detailed Description

allows Strategy to access portion of Measurements table under its namespace

Definition at line 40 of file measurements-accessor.hpp.

Constructor & Destructor Documentation

§ MeasurementsAccessor()

nfd::MeasurementsAccessor::MeasurementsAccessor ( Measurements measurements,
const StrategyChoice strategyChoice,
const fw::Strategy strategy 
)

Definition at line 32 of file measurements-accessor.cpp.

§ ~MeasurementsAccessor()

nfd::MeasurementsAccessor::~MeasurementsAccessor ( )

Member Function Documentation

§ get() [1/3]

§ get() [2/3]

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::get ( const fib::Entry fibEntry)
inline

find or insert a Measurements entry for fibEntry->getPrefix()

Definition at line 115 of file measurements-accessor.hpp.

§ get() [3/3]

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::get ( const pit::Entry pitEntry)
inline

find or insert a Measurements entry for pitEntry->getName()

Definition at line 121 of file measurements-accessor.hpp.

§ getParent()

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::getParent ( const measurements::Entry child)
inline

find or insert a Measurements entry for child's parent

Return values
nullptrif child is the root entry

Definition at line 127 of file measurements-accessor.hpp.

Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), nfd::fw::NccStrategy::getMeasurementsEntryInfo(), and nfd::fw::NccStrategy::timeoutOnBestFace().

§ findLongestPrefixMatch() [1/2]

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::findLongestPrefixMatch ( const Name name,
const measurements::EntryPredicate pred = measurements::AnyEntry() 
) const
inline

perform a longest prefix match for name

Definition at line 133 of file measurements-accessor.hpp.

Referenced by nfd::fw::AccessStrategy::beforeSatisfyInterest().

§ findLongestPrefixMatch() [2/2]

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::findLongestPrefixMatch ( const pit::Entry pitEntry,
const measurements::EntryPredicate pred = measurements::AnyEntry() 
) const
inline

perform a longest prefix match for pitEntry.getName()

Definition at line 140 of file measurements-accessor.hpp.

§ findExactMatch()

shared_ptr< measurements::Entry > nfd::MeasurementsAccessor::findExactMatch ( const Name name) const
inline

perform an exact match

Definition at line 147 of file measurements-accessor.hpp.

§ extendLifetime()

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

extend lifetime of an entry

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

Definition at line 153 of file measurements-accessor.hpp.

Referenced by nfd::fw::NccStrategy::beforeSatisfyInterest(), nfd::fw::AccessStrategy::beforeSatisfyInterest(), and nfd::fw::NccStrategy::timeoutOnBestFace().


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