A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
bs-scheduler.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
*
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
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
19
*/
20
21
/* BS outbound scheduler as per in Section 6.3.5.1 */
22
23
#ifndef BS_SCHEDULER_H
24
#define BS_SCHEDULER_H
25
26
#include <list>
27
#include "ns3/packet.h"
28
#include "
wimax-phy.h
"
29
#include "ns3/packet-burst.h"
30
#include "
dl-mac-messages.h
"
31
#include "
service-flow.h
"
32
33
namespace
ns3
{
34
35
class
BaseStationNetDevice;
36
class
GenericMacHeader;
37
class
WimaxConnection;
38
class
Cid;
39
43
class
BSScheduler
:
public
Object
44
{
45
public
:
46
BSScheduler
();
52
BSScheduler
(
Ptr<BaseStationNetDevice>
bs);
53
~BSScheduler
(
void
);
54
59
static
TypeId
GetTypeId
(
void
);
60
66
virtual
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > >*
67
GetDownlinkBursts
(
void
)
const
= 0;
76
virtual
void
AddDownlinkBurst
(
Ptr<const WimaxConnection>
connection,
77
uint8_t diuc,
78
WimaxPhy::ModulationType
modulationType,
79
Ptr<PacketBurst>
burst) = 0;
80
84
virtual
void
Schedule
(
void
) = 0;
90
virtual
bool
SelectConnection
(
Ptr<WimaxConnection>
&connection) = 0;
91
99
virtual
Ptr<PacketBurst>
CreateUgsBurst
(
ServiceFlow
*serviceFlow,
100
WimaxPhy::ModulationType
modulationType,
101
uint32_t availableSymbols) = 0;
102
107
virtual
Ptr<BaseStationNetDevice>
GetBs
(
void
);
112
virtual
void
SetBs
(
Ptr<BaseStationNetDevice>
bs);
113
121
bool
CheckForFragmentation
(
Ptr<WimaxConnection>
connection,
122
int
availableSymbols,
123
WimaxPhy::ModulationType
modulationType);
124
private
:
125
Ptr<BaseStationNetDevice>
m_bs
;
126
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst> > > *
m_downlinkBursts
;
127
};
128
129
}
// namespace ns3
130
131
#endif
/* BS_SCHEDULER_H */
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::BSScheduler::m_bs
Ptr< BaseStationNetDevice > m_bs
base station
Definition:
bs-scheduler.h:125
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::BSScheduler::GetBs
virtual Ptr< BaseStationNetDevice > GetBs(void)
Get the base station.
Definition:
bs-scheduler.cc:89
ns3::BSScheduler::CheckForFragmentation
bool CheckForFragmentation(Ptr< WimaxConnection > connection, int availableSymbols, WimaxPhy::ModulationType modulationType)
Check if the packet fragmentation is possible for transport connection.
Definition:
bs-scheduler.cc:95
ns3::BSScheduler::Schedule
virtual void Schedule(void)=0
the scheduling function for the downlink subframe.
ns3::BSScheduler::AddDownlinkBurst
virtual void AddDownlinkBurst(Ptr< const WimaxConnection > connection, uint8_t diuc, WimaxPhy::ModulationType modulationType, Ptr< PacketBurst > burst)=0
This function adds a downlink burst to the list of downlink bursts scheduled for the next downlink su...
ns3::BSScheduler::SetBs
virtual void SetBs(Ptr< BaseStationNetDevice > bs)
Set the base station.
Definition:
bs-scheduler.cc:84
ns3::BSScheduler::GetDownlinkBursts
virtual std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * GetDownlinkBursts(void) const =0
This function returns all the downlink bursts scheduled for the next downlink sub-frame.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition:
wimax-phy.h:50
ns3::BSScheduler::BSScheduler
BSScheduler()
Definition:
bs-scheduler.cc:55
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
wimax-phy.h
service-flow.h
ns3::BSScheduler::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
bs-scheduler.cc:45
ns3::BSScheduler::m_downlinkBursts
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * m_downlinkBursts
down link bursts
Definition:
bs-scheduler.h:126
dl-mac-messages.h
ns3::BSScheduler
Definition:
bs-scheduler.h:44
ns3::BSScheduler::~BSScheduler
~BSScheduler(void)
Definition:
bs-scheduler.cc:68
ns3::BSScheduler::CreateUgsBurst
virtual Ptr< PacketBurst > CreateUgsBurst(ServiceFlow *serviceFlow, WimaxPhy::ModulationType modulationType, uint32_t availableSymbols)=0
Creates a downlink UGS burst.
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition:
service-flow.h:40
ns3::BSScheduler::SelectConnection
virtual bool SelectConnection(Ptr< WimaxConnection > &connection)=0
Selects a connection from the list of connections having packets to be sent .
src
wimax
model
bs-scheduler.h
Generated on Fri Oct 1 2021 17:03:53 for ns-3 by
1.8.20