|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
29 #ifndef TBF_QUEUE_DISC_H
30 #define TBF_QUEUE_DISC_H
32 #include "ns3/queue-disc.h"
33 #include "ns3/nstime.h"
34 #include "ns3/boolean.h"
35 #include "ns3/data-rate.h"
36 #include "ns3/random-variable-stream.h"
37 #include "ns3/traced-value.h"
38 #include "ns3/trace-source-accessor.h"
39 #include "ns3/event-id.h"
91 void SetMtu (uint32_t mtu);
98 uint32_t
GetMtu (
void)
const;
TbfQueueDisc()
TbfQueueDisc Constructor.
a unique identifier for an interface.
virtual bool DoEnqueue(Ptr< QueueDiscItem > item)
This function actually enqueues a packet into the queue disc.
static TypeId GetTypeId(void)
Get the type ID.
virtual bool CheckConfig(void)
Check whether the current configuration is correct.
An identifier for simulation events.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
QueueDisc is an abstract base class providing the interface and implementing the operations common to...
uint32_t m_burst
Size of first bucket in bytes.
uint32_t GetMtu(void) const
Get the size of the second bucket in bytes.
void SetMtu(uint32_t mtu)
Set the size of the second bucket in bytes.
void SetBurst(uint32_t burst)
Set the size of the first bucket in bytes.
virtual Ptr< QueueDiscItem > DoDequeue(void)
This function actually extracts a packet from the queue disc.
Smart pointer class similar to boost::intrusive_ptr.
Class for representing data rates.
DataRate m_peakRate
Rate at which tokens enter the second bucket.
TracedValue< uint32_t > m_ptokens
Current number of tokens in second bucket.
Simulation virtual time values and global simulation resolution.
virtual void DoDispose(void)
Dispose of the object.
virtual ~TbfQueueDisc()
Destructor.
uint32_t GetSecondBucketTokens(void) const
Get the current number of tokens inside the second bucket in bytes.
void SetRate(DataRate rate)
Set the rate of the tokens entering the first bucket.
uint32_t GetFirstBucketTokens(void) const
Get the current number of tokens inside the first bucket in bytes.
DataRate m_rate
Rate at which tokens enter the first bucket.
TracedValue< uint32_t > m_btokens
Current number of tokens in first bucket.
uint32_t m_mtu
Size of second bucket in bytes.
DataRate GetPeakRate(void) const
Get the rate of the tokens entering the second bucket.
EventId m_id
EventId of the scheduled queue waking event when enough tokens are available.
void SetPeakRate(DataRate peakRate)
Set the rate of the tokens entering the second bucket.
DataRate GetRate(void) const
Get the rate of the tokens entering the first bucket.
Time m_timeCheckPoint
Time check-point.
uint32_t GetBurst(void) const
Get the size of the first bucket in bytes.
virtual void InitializeParams(void)
Initialize parameters (if any) before the first packet is enqueued.