A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
bandwidth-manager.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008,2009 INRIA, UDcast
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: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18
* Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
19
* <amine.ismail@UDcast.com>
20
*/
21
22
#ifndef BANDWIDTH_MANAGER_H
23
#define BANDWIDTH_MANAGER_H
24
25
#include "
bs-uplink-scheduler.h
"
26
#include "
cid.h
"
27
#include "
ul-job.h
"
28
#include "
wimax-net-device.h
"
29
30
#include <stdint.h>
31
32
/*
33
The same bandwidth manager class serves both for BS and SS though some functions are exclusive to
34
only one of them.
35
*/
36
37
namespace
ns3
38
{
39
40
class
SSRecord;
41
class
ServiceFlow;
42
class
UlJob;
43
class
UplinkScheduler;
44
56
class
BandwidthManager
:
public
Object
57
{
58
public
:
63
static
TypeId
GetTypeId
();
69
BandwidthManager
(
Ptr<WimaxNetDevice>
device);
70
~BandwidthManager
()
override
;
71
72
// Delete copy constructor and assignment operator to avoid misuse
73
BandwidthManager
(
const
BandwidthManager
&) =
delete
;
74
BandwidthManager
&
operator=
(
const
BandwidthManager
&) =
delete
;
75
76
void
DoDispose
()
override
;
77
84
uint32_t
CalculateAllocationSize
(
const
SSRecord
* ssRecord,
const
ServiceFlow
* serviceFlow);
90
ServiceFlow
*
SelectFlowForRequest
(uint32_t& bytesToRequest);
96
void
SendBandwidthRequest
(uint8_t uiuc, uint16_t allocationSize);
101
void
ProcessBandwidthRequest
(
const
BandwidthRequestHeader
& bwRequestHdr);
103
void
SetSubframeRatio
();
108
uint32_t
GetSymbolsPerFrameAllocated
();
109
110
private
:
111
Ptr<WimaxNetDevice>
m_device
;
112
uint16_t
m_nrBwReqsSent
;
113
};
114
115
}
// namespace ns3
116
117
#endif
/* BANDWIDTH_MANAGER_H */
bs-uplink-scheduler.h
cid.h
ns3::BandwidthManager
This class manage the bandwidth request and grant mechanism.
Definition:
bandwidth-manager.h:57
ns3::BandwidthManager::SetSubframeRatio
void SetSubframeRatio()
Set subframe ratio.
Definition:
bandwidth-manager.cc:208
ns3::BandwidthManager::m_nrBwReqsSent
uint16_t m_nrBwReqsSent
bandwidth requests sent
Definition:
bandwidth-manager.h:112
ns3::BandwidthManager::GetSymbolsPerFrameAllocated
uint32_t GetSymbolsPerFrameAllocated()
Get symbols per frame allocated.
Definition:
bandwidth-manager.cc:223
ns3::BandwidthManager::m_device
Ptr< WimaxNetDevice > m_device
the device
Definition:
bandwidth-manager.h:111
ns3::BandwidthManager::CalculateAllocationSize
uint32_t CalculateAllocationSize(const SSRecord *ssRecord, const ServiceFlow *serviceFlow)
Calculate allocation size function.
Definition:
bandwidth-manager.cc:68
ns3::BandwidthManager::SelectFlowForRequest
ServiceFlow * SelectFlowForRequest(uint32_t &bytesToRequest)
Select flow for request function.
Definition:
bandwidth-manager.cc:123
ns3::BandwidthManager::DoDispose
void DoDispose() override
Destructor implementation.
Definition:
bandwidth-manager.cc:62
ns3::BandwidthManager::~BandwidthManager
~BandwidthManager() override
Definition:
bandwidth-manager.cc:57
ns3::BandwidthManager::BandwidthManager
BandwidthManager(Ptr< WimaxNetDevice > device)
Constructor.
Definition:
bandwidth-manager.cc:51
ns3::BandwidthManager::ProcessBandwidthRequest
void ProcessBandwidthRequest(const BandwidthRequestHeader &bwRequestHdr)
Process bandwidth request.
Definition:
bandwidth-manager.cc:187
ns3::BandwidthManager::BandwidthManager
BandwidthManager(const BandwidthManager &)=delete
ns3::BandwidthManager::operator=
BandwidthManager & operator=(const BandwidthManager &)=delete
ns3::BandwidthManager::SendBandwidthRequest
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
Send bandwidth request.
Definition:
bandwidth-manager.cc:152
ns3::BandwidthManager::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
bandwidth-manager.cc:45
ns3::BandwidthRequestHeader
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
Definition:
wimax-mac-header.h:260
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3::SSRecord
This class is used by the base station to store some information related to subscriber station in the...
Definition:
ss-record.h:46
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:43
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ul-job.h
wimax-net-device.h
src
wimax
model
bandwidth-manager.h
Generated on Sun Mar 3 2024 17:11:13 for ns-3 by
1.9.1