Structure to manage limits for outstanding interests. More...
#include <ndn-limits-rate.h>
Public Types | |
typedef Limits | super |
Public Types inherited from ns3::ndn::Limits | |
typedef Callback< void > | CallbackHandler |
Public Member Functions | |
LimitsRate () | |
Constructor. More... | |
virtual void | SetLimits (double rate, double delay) |
Set limit for the number of outstanding interests. More... | |
virtual double | GetMaxLimit () const |
Get maximum limit (interpretation of the limit depends on realization) | |
virtual bool | IsBelowLimit () |
Check if Interest limit is reached (token bucket is not empty) | |
virtual void | BorrowLimit () |
Get token from the bucket. | |
virtual void | ReturnLimit () |
Does nothing (token bucket leakage is time-dependent only) | |
virtual void | UpdateCurrentLimit (double limit) |
Update normalized amount that should be leaked every second (token bucket leak rate) and leak rate. | |
virtual double | GetCurrentLimit () const |
Get normalized amount that should be leaked every second (token bucket leak rate) | |
virtual double | GetCurrentLimitRate () const |
Get value of the current limit in terms of maximum rate that needs to be enforced. More... | |
Public Member Functions inherited from ns3::ndn::Limits | |
Limits () | |
Default constructor. | |
virtual | ~Limits () |
Virtual destructor. | |
virtual double | GetMaxRate () const |
Get maximum rate that needs to be enforced. | |
virtual double | GetMaxDelay () const |
Get maximum delay for BDP product for window-based limits. | |
virtual bool | IsEnabled () const |
Check whether limits are enabled or not. | |
virtual void | SetLinkDelay (double delay) |
Set link delay (in seconds) More... | |
virtual double | GetLinkDelay () const |
Get link delay (in seconds) | |
void | RegisterAvailableSlotCallback (CallbackHandler handler) |
Set callback which will be called when exhausted limit gets a new slot. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Static Public Member Functions inherited from ns3::ndn::Limits | |
static TypeId | GetTypeId () |
Protected Member Functions | |
void | NotifyNewAggregate () |
Protected Member Functions inherited from ns3::ndn::Limits | |
void | FireAvailableSlotCallback () |
Structure to manage limits for outstanding interests.
Definition at line 34 of file ndn-limits-rate.h.
|
inline |
Constructor.
prefix | smart pointer to the prefix for the FIB entry |
Definition at line 47 of file ndn-limits-rate.h.
|
inlinevirtual |
Get value of the current limit in terms of maximum rate that needs to be enforced.
Compared to GetCurrentLimit, this method guarantees that the returned value is maximum number of packets that can be send out within one second (max "rate")
Implements ns3::ndn::Limits.
Definition at line 101 of file ndn-limits-rate.h.
|
virtual |
Set limit for the number of outstanding interests.
rate | Maximum rate that needs to be enforced |
delay | Maximum delay for BDP product for window-based limits |
Reimplemented from ns3::ndn::Limits.
Definition at line 83 of file ndn-limits-rate.cc.
References ns3::ndn::Limits::GetMaxDelay(), ns3::ndn::Limits::GetMaxRate(), and ns3::ndn::Limits::SetLimits().