Abstract class to manage Interest limits. More...
#include <ndn-limits.h>
Classes | |
class | Rate |
class | Window |
Public Types | |
typedef Callback< void > | CallbackHandler |
Public Member Functions | |
Limits () | |
Default constructor. | |
virtual | ~Limits () |
Virtual destructor. | |
virtual void | SetLimits (double rate, double delay) |
Set limit for the number of outstanding interests. More... | |
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 double | GetMaxLimit () const =0 |
Get maximum limit (interpretation of the limit depends on realization) | |
virtual bool | IsEnabled () const |
Check whether limits are enabled or not. | |
virtual void | UpdateCurrentLimit (double limit)=0 |
Update a current value of the limit. More... | |
virtual double | GetCurrentLimit () const =0 |
Get value of the current limit. More... | |
virtual double | GetCurrentLimitRate () const =0 |
Get value of the current limit in terms of maximum rate that needs to be enforced. More... | |
virtual bool | IsBelowLimit ()=0 |
Realization-specific method called to check availability of the limit. | |
virtual void | BorrowLimit ()=0 |
"Borrow" limit More... | |
virtual void | ReturnLimit ()=0 |
"Return" limit | |
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 () |
Protected Member Functions | |
void | FireAvailableSlotCallback () |
Abstract class to manage Interest limits.
Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 35 of file ndn-limits.h.
|
pure virtual |
"Borrow" limit
IsBelowLimit must be true, otherwise assert fail
Implemented in ns3::ndn::LimitsWindow, and ns3::ndn::LimitsRate.
|
pure virtual |
Get value of the current limit.
Note that interpretation of this value may be different in different ndn::Limit realizations
Implemented in ns3::ndn::LimitsRate, and ns3::ndn::LimitsWindow.
|
pure virtual |
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")
Implemented in ns3::ndn::LimitsRate, and ns3::ndn::LimitsWindow.
|
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 in ns3::ndn::LimitsRate, and ns3::ndn::LimitsWindow.
Definition at line 61 of file ndn-limits.h.
Referenced by ns3::ndn::GlobalRoutingHelper::CalculateAllPossibleRoutes(), ns3::ndn::GlobalRoutingHelper::CalculateRoutes(), ns3::ndn::LimitsRate::SetLimits(), and ns3::ndn::LimitsWindow::SetLimits().
|
inlinevirtual |
Set link delay (in seconds)
This is a supplementary information that may or may not be useful for limits
Definition at line 160 of file ndn-limits.h.
|
pure 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
Implemented in ns3::ndn::LimitsRate, and ns3::ndn::LimitsWindow.