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::Limits Class Referenceabstract

Abstract class to manage Interest limits. More...

#include <ndn-limits.h>

Inheritance diagram for ns3::ndn::Limits:
Collaboration diagram for ns3::ndn::Limits:

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

Detailed Description

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.

Member Function Documentation

virtual void ns3::ndn::Limits::BorrowLimit ( )
pure virtual

"Borrow" limit

IsBelowLimit must be true, otherwise assert fail

Implemented in ns3::ndn::LimitsWindow, and ns3::ndn::LimitsRate.

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

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

virtual void ns3::ndn::Limits::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 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().

virtual void ns3::ndn::Limits::SetLinkDelay ( double  delay)
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.

virtual void ns3::ndn::Limits::UpdateCurrentLimit ( double  limit)
pure 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

Implemented in ns3::ndn::LimitsRate, and ns3::ndn::LimitsWindow.


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