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::LimitsRate Class Reference

Structure to manage limits for outstanding interests. More...

#include <ndn-limits-rate.h>

Inheritance diagram for ns3::ndn::LimitsRate:
Collaboration diagram for ns3::ndn::LimitsRate:

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

Detailed Description

Structure to manage limits for outstanding interests.

Definition at line 34 of file ndn-limits-rate.h.

Constructor & Destructor Documentation

ns3::ndn::LimitsRate::LimitsRate ( )
inline

Constructor.

Parameters
prefixsmart pointer to the prefix for the FIB entry

Definition at line 47 of file ndn-limits-rate.h.

Member Function Documentation

virtual double ns3::ndn::LimitsRate::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 101 of file ndn-limits-rate.h.

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

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 83 of file ndn-limits-rate.cc.

References ns3::ndn::Limits::GetMaxDelay(), ns3::ndn::Limits::GetMaxRate(), and ns3::ndn::Limits::SetLimits().


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