|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
26 #include "ns3/packet.h"
27 #include "ns3/simulator.h"
45 .SetGroupName(
"Wimax");
52 m_signalQualityThreshold (10)
66 return rand () % 8 + 2;
76 "Base station: Error while processing ranging request: !BS_STATE_UL_SUB_FRAME");
80 if (
m_bs->GetUplinkScheduler ()->GetIsInvIrIntrvlAllocated ())
82 if (
m_bs->GetUplinkScheduler ()->GetIsIrIntrvlAllocated ())
84 irIntervalBoundary =
m_bs->GetUlSubframeStartTime ()
85 +
Seconds ((
m_bs->GetUplinkScheduler ()->GetNrIrOppsAllocated () + 1) *
m_bs->GetRangReqOppSize ()
86 *
m_bs->GetSymbolDuration ().GetSeconds ());
90 irIntervalBoundary =
m_bs->GetUlSubframeStartTime () +
Seconds (
m_bs->GetRangReqOppSize ()
91 *
m_bs->GetSymbolDuration ().GetSeconds ());
97 "Base station: Error while processing ranging request: IR interval not allocated");
99 irIntervalBoundary =
m_bs->GetUlSubframeStartTime ()
100 +
Seconds (
m_bs->GetUplinkScheduler ()->GetNrIrOppsAllocated () *
m_bs->GetRangReqOppSize ()
101 *
m_bs->GetSymbolDuration ().GetSeconds ());
116 bool decodable =
false;
185 m_bs->GetConnectionManager ()->AllocateManagementConnections (ssRecord, rngrsp);
188 uint8_t diuc =
m_bs->GetBurstProfileManager ()->GetBurstProfileForSS (ssRecord, rngreq, modulationType);
221 SSRecord *ssRecord =
m_bs->GetSSManager ()->GetSSRecord (cid);
247 SSRecord *ssRecord =
m_bs->GetSSManager ()->GetSSRecord (cid);
337 return m_bs->GetChannel (1);
360 return signalQuality;
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void PerformInvitedRanging(Cid cid, RngRsp *rngrsp)
Perform inivted ranging function.
void SetDlFreqOverride(uint32_t dlFreqOverride)
set the Center frequency, in kHz, of new downlink channel where the SS should redo initial ranging.
void AcceptRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord)
Accept ranging function.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
void SetRangStatus(uint8_t rangStatus)
set the range status.
void SetDlOperBurstProfile(uint16_t dlOperBurstProfile)
set the DL oper burst profile
void DeallocateCids(Cid cid)
Deallocate CIDs function.
Mac48Address GetMacAddress(void) const
Get MAC address field.
void AddHeader(const Header &header)
Add header to this packet.
static Time Now(void)
Return the current simulation virtual time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t GetRangStatus(void) const
void PerformInitialRanging(Cid cid, RngReq *rngreq, RngRsp *rngrsp)
Perform initial ranging function.
Mac Management messages Section 6.3.2.3 MAC Management messages page 42, Table 14 page 43.
void SetInitRangOppNumber(uint8_t initRangOppNumber)
set initial range opp number.
void ResetInvitedRangingRetries(void)
Reset invited ranging retries.
Ptr< BaseStationNetDevice > m_bs
base station
uint8_t GetReqDlBurstProfile(void) const
Get request DL burst profile field.
uint8_t m_signalQualityThreshold
signal quality threshold
void SetParametersToAdjust(RngRsp *rngrsp)
Set parameters to adjust function.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
bool IsRangingAcceptable(void)
Is ranging acceptable function.
void AbortRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord, bool isNewSS)
Abort ranging function.
Smart pointer class similar to boost::intrusive_ptr.
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.
void ProcessRangingRequest(Cid cid, RngReq rngreq)
process a ranging request message
ModulationType
ModulationType enumeration.
uint32_t GetNewDlChannel(void)
Get new DL channel function.
uint8_t GetInvitedRangRetries(void) const
Get invited range retries.
A base class which provides memory management and object aggregation.
This class is used by the base station to store some information related to subscriber station in the...
void SetMacAddress(Mac48Address macAddress)
set the MAC address
void EnablePollForRanging(void)
Enable poll for ranging function.
BSLinkManager(Ptr< BaseStationNetDevice > bs)
Constructor.
void SetFrameNumber(uint32_t frameNumber)
set frame number.
void SetOffsetFreqAdjust(uint32_t offsetFreqAdjust)
set the relative change in transmission frequency that the SS should take in order to better match th...
Simulation virtual time values and global simulation resolution.
bool ChangeDlChannel(void)
Change DL channel function.
void PerformRanging(Cid cid, RngReq rngreq)
Perform ranging function.
void IncrementInvitedRangingRetries(void)
Increment invited ranging retries.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
void ScheduleRngRspMessage(Cid cid, RngRsp *rngrsp)
Schedule range response message function.
bool IsInitialRanging(void) const
@ RANGING_STATUS_CONTINUE
void PrintDebug(void) const
Print debug function.
uint8_t GetRangingCorrectionRetries(void) const
Get ranging correction retries.
static TypeId GetTypeId(void)
Get the type ID.
void IncrementRangingCorrectionRetries(void)
Increment ranging correction retries.
void ContinueRanging(Cid cid, RngRsp *rngrsp, SSRecord *ssRecord)
Continue ranging function.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
void SetPowerLevelAdjust(uint8_t powerLevelAdjust)
set the relative change in transmission power level that the SS should make in order that transmissio...
void SetModulationType(WimaxPhy::ModulationType modulationType)
Set modulation type.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint8_t GetSignalQuality(void)
Get signal quality function.
void ResetRangingCorrectionRetries(void)
Reset ranging correction retries.
uint64_t SelectDlChannel(void)
void SetTimingAdjust(uint32_t timingAdjust)
set the Tx timing offset adjustment (signed 32-bit).
Cid GetBasicCid(void) const
Get basic CID.
void SetRangingStatus(WimaxNetDevice::RangingStatus rangingStatus)
Set ranging status.
void DisablePollForRanging(void)
Disable poll for ranging.
This class implements the ranging response message described by "IEEE Standard for Local and metropol...
uint32_t m_signalQuality
signal quality
uint8_t CalculateRangingOppsToAllocate(void)
int tries
variable to test multiple RNG-REQ by the SS for example undecodable at BS or lost RNG-RSP
This class implements the ranging request message described by "IEEE Standard for Local and metropoli...