/usr/include/ns3.27/ns3/bs-uplink-scheduler.h is in libns3-dev 3.27+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
* Copyright (c) 2007,2008 INRIA
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation;
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author: Jahanzeb Farooq <jahanzeb.farooq@sophia.inria.fr>
*/
#ifndef UPLINK_SCHEDULER_H
#define UPLINK_SCHEDULER_H
#include <stdint.h>
#include "ul-mac-messages.h"
#include "ns3/nstime.h"
#include "wimax-phy.h"
#include "service-flow-record.h"
#include "service-flow.h"
namespace ns3 {
class BaseStationNetDevice;
class SSRecord;
class ServiceFlow;
class ServiceFlowRecord;
/**
* \ingroup wimax
* \brief Virtual class for uplink scheduler.
*/
class UplinkScheduler : public Object
{
public:
UplinkScheduler (void);
/**
* Constructor
*
* \param bs base station device
*/
UplinkScheduler (Ptr<BaseStationNetDevice> bs);
virtual ~UplinkScheduler (void);
/**
* \brief Get the type ID.
* \return the object TypeId
*/
static TypeId GetTypeId (void);
/**
* \return the number of IR opps allocated
*/
virtual uint8_t GetNrIrOppsAllocated (void) const;
/**
* \brief Set the number of IR opps allocated
* \param nrIrOppsAllocated number of IR opps allocated
*/
virtual void SetNrIrOppsAllocated (uint8_t nrIrOppsAllocated);
/**
* \return true if the IR interval is allocated
*/
virtual bool GetIsIrIntrvlAllocated (void) const;
/**
* \brief Set if the IR interval is allocated
* \param isIrIntrvlAllocated
*/
virtual void SetIsIrIntrvlAllocated (bool isIrIntrvlAllocated);
/**
* \return true if the Inv IR interval is allocated
*/
virtual bool GetIsInvIrIntrvlAllocated (void) const;
/**
* \brief Set if the Inv IR interval is allocated
* \param isInvIrIntrvlAllocated
*/
virtual void SetIsInvIrIntrvlAllocated (bool isInvIrIntrvlAllocated);
/**
* \return uplink allocations
*/
virtual std::list<OfdmUlMapIe> GetUplinkAllocations (void) const;
/**
* \return the timestamp of the IR interval
*/
virtual Time GetTimeStampIrInterval (void);
/**
* \brief Set timestamp IR interval
* \param timeStampIrInterval
*/
virtual void SetTimeStampIrInterval (Time timeStampIrInterval);
/**
* \return the DCD timestamp
*/
virtual Time GetDcdTimeStamp (void) const;
/**
* \brief Set DCD timestamp
* \param dcdTimeStamp
*/
virtual void SetDcdTimeStamp (Time dcdTimeStamp);
/**
* \return the UCD timestamp
*/
virtual Time GetUcdTimeStamp (void) const;
/**
* \brief Set UCD timestamp
* \param ucdTimeStamp
*/
virtual void SetUcdTimeStamp (Time ucdTimeStamp);
/**
* \return the base station device
*/
virtual Ptr<BaseStationNetDevice> GetBs (void);
/**
* \brief Set base station device
* \param bs
*/
virtual void SetBs (Ptr<BaseStationNetDevice> bs);
/**
* Determines if channel descriptors sent in the current frame are
* required to be updated
*/
virtual void GetChannelDescriptorsToUpdate (bool&, bool&, bool&, bool&) = 0;
/**
* \return the calculated allocation start time
*/
virtual uint32_t CalculateAllocationStartTime (void) = 0;
/**
* Add uplink allocation
* \param ulMapIe the UL map IE
* \param allocationSize the allocation size
* \param symbolsToAllocation the symbols to allocation
* \param availableSymbols the available symbols
*/
virtual void AddUplinkAllocation (OfdmUlMapIe &ulMapIe,
const uint32_t &allocationSize,
uint32_t &symbolsToAllocation,
uint32_t &availableSymbols) = 0;
/**
* Schedule function
*/
virtual void Schedule (void) = 0;
/**
* Service unsolicited grants function
* \param ssRecord the SS record
* \param schedulingType the scheduling type
* \param ulMapIe the UL map IE
* \param modulationType the modulation type
* \param symbolsToAllocation the symbols to allocation
* \param availableSymbols the available symbols
*/
virtual void ServiceUnsolicitedGrants (const SSRecord *ssRecord,
enum ServiceFlow::SchedulingType schedulingType,
OfdmUlMapIe &ulMapIe,
const WimaxPhy::ModulationType modulationType,
uint32_t &symbolsToAllocation,
uint32_t &availableSymbols) = 0;
/**
* Service bandwidth request function
* \param ssRecord the SS record
* \param schedulingType the scheduling type
* \param ulMapIe the UL map IE
* \param modulationType the modulation type
* \param symbolsToAllocation the symbols to allocation
* \param availableSymbols the available symbols
*/
virtual void ServiceBandwidthRequests (const SSRecord *ssRecord,
enum ServiceFlow::SchedulingType schedulingType,
OfdmUlMapIe &ulMapIe,
const WimaxPhy::ModulationType modulationType,
uint32_t &symbolsToAllocation,
uint32_t &availableSymbols) = 0;
/**
* Service bandwidth request function
* \param serviceFlow the service flow
* \param schedulingType the scheduling type
* \param ulMapIe the UL map IE
* \param modulationType the modulation type
* \param symbolsToAllocation the symbols to allocation
* \param availableSymbols the available symbols
* \returns true if successful
*/
virtual bool ServiceBandwidthRequests (ServiceFlow *serviceFlow,
enum ServiceFlow::SchedulingType schedulingType,
OfdmUlMapIe &ulMapIe,
const WimaxPhy::ModulationType modulationType,
uint32_t &symbolsToAllocation,
uint32_t &availableSymbols) = 0;
/**
* Allocate initial ranging interval function
* \param symbolsToAllocation the symbols to allocation
* \param availableSymbols the available symbols
*/
virtual void AllocateInitialRangingInterval (uint32_t &symbolsToAllocation, uint32_t &availableSymbols) = 0;
/**
* Setp service flow function
* \param ssRecord the SS record
* \param serviceFlow the service flow
*/
virtual void SetupServiceFlow (SSRecord *ssRecord, ServiceFlow *serviceFlow) = 0;
/**
* Process bandwidth request function
* \param bwRequestHdr
*/
virtual void ProcessBandwidthRequest (const BandwidthRequestHeader &bwRequestHdr) = 0;
/**
* one time initialization function
*/
virtual void InitOnce (void) = 0;
/**
* \brief Set requested bandwidth
* \param sfr service flow record
*/
virtual void OnSetRequestedBandwidth (ServiceFlowRecord *sfr) = 0;
private:
Ptr<BaseStationNetDevice> m_bs; ///< the base station
std::list<OfdmUlMapIe> m_uplinkAllocations; ///< uplink allocations
Time m_timeStampIrInterval; ///< timestamp IR interval
uint8_t m_nrIrOppsAllocated; ///< number IR opps allocated
bool m_isIrIntrvlAllocated; ///< is IR interval allocated
bool m_isInvIrIntrvlAllocated; ///< is Inv IR interval allocated
Time m_dcdTimeStamp; ///< DCD timestamp
Time m_ucdTimeStamp; ///< UCD timestamp
};
} // namespace ns3
#endif /* UPLINK_SCHEDULER_H */
|