A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
bs-uplink-scheduler-simple.h
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);
45  ~UplinkSchedulerSimple (void);
46 
47  static TypeId GetTypeId (void);
48 
49  std::list<OfdmUlMapIe> GetUplinkAllocations (void) const;
50 
55  void GetChannelDescriptorsToUpdate (bool&, bool&, bool&, bool&);
56  uint32_t CalculateAllocationStartTime (void);
57  void AddUplinkAllocation (OfdmUlMapIe &ulMapIe,
58  const uint32_t &allocationSize,
59  uint32_t &symbolsToAllocation,
60  uint32_t &availableSymbols);
61  void Schedule (void);
62  void ServiceUnsolicitedGrants (const SSRecord *ssRecord,
63  enum ServiceFlow::SchedulingType schedulingType,
64  OfdmUlMapIe &ulMapIe,
65  const WimaxPhy::ModulationType modulationType,
66  uint32_t &symbolsToAllocation,
67  uint32_t &availableSymbols);
68  void ServiceBandwidthRequests (const SSRecord *ssRecord,
69  enum ServiceFlow::SchedulingType schedulingType,
70  OfdmUlMapIe &ulMapIe,
71  const WimaxPhy::ModulationType modulationType,
72  uint32_t &symbolsToAllocation,
73  uint32_t &availableSymbols);
74  bool ServiceBandwidthRequests (ServiceFlow *serviceFlow,
75  enum ServiceFlow::SchedulingType schedulingType,
76  OfdmUlMapIe &ulMapIe,
77  const WimaxPhy::ModulationType modulationType,
78  uint32_t &symbolsToAllocation,
79  uint32_t &availableSymbols);
80  void AllocateInitialRangingInterval (uint32_t &symbolsToAllocation, uint32_t &availableSymbols);
81  void SetupServiceFlow (SSRecord *ssRecord, ServiceFlow *serviceFlow);
82 
83  void ProcessBandwidthRequest (const BandwidthRequestHeader &bwRequestHdr);
84 
85  void InitOnce (void);
86 
87  void OnSetRequestedBandwidth (ServiceFlowRecord *sfr);
88 
89 private:
90  std::list<OfdmUlMapIe> m_uplinkAllocations;
91 
92 };
93 
94 } // namespace ns3
95 
96 #endif /* UPLINK_SCHEDULER_SIMPLE_H */
smart pointer class similar to boost::intrusive_ptr
Definition: ptr.h:59
this class implements a structure to manage some parameters and statistics related to a service flow ...
this class implements the bandwidth-request mac Header as described by IEEE Standard for Local and me...
This class is used by the base station to store some information related to subscriber station in the...
Definition: ss-record.h:43
a unique identifier for an interface.
Definition: type-id.h:44