NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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; -*- */
27 
28 namespace nfd {
29 namespace measurements {
30 
31 using fw::Strategy;
32 
34  const StrategyChoice& strategyChoice,
35  const Strategy& strategy)
36  : m_measurements(measurements)
37  , m_strategyChoice(strategyChoice)
38  , m_strategy(&strategy)
39 {
40 }
41 
43 {
44 }
45 
46 Entry*
47 MeasurementsAccessor::filter(Entry* entry) const
48 {
49  if (entry == nullptr) {
50  return entry;
51  }
52 
53  Strategy& effectiveStrategy = m_strategyChoice.findEffectiveStrategy(*entry);
54  if (&effectiveStrategy == m_strategy) {
55  return entry;
56  }
57  return nullptr;
58 }
59 
60 } // namespace measurements
61 } // namespace nfd
represents a Measurements entry
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
the Measurements table
represents a forwarding strategy
Definition: strategy.hpp:37
represents the Strategy Choice table
MeasurementsAccessor(Measurements &measurements, const StrategyChoice &strategyChoice, const fw::Strategy &strategy)