26 #ifndef NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP 27 #define NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP 44 FaceInfo(shared_ptr<const ndn::util::RttEstimator::Options> opts)
45 : m_rttEstimator(
std::
move(opts))
52 return !!m_timeoutEvent;
102 m_nTimeouts = nTimeouts;
112 Name m_lastInterestName;
113 size_t m_nTimeouts = 0;
139 : m_rttEstimatorOpts(
std::
move(opts))
144 getFaceInfo(
FaceId faceId);
147 getOrCreateFaceInfo(
FaceId faceId);
155 return m_isProbingDue;
161 m_isProbingDue = isProbingDue;
167 return m_isFirstProbeScheduled;
173 m_isFirstProbeScheduled = isScheduled;
177 std::unordered_map<FaceId, FaceInfo> m_fiMap;
178 shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
179 bool m_isProbingDue =
false;
180 bool m_isFirstProbeScheduled =
false;
201 getNamespaceInfo(
const Name& prefix);
204 getOrCreateNamespaceInfo(
const fib::Entry& fibEntry,
const Name& prefix);
215 shared_ptr<const ndn::util::RttEstimator::Options> m_rttEstimatorOpts;
222 #endif // NFD_DAEMON_FW_ASF_MEASUREMENTS_HPP NamespaceInfo(shared_ptr< const ndn::util::RttEstimator::Options > opts)
bool isProbingDue() const
Helper class to retrieve and create strategy measurements.
time::nanoseconds scheduleTimeout(const Name &interestName, scheduler::EventCallback cb)
static const time::nanoseconds RTT_TIMEOUT
std::function< void()> EventCallback
Function to be invoked when a scheduled event expires.
boost::chrono::microseconds microseconds
void addMeasurement(time::nanoseconds rtt, size_t nExpectedSamples=1)
Records a new RTT measurement.
Stores strategy information about each face in this namespace.
void recordRtt(time::nanoseconds rtt)
FaceInfo(shared_ptr< const ndn::util::RttEstimator::Options > opts)
time::nanoseconds getLastRtt() const
Represents a Measurements entry.
void setIsFirstProbeScheduled(bool isScheduled)
void cancelTimeout(const Name &prefix)
Copyright (c) 2011-2015 Regents of the University of California.
static constexpr int getTypeId()
size_t getNTimeouts() const
void setIsProbingDue(bool isProbingDue)
Represents an absolute name.
bool isFirstProbeScheduled() const
void setNTimeouts(size_t nTimeouts)
Strategy information for each face in a namespace.
allows Strategy to access portion of Measurements table under its namespace
time::nanoseconds getSmoothedRtt() const
Returns the smoothed RTT value (SRTT).
time::nanoseconds getSrtt() const
void recordTimeout(const Name &interestName)
uint64_t FaceId
Identifies a face.
bool isTimeoutScheduled() const
boost::chrono::nanoseconds nanoseconds
Contains arbitrary information placed by the forwarding strategy on table entries.
static const time::nanoseconds RTT_NO_MEASUREMENT