NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ndnSIM
ndnSIM documentation
All Attributes
All GlobalValues
All LogComponents
All TraceSources
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
asf-probing-module.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
27
#define NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
28
29
#include "
asf-measurements.hpp
"
30
31
namespace
nfd
{
32
namespace
fw {
33
namespace
asf {
34
37
class
ProbingModule
38
{
39
public
:
40
explicit
41
ProbingModule
(
AsfMeasurements
& measurements);
42
43
void
44
scheduleProbe
(
const
fib::Entry
& fibEntry,
const
time::milliseconds
& interval);
45
46
Face
*
47
getFaceToProbe
(
const
Face
& inFace,
48
const
Interest
& interest,
49
const
fib::Entry
& fibEntry,
50
const
Face
& faceUsed);
51
52
bool
53
isProbingNeeded
(
const
fib::Entry
& fibEntry,
const
Interest
& interest);
54
55
void
56
afterForwardingProbe
(
const
fib::Entry
& fibEntry,
const
Interest
& interest);
57
58
private
:
59
// Used to associate FaceInfo with the face in a NextHop
60
typedef
std::pair<FaceInfo*, Face*> FaceInfoFacePair;
61
typedef
std::function<bool(FaceInfoFacePair, FaceInfoFacePair)> FaceInfoPredicate;
62
typedef
std::set<FaceInfoFacePair, FaceInfoPredicate> FaceInfoFacePairSet;
63
64
Face
*
65
getFaceBasedOnProbability(
const
FaceInfoFacePairSet& rankedFaces);
66
67
double
68
getProbingProbability(uint64_t rank, uint64_t rankSum, uint64_t nFaces);
69
70
double
71
getRandomNumber(
double
start,
double
end);
72
73
public
:
74
static
constexpr time::seconds
DEFAULT_PROBING_INTERVAL
= time::seconds(60);
75
76
private
:
77
time::seconds m_probingInterval;
78
AsfMeasurements
& m_measurements;
79
};
80
81
}
// namespace asf
82
}
// namespace fw
83
}
// namespace nfd
84
85
#endif // NFD_DAEMON_FW_ASF_PROBING_MODULE_HPP
nfd::fw::asf::AsfMeasurements
Helper class to retrieve and create strategy measurements.
Definition:
asf-measurements.hpp:284
nfd::fib::Entry
represents a FIB entry
Definition:
fib-entry.hpp:51
websocketpp::lib::asio::milliseconds
boost::posix_time::time_duration milliseconds(long duration)
Definition:
asio.hpp:117
nfd::fw::asf::ProbingModule::ProbingModule
ProbingModule(AsfMeasurements &measurements)
Definition:
asf-probing-module.cpp:39
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd::fw::asf::ProbingModule
ASF Probing Module.
Definition:
asf-probing-module.hpp:37
nfd::fw::asf::ProbingModule::isProbingNeeded
bool isProbingNeeded(const fib::Entry &fibEntry, const Interest &interest)
Definition:
asf-probing-module.cpp:114
Face
ndn Face
Definition:
face-impl.hpp:41
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::asf::ProbingModule::scheduleProbe
void scheduleProbe(const fib::Entry &fibEntry, const time::milliseconds &interval)
Definition:
asf-probing-module.cpp:46
nfd::fw::asf::ProbingModule::getFaceToProbe
Face * getFaceToProbe(const Face &inFace, const Interest &interest, const fib::Entry &fibEntry, const Face &faceUsed)
Definition:
asf-probing-module.cpp:66
nfd::fw::asf::ProbingModule::afterForwardingProbe
void afterForwardingProbe(const fib::Entry &fibEntry, const Interest &interest)
Definition:
asf-probing-module.cpp:132
nfd::fw::asf::ProbingModule::DEFAULT_PROBING_INTERVAL
static constexpr time::seconds DEFAULT_PROBING_INTERVAL
Definition:
asf-probing-module.hpp:74
asf-measurements.hpp
ndnSIM
NFD
daemon
fw
asf-probing-module.hpp
Generated on Thu Nov 2 2017 03:30:29 for ndnSIM by
1.8.11