32 time::milliseconds(1);
35 time::milliseconds(250);
37 class RetxSuppressionExponential::PitInfo :
public StrategyInfo
47 PitInfo(
const Duration& initialInterval)
48 : suppressionInterval(initialInterval)
62 : m_initialInterval(initialInterval)
63 , m_multiplier(multiplier)
64 , m_maxInterval(maxInterval)
66 BOOST_ASSERT(initialInterval > time::milliseconds::zero());
67 BOOST_ASSERT(multiplier >= 1.0);
68 BOOST_ASSERT(maxInterval >= initialInterval);
80 time::steady_clock::TimePoint now = time::steady_clock::now();
81 time::steady_clock::Duration sinceLastOutgoing = now - lastOutgoing;
84 bool shouldSuppress = sinceLastOutgoing < pi->suppressionInterval;
90 pi->suppressionInterval = std::min(m_maxInterval,
91 time::duration_cast<Duration>(pi->suppressionInterval * m_multiplier));
101 if (outRecord == pitEntry.
out_end()) {
105 time::steady_clock::TimePoint lastOutgoing = outRecord->getLastRenewed();
106 time::steady_clock::TimePoint now = time::steady_clock::now();
107 time::steady_clock::Duration sinceLastOutgoing = now - lastOutgoing;
110 PitInfo* pi = outRecord->insertStrategyInfo<PitInfo>(m_initialInterval).first;
111 bool shouldSuppress = sinceLastOutgoing < pi->suppressionInterval;
113 if (shouldSuppress) {
124 pi->suppressionInterval = std::min(m_maxInterval,
125 time::duration_cast<Duration>(pi->suppressionInterval * m_multiplier));
Interest is retransmission and should be forwarded.
static const float DEFAULT_MULTIPLIER
OutRecordCollection::iterator getOutRecord(const Face &face)
get the out-record for face
void incrementIntervalForOutRecord(pit::OutRecord &outRecord)
Increment the suppression interval for out record.
contains information about an Interest toward an outgoing face
Interest is retransmission and should be suppressed.
RetxSuppressionResult decidePerUpstream(pit::Entry &pitEntry, Face &outFace)
determines whether Interest is a retransmission per upstream and if so, whether it shall be forwarded...
std::pair< T *, bool > insertStrategyInfo(A &&...args)
insert a StrategyInfo item
static const Duration DEFAULT_INITIAL_INTERVAL
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Interest is new (not a retransmission)
RetxSuppressionExponential(const Duration &initialInterval=DEFAULT_INITIAL_INTERVAL, float multiplier=DEFAULT_MULTIPLIER, const Duration &maxInterval=DEFAULT_MAX_INTERVAL)
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
time::steady_clock::TimePoint getLastOutgoing(const pit::Entry &pitEntry)
static const Duration DEFAULT_MAX_INTERVAL
RetxSuppressionResult decidePerPitEntry(pit::Entry &pitEntry)
determines whether Interest is a retransmission per pit entry and if so, whether it shall be forwarde...
OutRecordCollection::iterator out_end()
time::microseconds Duration
time granularity