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);
154 return m_rttStats.
getRtt();
172 return m_nSilentTimeouts;
178 m_nSilentTimeouts = nSilentTimeouts;
183 cancelTimeoutEvent();
186 doesNameMatchLastInterest(
const Name&
name);
190 Name m_lastInterestName;
197 bool m_isTimeoutScheduled;
198 size_t m_nSilentTimeouts;
234 if (m_fit.find(faceId) != m_fit.end()) {
235 return &m_fit.at(faceId);
245 return m_fit.find(faceId);
257 return m_fit.emplace(faceId,
FaceInfo()).first;
263 return m_isProbingDue;
275 return m_hasFirstProbeBeenScheduled;
281 m_hasFirstProbeBeenScheduled = hasBeenScheduled;
288 bool m_hasFirstProbeBeenScheduled;
329 #endif // NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP Duration computeRto() const
bool isProbingDue() const
Helper class to retrieve and create strategy measurements.
FaceInfo * get(FaceId faceId)
FaceInfo & getOrCreateFaceInfo(const fib::Entry &fibEntry, FaceId faceId)
void recordRtt(const shared_ptr< pit::Entry > &pitEntry, const Face &inFace)
time::microseconds Duration
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
void extendFaceInfoLifetime(FaceInfo &info, FaceId faceId)
FaceInfo & getOrCreateFaceInfo(const fib::Entry &fibEntry, const Interest &interest, FaceId faceId)
const scheduler::EventId & getMeasurementExpirationEventId()
AsfMeasurements(MeasurementsAccessor &measurements)
Represents an Interest packet.
void setNSilentTimeouts(size_t nSilentTimeouts)
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
void expireFaceInfo(FaceId faceId)
Copyright (c) 2011-2015 Regents of the University of California.
FaceInfoTable::iterator find(FaceId faceId)
static constexpr int getTypeId()
void setHasFirstProbeBeenScheduled(bool hasBeenScheduled)
void setIsProbingDue(bool isProbingDue)
NamespaceInfo & getOrCreateNamespaceInfo(const fib::Entry &fibEntry, const Interest &interest)
const FaceInfoTable::iterator insert(FaceId faceId)
static const Rtt RTT_NO_MEASUREMENT
static constexpr time::microseconds MEASUREMENTS_LIFETIME
RttStats::Rtt getRtt() const
Represents an absolute name.
void setTimeoutEvent(const scheduler::EventId &id, const Name &interestName)
bool isFirstProbeScheduled() const
Strategy information for each face in a namespace.
std::unordered_map< FaceId, FaceInfo > FaceInfoTable
allows Strategy to access portion of Measurements table under its namespace
NamespaceInfo * getNamespaceInfo(const Name &prefix)
RttStats::Rtt getSrtt() const
implements the Mean-Deviation RTT estimator
FaceInfo * getFaceInfo(const fib::Entry &fibEntry, FaceId faceId)
void recordTimeout(const Name &interestName)
FaceInfo * getFaceInfo(const fib::Entry &fibEntry, const Interest &interest, FaceId faceId)
uint64_t FaceId
identifies a face
A handle of scheduled event.
bool isTimeoutScheduled() const
contains arbitrary information forwarding strategy places on table entries
size_t getNSilentTimeouts() const
time::duration< double, boost::micro > Rtt