26 #include "ns3/packet.h"
27 #include "ns3/simulator.h"
51 m_signalQualityThreshold (10)
65 return rand () % 8 + 2;
75 "Base station: Error while processing ranging request: !BS_STATE_UL_SUB_FRAME");
77 Time irIntervalBoundary = Seconds (0);
79 if (
m_bs->GetUplinkScheduler ()->GetIsInvIrIntrvlAllocated ())
81 if (
m_bs->GetUplinkScheduler ()->GetIsIrIntrvlAllocated ())
83 irIntervalBoundary =
m_bs->GetUlSubframeStartTime ()
84 + Seconds ((
m_bs->GetUplinkScheduler ()->GetNrIrOppsAllocated () + 1) *
m_bs->GetRangReqOppSize ()
85 *
m_bs->GetSymbolDuration ().GetSeconds ());
89 irIntervalBoundary =
m_bs->GetUlSubframeStartTime () + Seconds (
m_bs->GetRangReqOppSize ()
90 *
m_bs->GetSymbolDuration ().GetSeconds ());
96 "Base station: Error while processing ranging request: IR interval not allocated");
98 irIntervalBoundary =
m_bs->GetUlSubframeStartTime ()
99 + Seconds (
m_bs->GetUplinkScheduler ()->GetNrIrOppsAllocated () *
m_bs->GetRangReqOppSize ()
100 *
m_bs->GetSymbolDuration ().GetSeconds ());
115 bool decodable =
false;
184 m_bs->GetConnectionManager ()->AllocateManagementConnections (ssRecord, rngrsp);
187 uint8_t diuc =
m_bs->GetBurstProfileManager ()->GetBurstProfileForSS (ssRecord, rngreq, modulationType);
220 SSRecord *ssRecord =
m_bs->GetSSManager ()->GetSSRecord (cid);
246 SSRecord *ssRecord =
m_bs->GetSSManager ()->GetSSRecord (cid);
336 return m_bs->GetChannel (1);
359 return signalQuality;
void IncrementRangingCorrectionRetries(void)
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
bool IsRangingAcceptable(void)
void SetPowerLevelAdjust(uint8_t powerLevelAdjust)
set the relative change in transmission power level that the SS should make in order that transmissio...
Cid GetBasicCid(void) const
uint8_t GetReqDlBurstProfile(void) const
void SetMacAddress(Mac48Address macAddress)
Mac48Address GetMacAddress(void) const
void ProcessRangingRequest(Cid cid, RngReq rngreq)
process a ranging request message
uint64_t SelectDlChannel(void)
void DisablePollForRanging(void)
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
void SetModulationType(WimaxPhy::ModulationType modulationType)
void SetRangingStatus(WimaxNetDevice::RangingStatus rangingStatus)
void PerformRanging(Cid cid, RngReq rngreq)
void PerformInitialRanging(Cid cid, RngReq *rngreq, RngRsp *rngrsp)
void ResetInvitedRangingRetries(void)
void PerformInvitedRanging(Cid cid, RngRsp *rngrsp)
void AcceptRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord)
void SetRangStatus(uint8_t rangStatus)
void ResetRangingCorrectionRetries(void)
bool IsInitialRanging(void) const
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
void EnablePollForRanging(void)
void SetTimingAdjust(uint32_t timingAdjust)
set the Tx timing offset adjustment (signed 32-bit).
uint8_t GetSignalQuality(void)
void PrintDebug(void) const
void DeallocateCids(Cid cid)
uint32_t GetNewDlChannel(void)
static TypeId GetTypeId(void)
uint8_t GetRangingCorrectionRetries(void) const
uint8_t GetRangStatus(void) const
void ContinueRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord)
void IncrementInvitedRangingRetries(void)
bool ChangeDlChannel(void)
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging...
void ScheduleRngRspMessage(Cid cid, RngRsp *rngrsp)
void SetParametersToAdjust(RngRsp *rngrsp)
void SetInitRangOppNumber(uint8_t initRangOppNumber)
void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust)
set the relative change in transmission frequency that the SS should take in order to better match th...
BSLinkManager(Ptr< BaseStationNetDevice > bs)
#define NS_ASSERT_MSG(condition, message)
uint8_t GetInvitedRangRetries(void) const
void SetFrameNumber(uint32_t frameNumber)
void AbortRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord, bool isNewSS)
#define NS_LOG_DEBUG(msg)
void VerifyInvitedRanging(Cid cid, uint8_t uiuc)
Verifies at the end of an invited ranging interval if SS sent ranging message in it or not...
Ptr< BaseStationNetDevice > m_bs
This class is used by the base station to store some information related to subscriber station in the...
uint8_t CalculateRangingOppsToAllocate(void)
a base class which provides memory management and object aggregation
uint8_t m_signalQualityThreshold
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
NS_LOG_COMPONENT_DEFINE("BSLinkManager")