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