A Discrete-Event Network Simulator
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"
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
35namespace ns3 {
36
37NS_LOG_COMPONENT_DEFINE ("UplinkScheduler");
38
39NS_OBJECT_ENSURE_REGISTERED (UplinkScheduler);
40
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
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
64{
65 m_bs = 0;
66 m_uplinkAllocations.clear ();
67}
68void
70{
71
72}
73
76{
77 static TypeId tid = TypeId ("ns3::UplinkScheduler")
78 .SetParent<Object> ()
79 .SetGroupName("Wimax")
80 ;
81 return tid;
82}
83
84uint8_t
86{
88}
89
90void
91UplinkScheduler::SetNrIrOppsAllocated (uint8_t nrIrOppsAllocated)
92{
93 m_nrIrOppsAllocated = nrIrOppsAllocated;
94}
95
96bool
98{
100}
101
102void
104{
105
106 m_isIrIntrvlAllocated = isIrIntrvlAllocated;
107}
108
109bool
111{
112
114}
115
116void
118{
119 m_isInvIrIntrvlAllocated = isInvIrIntrvlAllocated;
120}
121
122Time
124{
125 return m_dcdTimeStamp;
126}
127
128void
130{
131 m_dcdTimeStamp = dcdTimeStamp;
132}
133
134Time
136{
137 return m_ucdTimeStamp;
138}
139
140void
142{
143 m_ucdTimeStamp = ucdTimeStamp;
144}
145
146std::list<OfdmUlMapIe>
148{
149 return m_uplinkAllocations;
150}
151
152Time
154{
156}
157
158void
160{
161 m_timeStampIrInterval = timeStampIrInterval;
162}
163
166{
167 return m_bs;
168}
169void
171{
172 m_bs = bs;
173}
174} // namespace ns3
A base class which provides memory management and object aggregation.
Definition: object.h:88
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:74
Control the scheduling of simulation events.
Definition: simulator.h:69
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:103
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:922
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:205
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:45
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:287
Time Seconds(double value)
Construct a Time in the indicated unit.
Definition: nstime.h:1244
Every class exported by the ns3 library is enclosed in the ns3 namespace.