A Discrete-Event Network Simulator
API
bandwidth-manager.h
Go to the documentation of this file.
1/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2/*
3 * Copyright (c) 2007,2008,2009 INRIA, UDcast
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation;
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 *
18 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19 * Mohamed Amine Ismail <amine.ismail@sophia.inria.fr>
20 * <amine.ismail@UDcast.com>
21 */
22
23#ifndef BANDWIDTH_MANAGER_H
24#define BANDWIDTH_MANAGER_H
25
26#include <stdint.h>
27#include "wimax-net-device.h"
28#include "ul-job.h"
29#include "bs-uplink-scheduler.h"
30#include "cid.h"
31
32/*
33 The same bandwidth manager class serves both for BS and SS though some functions are exclusive to only one of them.
34 */
35
36namespace ns3 {
37
38class SSRecord;
39class ServiceFlow;
40class UlJob;
41class UplinkScheduler;
42
55{
56public:
61 static TypeId GetTypeId (void);
68 ~BandwidthManager (void);
69
70 // Delete copy constructor and assignment operator to avoid misuse
73
74 void DoDispose (void);
75
82 uint32_t CalculateAllocationSize (const SSRecord *ssRecord, const ServiceFlow *serviceFlow);
88 ServiceFlow* SelectFlowForRequest (uint32_t &bytesToRequest);
94 void SendBandwidthRequest (uint8_t uiuc, uint16_t allocationSize);
99 void ProcessBandwidthRequest (const BandwidthRequestHeader &bwRequestHdr);
101 void SetSubframeRatio (void);
107private:
109 uint16_t m_nrBwReqsSent;
110};
111
112} // namespace ns3
113
114#endif /* BANDWIDTH_MANAGER_H */
This class manage the bandwidth request and grant mechanism.
void DoDispose(void)
Destructor implementation.
uint16_t m_nrBwReqsSent
bandwidth requests sent
void SetSubframeRatio(void)
Set subframe ratio.
Ptr< WimaxNetDevice > m_device
the device
uint32_t CalculateAllocationSize(const SSRecord *ssRecord, const ServiceFlow *serviceFlow)
Calculate allocation size function.
ServiceFlow * SelectFlowForRequest(uint32_t &bytesToRequest)
Select flow for request function.
BandwidthManager & operator=(const BandwidthManager &)=delete
uint32_t GetSymbolsPerFrameAllocated(void)
Get symbols per frame allocated.
BandwidthManager(Ptr< WimaxNetDevice > device)
Constructor.
void ProcessBandwidthRequest(const BandwidthRequestHeader &bwRequestHdr)
Process bandwidth request.
BandwidthManager(const BandwidthManager &)=delete
void SendBandwidthRequest(uint8_t uiuc, uint16_t allocationSize)
Send bandwidth request.
static TypeId GetTypeId(void)
Get the type ID.
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:44
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:42
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.