A Discrete-Event Network Simulator
lorawan @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
j
l
m
n
o
p
q
r
s
t
w
Enumerator
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Symbols
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
e
l
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
▼
ns-3
►
ns-3 Documentation
►
All Environment Variables
Todo List
Deprecated List
Bug List
►
Topics
►
Namespaces
►
Classes
▼
Files
▼
File List
►
doc
►
examples
▼
src
►
antenna
►
aodv
►
applications
►
bridge
►
brite
►
buildings
►
click
►
config-store
►
core
►
csma
►
csma-layout
►
dsdv
►
dsr
►
energy
►
fd-net-device
►
flow-monitor
►
internet
►
internet-apps
►
lorawan
►
lr-wpan
►
lte
►
mesh
►
mobility
►
mpi
►
netanim
►
network
►
nix-vector-routing
►
olsr
►
openflow
►
point-to-point
►
point-to-point-layout
►
propagation
►
sixlowpan
►
spectrum
►
stats
►
tap-bridge
►
test
►
topology-read
►
traffic-control
►
uan
►
virtual-net-device
►
visualizer
►
wifi
▼
wimax
►
examples
►
helper
▼
model
bandwidth-manager.cc
bandwidth-manager.h
bs-link-manager.cc
bs-link-manager.h
bs-net-device.cc
bs-net-device.h
bs-scheduler-rtps.cc
bs-scheduler-rtps.h
bs-scheduler-simple.cc
bs-scheduler-simple.h
bs-scheduler.cc
bs-scheduler.h
bs-service-flow-manager.cc
bs-service-flow-manager.h
bs-uplink-scheduler-mbqos.cc
bs-uplink-scheduler-mbqos.h
bs-uplink-scheduler-rtps.cc
bs-uplink-scheduler-rtps.h
bs-uplink-scheduler-simple.cc
bs-uplink-scheduler-simple.h
bs-uplink-scheduler.cc
bs-uplink-scheduler.h
burst-profile-manager.cc
burst-profile-manager.h
►
bvec.h
cid-factory.cc
cid-factory.h
►
cid.cc
►
cid.h
connection-manager.cc
connection-manager.h
►
crc8.cc
►
crc8.h
cs-parameters.cc
cs-parameters.h
default-traces.h
dl-mac-messages.cc
►
dl-mac-messages.h
ipcs-classifier-record.cc
►
ipcs-classifier-record.h
ipcs-classifier.cc
ipcs-classifier.h
mac-messages.cc
►
mac-messages.h
ofdm-downlink-frame-prefix.cc
►
ofdm-downlink-frame-prefix.h
send-params.cc
►
send-params.h
service-flow-manager.cc
service-flow-manager.h
service-flow-record.cc
service-flow-record.h
service-flow.cc
service-flow.h
simple-ofdm-send-param.cc
simple-ofdm-send-param.h
simple-ofdm-wimax-channel.cc
simple-ofdm-wimax-channel.h
simple-ofdm-wimax-phy.cc
simple-ofdm-wimax-phy.h
snr-to-block-error-rate-manager.cc
snr-to-block-error-rate-manager.h
snr-to-block-error-rate-record.cc
snr-to-block-error-rate-record.h
ss-link-manager.cc
ss-link-manager.h
ss-manager.cc
ss-manager.h
ss-net-device.cc
ss-net-device.h
ss-record.cc
ss-record.h
ss-scheduler.cc
ss-scheduler.h
ss-service-flow-manager.cc
ss-service-flow-manager.h
►
ul-job.cc
►
ul-job.h
ul-mac-messages.cc
►
ul-mac-messages.h
wimax-channel.cc
wimax-channel.h
wimax-connection.cc
wimax-connection.h
wimax-mac-header.cc
►
wimax-mac-header.h
wimax-mac-queue.cc
►
wimax-mac-queue.h
wimax-mac-to-mac-header.cc
wimax-mac-to-mac-header.h
wimax-net-device.cc
wimax-net-device.h
wimax-phy.cc
wimax-phy.h
wimax-tlv.cc
►
wimax-tlv.h
►
test
►
zigbee
►
utils
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
bs-scheduler.cc
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
#include "
bs-scheduler.h
"
10
11
#include "
bs-net-device.h
"
12
#include "
burst-profile-manager.h
"
13
#include "
cid.h
"
14
#include "
connection-manager.h
"
15
#include "
service-flow-manager.h
"
16
#include "
service-flow-record.h
"
17
#include "
service-flow.h
"
18
#include "
ss-manager.h
"
19
#include "
ss-record.h
"
20
#include "
wimax-connection.h
"
21
#include "
wimax-mac-header.h
"
22
#include "
wimax-mac-queue.h
"
23
24
#include "ns3/log.h"
25
#include "ns3/packet-burst.h"
26
#include "ns3/simulator.h"
27
28
namespace
ns3
29
{
30
31
NS_LOG_COMPONENT_DEFINE
(
"BSScheduler"
);
32
33
NS_OBJECT_ENSURE_REGISTERED
(BSScheduler);
34
35
TypeId
36
BSScheduler::GetTypeId
()
37
{
38
static
TypeId
tid =
TypeId
(
"ns3::BSScheduler"
).
SetParent
<
Object
>().SetGroupName(
"Wimax"
)
39
// No AddConstructor because this is an abstract class.
40
;
41
return
tid;
42
}
36
BSScheduler::GetTypeId
() {
…
}
43
44
BSScheduler::BSScheduler
()
45
: m_downlinkBursts(new
std
::list<
std
::pair<
OfdmDlMapIe
*,
Ptr
<
PacketBurst
>>>())
46
{
47
// m_downlinkBursts is filled by AddDownlinkBurst and emptied by
48
// wimax-bs-net-device::sendBurst and wimax-ss-net-device::sendBurst
49
}
44
BSScheduler::BSScheduler
() {
…
}
50
51
BSScheduler::BSScheduler
(
Ptr<BaseStationNetDevice>
bs)
52
: m_downlinkBursts(new
std
::list<
std
::pair<
OfdmDlMapIe
*,
Ptr
<
PacketBurst
>>>())
53
{
54
}
51
BSScheduler::BSScheduler
(
Ptr<BaseStationNetDevice>
bs) {
…
}
55
56
BSScheduler::~BSScheduler
()
57
{
58
std::list<std::pair<OfdmDlMapIe*, Ptr<PacketBurst>>>* downlinkBursts =
m_downlinkBursts
;
59
std::pair<OfdmDlMapIe*, Ptr<PacketBurst>> pair;
60
while
(!downlinkBursts->empty())
61
{
62
pair = downlinkBursts->front();
63
pair.second =
nullptr
;
64
delete
pair.first;
65
}
66
SetBs
(
nullptr
);
67
delete
m_downlinkBursts
;
68
m_downlinkBursts
=
nullptr
;
69
}
56
BSScheduler::~BSScheduler
() {
…
}
70
71
void
72
BSScheduler::SetBs
(
Ptr<BaseStationNetDevice>
bs)
73
{
74
m_bs
= bs;
75
}
72
BSScheduler::SetBs
(
Ptr<BaseStationNetDevice>
bs) {
…
}
76
77
Ptr<BaseStationNetDevice>
78
BSScheduler::GetBs
()
79
{
80
return
m_bs
;
81
}
78
BSScheduler::GetBs
() {
…
}
82
83
bool
84
BSScheduler::CheckForFragmentation
(
Ptr<WimaxConnection>
connection,
85
int
availableSymbols,
86
WimaxPhy::ModulationType
modulationType)
87
{
88
NS_LOG_INFO
(
"BS Scheduler, CheckForFragmentation"
);
89
if
(connection->GetType() !=
Cid::TRANSPORT
)
90
{
91
NS_LOG_INFO
(
"\t No Transport connection, Fragmentation IS NOT possible"
);
92
return
false
;
93
}
94
uint32_t
availableByte =
GetBs
()->GetPhy()->GetNrBytes(availableSymbols, modulationType);
95
96
uint32_t
headerSize =
97
connection->GetQueue()->GetFirstPacketHdrSize(
MacHeaderType::HEADER_TYPE_GENERIC
);
98
NS_LOG_INFO
(
"\t availableByte = "
<< availableByte <<
" headerSize = "
<< headerSize);
99
100
if
(availableByte > headerSize)
101
{
102
NS_LOG_INFO
(
"\t Fragmentation IS possible"
);
103
return
true
;
104
}
105
else
106
{
107
NS_LOG_INFO
(
"\t Fragmentation IS NOT possible"
);
108
return
false
;
109
}
110
}
84
BSScheduler::CheckForFragmentation
(
Ptr<WimaxConnection>
connection, {
…
}
111
}
// namespace ns3
bs-net-device.h
bs-scheduler.h
burst-profile-manager.h
cid.h
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::m_bs
Ptr< BaseStationNetDevice > m_bs
base station
Definition
bs-scheduler.h:118
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::Cid::TRANSPORT
@ TRANSPORT
Definition
cid.h:35
ns3::MacHeaderType::HEADER_TYPE_GENERIC
@ HEADER_TYPE_GENERIC
Definition
wimax-mac-header.h:32
ns3::Object
A base class which provides memory management and object aggregation.
Definition
object.h:78
ns3::OfdmDlMapIe
This class implements the OFDM DL-MAP information element as described by "IEEE Standard forLocal and...
Definition
dl-mac-messages.h:449
ns3::PacketBurst
this class implement a burst as a list of packets
Definition
packet-burst.h:26
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::WimaxPhy::ModulationType
ModulationType
ModulationType enumeration.
Definition
wimax-phy.h:43
uint32_t
connection-manager.h
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition
log.h:191
NS_LOG_INFO
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Definition
log.h:264
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std
STL namespace.
service-flow-manager.h
service-flow-record.h
service-flow.h
ss-manager.h
ss-record.h
wimax-connection.h
wimax-mac-header.h
wimax-mac-queue.h
src
wimax
model
bs-scheduler.cc
Generated on Tue Apr 8 2025 15:27:21 for ns-3 by
1.11.0