A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
bs-scheduler.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007,2008 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7
*/
8
9
/* BS outbound scheduler as per in Section 6.3.5.1 */
10
11
#ifndef BS_SCHEDULER_H
12
#define BS_SCHEDULER_H
13
14
#include "
dl-mac-messages.h
"
15
#include "
service-flow.h
"
16
#include "
wimax-phy.h
"
17
18
#include "ns3/packet-burst.h"
19
#include "ns3/packet.h"
20
21
#include <list>
22
23
namespace
ns3
24
{
25
26
class
BaseStationNetDevice;
27
class
GenericMacHeader;
28
class
WimaxConnection;
29
class
Cid;
30
31
/**
32
* \ingroup wimax
33
*
34
* BaseStation Scheduler
35
*/
36
class
BSScheduler
:
public
Object
37
{
38
public
:
39
BSScheduler
();
40
/**
41
* Constructor
42
*
43
* \param bs base station device
44
*/
45
BSScheduler
(
Ptr<BaseStationNetDevice>
bs);
46
~BSScheduler
()
override
;
47
48
/**
49
* \brief Get the type ID.
50
* \return the object TypeId
51
*/
52
static
TypeId
GetTypeId
();
53
54
/**
55
* \brief This function returns all the downlink bursts scheduled for the next
56
* downlink sub-frame
57
* \returns all the downlink bursts scheduled for the next downlink sub-frame
58
*/
59
virtual
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>*
GetDownlinkBursts
()
const
= 0;
60
/**
61
* \brief This function adds a downlink burst to the list of downlink bursts
62
* scheduled for the next downlink sub-frame
63
* \param connection a pointer to connection in which the burst will be sent
64
* \param diuc downlink iuc
65
* \param modulationType the modulation type of the burst
66
* \param burst the downlink burst to add to the downlink sub frame
67
*/
68
virtual
void
AddDownlinkBurst
(
Ptr<const WimaxConnection>
connection,
69
uint8_t diuc,
70
WimaxPhy::ModulationType
modulationType,
71
Ptr<PacketBurst>
burst) = 0;
72
73
/**
74
* \brief the scheduling function for the downlink subframe.
75
*/
76
virtual
void
Schedule
() = 0;
77
/**
78
* \brief Selects a connection from the list of connections having packets to be sent .
79
* \param connection will point to a connection that have packets to be sent
80
* \returns false if no connection has packets to be sent, true otherwise
81
*/
82
virtual
bool
SelectConnection
(
Ptr<WimaxConnection>
& connection) = 0;
83
84
/**
85
* \brief Creates a downlink UGS burst
86
* \param serviceFlow the service flow of the burst
87
* \param modulationType the modulation type to be used for the burst
88
* \param availableSymbols maximum number of OFDM symbols to be used by the burst
89
* \returns a Burst (list of packets)
90
*/
91
virtual
Ptr<PacketBurst>
CreateUgsBurst
(
ServiceFlow
* serviceFlow,
92
WimaxPhy::ModulationType
modulationType,
93
uint32_t
availableSymbols) = 0;
94
95
/**
96
* \brief Get the base station.
97
* \returns the base station net device
98
*/
99
virtual
Ptr<BaseStationNetDevice>
GetBs
();
100
/**
101
* \brief Set the base station.
102
* \param bs the base station net device
103
*/
104
virtual
void
SetBs
(
Ptr<BaseStationNetDevice>
bs);
105
106
/**
107
* \brief Check if the packet fragmentation is possible for transport connection.
108
* \param connection the downlink connection
109
* \param availableSymbols maximum number of OFDM symbols to be used by the burst
110
* \param modulationType the modulation type to be used for the burst
111
* \returns false if packet fragmentation is not possible, true otherwise
112
*/
113
bool
CheckForFragmentation
(
Ptr<WimaxConnection>
connection,
114
int
availableSymbols,
115
WimaxPhy::ModulationType
modulationType);
116
117
private
:
118
Ptr<BaseStationNetDevice>
m_bs
;
///< base station
119
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>*
m_downlinkBursts
;
///< down link bursts
120
};
121
122
}
// namespace ns3
123
124
#endif
/* BS_SCHEDULER_H */
ns3::BSScheduler
BaseStation Scheduler.
Definition
bs-scheduler.h:37
ns3::BSScheduler::GetDownlinkBursts
virtual std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * GetDownlinkBursts() const =0
This function returns all the downlink bursts scheduled for the next downlink sub-frame.
ns3::BSScheduler::CreateUgsBurst
virtual Ptr< PacketBurst > CreateUgsBurst(ServiceFlow *serviceFlow, WimaxPhy::ModulationType modulationType, uint32_t availableSymbols)=0
Creates a downlink UGS burst.
ns3::BSScheduler::Schedule
virtual void Schedule()=0
the scheduling function for the downlink subframe.
ns3::BSScheduler::~BSScheduler
~BSScheduler() override
Definition
bs-scheduler.cc:56
ns3::BSScheduler::GetBs
virtual Ptr< BaseStationNetDevice > GetBs()
Get the base station.
Definition
bs-scheduler.cc:78
ns3::BSScheduler::SetBs
virtual void SetBs(Ptr< BaseStationNetDevice > bs)
Set the base station.
Definition
bs-scheduler.cc:72
ns3::BSScheduler::SelectConnection
virtual bool SelectConnection(Ptr< WimaxConnection > &connection)=0
Selects a connection from the list of connections having packets to be sent .
ns3::BSScheduler::m_bs
Ptr< BaseStationNetDevice > m_bs
base station
Definition
bs-scheduler.h:118
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::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
bs-scheduler.cc:36
ns3::BSScheduler::BSScheduler
BSScheduler()
Definition
bs-scheduler.cc:44
ns3::BSScheduler::m_downlinkBursts
std::list< std::pair< OfdmDlMapIe *, Ptr< PacketBurst > > > * m_downlinkBursts
down link bursts
Definition
bs-scheduler.h:119
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:84
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::ServiceFlow
This class implements service flows as described by the IEEE-802.16 standard.
Definition
service-flow.h:32
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition
wimax-phy.h:43
uint32_t
dl-mac-messages.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
service-flow.h
wimax-phy.h
src
wimax
model
bs-scheduler.h
Generated on Mon Nov 4 2024 19:38:11 for ns-3 by
1.11.0