NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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, StrategyChoice &strategyChoice, 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...
 
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

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

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

nfd::MeasurementsAccessor::~MeasurementsAccessor ( )

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

Member Function Documentation

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 114 of file measurements-accessor.hpp.

References nfd::Measurements::extendLifetime().

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

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

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

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

References nfd::Measurements::get().

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

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

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

References nfd::Measurements::get().

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 108 of file measurements-accessor.hpp.

References nfd::Measurements::getParent().

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


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