A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
queue-limits.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2016 Universita' degli Studi di Napoli Federico II
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors: Pasquale Imputato <p.imputato@gmail.com>
7
* Stefano Avallone <stefano.avallone@unina.it>
8
*/
9
10
#ifndef QUEUE_LIMITS_H
11
#define QUEUE_LIMITS_H
12
13
#include "ns3/object.h"
14
15
namespace
ns3
16
{
17
18
/**
19
* \ingroup network
20
*
21
* \brief Abstract base class for NetDevice queue length controller
22
*
23
* QueueLimits is an abstract base class providing the interface to
24
* the NetDevice queue length controller.
25
*
26
* Child classes need to implement the methods used for a byte-based
27
* measure of the queue length.
28
*
29
* The design and implementation of this class is inspired by Linux.
30
* For more details, see the queue limits Sphinx documentation.
31
*/
32
class
QueueLimits
:
public
Object
33
{
34
public
:
35
/**
36
* \brief Get the type ID.
37
* \return the object TypeId
38
*/
39
static
TypeId
GetTypeId
();
40
41
~QueueLimits
()
override
;
42
43
/**
44
* \brief Reset queue limits state
45
*/
46
virtual
void
Reset
() = 0;
47
48
/**
49
* \brief Record number of completed bytes and recalculate the limit
50
* \param count the number of completed bytes
51
*/
52
virtual
void
Completed
(
uint32_t
count) = 0;
53
54
/**
55
* Available is called from NotifyTransmittedBytes to calculate the
56
* number of bytes that can be passed again to the NetDevice.
57
* A negative value means that no packets can be passed to the NetDevice.
58
* In this case, NotifyTransmittedBytes stops the transmission queue.
59
* \brief Returns how many bytes can be queued
60
* \return the number of bytes that can be queued
61
*/
62
virtual
int32_t
Available
()
const
= 0;
63
64
/**
65
* \brief Record the number of bytes queued
66
* \param count the number of bytes queued
67
*/
68
virtual
void
Queued
(
uint32_t
count) = 0;
69
};
70
71
}
// namespace ns3
72
73
#endif
/* QUEUE_LIMITS_H */
int32_t
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::QueueLimits
Abstract base class for NetDevice queue length controller.
Definition
queue-limits.h:33
ns3::QueueLimits::Reset
virtual void Reset()=0
Reset queue limits state.
ns3::QueueLimits::Queued
virtual void Queued(uint32_t count)=0
Record the number of bytes queued.
ns3::QueueLimits::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
queue-limits.cc:22
ns3::QueueLimits::~QueueLimits
~QueueLimits() override
Definition
queue-limits.cc:28
ns3::QueueLimits::Completed
virtual void Completed(uint32_t count)=0
Record number of completed bytes and recalculate the limit.
ns3::QueueLimits::Available
virtual int32_t Available() const =0
Available is called from NotifyTransmittedBytes to calculate the number of bytes that can be passed a...
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
utils
queue-limits.h
Generated on Fri Nov 8 2024 13:59:05 for ns-3 by
1.11.0