A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
bs-uplink-scheduler-simple.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2007,2008 INRIA
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 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
18 */
19
20#ifndef UPLINK_SCHEDULER_SIMPLE_H
21#define UPLINK_SCHEDULER_SIMPLE_H
22
23#include "bs-uplink-scheduler.h"
24#include "service-flow.h"
25#include "ul-mac-messages.h"
26#include "wimax-phy.h"
27
28#include "ns3/nstime.h"
29
30#include <stdint.h>
31
32namespace ns3
33{
34
35class BaseStationNetDevice;
36class SSRecord;
37class ServiceFlow;
38
39/**
40 * \ingroup wimax
41 *
42 * Uplink Scheduler - simplified
43 */
45{
46 public:
48 /**
49 * Constructor
50 *
51 * \param bs base station device
52 */
54 ~UplinkSchedulerSimple() override;
55
56 /**
57 * \brief Get the type ID.
58 * \return the object TypeId
59 */
60 static TypeId GetTypeId();
61
62 std::list<OfdmUlMapIe> GetUplinkAllocations() const override;
63
64 /**
65 * \brief Determines if channel descriptors sent in the current frame are
66 * required to be updated
67 *
68 * \param updateDcd currently unused (assume true)
69 * \param updateUcd currently unused (assume true)
70 * \param [out] sendDcd DCD must be updated
71 * \param [out] sendUcd UCD must be updated
72 *
73 */
74 void GetChannelDescriptorsToUpdate(bool& updateDcd,
75 bool& updateUcd,
76 bool& sendDcd,
77 bool& sendUcd) override;
79 void AddUplinkAllocation(OfdmUlMapIe& ulMapIe,
80 const uint32_t& allocationSize,
81 uint32_t& symbolsToAllocation,
82 uint32_t& availableSymbols) override;
83 void Schedule() override;
84 /**
85 * Service Unsolicited Grants function
86 * \param ssRecord Subscriber station record
87 * \param schedulingType the scheduling type
88 * \param ulMapIe the UL map IE
89 * \param modulationType the modulation type
90 * \param symbolsToAllocation the symbols to allocation
91 * \param availableSymbols the available symbols
92 */
93 void ServiceUnsolicitedGrants(const SSRecord* ssRecord,
94 ServiceFlow::SchedulingType schedulingType,
95 OfdmUlMapIe& ulMapIe,
96 const WimaxPhy::ModulationType modulationType,
97 uint32_t& symbolsToAllocation,
98 uint32_t& availableSymbols) override;
99 /**
100 * Service Bandwidth Requests function
101 * \param ssRecord Subscriber station record
102 * \param schedulingType the scheduling type
103 * \param ulMapIe the UL map IE
104 * \param modulationType the modulation type
105 * \param symbolsToAllocation the symbols to allocation
106 * \param availableSymbols the available symbols
107 */
108 void ServiceBandwidthRequests(const SSRecord* ssRecord,
109 ServiceFlow::SchedulingType schedulingType,
110 OfdmUlMapIe& ulMapIe,
111 const WimaxPhy::ModulationType modulationType,
112 uint32_t& symbolsToAllocation,
113 uint32_t& availableSymbols) override;
114 /**
115 * Service bandwidth requests function
116 * \param serviceFlow the service flow
117 * \param schedulingType the scheduling type
118 * \param ulMapIe the UL map IE
119 * \param modulationType the modulation type
120 * \param symbolsToAllocation the symbols to allocation
121 * \param availableSymbols the available symbols
122 * \returns true if successful
123 */
124 bool ServiceBandwidthRequests(ServiceFlow* serviceFlow,
125 ServiceFlow::SchedulingType schedulingType,
126 OfdmUlMapIe& ulMapIe,
127 const WimaxPhy::ModulationType modulationType,
128 uint32_t& symbolsToAllocation,
129 uint32_t& availableSymbols) override;
130 /**
131 * Allocate Initial Ranging Interval function
132 *
133 * \param symbolsToAllocation symbols to allocation for UpLink Subframe
134 * \param availableSymbols available symbols for rtPS flows
135 */
136 void AllocateInitialRangingInterval(uint32_t& symbolsToAllocation,
137 uint32_t& availableSymbols) override;
138 /**
139 * Setup service flow function
140 * \param ssRecord Subscriber station record
141 * \param serviceFlow the service flow
142 */
143 void SetupServiceFlow(SSRecord* ssRecord, ServiceFlow* serviceFlow) override;
144
145 /**
146 * Process bandwidth request function
147 * \param bwRequestHdr the bandwidth request header
148 */
149 void ProcessBandwidthRequest(const BandwidthRequestHeader& bwRequestHdr) override;
150
151 /// Init once function
152 void InitOnce() override;
153
154 /**
155 * Set requested bandwidth function
156 * \param sfr the service flow record
157 */
158 void OnSetRequestedBandwidth(ServiceFlowRecord* sfr) override;
159
160 private:
161 std::list<OfdmUlMapIe> m_uplinkAllocations; ///< uplink allocations
162};
163
164} // namespace ns3
165
166#endif /* UPLINK_SCHEDULER_SIMPLE_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:77
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
a unique identifier for an interface.
Definition: type-id.h:59
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:54
Every class exported by the ns3 library is enclosed in the ns3 namespace.