26 #ifndef NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP 27 #define NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP 40 typedef time::duration<double, boost::micro>
Rtt;
73 computeSrtt(Rtt previousSrtt, Rtt currentRtt);
84 static const double ALPHA;
95 class Error :
public std::runtime_error
100 :
std::runtime_error(what)
115 m_measurementExpirationId = id;
121 return m_measurementExpirationId;
125 cancelTimeoutEvent(
const Name& prefix);
130 return m_isTimeoutScheduled;
134 recordRtt(
const shared_ptr<pit::Entry>& pitEntry,
const Face& inFace);
148 return m_rttStats.computeRto();
154 return m_rttStats.getRtt();
160 return m_rttStats.getSrtt();
171 cancelTimeoutEvent();
174 doesNameMatchLastInterest(
const Name&
name);
178 Name m_lastInterestName;
185 bool m_isTimeoutScheduled;
216 extendFaceInfoLifetime(
FaceInfo& info,
const Face& face);
221 return m_fit.at(faceId);
227 return m_fit.find(faceId);
239 const auto& pair = m_fit.insert(std::make_pair(faceId,
FaceInfo()));
246 return m_isProbingDue;
252 m_isProbingDue = isProbingDue;
258 return m_hasFirstProbeBeenScheduled;
264 m_hasFirstProbeBeenScheduled = hasBeenScheduled;
271 bool m_hasFirstProbeBeenScheduled;
292 getNamespaceInfo(
const Name& prefix);
302 static constexpr time::microseconds MEASUREMENTS_LIFETIME = time::seconds(300);
312 #endif // NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP Duration computeRto() const
bool isProbingDue() const
time::microseconds Duration
Helper class to retrieve and create strategy measurements.
void setMeasurementExpirationEventId(const scheduler::EventId &id)
generalization of a network interface
bool hasSrttMeasurement() const
void addRttMeasurement(RttEstimator::Duration &durationRtt)
RttEstimator::Duration computeRto() const
Error(const std::string &what)
RttEstimator::Duration computeRto() const
const scheduler::EventId & getMeasurementExpirationEventId()
represents an Interest packet
stores stategy information about each face in this namespace
static const Rtt RTT_TIMEOUT
FaceInfoTable::iterator end()
represents a Measurements entry
Table::const_iterator iterator
std::shared_ptr< ns3::EventId > EventId
Copyright (c) 2011-2015 Regents of the University of California.
static constexpr int getTypeId()
void setHasFirstProbeBeenScheduled(bool hasBeenScheduled)
FaceInfoTable::iterator find(nfd::face::FaceId faceId)
void setIsProbingDue(bool isProbingDue)
static const Rtt RTT_NO_MEASUREMENT
RttStats::Rtt getRtt() const
Name abstraction to represent an absolute name.
bool isFirstProbeScheduled() const
Strategy information for each face in a namespace.
const FaceInfoTable::iterator insert(nfd::face::FaceId faceId)
allows Strategy to access portion of Measurements table under its namespace
RttStats::Rtt getSrtt() const
implements the Mean-Deviation RTT estimator
uint64_t FaceId
identifies a face
bool isTimeoutScheduled() const
contains arbitrary information forwarding strategy places on table entries
time::duration< double, boost::micro > Rtt
std::unordered_map< face::FaceId, FaceInfo > FaceInfoTable