A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bs-uplink-scheduler-mbqos.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2009 INRIA/LRC - Computer Networks Laboratory
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Authors: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 * Flavio Kobuta <flaviokubota@gmail.com>
19 *
20 */
21
22#ifndef UPLINK_SCHEDULER_MBQOS_H
23#define UPLINK_SCHEDULER_MBQOS_H
24
25#include "bs-uplink-scheduler.h"
26#include "service-flow-record.h"
27#include "service-flow.h"
28#include "ul-job.h"
29#include "ul-mac-messages.h"
30#include "wimax-phy.h"
31
32#include "ns3/nstime.h"
33#include "ns3/object.h"
34
35#include <stdint.h>
36
37namespace ns3
38{
39
40class BaseStationNetDevice;
41class SSRecord;
42class ServiceFlow;
43class ServiceFlowRecord;
44class UlJob;
45
73{
74 public:
82 ~UplinkSchedulerMBQoS() override;
83
88 static TypeId GetTypeId();
89
94 std::list<OfdmUlMapIe> GetUplinkAllocations() const override;
95
104 void GetChannelDescriptorsToUpdate(bool& updateDcd,
105 bool& updateUcd,
106 bool& sendDcd,
107 bool& sendUcd) override;
120 void AddUplinkAllocation(OfdmUlMapIe& ulMapIe,
121 const uint32_t& allocationSize,
122 uint32_t& symbolsToAllocation,
123 uint32_t& availableSymbols) override;
124
128 void Schedule() override;
138 void ServiceUnsolicitedGrants(const SSRecord* ssRecord,
139 ServiceFlow::SchedulingType schedulingType,
140 OfdmUlMapIe& ulMapIe,
141 const WimaxPhy::ModulationType modulationType,
142 uint32_t& symbolsToAllocation,
143 uint32_t& availableSymbols) override;
153 void ServiceBandwidthRequests(const SSRecord* ssRecord,
154 ServiceFlow::SchedulingType schedulingType,
155 OfdmUlMapIe& ulMapIe,
156 const WimaxPhy::ModulationType modulationType,
157 uint32_t& symbolsToAllocation,
158 uint32_t& availableSymbols) override;
169 bool ServiceBandwidthRequests(ServiceFlow* serviceFlow,
170 ServiceFlow::SchedulingType schedulingType,
171 OfdmUlMapIe& ulMapIe,
172 const WimaxPhy::ModulationType modulationType,
173 uint32_t& symbolsToAllocation,
174 uint32_t& availableSymbols) override;
180 void AllocateInitialRangingInterval(uint32_t& symbolsToAllocation,
181 uint32_t& availableSymbols) override;
187 void SetupServiceFlow(SSRecord* ssRecord, ServiceFlow* serviceFlow) override;
188
199 void CheckDeadline(uint32_t& availableSymbols);
200
210 void CheckMinimumBandwidth(uint32_t& availableSymbols);
211
217
224 void EnqueueJob(UlJob::JobPriority priority, Ptr<UlJob> job);
225
233
234 void ProcessBandwidthRequest(const BandwidthRequestHeader& bwRequestHdr) override;
235
242 Time DetermineDeadline(ServiceFlow* serviceFlow);
243
247 void InitOnce() override;
248
255 uint32_t CountSymbolsQueue(std::list<Ptr<UlJob>> jobs);
256
264
269 void OnSetRequestedBandwidth(ServiceFlowRecord* sfr) override;
270
281 ReqType reqType);
282
289 uint32_t GetPendingSize(ServiceFlow* serviceFlow);
290
303 ServiceFlow::SchedulingType schedulingType,
304 OfdmUlMapIe& ulMapIe,
305 const WimaxPhy::ModulationType modulationType,
306 uint32_t& symbolsToAllocation,
307 uint32_t& availableSymbols,
308 uint32_t allocationSizeBytes);
309
310 private:
311 std::list<OfdmUlMapIe> m_uplinkAllocations;
312
313 // queues for scheduler
314 std::list<Ptr<UlJob>> m_uplinkJobs_high;
315 std::list<Ptr<UlJob>> m_uplinkJobs_inter;
316 std::list<Ptr<UlJob>> m_uplinkJobs_low;
317
318 // interval to reset window
320};
321
322} // namespace ns3
323
324#endif /* UPLINK_SCHEDULER_MBQOS_H */
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:46
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:43
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:62
this class implements a structure to manage some parameters and statistics related to a service flow
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
a unique identifier for an interface.
Definition: type-id.h:59
JobPriority
Job priority enumeration.
Definition: ul-job.h:54
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ReqType
Request type enumeration.
Definition: ul-job.h:40