Structure to manage limits for outstanding interests (window-based limiting) More...
#include <ndn-limits-window.h>
Public Types | |
typedef Limits | super |
Public Types inherited from ns3::ndn::Limits | |
typedef Callback< void > | CallbackHandler |
Public Member Functions | |
LimitsWindow () | |
Default Constructor. | |
virtual | ~LimitsWindow () |
Virtual destructor. | |
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 void | UpdateCurrentLimit (double limit) |
Update a current value of the limit. More... | |
virtual double | GetCurrentLimit () const |
Get value of the current limit. More... | |
virtual double | GetCurrentLimitRate () const |
Get value of the current limit in terms of maximum rate that needs to be enforced. More... | |
virtual bool | IsBelowLimit () |
Check if current interest window (number of pending interests) if less than maximum. | |
virtual void | BorrowLimit () |
Increase current window of outstanding interests. | |
virtual void | ReturnLimit () |
Decrease current window of outstanding interests. | |
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 () |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::ndn::Limits | |
void | FireAvailableSlotCallback () |
Structure to manage limits for outstanding interests (window-based limiting)
Definition at line 33 of file ndn-limits-window.h.
|
inlinevirtual |
Get value of the current limit.
Note that interpretation of this value may be different in different ndn::Limit realizations
Implements ns3::ndn::Limits.
Definition at line 76 of file ndn-limits-window.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 82 of file ndn-limits-window.h.
References ns3::ndn::Limits::GetMaxDelay().
|
inlinevirtual |
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 58 of file ndn-limits-window.h.
References ns3::ndn::Limits::GetMaxDelay(), ns3::ndn::Limits::GetMaxRate(), and ns3::ndn::Limits::SetLimits().
|
virtual |
Update a current value of the limit.
limit | Value of current limit. |
Note that interpretation of this value may be different in different ndn::Limit realizations
All realizations will try to guarantee that if limit is larger than previously set value of maximum limit, then the current limit will be limited to that maximum value
Implements ns3::ndn::Limits.
Definition at line 52 of file ndn-limits-window.cc.
References ns3::ndn::Limits::GetMaxDelay(), and ns3::ndn::Limits::GetMaxRate().