A Discrete-Event Network Simulator
API
bs-uplink-scheduler-simple.h
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 #ifndef UPLINK_SCHEDULER_SIMPLE_H
22 #define UPLINK_SCHEDULER_SIMPLE_H
23 
24 #include <stdint.h>
25 #include "ul-mac-messages.h"
26 #include "ns3/nstime.h"
27 #include "wimax-phy.h"
28 #include "bs-uplink-scheduler.h"
29 #include "service-flow.h"
30 
31 namespace ns3 {
32 
33 class BaseStationNetDevice;
34 class SSRecord;
35 class ServiceFlow;
36 
41 {
42 public:
43  UplinkSchedulerSimple (void);
51 
56  static TypeId GetTypeId (void);
57 
58  std::list<OfdmUlMapIe> GetUplinkAllocations (void) const;
59 
70  void GetChannelDescriptorsToUpdate (bool& updateDcd, bool& updateUcd, bool& sendDcd, bool& sendUcd);
71  uint32_t CalculateAllocationStartTime (void);
72  void AddUplinkAllocation (OfdmUlMapIe &ulMapIe,
73  const uint32_t &allocationSize,
74  uint32_t &symbolsToAllocation,
75  uint32_t &availableSymbols);
76  void Schedule (void);
86  void ServiceUnsolicitedGrants (const SSRecord *ssRecord,
87  enum ServiceFlow::SchedulingType schedulingType,
88  OfdmUlMapIe &ulMapIe,
89  const WimaxPhy::ModulationType modulationType,
90  uint32_t &symbolsToAllocation,
91  uint32_t &availableSymbols);
101  void ServiceBandwidthRequests (const SSRecord *ssRecord,
102  enum ServiceFlow::SchedulingType schedulingType,
103  OfdmUlMapIe &ulMapIe,
104  const WimaxPhy::ModulationType modulationType,
105  uint32_t &symbolsToAllocation,
106  uint32_t &availableSymbols);
117  bool ServiceBandwidthRequests (ServiceFlow *serviceFlow,
118  enum ServiceFlow::SchedulingType schedulingType,
119  OfdmUlMapIe &ulMapIe,
120  const WimaxPhy::ModulationType modulationType,
121  uint32_t &symbolsToAllocation,
122  uint32_t &availableSymbols);
129  void AllocateInitialRangingInterval (uint32_t &symbolsToAllocation, uint32_t &availableSymbols);
135  void SetupServiceFlow (SSRecord *ssRecord, ServiceFlow *serviceFlow);
136 
141  void ProcessBandwidthRequest (const BandwidthRequestHeader &bwRequestHdr);
142 
144  void InitOnce (void);
145 
151 
152 private:
153  std::list<OfdmUlMapIe> m_uplinkAllocations;
154 
155 };
156 
157 } // namespace ns3
158 
159 #endif /* UPLINK_SCHEDULER_SIMPLE_H */
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
this class implements a structure to manage some parameters and statistics related to a service flow ...
SchedulingType
section 11.13.11 Service flow scheduling type, page 701
Definition: service-flow.h:58
Every class exported by the ns3 library is enclosed in the ns3 namespace.
This class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
This class implements service flows as described by the IEEE-802.16 standard.
Definition: service-flow.h:39
ModulationType
ModulationType enumeration.
Definition: wimax-phy.h:49
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:43
This class implements the UL-MAP_IE message as described by "IEEE Standard for Local and metropolitan...
a unique identifier for an interface.
Definition: type-id.h:58