NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
measurements-accessor.cpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#include "
measurements-accessor.hpp
"
27
28
namespace
nfd
{
29
30
using
fw::Strategy
;
31
32
MeasurementsAccessor::MeasurementsAccessor
(
Measurements
& measurements,
33
const
StrategyChoice
& strategyChoice,
34
const
Strategy
& strategy)
35
: m_measurements(measurements)
36
, m_strategyChoice(strategyChoice)
37
, m_strategy(&strategy)
38
{
39
}
40
41
MeasurementsAccessor::~MeasurementsAccessor
()
42
{
43
}
44
45
shared_ptr<measurements::Entry>
46
MeasurementsAccessor::filter(
const
shared_ptr<measurements::Entry>& entry)
const
47
{
48
if
(entry ==
nullptr
) {
49
return
entry;
50
}
51
52
Strategy
& effectiveStrategy = m_strategyChoice.
findEffectiveStrategy
(*entry);
53
if
(&effectiveStrategy == m_strategy) {
54
return
entry;
55
}
56
return
shared_ptr<measurements::Entry>();
57
}
58
59
}
// namespace nfd
nfd::StrategyChoice::findEffectiveStrategy
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
Definition:
strategy-choice.cpp:166
nfd::StrategyChoice
represents the Strategy Choice table
Definition:
strategy-choice.hpp:45
nfd::Measurements
represents the Measurements table
Definition:
measurements.hpp:75
nfd::MeasurementsAccessor::MeasurementsAccessor
MeasurementsAccessor(Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)
Definition:
measurements-accessor.cpp:32
nfd::fw::Strategy
Strategy
Definition:
strategy.cpp:33
measurements-accessor.hpp
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::Strategy
represents a forwarding strategy
Definition:
strategy.hpp:38
nfd::MeasurementsAccessor::~MeasurementsAccessor
~MeasurementsAccessor()
Definition:
measurements-accessor.cpp:41
ndnSIM
NFD
daemon
table
measurements-accessor.cpp
Generated on Sat Nov 12 2016 16:02:54 for ndnSIM by
1.8.12