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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
7 */
8
9#ifndef UPLINK_SCHEDULER_SIMPLE_H
10#define UPLINK_SCHEDULER_SIMPLE_H
11
12#include "bs-uplink-scheduler.h"
13#include "service-flow.h"
14#include "ul-mac-messages.h"
15#include "wimax-phy.h"
16
17#include "ns3/nstime.h"
18
19#include <stdint.h>
20
21namespace ns3
22{
23
24class BaseStationNetDevice;
25class SSRecord;
26class ServiceFlow;
27
28/**
29 * \ingroup wimax
30 *
31 * Uplink Scheduler - simplified
32 */
34{
35 public:
37 /**
38 * Constructor
39 *
40 * \param bs base station device
41 */
43 ~UplinkSchedulerSimple() override;
44
45 /**
46 * \brief Get the type ID.
47 * \return the object TypeId
48 */
49 static TypeId GetTypeId();
50
51 std::list<OfdmUlMapIe> GetUplinkAllocations() const override;
52
53 /**
54 * \brief Determines if channel descriptors sent in the current frame are
55 * required to be updated
56 *
57 * \param updateDcd currently unused (assume true)
58 * \param updateUcd currently unused (assume true)
59 * \param [out] sendDcd DCD must be updated
60 * \param [out] sendUcd UCD must be updated
61 *
62 */
63 void GetChannelDescriptorsToUpdate(bool& updateDcd,
64 bool& updateUcd,
65 bool& sendDcd,
66 bool& sendUcd) override;
68 void AddUplinkAllocation(OfdmUlMapIe& ulMapIe,
69 const uint32_t& allocationSize,
70 uint32_t& symbolsToAllocation,
71 uint32_t& availableSymbols) override;
72 void Schedule() override;
73 /**
74 * Service Unsolicited Grants function
75 * \param ssRecord Subscriber station record
76 * \param schedulingType the scheduling type
77 * \param ulMapIe the UL map IE
78 * \param modulationType the modulation type
79 * \param symbolsToAllocation the symbols to allocation
80 * \param availableSymbols the available symbols
81 */
82 void ServiceUnsolicitedGrants(const SSRecord* ssRecord,
83 ServiceFlow::SchedulingType schedulingType,
84 OfdmUlMapIe& ulMapIe,
85 const WimaxPhy::ModulationType modulationType,
86 uint32_t& symbolsToAllocation,
87 uint32_t& availableSymbols) override;
88 /**
89 * Service Bandwidth Requests function
90 * \param ssRecord Subscriber station record
91 * \param schedulingType the scheduling type
92 * \param ulMapIe the UL map IE
93 * \param modulationType the modulation type
94 * \param symbolsToAllocation the symbols to allocation
95 * \param availableSymbols the available symbols
96 */
97 void ServiceBandwidthRequests(const SSRecord* ssRecord,
98 ServiceFlow::SchedulingType schedulingType,
99 OfdmUlMapIe& ulMapIe,
100 const WimaxPhy::ModulationType modulationType,
101 uint32_t& symbolsToAllocation,
102 uint32_t& availableSymbols) override;
103 /**
104 * Service bandwidth requests function
105 * \param serviceFlow the service flow
106 * \param schedulingType the scheduling type
107 * \param ulMapIe the UL map IE
108 * \param modulationType the modulation type
109 * \param symbolsToAllocation the symbols to allocation
110 * \param availableSymbols the available symbols
111 * \returns true if successful
112 */
113 bool ServiceBandwidthRequests(ServiceFlow* serviceFlow,
114 ServiceFlow::SchedulingType schedulingType,
115 OfdmUlMapIe& ulMapIe,
116 const WimaxPhy::ModulationType modulationType,
117 uint32_t& symbolsToAllocation,
118 uint32_t& availableSymbols) override;
119 /**
120 * Allocate Initial Ranging Interval function
121 *
122 * \param symbolsToAllocation symbols to allocation for UpLink Subframe
123 * \param availableSymbols available symbols for rtPS flows
124 */
125 void AllocateInitialRangingInterval(uint32_t& symbolsToAllocation,
126 uint32_t& availableSymbols) override;
127 /**
128 * Setup service flow function
129 * \param ssRecord Subscriber station record
130 * \param serviceFlow the service flow
131 */
132 void SetupServiceFlow(SSRecord* ssRecord, ServiceFlow* serviceFlow) override;
133
134 /**
135 * Process bandwidth request function
136 * \param bwRequestHdr the bandwidth request header
137 */
138 void ProcessBandwidthRequest(const BandwidthRequestHeader& bwRequestHdr) override;
139
140 /// Init once function
141 void InitOnce() override;
142
143 /**
144 * Set requested bandwidth function
145 * \param sfr the service flow record
146 */
147 void OnSetRequestedBandwidth(ServiceFlowRecord* sfr) override;
148
149 private:
150 std::list<OfdmUlMapIe> m_uplinkAllocations; ///< uplink allocations
151};
152
153} // namespace ns3
154
155#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 forLocal and metropolitan ...
Smart pointer class similar to boost::intrusive_ptr.
This class is used by the base station to store some information related to subscriber station in the...
Definition ss-record.h:35
This class implements service flows as described by the IEEE-802.16 standard.
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
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:48
ModulationType
ModulationType enumeration.
Definition wimax-phy.h:43
Every class exported by the ns3 library is enclosed in the ns3 namespace.