26 #include "ns3/packet.h"
27 #include "ns3/simulator.h"
29 #include "ns3/pointer.h"
54 m_initRangOppNumber (0),
55 m_contentionRangingRetries (0),
56 m_rngReqFrameNumber (0),
59 m_rangingIntervalFound (false),
62 m_nrInvitedPollsRecvd (0),
65 m_nrRangingTransOpps (0),
66 m_isBackoffSet (false),
67 m_rangingAnomalies (0)
138 if (deleteParameters)
144 "Subscriber Station: Error while scanning: Already registered with a BS");
160 m_ss->GetPhy ()->StartScanning (dlChannel,
m_ss->GetIntervalT20 (),
196 "SS: Error while sending a ranging request: the ss state should be SS_STATE_WAITING_REG_RANG_INTRVL or SS_STATE_WAITING_INV_RANG_INTRVL");
202 m_ss->GetBurstProfileManager ()->GetBurstProfileToRequest ());
225 connection =
m_ss->GetBasicConnection ();
229 connection =
m_ss->GetInitialRangingConnection ();
240 ==
m_ss->GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize ()
241 /
m_ss->GetPhy ()->GetPsPerSymbol (),
242 "SS: Error while sending a ranging request: the allocation size is not correct");
245 m_ss->SendBurst (uiuc, allocationSize, connection);
258 "SS: Can not start connection resolution: The SS state should be SS_STATE_WAITING_RNG_RSP or SS_STATE_WAITING_REG_RANG_INTRVL or SS_STATE_ADJUSTING_PARAMETERS");
260 if (
m_ss->GetState ()
268 else if (
m_ss->GetState ()
291 Time defferTime = Seconds (0);
292 Time timeToAllocation = Seconds (0);
293 uint16_t nrPsPerRangOpp =
294 m_ss->GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize ();
296 m_ss->GetCurrentUcd ().GetChannelEncodings ().GetRangReqOppSize ()
297 /
m_ss->GetPhy ()->GetPsPerSymbol ();
303 defferTime = Seconds (deferTOs * nrPsPerRangOpp
304 *
m_ss->GetPhy ()->GetPsDuration ().GetSeconds ());
305 timeToAllocation =
m_ss->GetTimeToAllocation (defferTime);
325 "be sure that CW has been set and BO is not already set");
335 m_ss->GetCurrentUcd ().GetRangingBackoffEnd ());
342 (double)
m_ss->GetCurrentUcd ().GetRangingBackoffStart ()) - 1;
351 if (cid ==
m_ss->GetInitialRangingConnection ()->GetCid ())
372 m_ss->SetBasicConnection (CreateObject<WimaxConnection> (rngrsp.
GetBasicCid (),
375 m_ss->SetPrimaryConnection (CreateObject<WimaxConnection> (rngrsp.
GetPrimaryCid (),
377 m_ss->SetAreManagementConnectionsAllocated (
true);
396 "SS: Can not perform ranging: the ranging status should be RANGING_STATUS_CONTINUE or RANGING_STATUS_ABORT or RANGING_STATUS_SUCCESS");
405 m_ss->SetBasicConnection (0);
406 m_ss->SetPrimaryConnection (0);
407 m_ss->SetAreManagementConnectionsAllocated (
false);
418 if (
m_ss->HasServiceFlows () && !
m_ss->GetAreServiceFlowsAllocated ())
420 m_ss->GetServiceFlowManager ()->InitiateServiceFlows ();
452 bool successful =
true;
500 bool deleteUlParameters,
EventId &eventId)
503 this, eventType, deleteUlParameters), eventId);
void SetMacAddress(Mac48Address macAddress)
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
void SetReqDlBurstProfile(uint8_t reqDlBurstProfile)
Ptr< SubscriberStationNetDevice > m_ss
Doxygen introspection did not find any typical Config paths.
void ResetRangingRequestCW(void)
WimaxNetDevice::RangingStatus m_rangingStatus
Doxygen introspection did not find any typical Config paths.
void ScheduleScanningRestart(Time interval, SubscriberStationNetDevice::EventType eventType, bool deleteUlParameters, EventId &eventId)
EventId m_waitForRngRspEvent
void SetBsEirp(uint16_t bs_eirp)
uint8_t m_contentionRangingRetries
SSLinkManager(Ptr< SubscriberStationNetDevice > ss)
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
void StartSynchronizing(void)
bool GetRangingIntervalFound(void) const
uint16_t CalculateMaxIRSignalStrength(void)
void StartScanning(SubscriberStationNetDevice::EventType type, bool deleteParameters)
static void Cancel(const EventId &id)
Set the cancel bit on this event: the event's associated function will not be invoked when it expires...
bool IsRunning(void) const
This method is syntactic sugar for the ns3::Simulator::isExpired method.
uint32_t GetDlFreqOverride(void) const
void DoDispose(void)
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
void PerformRanging(Cid cid, RngRsp rngrsp)
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
uint8_t m_nrRangingTransOpps
void AdjustRangingParameters(const RngRsp &rngrsp)
uint16_t m_nrRngRspsRecvd
uint8_t GetInitRangOppNumber(void) const
uint8_t m_initRangOppNumber
uint32_t GetTimingAdjust(void) const
void SendRangingRequest(uint8_t uiuc, uint16_t allocationSize)
void PerformBackoff(void)
uint8_t m_rangingAnomalies
bool IsUlChannelUsable(void)
Doxygen introspection did not find any typical Config paths.
Cid GetBasicCid(void) const
void SetRangingCW(uint8_t rangingCW)
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
uint16_t m_nrInvitedPollsRecvd
void NegotiateBasicCapabilities(void)
void SelectRandomBackoff(void)
uint8_t GetRangStatus(void) const
void StartContentionResolution(void)
Hold together all Wimax-related objects in a NetDevice.
void SetNrRangingTransOpps(uint8_t nrRangingTransOpps)
uint32_t GetFrameNumber(void) const
void SetEirXPIrMax(uint16_t eir_x_p_ir_max)
uint32_t m_rngReqFrameNumber
void IncreaseRangingRequestCW(void)
void SetRangingIntervalFound(bool rangingIntervalFound)
Mac48Address GetMacAddress(void) const
uint16_t GetMinTransmitPowerLevel(void)
void IncrementNrInvitedPollsRecvd(void)
uint8_t GetPowerLevelAdjust(void) const
#define NS_ASSERT_MSG(condition, message)
void DeleteUplinkParameters(void)
an identifier for simulation events.
EventId GetDlMapSyncTimeoutEvent(void)
static TypeId GetTypeId(void)
Cid GetPrimaryCid(void) const
uint32_t GetOffsetFreqAdjust(void) const
void EndScanning(bool status, uint64_t frequency)
a base class which provides memory management and object aggregation
EventId m_dlMapSyncTimeoutEvent
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
void AddHeader(const Header &header)
Add header to this packet.
NS_LOG_COMPONENT_DEFINE("SSLinkManager")
void SetRangingAnomalies(uint8_t rangingAnomalies)
bool m_rangingIntervalFound