A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 NS_LOG_COMPONENT_DEFINE ("UplinkScheduler");
36 
37 namespace ns3 {
38 
39 NS_OBJECT_ENSURE_REGISTERED (UplinkScheduler)
40  ;
41 
43  : m_bs (0),
44  m_timeStampIrInterval (Seconds (0)),
45  m_nrIrOppsAllocated (0),
46  m_isIrIntrvlAllocated (false),
47  m_isInvIrIntrvlAllocated (false),
48  m_dcdTimeStamp (Simulator::Now ()),
49  m_ucdTimeStamp (Simulator::Now ())
50 {
51 }
52 
54  : m_bs (bs),
55  m_timeStampIrInterval (Seconds (0)),
56  m_nrIrOppsAllocated (0),
57  m_isIrIntrvlAllocated (false),
58  m_isInvIrIntrvlAllocated (false),
59  m_dcdTimeStamp (Simulator::Now ()),
60  m_ucdTimeStamp (Simulator::Now ())
61 {
62 }
63 
65 {
66  m_bs = 0;
67  m_uplinkAllocations.clear ();
68 }
69 void
71 {
72 
73 }
74 
75 TypeId
77 {
78  static TypeId tid = TypeId ("ns3::UplinkScheduler")
79  .SetParent<Object> ()
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
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
Control the scheduling of simulation events.
Definition: simulator.h:62
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
Definition: simulator.cc:287
a base class which provides memory management and object aggregation
Definition: object.h:63
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611