A Discrete-Event Network Simulator
API
bs-uplink-scheduler.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_H
22 #define UPLINK_SCHEDULER_H
23 
24 #include <stdint.h>
25 #include "ul-mac-messages.h"
26 #include "ns3/nstime.h"
27 #include "wimax-phy.h"
28 #include "service-flow-record.h"
29 #include "service-flow.h"
30 
31 namespace ns3 {
32 
33 class BaseStationNetDevice;
34 class SSRecord;
35 class ServiceFlow;
36 class ServiceFlowRecord;
37 
42 class UplinkScheduler : public Object
43 {
44 public:
45  UplinkScheduler (void);
52  virtual ~UplinkScheduler (void);
53 
58  static TypeId GetTypeId (void);
59 
63  virtual uint8_t GetNrIrOppsAllocated (void) const;
68  virtual void SetNrIrOppsAllocated (uint8_t nrIrOppsAllocated);
69 
73  virtual bool GetIsIrIntrvlAllocated (void) const;
78  virtual void SetIsIrIntrvlAllocated (bool isIrIntrvlAllocated);
79 
83  virtual bool GetIsInvIrIntrvlAllocated (void) const;
88  virtual void SetIsInvIrIntrvlAllocated (bool isInvIrIntrvlAllocated);
89 
93  virtual std::list<OfdmUlMapIe> GetUplinkAllocations (void) const;
94 
98  virtual Time GetTimeStampIrInterval (void);
103  virtual void SetTimeStampIrInterval (Time timeStampIrInterval);
104 
108  virtual Time GetDcdTimeStamp (void) const;
113  virtual void SetDcdTimeStamp (Time dcdTimeStamp);
114 
118  virtual Time GetUcdTimeStamp (void) const;
123  virtual void SetUcdTimeStamp (Time ucdTimeStamp);
124 
128  virtual Ptr<BaseStationNetDevice> GetBs (void);
133  virtual void SetBs (Ptr<BaseStationNetDevice> bs);
138  virtual void GetChannelDescriptorsToUpdate (bool&, bool&, bool&, bool&) = 0;
142  virtual uint32_t CalculateAllocationStartTime (void) = 0;
150  virtual void AddUplinkAllocation (OfdmUlMapIe &ulMapIe,
151  const uint32_t &allocationSize,
152  uint32_t &symbolsToAllocation,
153  uint32_t &availableSymbols) = 0;
157  virtual void Schedule (void) = 0;
167  virtual void ServiceUnsolicitedGrants (const SSRecord *ssRecord,
168  enum ServiceFlow::SchedulingType schedulingType,
169  OfdmUlMapIe &ulMapIe,
170  const WimaxPhy::ModulationType modulationType,
171  uint32_t &symbolsToAllocation,
172  uint32_t &availableSymbols) = 0;
182  virtual void ServiceBandwidthRequests (const SSRecord *ssRecord,
183  enum ServiceFlow::SchedulingType schedulingType,
184  OfdmUlMapIe &ulMapIe,
185  const WimaxPhy::ModulationType modulationType,
186  uint32_t &symbolsToAllocation,
187  uint32_t &availableSymbols) = 0;
198  virtual bool ServiceBandwidthRequests (ServiceFlow *serviceFlow,
199  enum ServiceFlow::SchedulingType schedulingType,
200  OfdmUlMapIe &ulMapIe,
201  const WimaxPhy::ModulationType modulationType,
202  uint32_t &symbolsToAllocation,
203  uint32_t &availableSymbols) = 0;
209  virtual void AllocateInitialRangingInterval (uint32_t &symbolsToAllocation, uint32_t &availableSymbols) = 0;
215  virtual void SetupServiceFlow (SSRecord *ssRecord, ServiceFlow *serviceFlow) = 0;
220  virtual void ProcessBandwidthRequest (const BandwidthRequestHeader &bwRequestHdr) = 0;
221 
225  virtual void InitOnce (void) = 0;
226 
231  virtual void OnSetRequestedBandwidth (ServiceFlowRecord *sfr) = 0;
232 
233 private:
235  std::list<OfdmUlMapIe> m_uplinkAllocations;
242 };
243 
244 } // namespace ns3
245 
246 #endif /* UPLINK_SCHEDULER_H */
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
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
A base class which provides memory management and object aggregation.
Definition: object.h:87
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