A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
bs-uplink-scheduler.cc
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
#include "
bs-uplink-scheduler.h
"
22
#include "
bs-net-device.h
"
23
#include "ns3/simulator.h"
24
#include "
cid.h
"
25
#include "
burst-profile-manager.h
"
26
#include "
ss-manager.h
"
27
#include "ns3/log.h"
28
#include "ns3/uinteger.h"
29
#include "
ss-record.h
"
30
#include "
service-flow.h
"
31
#include "
service-flow-record.h
"
32
#include "
bs-link-manager.h
"
33
#include "
bandwidth-manager.h
"
34
35
namespace
ns3
{
36
37
NS_LOG_COMPONENT_DEFINE
(
"UplinkScheduler"
);
38
39
NS_OBJECT_ENSURE_REGISTERED
(UplinkScheduler);
40
41
UplinkScheduler::UplinkScheduler
(
void
)
42
: m_bs (0),
43
m_timeStampIrInterval (
Seconds
(0)),
44
m_nrIrOppsAllocated (0),
45
m_isIrIntrvlAllocated (false),
46
m_isInvIrIntrvlAllocated (false),
47
m_dcdTimeStamp (
Simulator
::
Now
()),
48
m_ucdTimeStamp (
Simulator
::
Now
())
49
{
50
}
51
52
UplinkScheduler::UplinkScheduler
(
Ptr<BaseStationNetDevice>
bs)
53
: m_bs (bs),
54
m_timeStampIrInterval (
Seconds
(0)),
55
m_nrIrOppsAllocated (0),
56
m_isIrIntrvlAllocated (false),
57
m_isInvIrIntrvlAllocated (false),
58
m_dcdTimeStamp (
Simulator
::
Now
()),
59
m_ucdTimeStamp (
Simulator
::
Now
())
60
{
61
}
62
63
UplinkScheduler::~UplinkScheduler
(
void
)
64
{
65
m_bs
= 0;
66
m_uplinkAllocations
.clear ();
67
}
68
void
69
UplinkScheduler::InitOnce
()
70
{
71
72
}
73
74
TypeId
75
UplinkScheduler::GetTypeId
(
void
)
76
{
77
static
TypeId
tid =
TypeId
(
"ns3::UplinkScheduler"
)
78
.
SetParent
<
Object
> ()
79
.SetGroupName(
"Wimax"
)
80
;
81
return
tid;
82
}
83
84
uint8_t
85
UplinkScheduler::GetNrIrOppsAllocated
(
void
)
const
86
{
87
return
m_nrIrOppsAllocated
;
88
}
89
90
void
91
UplinkScheduler::SetNrIrOppsAllocated
(uint8_t nrIrOppsAllocated)
92
{
93
m_nrIrOppsAllocated
= nrIrOppsAllocated;
94
}
95
96
bool
97
UplinkScheduler::GetIsIrIntrvlAllocated
(
void
)
const
98
{
99
return
m_isIrIntrvlAllocated
;
100
}
101
102
void
103
UplinkScheduler::SetIsIrIntrvlAllocated
(
bool
isIrIntrvlAllocated)
104
{
105
106
m_isIrIntrvlAllocated
= isIrIntrvlAllocated;
107
}
108
109
bool
110
UplinkScheduler::GetIsInvIrIntrvlAllocated
(
void
)
const
111
{
112
113
return
m_isInvIrIntrvlAllocated
;
114
}
115
116
void
117
UplinkScheduler::SetIsInvIrIntrvlAllocated
(
bool
isInvIrIntrvlAllocated)
118
{
119
m_isInvIrIntrvlAllocated
= isInvIrIntrvlAllocated;
120
}
121
122
Time
123
UplinkScheduler::GetDcdTimeStamp
(
void
)
const
124
{
125
return
m_dcdTimeStamp
;
126
}
127
128
void
129
UplinkScheduler::SetDcdTimeStamp
(
Time
dcdTimeStamp)
130
{
131
m_dcdTimeStamp
= dcdTimeStamp;
132
}
133
134
Time
135
UplinkScheduler::GetUcdTimeStamp
(
void
)
const
136
{
137
return
m_ucdTimeStamp
;
138
}
139
140
void
141
UplinkScheduler::SetUcdTimeStamp
(
Time
ucdTimeStamp)
142
{
143
m_ucdTimeStamp
= ucdTimeStamp;
144
}
145
146
std::list<OfdmUlMapIe>
147
UplinkScheduler::GetUplinkAllocations
(
void
)
const
148
{
149
return
m_uplinkAllocations
;
150
}
151
152
Time
153
UplinkScheduler::GetTimeStampIrInterval
(
void
)
154
{
155
return
m_timeStampIrInterval
;
156
}
157
158
void
159
UplinkScheduler::SetTimeStampIrInterval
(
Time
timeStampIrInterval)
160
{
161
m_timeStampIrInterval
= timeStampIrInterval;
162
}
163
164
Ptr<BaseStationNetDevice>
165
UplinkScheduler::GetBs
(
void
)
166
{
167
return
m_bs
;
168
}
169
void
170
UplinkScheduler::SetBs
(
Ptr<BaseStationNetDevice>
bs)
171
{
172
m_bs
= bs;
173
}
174
}
// namespace ns3
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
NS_LOG_COMPONENT_DEFINE
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition:
log.h:205
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:45
ns3::UplinkScheduler::m_dcdTimeStamp
Time m_dcdTimeStamp
DCD timestamp.
Definition:
bs-uplink-scheduler.h:240
ns3::UplinkScheduler::GetUcdTimeStamp
virtual Time GetUcdTimeStamp(void) const
Definition:
bs-uplink-scheduler.cc:135
bandwidth-manager.h
ns3::UplinkScheduler::~UplinkScheduler
virtual ~UplinkScheduler(void)
Definition:
bs-uplink-scheduler.cc:63
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::UplinkScheduler::UplinkScheduler
UplinkScheduler(void)
Definition:
bs-uplink-scheduler.cc:41
ns3::UplinkScheduler::GetDcdTimeStamp
virtual Time GetDcdTimeStamp(void) const
Definition:
bs-uplink-scheduler.cc:123
ns3::UplinkScheduler::GetIsIrIntrvlAllocated
virtual bool GetIsIrIntrvlAllocated(void) const
Definition:
bs-uplink-scheduler.cc:97
ns3::UplinkScheduler::SetNrIrOppsAllocated
virtual void SetNrIrOppsAllocated(uint8_t nrIrOppsAllocated)
Set the number of IR opps allocated.
Definition:
bs-uplink-scheduler.cc:91
ns3::UplinkScheduler::InitOnce
virtual void InitOnce(void)=0
one time initialization function
Definition:
bs-uplink-scheduler.cc:69
ns3::UplinkScheduler::m_bs
Ptr< BaseStationNetDevice > m_bs
the base station
Definition:
bs-uplink-scheduler.h:234
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:923
ns3::UplinkScheduler::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
bs-uplink-scheduler.cc:75
bs-link-manager.h
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
ns3::UplinkScheduler::SetUcdTimeStamp
virtual void SetUcdTimeStamp(Time ucdTimeStamp)
Set UCD timestamp.
Definition:
bs-uplink-scheduler.cc:141
ns3::Now
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition:
simulator.cc:287
ns3::UplinkScheduler::GetUplinkAllocations
virtual std::list< OfdmUlMapIe > GetUplinkAllocations(void) const
Definition:
bs-uplink-scheduler.cc:147
ns3::UplinkScheduler::GetNrIrOppsAllocated
virtual uint8_t GetNrIrOppsAllocated(void) const
Definition:
bs-uplink-scheduler.cc:85
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
ns3::UplinkScheduler::SetTimeStampIrInterval
virtual void SetTimeStampIrInterval(Time timeStampIrInterval)
Set timestamp IR interval.
Definition:
bs-uplink-scheduler.cc:159
ns3::UplinkScheduler::GetBs
virtual Ptr< BaseStationNetDevice > GetBs(void)
Definition:
bs-uplink-scheduler.cc:165
ns3::UplinkScheduler::m_isInvIrIntrvlAllocated
bool m_isInvIrIntrvlAllocated
is Inv IR interval allocated
Definition:
bs-uplink-scheduler.h:239
ns3::UplinkScheduler::m_isIrIntrvlAllocated
bool m_isIrIntrvlAllocated
is IR interval allocated
Definition:
bs-uplink-scheduler.h:238
ns3::UplinkScheduler::m_timeStampIrInterval
Time m_timeStampIrInterval
timestamp IR interval
Definition:
bs-uplink-scheduler.h:236
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:104
ns3::UplinkScheduler::SetBs
virtual void SetBs(Ptr< BaseStationNetDevice > bs)
Set base station device.
Definition:
bs-uplink-scheduler.cc:170
service-flow.h
bs-uplink-scheduler.h
ns3::UplinkScheduler::m_nrIrOppsAllocated
uint8_t m_nrIrOppsAllocated
number IR opps allocated
Definition:
bs-uplink-scheduler.h:237
cid.h
ns3::UplinkScheduler::GetTimeStampIrInterval
virtual Time GetTimeStampIrInterval(void)
Definition:
bs-uplink-scheduler.cc:153
ss-record.h
ns3::Seconds
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition:
nstime.h:1289
ns3::Simulator
Control the scheduling of simulation events.
Definition:
simulator.h:69
ns3::UplinkScheduler::GetIsInvIrIntrvlAllocated
virtual bool GetIsInvIrIntrvlAllocated(void) const
Definition:
bs-uplink-scheduler.cc:110
ns3::UplinkScheduler::m_ucdTimeStamp
Time m_ucdTimeStamp
UCD timestamp.
Definition:
bs-uplink-scheduler.h:241
ns3::UplinkScheduler::m_uplinkAllocations
std::list< OfdmUlMapIe > m_uplinkAllocations
uplink allocations
Definition:
bs-uplink-scheduler.h:235
ss-manager.h
service-flow-record.h
ns3::UplinkScheduler::SetDcdTimeStamp
virtual void SetDcdTimeStamp(Time dcdTimeStamp)
Set DCD timestamp.
Definition:
bs-uplink-scheduler.cc:129
bs-net-device.h
ns3::UplinkScheduler::SetIsIrIntrvlAllocated
virtual void SetIsIrIntrvlAllocated(bool isIrIntrvlAllocated)
Set if the IR interval is allocated.
Definition:
bs-uplink-scheduler.cc:103
burst-profile-manager.h
ns3::UplinkScheduler::SetIsInvIrIntrvlAllocated
virtual void SetIsInvIrIntrvlAllocated(bool isInvIrIntrvlAllocated)
Set if the Inv IR interval is allocated.
Definition:
bs-uplink-scheduler.cc:117
src
wimax
model
bs-uplink-scheduler.cc
Generated on Fri Oct 1 2021 17:03:53 for ns-3 by
1.8.20