22 #ifndef WIMAX_BS_NET_DEVICE_H
23 #define WIMAX_BS_NET_DEVICE_H
25 #include "wimax-net-device.h"
26 #include "ns3/event-id.h"
27 #include "wimax-connection.h"
28 #include "ns3/nstime.h"
29 #include "ns3/mac48-address.h"
30 #include "ns3/ipv4-address.h"
31 #include "ns3/bs-service-flow-manager.h"
32 #include "dl-mac-messages.h"
33 #include "ipcs-classifier.h"
42 class BurstProfileManager;
44 class UplinkScheduler;
45 class BsServiceFlowManager;
55 BS_STATE_DL_SUB_FRAME, BS_STATE_UL_SUB_FRAME, BS_STATE_TTG, BS_STATE_RTG
60 SHORT_PREAMBLE = 1, LONG_PREAMBLE
63 static TypeId GetTypeId (
void);
164 Time GetDlSubframeStartTime (
void)
const;
165 Time GetUlSubframeStartTime (
void)
const;
166 uint8_t GetRangingOppNumber (
void)
const;
209 Time GetPsDuration (
void)
const;
210 Time GetSymbolDuration (
void)
const;
223 void MarkUplinkAllocations (
void);
224 void MarkRangingOppStart (
Time rangingOppStartTime);
230 void StartFrame (
void);
231 void StartDlSubFrame (
void);
232 void EndDlSubFrame (
void);
233 void StartUlSubFrame (
void);
234 void EndUlSubFrame (
void);
235 void EndFrame (
void);
247 void SendBursts (
void);
253 void SetDlBurstProfiles (
Dcd *dcd);
254 void SetUlBurstProfiles (
Ucd *ucd);
256 void MarkUplinkAllocationStart (
Time allocationStartTime);
257 void MarkUplinkAllocationEnd (
Time allocationEndTime,
Cid cid, uint8_t uiuc);
258 void UplinkAllocationStart (
void);
259 void UplinkAllocationEnd (
Cid cid, uint8_t uiuc);
260 void RangingOppStart (
void);
263 Time m_initialRangInterval;
268 uint8_t m_maxRangCorrectionRetries;
269 uint8_t m_maxInvitedRangRetries;
270 uint8_t m_rangReqOppSize;
271 uint8_t m_bwReqOppSize;
273 uint32_t m_nrDlSymbols;
274 uint32_t m_nrUlSymbols;
277 uint32_t m_nrDlMapSent;
278 uint32_t m_nrUlMapSent;
280 uint32_t m_nrDcdSent;
281 uint32_t m_nrUcdSent;
283 uint32_t m_dcdConfigChangeCount;
284 uint32_t m_ucdConfigChangeCount;
286 uint32_t m_framesSinceLastDcd;
287 uint32_t m_framesSinceLastUcd;
290 uint32_t m_nrDlFrames;
291 uint32_t m_nrUlFrames;
294 uint16_t m_nrSsRegistered;
296 uint16_t m_nrDlAllocations;
297 uint16_t m_nrUlAllocations;
299 Time m_dlSubframeStartTime;
300 Time m_ulSubframeStartTime;
302 uint8_t m_ulAllocationNumber;
303 uint8_t m_rangingOppNumber;
307 uint32_t m_allocationStartTime;
317 Time m_symbolDuration;
void SetUcdInterval(Time ucdInterval)
Time GetIntervalT8(void) const
void SetNrDlSymbols(uint32_t dlSymbols)
uint32_t GetNrDcdSent(void) const
forward calls to a chain of CallbackAn ns3::TracedCallback has almost exactly the same API as a norma...
void SetLinkManager(Ptr< BSLinkManager > linkManager)
Ptr< BSScheduler > GetBSScheduler(void) const
TracedCallback< Ptr< const Packet > > m_bsRxTrace
uint8_t GetMaxRangingCorrectionRetries(void) const
void SetBSScheduler(Ptr< BSScheduler > bsSchedule)
uint8_t GetRangReqOppSize(void) const
void SetMaxInvitedRangRetries(uint8_t maxInvitedRangRetries)
void SetIntervalT8(Time interval)
void SetBsClassifier(Ptr< IpcsClassifier > classifier)
Time GetDcdInterval(void) const
uint8_t GetMaxInvitedRangRetries(void) const
TracedCallback< Ptr< const Packet > > m_bsRxDropTrace
bool Enqueue(Ptr< Packet > packet, const MacHeaderType &hdrType, Ptr< WimaxConnection > connection)
Enqueue a packet into a connection queue.
void SetRangReqOppSize(uint8_t rangReqOppSize)
TracedCallback< Ptr< const Packet > > m_bsTxDropTrace
Time GetInitialRangingInterval(void) const
Ptr< UplinkScheduler > GetUplinkScheduler(void) const
void SetInitialRangingInterval(Time initialRangInterval)
Ptr< IpcsClassifier > GetBsClassifier(void) const
uint8_t GetBwReqOppSize(void) const
Hold together all Wimax-related objects in a NetDevice.This class holds together ns3::WimaxPhy, ns3::WimaxConnection, ns3::ConectionManager, ns3::BurstProfileManager, and ns3::BandwidthManager.
void SetDcdInterval(Time dcdInterval)
TracedCallback< Ptr< const Packet > > m_bsPromiscRxTrace
void CreateMapMessages(void)
creates the MAC management messages DL-MAP and UL-MAP
TracedCallback< Ptr< const Packet > > m_bsTxTrace
void SetUplinkScheduler(Ptr< UplinkScheduler > ulScheduler)
uint32_t GetNrDlSymbols(void) const
void CreateDescriptorMessages(bool sendDcd, bool senUcd)
creates the channel descriptor MAC management messages DCD and UCD
uint32_t GetNrUlSymbols(void) const
void SetMaxRangingCorrectionRetries(uint8_t maxRangCorrectionRetries)
Ptr< BSLinkManager > GetLinkManager(void) const
Time GetUcdInterval(void) const
void SetBwReqOppSize(uint8_t bwReqOppSize)
Ptr< SSManager > GetSSManager(void) const
void SetSSManager(Ptr< SSManager > ssManager)
void InitBaseStationNetDevice(void)
initializes the BS net device and sets its parameters to the default values
void SetNrUlSymbols(uint32_t ulSymbols)
a unique identifier for an interface.
uint32_t GetNrUcdSent(void) const