A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
bs-scheduler-rtps.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 INRIA
4
* 2009 TELEMATICS LAB, Politecnico di Bari
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Author: Giuseppe Piro <g.piro@poliba.it>
20
*/
21
22
/* BS outbound scheduler as per in Section 6.3.5.1 */
23
24
#ifndef BS_SCHEDULER_RTPS_H
25
#define BS_SCHEDULER_RTPS_H
26
27
#include <list>
28
#include "ns3/packet.h"
29
#include "
wimax-phy.h
"
30
#include "ns3/packet-burst.h"
31
#include "
dl-mac-messages.h
"
32
#include "
bs-scheduler.h
"
33
34
namespace
ns3 {
35
36
class
BaseStationNetDevice;
37
class
GenericMacHeader;
38
class
WimaxConnection;
39
class
Cid;
40
58
class
BSSchedulerRtps
:
public
BSScheduler
59
{
60
public
:
61
BSSchedulerRtps
();
62
BSSchedulerRtps
(
Ptr<BaseStationNetDevice>
bs);
63
~BSSchedulerRtps
(
void
);
64
65
static
TypeId
GetTypeId
(
void
);
66
67
/*
68
* \brief This function returns all the downlink bursts scheduled for the next
69
* downlink sub-frame
70
* \returns all the downlink bursts scheduled for the next downlink sub-frame
71
*/
72
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > >*
73
GetDownlinkBursts
(
void
)
const
;
74
75
/*
76
* \brief This function adds a downlink burst to the list of downlink bursts
77
* scheduled for the next downlink sub-frame
78
* \param connection a pointer to connection in wich the burst will be sent
79
* \param diuc downlink iuc
80
* \param modulationType the modulation type of the burst
81
* \param burst the downlink burst to add to the downlink sub frame
82
*/
83
void
AddDownlinkBurst
(
Ptr<const WimaxConnection>
connection, uint8_t diuc,
84
WimaxPhy::ModulationType
modulationType,
Ptr<PacketBurst>
burst);
88
void
Schedule
(
void
);
96
bool
SelectIRandBCConnection
(
Ptr<WimaxConnection>
&connection);
104
bool
SelectMenagementConnection
(
Ptr<WimaxConnection>
&connection);
111
bool
SelectUGSConnection
(
Ptr<WimaxConnection>
&connection);
115
bool
SelectRTPSConnection
(
Ptr<WimaxConnection>
&connection);
119
bool
SelectNRTPSConnection
(
Ptr<WimaxConnection>
&connection);
123
bool
SelectBEConnection
(
Ptr<WimaxConnection>
&connection);
124
125
/*
126
* \brief Selects a connection from the list of connections having packets to be sent .
127
* \param connection will point to a connection that have packets to be sent
128
* \returns false if no connection has packets to be sent, true otherwise
129
*/
130
bool
SelectConnection
(
Ptr<WimaxConnection>
&connection);
131
132
/*
133
* \brief schedules the broadcast connections
134
* \param availableSymbols the remaining free OFDM symbols in the current subframe
135
*/
136
void
BSSchedulerBroadcastConnection
(uint32_t &availableSymbols);
137
138
/*
139
* \brief schedules the IR connections
140
* \param availableSymbols the remaining free OFDM symbols in the current subframe
141
*/
142
void
BSSchedulerInitialRangingConnection
(uint32_t &availableSymbols);
143
144
/*
145
* \brief schedules the basic connections
146
* \param availableSymbols the remaining free OFDM symbols in the current subframe
147
*/
148
void
BSSchedulerBasicConnection
(uint32_t &availableSymbols);
149
150
/*
151
* \brief schedules the primary connection
152
* \param availableSymbols the remaining free OFDM symbols in the current subframe
153
*/
154
void
BSSchedulerPrimaryConnection
(uint32_t &availableSymbols);
155
/*
156
* \brief schedules the UGS connection
157
* \param availableSymbols the remaining free OFDM symbols in the current subframe
158
*/
159
void
BSSchedulerUGSConnection
(uint32_t &availableSymbols);
175
void
BSSchedulerRTPSConnection
(uint32_t &availableSymbols);
176
177
/*
178
* \brief schedules the NRTPS connections
179
* \param availableSymbols the remaining free OFDM symbols in the current subframe
180
*/
181
void
BSSchedulerNRTPSConnection
(uint32_t &availableSymbols);
182
183
/*
184
* \brief schedules the BE connection
185
* \param availableSymbols the remaining free OFDM symbols in the current subframe
186
*/
187
void
BSSchedulerBEConnection
(uint32_t &availableSymbols);
188
189
/*
190
* \brief Creates a downlink UGS burst
191
* \param serviceFlow the service flow of the burst
192
* \param modulationType the modulation type to be used for the burst
193
* \param availableSymbols maximum number of OFDM symbols to be used by the burst
194
* \returns a Burst (list of packets)
195
*/
196
Ptr<PacketBurst>
CreateUgsBurst
(
ServiceFlow
*serviceFlow,
197
WimaxPhy::ModulationType
modulationType, uint32_t availableSymbols);
198
199
private
:
200
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *
m_downlinkBursts
;
201
};
202
203
}
// namespace ns3
204
205
#endif
/* BS_SCHEDULER_RTPS_H */
src
wimax
model
bs-scheduler-rtps.h
Generated on Tue Oct 9 2012 16:45:49 for ns-3 by
1.8.1.2