this class implements the link manager of subscriber station net device. More...
#include "ss-link-manager.h"
Public Member Functions | |
SSLinkManager (Ptr< SubscriberStationNetDevice > ss) | |
Constructor. More... | |
~SSLinkManager (void) | |
void | DoDispose (void) |
Destructor implementation. More... | |
EventId | GetDlMapSyncTimeoutEvent (void) |
Get DL map sync timeput event. More... | |
bool | GetRangingIntervalFound (void) const |
Get ranging interval found. More... | |
void | IncrementNrInvitedPollsRecvd (void) |
Increment NR invited polls received. More... | |
bool | IsUlChannelUsable (void) |
Is UL channel usable. More... | |
void | PerformBackoff (void) |
Perform backoff. More... | |
void | PerformRanging (Cid cid, RngRsp rngrsp) |
Perform ranging. More... | |
void | ScheduleScanningRestart (Time interval, SubscriberStationNetDevice::EventType eventType, bool deleteUlParameters, EventId &eventId) |
Schedule scanning request. More... | |
void | SendRangingRequest (uint8_t uiuc, uint16_t allocationSize) |
Send ranging request. More... | |
void | SetBsEirp (uint16_t bs_eirp) |
Set BS EIRP. More... | |
void | SetEirXPIrMax (uint16_t eir_x_p_ir_max) |
Set EIRX IR maximum. More... | |
void | SetNrRangingTransOpps (uint8_t nrRangingTransOpps) |
Ser NR ranging trans opps. More... | |
void | SetRangingCW (uint8_t rangingCW) |
Set ranging CW. More... | |
void | SetRangingIntervalFound (bool rangingIntervalFound) |
Set ranging interval found. More... | |
void | StartContentionResolution (void) |
Start contention resolution. More... | |
void | StartScanning (SubscriberStationNetDevice::EventType type, bool deleteParameters) |
Start scanning. More... | |
Public Member Functions inherited from ns3::Object | |
Object () | |
Constructor. More... | |
virtual | ~Object () |
Destructor. More... | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. More... | |
void | Dispose (void) |
Dispose of this Object. More... | |
AggregateIterator | GetAggregateIterator (void) const |
Get an iterator to the Objects aggregated to this one. More... | |
virtual TypeId | GetInstanceTypeId (void) const |
Get the most derived TypeId for this Object. More... | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. More... | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. More... | |
template<typename T > | |
Ptr< T > | GetObject (void) const |
Get a pointer to the requested aggregated Object. More... | |
void | Initialize (void) |
Invoke DoInitialize on all Objects aggregated to this one. More... | |
bool | IsInitialized (void) const |
Check if the object has been initialized. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. More... | |
SimpleRefCount (const SimpleRefCount &o[[maybe_unused]]) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= ([[maybe_unused]] const SimpleRefCount &o) |
Assignment operator. More... | |
void | Ref (void) const |
Increment the reference count. More... | |
void | Unref (void) const |
Decrement the reference count. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
SSLinkManager (const SSLinkManager &) | |
type conversion operator More... | |
void | AdjustRangingParameters (const RngRsp &rngrsp) |
Adjust ranging parameters. More... | |
uint16_t | CalculateMaxIRSignalStrength (void) |
Calculate maximum IR signal strength. More... | |
void | DeleteUplinkParameters (void) |
Delete uplink parameters. More... | |
void | EndScanning (bool status, uint64_t frequency) |
End scanning. More... | |
uint16_t | GetMinTransmitPowerLevel (void) |
Get minimum transmit power level. More... | |
void | IncreaseRangingRequestCW (void) |
Increase rnaging request CW. More... | |
void | NegotiateBasicCapabilities (void) |
Negotiate basic capabilities. More... | |
SSLinkManager & | operator= (const SSLinkManager &) |
assignment operator More... | |
void | ResetRangingRequestCW (void) |
Reset ranging request CW. More... | |
bool | SearchForDlChannel (uint8_t channel) |
Search for DL channel. More... | |
void | SelectRandomBackoff (void) |
Select random backoff. More... | |
void | StartSynchronizing (void) |
Start synchronizing. More... | |
Private Attributes | |
uint16_t | m_bsEirp |
BS EIRP. More... | |
uint8_t | m_contentionRangingRetries |
contention ranging retries More... | |
uint8_t | m_dlChnlNr |
indicates the channel/frequency currently the SS is scanning More... | |
EventId | m_dlMapSyncTimeoutEvent |
DL map sync timeout event. More... | |
uint16_t | m_eirXPIrMax |
initial ranging maximum equivalent isotropic received power at BS More... | |
uint64_t | m_frequency |
frequency on which it is currently operating, i.e., where scanning was successful More... | |
uint8_t | m_initRangOppNumber |
Initial Ranging opportunity (1–255) in which SS transmitted the RNG_REQ. More... | |
bool | m_isBackoffSet |
is backoff set More... | |
uint16_t | m_nrInvitedPollsRecvd |
number invited polls received More... | |
uint8_t | m_nrRangingTransOpps |
number ranging trans opps More... | |
uint16_t | m_nrRngReqsSent |
number rang requests sent More... | |
uint16_t | m_nrRngRspsRecvd |
number rang responses received More... | |
uint16_t | m_pTxIrMax |
maximum transmit signal strength for initial ranging calculated by SS More... | |
uint8_t | m_rangingAnomalies |
ranging anomalies More... | |
uint8_t | m_rangingBO |
ranging BO More... | |
uint8_t | m_rangingCW |
ranging CW More... | |
bool | m_rangingIntervalFound |
ranging interval found More... | |
WimaxNetDevice::RangingStatus | m_rangingStatus |
ranging status More... | |
RngReq | m_rngreq |
rng request More... | |
uint32_t | m_rngReqFrameNumber |
frame number in which SS sent RNG_REQ message More... | |
Ptr< SubscriberStationNetDevice > | m_ss |
subscriber station device More... | |
EventId | m_waitForRngRspEvent |
wait for rang response event More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
Copy an Object. More... | |
virtual void | DoInitialize (void) |
Initialize() implementation. More... | |
virtual void | NotifyNewAggregate (void) |
Notify all Objects aggregated to this one of a new Object being aggregated. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
this class implements the link manager of subscriber station net device.
An ss link manager is responsible for link scanning and ranging
ns3::SSLinkManager is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 160 bytes (on a 64-bit architecture).
Definition at line 41 of file ss-link-manager.h.
ns3::SSLinkManager::SSLinkManager | ( | Ptr< SubscriberStationNetDevice > | ss | ) |
Constructor.
ss | subscriber station device |
Definition at line 48 of file ss-link-manager.cc.
ns3::SSLinkManager::~SSLinkManager | ( | void | ) |
Definition at line 72 of file ss-link-manager.cc.
References m_ss.
|
private |
type conversion operator
|
private |
Adjust ranging parameters.
rngrsp | the ranging response |
Definition at line 449 of file ss-link-manager.cc.
References ns3::RngRsp::GetOffsetFreqAdjust(), ns3::RngRsp::GetPowerLevelAdjust(), and ns3::RngRsp::GetTimingAdjust().
Referenced by PerformRanging().
|
private |
Calculate maximum IR signal strength.
Definition at line 473 of file ss-link-manager.cc.
References GetMinTransmitPowerLevel(), m_bsEirp, and m_eirXPIrMax.
Referenced by SendRangingRequest().
|
private |
Delete uplink parameters.
Definition at line 436 of file ss-link-manager.cc.
References m_ss.
Referenced by StartScanning().
|
virtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented from ns3::Object.
Definition at line 79 of file ss-link-manager.cc.
References m_ss.
|
private |
End scanning.
status | the end status |
frequency | the frequency |
Definition at line 165 of file ss-link-manager.cc.
References ns3::SubscriberStationNetDevice::EVENT_NONE, m_frequency, StartScanning(), and StartSynchronizing().
Referenced by StartScanning().
EventId ns3::SSLinkManager::GetDlMapSyncTimeoutEvent | ( | void | ) |
Get DL map sync timeput event.
Definition at line 127 of file ss-link-manager.cc.
References m_dlMapSyncTimeoutEvent.
|
private |
Get minimum transmit power level.
Definition at line 491 of file ss-link-manager.cc.
Referenced by CalculateMaxIRSignalStrength().
bool ns3::SSLinkManager::GetRangingIntervalFound | ( | void | ) | const |
Get ranging interval found.
Definition at line 103 of file ss-link-manager.cc.
References m_rangingIntervalFound.
|
static |
Get the type ID.
Definition at line 40 of file ss-link-manager.cc.
References ns3::TypeId::SetParent().
|
private |
Increase rnaging request CW.
Definition at line 332 of file ss-link-manager.cc.
References m_rangingCW, m_ss, and min.
Referenced by StartContentionResolution().
void ns3::SSLinkManager::IncrementNrInvitedPollsRecvd | ( | void | ) |
Increment NR invited polls received.
Definition at line 121 of file ss-link-manager.cc.
References m_nrInvitedPollsRecvd.
bool ns3::SSLinkManager::IsUlChannelUsable | ( | void | ) |
Is UL channel usable.
Definition at line 442 of file ss-link-manager.cc.
|
private |
Negotiate basic capabilities.
Definition at line 467 of file ss-link-manager.cc.
Referenced by PerformRanging().
|
private |
assignment operator
void ns3::SSLinkManager::PerformBackoff | ( | void | ) |
Perform backoff.
Definition at line 289 of file ss-link-manager.cc.
References m_initRangOppNumber, m_isBackoffSet, m_nrRangingTransOpps, m_rangingBO, m_rngReqFrameNumber, m_ss, ns3::Simulator::Schedule(), ns3::Seconds(), SendRangingRequest(), and ns3::OfdmUlBurstProfile::UIUC_INITIAL_RANGING.
Perform ranging.
cid | the CID |
rngrsp | the ranging response |
Definition at line 346 of file ss-link-manager.cc.
References AdjustRangingParameters(), ns3::Cid::BASIC, ns3::Simulator::Cancel(), ns3::RngRsp::GetBasicCid(), ns3::RngRsp::GetDlFreqOverride(), ns3::RngRsp::GetFrameNumber(), ns3::RngRsp::GetInitRangOppNumber(), ns3::RngRsp::GetMacAddress(), ns3::RngRsp::GetPrimaryCid(), ns3::RngRsp::GetRangStatus(), ns3::EventId::IsRunning(), m_initRangOppNumber, m_nrRngRspsRecvd, m_rangingStatus, m_rngReqFrameNumber, m_ss, m_waitForRngRspEvent, NegotiateBasicCapabilities(), NS_ASSERT_MSG, ns3::Cid::PRIMARY, ns3::WimaxNetDevice::RANGING_STATUS_ABORT, ns3::WimaxNetDevice::RANGING_STATUS_CONTINUE, ns3::WimaxNetDevice::RANGING_STATUS_SUCCESS, ResetRangingRequestCW(), ns3::SubscriberStationNetDevice::SS_STATE_ADJUSTING_PARAMETERS, ns3::SubscriberStationNetDevice::SS_STATE_REGISTERED, and ns3::SubscriberStationNetDevice::SS_STATE_WAITING_INV_RANG_INTRVL.
|
private |
Reset ranging request CW.
Definition at line 339 of file ss-link-manager.cc.
References m_rangingCW, and m_ss.
Referenced by PerformRanging().
void ns3::SSLinkManager::ScheduleScanningRestart | ( | Time | interval, |
SubscriberStationNetDevice::EventType | eventType, | ||
bool | deleteUlParameters, | ||
EventId & | eventId | ||
) |
Schedule scanning request.
interval | the scanning request interval |
eventType | event type |
deleteUlParameters | the delete UL parameters |
eventId | the event ID |
Definition at line 498 of file ss-link-manager.cc.
References m_ss, ns3::Simulator::Schedule(), and StartScanning().
|
private |
Search for DL channel.
channel | the DL channel |
|
private |
Select random backoff.
Definition at line 322 of file ss-link-manager.cc.
References m_isBackoffSet, m_rangingBO, m_rangingCW, and NS_ASSERT_MSG.
Referenced by StartContentionResolution().
void ns3::SSLinkManager::SendRangingRequest | ( | uint8_t | uiuc, |
uint16_t | allocationSize | ||
) |
Send ranging request.
uiuc | the UIUC |
allocationSize | the allocation size |
Definition at line 189 of file ss-link-manager.cc.
References ns3::Packet::AddHeader(), CalculateMaxIRSignalStrength(), m_nrRngReqsSent, m_nrRngRspsRecvd, m_pTxIrMax, m_rangingAnomalies, m_rangingStatus, m_rngreq, m_ss, m_waitForRngRspEvent, ns3::ManagementMessageType::MESSAGE_TYPE_RNG_REQ, NS_ASSERT_MSG, ns3::WimaxNetDevice::RANGING_STATUS_CONTINUE, ns3::Simulator::Schedule(), ns3::RngReq::SetMacAddress(), ns3::RngReq::SetRangingAnomalies(), ns3::RngReq::SetReqDlBurstProfile(), ns3::SubscriberStationNetDevice::SS_STATE_WAITING_INV_RANG_INTRVL, ns3::SubscriberStationNetDevice::SS_STATE_WAITING_REG_RANG_INTRVL, ns3::SubscriberStationNetDevice::SS_STATE_WAITING_RNG_RSP, and StartContentionResolution().
Referenced by PerformBackoff(), and ns3::SubscriberStationNetDevice::ProcessUlMap().
void ns3::SSLinkManager::SetBsEirp | ( | uint16_t | bs_eirp | ) |
Set BS EIRP.
bs_eirp | the BS EIRP |
Definition at line 85 of file ss-link-manager.cc.
References m_bsEirp.
void ns3::SSLinkManager::SetEirXPIrMax | ( | uint16_t | eir_x_p_ir_max | ) |
Set EIRX IR maximum.
eir_x_p_ir_max | the EIRX IR maximum |
Definition at line 91 of file ss-link-manager.cc.
References m_eirXPIrMax.
void ns3::SSLinkManager::SetNrRangingTransOpps | ( | uint8_t | nrRangingTransOpps | ) |
Ser NR ranging trans opps.
nrRangingTransOpps | the NR ranging trans opps |
Definition at line 109 of file ss-link-manager.cc.
References m_nrRangingTransOpps.
void ns3::SSLinkManager::SetRangingCW | ( | uint8_t | rangingCW | ) |
Set ranging CW.
rangingCW | the ranging CW |
Definition at line 115 of file ss-link-manager.cc.
References m_rangingCW.
void ns3::SSLinkManager::SetRangingIntervalFound | ( | bool | rangingIntervalFound | ) |
Set ranging interval found.
rangingIntervalFound | the ranging interval found |
Definition at line 97 of file ss-link-manager.cc.
References m_rangingIntervalFound.
void ns3::SSLinkManager::StartContentionResolution | ( | void | ) |
Start contention resolution.
Definition at line 249 of file ss-link-manager.cc.
References ns3::SubscriberStationNetDevice::EVENT_NONE, IncreaseRangingRequestCW(), m_contentionRangingRetries, m_isBackoffSet, m_ss, NS_ASSERT_MSG, SelectRandomBackoff(), ns3::SubscriberStationNetDevice::SS_STATE_ADJUSTING_PARAMETERS, ns3::SubscriberStationNetDevice::SS_STATE_WAITING_REG_RANG_INTRVL, ns3::SubscriberStationNetDevice::SS_STATE_WAITING_RNG_RSP, and StartScanning().
Referenced by SendRangingRequest().
void ns3::SSLinkManager::StartScanning | ( | SubscriberStationNetDevice::EventType | type, |
bool | deleteParameters | ||
) |
Start scanning.
type | the event type |
deleteParameters | the delete parameters |
Definition at line 133 of file ss-link-manager.cc.
References DeleteUplinkParameters(), EndScanning(), m_dlChnlNr, m_ss, ns3::MakeCallback(), NS_ASSERT_MSG, ns3::SubscriberStationNetDevice::SS_STATE_IDLE, and ns3::SubscriberStationNetDevice::SS_STATE_SCANNING.
Referenced by EndScanning(), ScheduleScanningRestart(), ns3::SubscriberStationNetDevice::Start(), StartContentionResolution(), and StartSynchronizing().
|
private |
Start synchronizing.
Definition at line 179 of file ss-link-manager.cc.
References ns3::SubscriberStationNetDevice::EVENT_DL_MAP_SYNC_TIMEOUT, m_dlMapSyncTimeoutEvent, m_ss, ns3::Simulator::Schedule(), ns3::SubscriberStationNetDevice::SS_STATE_SYNCHRONIZING, and StartScanning().
Referenced by EndScanning().
|
private |
BS EIRP.
Definition at line 187 of file ss-link-manager.h.
Referenced by CalculateMaxIRSignalStrength(), and SetBsEirp().
|
private |
contention ranging retries
Definition at line 192 of file ss-link-manager.h.
Referenced by StartContentionResolution().
|
private |
indicates the channel/frequency currently the SS is scanning
Definition at line 196 of file ss-link-manager.h.
Referenced by StartScanning().
|
private |
DL map sync timeout event.
Definition at line 212 of file ss-link-manager.h.
Referenced by GetDlMapSyncTimeoutEvent(), and StartSynchronizing().
|
private |
initial ranging maximum equivalent isotropic received power at BS
Definition at line 188 of file ss-link-manager.h.
Referenced by CalculateMaxIRSignalStrength(), and SetEirXPIrMax().
|
private |
frequency on which it is currently operating, i.e., where scanning was successful
Definition at line 197 of file ss-link-manager.h.
Referenced by EndScanning().
|
private |
Initial Ranging opportunity (1–255) in which SS transmitted the RNG_REQ.
Definition at line 191 of file ss-link-manager.h.
Referenced by PerformBackoff(), and PerformRanging().
|
private |
is backoff set
Definition at line 208 of file ss-link-manager.h.
Referenced by PerformBackoff(), SelectRandomBackoff(), and StartContentionResolution().
|
private |
number invited polls received
Definition at line 203 of file ss-link-manager.h.
Referenced by IncrementNrInvitedPollsRecvd().
|
private |
number ranging trans opps
Definition at line 207 of file ss-link-manager.h.
Referenced by PerformBackoff(), and SetNrRangingTransOpps().
|
private |
number rang requests sent
Definition at line 201 of file ss-link-manager.h.
Referenced by SendRangingRequest().
|
private |
number rang responses received
Definition at line 202 of file ss-link-manager.h.
Referenced by PerformRanging(), and SendRangingRequest().
|
private |
maximum transmit signal strength for initial ranging calculated by SS
Definition at line 189 of file ss-link-manager.h.
Referenced by SendRangingRequest().
|
private |
ranging anomalies
Definition at line 209 of file ss-link-manager.h.
Referenced by SendRangingRequest().
|
private |
ranging BO
Definition at line 206 of file ss-link-manager.h.
Referenced by PerformBackoff(), and SelectRandomBackoff().
|
private |
ranging CW
Definition at line 205 of file ss-link-manager.h.
Referenced by IncreaseRangingRequestCW(), ResetRangingRequestCW(), SelectRandomBackoff(), and SetRangingCW().
|
private |
ranging interval found
Definition at line 198 of file ss-link-manager.h.
Referenced by GetRangingIntervalFound(), and SetRangingIntervalFound().
|
private |
ranging status
Definition at line 185 of file ss-link-manager.h.
Referenced by PerformRanging(), and SendRangingRequest().
|
private |
|
private |
frame number in which SS sent RNG_REQ message
Definition at line 193 of file ss-link-manager.h.
Referenced by PerformBackoff(), and PerformRanging().
|
private |
subscriber station device
Definition at line 183 of file ss-link-manager.h.
Referenced by ~SSLinkManager(), DeleteUplinkParameters(), DoDispose(), IncreaseRangingRequestCW(), PerformBackoff(), PerformRanging(), ResetRangingRequestCW(), ScheduleScanningRestart(), SendRangingRequest(), StartContentionResolution(), StartScanning(), and StartSynchronizing().
|
private |
wait for rang response event
Definition at line 211 of file ss-link-manager.h.
Referenced by PerformRanging(), and SendRangingRequest().