A Discrete-Event Network Simulator
API
queue-limits.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 Universita' degli Studi di Napoli Federico II
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Authors: Pasquale Imputato <p.imputato@gmail.com>
18  * Stefano Avallone <stefano.avallone@unina.it>
19  */
20 
21 #ifndef QUEUE_LIMITS_H
22 #define QUEUE_LIMITS_H
23 
24 #include "ns3/object.h"
25 
26 namespace ns3
27 {
28 
43 class QueueLimits : public Object
44 {
45  public:
50  static TypeId GetTypeId();
51 
52  ~QueueLimits() override;
53 
57  virtual void Reset() = 0;
58 
63  virtual void Completed(uint32_t count) = 0;
64 
73  virtual int32_t Available() const = 0;
74 
79  virtual void Queued(uint32_t count) = 0;
80 };
81 
82 } // namespace ns3
83 
84 #endif /* QUEUE_LIMITS_H */
A base class which provides memory management and object aggregation.
Definition: object.h:89
Abstract base class for NetDevice queue length controller.
Definition: queue-limits.h:44
virtual void Reset()=0
Reset queue limits state.
virtual void Queued(uint32_t count)=0
Record the number of bytes queued.
static TypeId GetTypeId()
Get the type ID.
Definition: queue-limits.cc:33
~QueueLimits() override
Definition: queue-limits.cc:39
virtual void Completed(uint32_t count)=0
Record number of completed bytes and recalculate the limit.
virtual int32_t Available() const =0
Available is called from NotifyTransmittedBytes to calculate the number of bytes that can be passed a...
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.