NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::LimitsWindow Class Reference

Structure to manage limits for outstanding interests (window-based limiting) More...

#include <ndn-limits-window.h>

Inheritance diagram for ns3::ndn::LimitsWindow:
Collaboration diagram for ns3::ndn::LimitsWindow:

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 ()
 

Detailed Description

Structure to manage limits for outstanding interests (window-based limiting)

Definition at line 33 of file ndn-limits-window.h.

Member Function Documentation

virtual double ns3::ndn::LimitsWindow::GetCurrentLimit ( ) const
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.

virtual double ns3::ndn::LimitsWindow::GetCurrentLimitRate ( ) const
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().

virtual void ns3::ndn::LimitsWindow::SetLimits ( double  rate,
double  delay 
)
inlinevirtual

Set limit for the number of outstanding interests.

Parameters
rateMaximum rate that needs to be enforced
delayMaximum 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().

void ns3::ndn::LimitsWindow::UpdateCurrentLimit ( double  limit)
virtual

Update a current value of the limit.

Parameters
limitValue 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().


The documentation for this class was generated from the following files: