A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
ns3::WifiRemoteStationManager Class Reference

hold a list of per-remote-station state. More...

#include <wifi-remote-station-manager.h>

+ Inheritance diagram for ns3::WifiRemoteStationManager:
+ Collaboration diagram for ns3::WifiRemoteStationManager:

Public Member Functions

 WifiRemoteStationManager ()
virtual ~WifiRemoteStationManager ()
void AddBasicMode (WifiMode mode)
void AddSupportedMode (Mac48Address address, WifiMode mode)
WifiMode GetAckMode (Mac48Address address, WifiMode dataMode)
WifiMode GetBasicMode (uint32_t i) const
WifiMode GetCtsMode (Mac48Address address, WifiMode rtsMode)
WifiMode GetDataMode (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fullPacketSize)
WifiMode GetDefaultMode (void) const
uint32_t GetFragmentationThreshold (void) const
uint32_t GetFragmentOffset (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
uint32_t GetFragmentSize (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
WifiRemoteStationInfo GetInfo (Mac48Address address)
uint32_t GetMaxSlrc (void) const
uint32_t GetMaxSsrc (void) const
uint32_t GetNBasicModes (void) const
WifiMode GetNonUnicastMode (void) const
uint32_t GetRtsCtsThreshold (void) const
WifiMode GetRtsMode (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
bool IsAssociated (Mac48Address address) const
bool IsBrandNew (Mac48Address address) const
bool IsLastFragment (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fragmentNumber)
bool IsWaitAssocTxOk (Mac48Address address) const
bool NeedDataRetransmission (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
bool NeedFragmentation (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
bool NeedRts (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
bool NeedRtsRetransmission (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet)
void PrepareForQueue (Mac48Address address, const WifiMacHeader *header, Ptr< const Packet > packet, uint32_t fullPacketSize)
void RecordDisassociated (Mac48Address address)
void RecordGotAssocTxFailed (Mac48Address address)
void RecordGotAssocTxOk (Mac48Address address)
void RecordWaitAssocTxOk (Mac48Address address)
void ReportDataFailed (Mac48Address address, const WifiMacHeader *header)
void ReportDataOk (Mac48Address address, const WifiMacHeader *header, double ackSnr, WifiMode ackMode, double dataSnr)
void ReportFinalDataFailed (Mac48Address address, const WifiMacHeader *header)
void ReportFinalRtsFailed (Mac48Address address, const WifiMacHeader *header)
void ReportRtsFailed (Mac48Address address, const WifiMacHeader *header)
void ReportRtsOk (Mac48Address address, const WifiMacHeader *header, double ctsSnr, WifiMode ctsMode, double rtsSnr)
void ReportRxOk (Mac48Address address, const WifiMacHeader *header, double rxSnr, WifiMode txMode)
void Reset (void)
void Reset (Mac48Address address)
void SetFragmentationThreshold (uint32_t threshold)
void SetMaxSlrc (uint32_t maxSlrc)
void SetMaxSsrc (uint32_t maxSsrc)
void SetRtsCtsThreshold (uint32_t threshold)
virtual void SetupPhy (Ptr< WifiPhy > phy)
- Public Member Functions inherited from ns3::Object
 Object ()
virtual ~Object ()
void AggregateObject (Ptr< Object > other)
void Dispose (void)
AggregateIterator GetAggregateIterator (void) const
virtual TypeId GetInstanceTypeId (void) const
template<typename T >
Ptr< T > GetObject (void) const
template<typename T >
Ptr< T > GetObject (TypeId tid) const
void Start (void)
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 SimpleRefCount (const SimpleRefCount &o)
uint32_t GetReferenceCount (void) const
SimpleRefCountoperator= (const SimpleRefCount &o)
void Ref (void) const
void Unref (void) const
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
void GetAttribute (std::string name, AttributeValue &value) const
bool GetAttributeFailSafe (std::string name, AttributeValue &attribute) const
void SetAttribute (std::string name, const AttributeValue &value)
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)

Static Public Member Functions

static TypeId GetTypeId (void)
 This method returns the TypeId associated to ns3::WifiRemoteStationManager.

Protected Member Functions

virtual void DoDispose (void)
uint32_t GetNSupported (const WifiRemoteStation *station) const
WifiMode GetSupported (const WifiRemoteStation *station, uint32_t i) const
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
virtual void DoStart (void)
virtual void NotifyNewAggregate (void)

Private Types

typedef std::vector
< WifiRemoteStation * > 
Stations
typedef std::vector
< WifiRemoteStationState * > 
StationStates

Private Member Functions

virtual WifiRemoteStationDoCreateStation (void) const =0
virtual WifiMode DoGetDataMode (WifiRemoteStation *station, uint32_t size)=0
virtual WifiMode DoGetRtsMode (WifiRemoteStation *station)=0
virtual bool DoNeedDataRetransmission (WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual bool DoNeedFragmentation (WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual bool DoNeedRts (WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual bool DoNeedRtsRetransmission (WifiRemoteStation *station, Ptr< const Packet > packet, bool normally)
virtual void DoReportDataFailed (WifiRemoteStation *station)=0
virtual void DoReportDataOk (WifiRemoteStation *station, double ackSnr, WifiMode ackMode, double dataSnr)=0
virtual void DoReportFinalDataFailed (WifiRemoteStation *station)=0
virtual void DoReportFinalRtsFailed (WifiRemoteStation *station)=0
virtual void DoReportRtsFailed (WifiRemoteStation *station)=0
virtual void DoReportRtsOk (WifiRemoteStation *station, double ctsSnr, WifiMode ctsMode, double rtsSnr)=0
virtual void DoReportRxOk (WifiRemoteStation *station, double rxSnr, WifiMode txMode)=0
WifiMode GetControlAnswerMode (Mac48Address address, WifiMode reqMode)
uint32_t GetNFragments (Ptr< const Packet > packet)
virtual bool IsLowLatency (void) const =0
WifiRemoteStationLookup (Mac48Address address, uint8_t tid) const
WifiRemoteStationLookup (Mac48Address address, const WifiMacHeader *header) const
 Find a remote station by its remote address and TID taken from MAC header.
WifiRemoteStationStateLookupState (Mac48Address address) const

Private Attributes

double m_avgSlrcCoefficient
WifiModeList m_bssBasicRateSet
WifiMode m_defaultTxMode
uint32_t m_fragmentationThreshold
bool m_isLowLatency
TracedCallback< Mac48Addressm_macTxDataFailed
TracedCallback< Mac48Addressm_macTxFinalDataFailed
TracedCallback< Mac48Addressm_macTxFinalRtsFailed
TracedCallback< Mac48Addressm_macTxRtsFailed
uint32_t m_maxSlrc
uint32_t m_maxSsrc
WifiMode m_nonUnicastMode
uint32_t m_rtsCtsThreshold
StationStates m_states
Stations m_stations
Ptr< WifiPhym_wifiPhy

Detailed Description

hold a list of per-remote-station state.

See Also
ns3::WifiRemoteStation.

Definition at line 81 of file wifi-remote-station-manager.h.

Member Typedef Documentation

Definition at line 398 of file wifi-remote-station-manager.h.

Constructor & Destructor Documentation

ns3::WifiRemoteStationManager::WifiRemoteStationManager ( )

Definition at line 190 of file wifi-remote-station-manager.cc.

ns3::WifiRemoteStationManager::~WifiRemoteStationManager ( )
virtual

Definition at line 194 of file wifi-remote-station-manager.cc.

Member Function Documentation

void ns3::WifiRemoteStationManager::AddBasicMode ( WifiMode  mode)

Definition at line 743 of file wifi-remote-station-manager.cc.

References GetBasicMode(), GetNBasicModes(), and m_bssBasicRateSet.

Referenced by ns3::StaWifiMac::Receive(), and ns3::MeshWifiInterfaceMac::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::AddSupportedMode ( Mac48Address  address,
WifiMode  mode 
)

Invoked in a STA or AP to store the set of modes supported by a destination which is also supported locally. The set of supported modes includes the BSSBasicRateSet.

Definition at line 274 of file wifi-remote-station-manager.cc.

References ns3::Mac48Address::IsGroup(), LookupState(), and NS_ASSERT.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), and Reset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual WifiRemoteStation* ns3::WifiRemoteStationManager::DoCreateStation ( void  ) const
privatepure virtual
Returns
a new station data structure

Referenced by Lookup().

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::DoDispose ( void  )
protectedvirtual

This method is called by Object::Dispose or by the object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overriden 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 198 of file wifi-remote-station-manager.cc.

References m_states, and m_stations.

virtual WifiMode ns3::WifiRemoteStationManager::DoGetDataMode ( WifiRemoteStation station,
uint32_t  size 
)
privatepure virtual
Parameters
stationthe station with which we need to communicate
sizesize of the packet or fragment we want to send
Returns
the transmission mode to use to send a packet to the station

Note: This method is called before sending a unicast packet or a fragment of a unicast packet to decide which transmission mode to use.

Referenced by GetDataMode(), and PrepareForQueue().

+ Here is the caller graph for this function:

virtual WifiMode ns3::WifiRemoteStationManager::DoGetRtsMode ( WifiRemoteStation station)
privatepure virtual
Parameters
stationthe station with which we need to communicate
Returns
the transmission mode to use to send an rts to the station

Note: This method is called before sending an rts to a station to decide which transmission mode to use for the rts.

Referenced by GetRtsMode(), and PrepareForQueue().

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::DoNeedDataRetransmission ( WifiRemoteStation station,
Ptr< const Packet packet,
bool  normally 
)
privatevirtual
Parameters
stationthe station with which we need to communicate
packetthe packet to send
normallyindicates whether the normal 802.11 data retransmission mechanism would request that the data is retransmitted or not.
Returns
true if we want to resend a packet after a failed transmission attempt, false otherwise.

Note: This method is called after a unicast packet transmission has been attempted and has failed.

Definition at line 791 of file wifi-remote-station-manager.cc.

Referenced by NeedDataRetransmission().

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::DoNeedFragmentation ( WifiRemoteStation station,
Ptr< const Packet packet,
bool  normally 
)
privatevirtual
Parameters
stationthe station with which we need to communicate
packetthe packet to send
normallyindicates whether the normal 802.11 data fragmentation mechanism would request that the data packet is fragmented or not.
Returns
true if this packet should be fragmented, false otherwise.

Note: This method is called before sending a unicast packet.

Definition at line 797 of file wifi-remote-station-manager.cc.

Referenced by NeedFragmentation().

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::DoNeedRts ( WifiRemoteStation station,
Ptr< const Packet packet,
bool  normally 
)
privatevirtual
Parameters
stationthe station with which we need to communicate
packetthe packet to send
normallyindicates whether the normal 802.11 rts enable mechanism would request that the rts is sent or not.
Returns
true if we want to use an RTS/CTS handshake for this packet before sending it, false otherwise.

Note: This method is called before a unicast packet is sent on the medium.

Definition at line 779 of file wifi-remote-station-manager.cc.

Referenced by NeedRts().

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::DoNeedRtsRetransmission ( WifiRemoteStation station,
Ptr< const Packet packet,
bool  normally 
)
privatevirtual
Parameters
stationthe station with which we need to communicate
packetthe packet to send
normallyindicates whether the normal 802.11 rts enable mechanism would request that the rts is retransmitted or not.
Returns
true if we want to restart a failed RTS/CTS handshake, false otherwise.

Note: This method is called after an rts/cts handshake has been attempted and has failed.

Definition at line 785 of file wifi-remote-station-manager.cc.

Referenced by NeedRtsRetransmission().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportDataFailed ( WifiRemoteStation station)
privatepure virtual

Referenced by ReportDataFailed().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportDataOk ( WifiRemoteStation station,
double  ackSnr,
WifiMode  ackMode,
double  dataSnr 
)
privatepure virtual

Referenced by ReportDataOk().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportFinalDataFailed ( WifiRemoteStation station)
privatepure virtual

Referenced by ReportFinalDataFailed().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportFinalRtsFailed ( WifiRemoteStation station)
privatepure virtual

Referenced by ReportFinalRtsFailed().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportRtsFailed ( WifiRemoteStation station)
privatepure virtual

Referenced by ReportRtsFailed().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportRtsOk ( WifiRemoteStation station,
double  ctsSnr,
WifiMode  ctsMode,
double  rtsSnr 
)
privatepure virtual

Referenced by ReportRtsOk().

+ Here is the caller graph for this function:

virtual void ns3::WifiRemoteStationManager::DoReportRxOk ( WifiRemoteStation station,
double  rxSnr,
WifiMode  txMode 
)
privatepure virtual

Referenced by ReportRxOk().

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetAckMode ( Mac48Address  address,
WifiMode  dataMode 
)
Parameters
address
dataModethe transmission mode used to send an ACK we just received
Returns
the transmission mode to use for the ACK to complete the data/ACK handshake.

Definition at line 657 of file wifi-remote-station-manager.cc.

References GetControlAnswerMode(), ns3::Mac48Address::IsGroup(), and NS_ASSERT.

Referenced by ns3::MacLow::GetAckTxModeForData().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetControlAnswerMode ( Mac48Address  address,
WifiMode  reqMode 
)
private

The standard has relatively unambiguous rules for selecting a control response rate (the below is quoted from IEEE 802.11-2007, Section 9.6):

To allow the transmitting STA to calculate the contents of the Duration/ID field, a STA responding to a received frame shall transmit its Control Response frame (either CTS or ACK), other than the BlockAck control frame, at the highest rate in the BSSBasicRateSet parameter that is less than or equal to the rate of the immediately previous frame in the frame exchange sequence (as defined in 9.12) and that is of the same modulation class (see 9.6.1) as the received frame...

If no suitable basic rate was found, we search the mandatory rates. The standard (IEEE 802.11-2007, Section 9.6) says:

...If no rate contained in the BSSBasicRateSet parameter meets these conditions, then the control frame sent in response to a received frame shall be transmitted at the highest mandatory rate of the PHY that is less than or equal to the rate of the received frame, and that is of the same modulation class as the received frame. In addition, the Control Response frame shall be sent using the same PHY options as the received frame, unless they conflict with the requirement to use the BSSBasicRateSet parameter.

TODO: Note that we're ignoring the last sentence for now, because there is not yet any manipulation here of PHY options.

If we still haven't found a suitable rate for the response then someone has messed up the simulation config. This probably means that the WifiPhyStandard is not set correctly, or that a rate that is not supported by the PHY has been explicitly requested in a WifiRemoteStationManager (or descendant) configuration.

Either way, it is serious - we can either disobey the standard or fail, and I have chosen to do the latter...

Definition at line 545 of file wifi-remote-station-manager.cc.

References GetDefaultMode(), ns3::WifiPhy::GetMode(), ns3::WifiMode::GetModulationClass(), ns3::WifiPhy::GetNModes(), ns3::WifiMode::GetPhyRate(), ns3::WifiMode::IsMandatory(), m_bssBasicRateSet, m_wifiPhy, and NS_FATAL_ERROR.

Referenced by GetAckMode(), and GetCtsMode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetCtsMode ( Mac48Address  address,
WifiMode  rtsMode 
)
Parameters
addressremote address
rtsModethe transmission mode used to send an RTS we just received
Returns
the transmission mode to use for the CTS to complete the RTS/CTS handshake.

Definition at line 651 of file wifi-remote-station-manager.cc.

References GetControlAnswerMode(), ns3::Mac48Address::IsGroup(), and NS_ASSERT.

Referenced by ns3::MacLow::GetCtsTxModeForRts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetDataMode ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet,
uint32_t  fullPacketSize 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
fullPacketSizethe size of the packet after its 802.11 MAC header has been added.
Returns
the transmission mode to use to send this packet

Definition at line 358 of file wifi-remote-station-manager.cc.

References DoGetDataMode(), ns3::TxModeTag::GetDataMode(), GetNonUnicastMode(), ns3::Mac48Address::IsGroup(), IsLowLatency(), Lookup(), and NS_ASSERT.

Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric(), and ns3::MacLow::GetDataTxMode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetDefaultMode ( void  ) const

Definition at line 726 of file wifi-remote-station-manager.cc.

References m_defaultTxMode.

Referenced by ns3::IdealWifiManager::DoGetDataMode(), ns3::IdealWifiManager::DoGetRtsMode(), GetControlAnswerMode(), LookupState(), and Reset().

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetFragmentationThreshold ( void  ) const

Definition at line 240 of file wifi-remote-station-manager.cc.

References m_fragmentationThreshold.

Referenced by GetFragmentOffset(), GetFragmentSize(), GetNFragments(), and NeedFragmentation().

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetFragmentOffset ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet,
uint32_t  fragmentNumber 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
fragmentNumberthe fragment index of the next fragment to send (starts at zero).
Returns
the offset within the original packet where this fragment starts.

Definition at line 528 of file wifi-remote-station-manager.cc.

References GetFragmentationThreshold(), GetNFragments(), ns3::Mac48Address::IsGroup(), and NS_ASSERT.

Referenced by ns3::EdcaTxopN::GetFragmentOffset(), and ns3::DcaTxop::GetFragmentOffset().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetFragmentSize ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet,
uint32_t  fragmentNumber 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
fragmentNumberthe fragment index of the next fragment to send (starts at zero).
Returns
the size of the corresponding fragment.

Definition at line 508 of file wifi-remote-station-manager.cc.

References GetFragmentationThreshold(), GetNFragments(), ns3::Packet::GetSize(), ns3::Mac48Address::IsGroup(), and NS_ASSERT.

Referenced by ns3::EdcaTxopN::GetFragmentSize(), ns3::DcaTxop::GetFragmentSize(), ns3::EdcaTxopN::GetNextFragmentSize(), and ns3::DcaTxop::GetNextFragmentSize().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiRemoteStationInfo ns3::WifiRemoteStationManager::GetInfo ( Mac48Address  address)

Definition at line 664 of file wifi-remote-station-manager.cc.

References LookupState(), and ns3::WifiRemoteStationState::m_info.

Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetMaxSlrc ( void  ) const

Definition at line 230 of file wifi-remote-station-manager.cc.

References m_maxSlrc.

Referenced by NeedDataRetransmission().

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetMaxSsrc ( void  ) const

Definition at line 225 of file wifi-remote-station-manager.cc.

References m_maxSsrc.

Referenced by NeedRtsRetransmission().

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetNBasicModes ( void  ) const
uint32_t ns3::WifiRemoteStationManager::GetNFragments ( Ptr< const Packet packet)
private

Definition at line 501 of file wifi-remote-station-manager.cc.

References GetFragmentationThreshold(), and ns3::Packet::GetSize().

Referenced by GetFragmentOffset(), GetFragmentSize(), and IsLastFragment().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetNonUnicastMode ( void  ) const

Definition at line 766 of file wifi-remote-station-manager.cc.

References GetBasicMode(), and m_nonUnicastMode.

Referenced by GetDataMode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32_t ns3::WifiRemoteStationManager::GetRtsCtsThreshold ( void  ) const

Definition at line 235 of file wifi-remote-station-manager.cc.

References m_rtsCtsThreshold.

Referenced by NeedRts().

+ Here is the caller graph for this function:

WifiMode ns3::WifiRemoteStationManager::GetRtsMode ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
Returns
the transmission mode to use to send the RTS prior to the transmission of the data packet itself.

Definition at line 376 of file wifi-remote-station-manager.cc.

References DoGetRtsMode(), ns3::TxModeTag::GetRtsMode(), ns3::Mac48Address::IsGroup(), IsLowLatency(), Lookup(), and NS_ASSERT.

Referenced by ns3::MacLow::GetRtsTxMode().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

TypeId ns3::WifiRemoteStationManager::GetTypeId ( void  )
static

This method returns the TypeId associated to ns3::WifiRemoteStationManager.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/RemoteStationManager

Attributes defined for this type:

  • IsLowLatency: If true, we attempt to modelize a so-called low-latency device: a device where decisions about tx parameters can be made on a per-packet basis and feedback about the transmission of each packet is obtained before sending the next. Otherwise, we modelize a high-latency device, that is a device where we cannot update our decision about tx parameters after every packet transmission.
  • MaxSsrc: The maximum number of retransmission attempts for an RTS. This value will not have any effect on some rate control algorithms.
  • MaxSlrc: The maximum number of retransmission attempts for a DATA packet. This value will not have any effect on some rate control algorithms.
  • RtsCtsThreshold: If the size of the data packet + LLC header + MAC header + FCS trailer is bigger than this value, we use an RTS/CTS handshake before sending the data, as per IEEE Std. 802.11-2007, Section 9.2.6. This value will not have any effect on some rate control algorithms.
  • FragmentationThreshold: If the size of the data packet + LLC header + MAC header + FCS trailer is biggerthan this value, we fragment it such that the size of the fragments are equal or smaller than this value, as per IEEE Std. 802.11-2007, Section 9.4. This value will not have any effect on some rate control algorithms.
  • NonUnicastMode: Wifi mode used for non-unicast transmissions.
    • Set with class: WifiModeValue
    • Underlying type: WifiMode
    • Initial value: Invalid-WifiMode
    • Flags: construct write read

TraceSources defined for this type:

  • MacTxRtsFailed: The transmission of a RTS by the MAC layer has failed
  • MacTxDataFailed: The transmission of a data packet by the MAC layer has failed
  • MacTxFinalRtsFailed: The transmission of a RTS has exceeded the maximum number of attempts
  • MacTxFinalDataFailed: The transmission of a data packet has exceeded the maximum number of attempts

Reimplemented from ns3::Object.

Reimplemented in ns3::MinstrelWifiManager, ns3::IdealWifiManager, ns3::ArfWifiManager, ns3::OnoeWifiManager, ns3::AmrrWifiManager, ns3::RraaWifiManager, ns3::AarfcdWifiManager, ns3::CaraWifiManager, ns3::AarfWifiManager, and ns3::ConstantRateWifiManager.

Definition at line 135 of file wifi-remote-station-manager.cc.

References IsLowLatency(), m_fragmentationThreshold, m_macTxDataFailed, m_macTxFinalDataFailed, m_macTxFinalRtsFailed, m_macTxRtsFailed, m_maxSlrc, m_maxSsrc, m_nonUnicastMode, m_rtsCtsThreshold, ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

+ Here is the call graph for this function:

bool ns3::WifiRemoteStationManager::IsAssociated ( Mac48Address  address) const

Definition at line 298 of file wifi-remote-station-manager.cc.

References ns3::WifiRemoteStationState::GOT_ASSOC_TX_OK, ns3::Mac48Address::IsGroup(), LookupState(), and ns3::WifiRemoteStationState::m_state.

Referenced by ns3::ApWifiMac::Enqueue(), and ns3::ApWifiMac::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::IsBrandNew ( Mac48Address  address) const

Definition at line 289 of file wifi-remote-station-manager.cc.

References ns3::WifiRemoteStationState::BRAND_NEW, ns3::Mac48Address::IsGroup(), LookupState(), and ns3::WifiRemoteStationState::m_state.

Referenced by ns3::AdhocWifiMac::Enqueue(), and ns3::MeshWifiInterfaceMac::ForwardDown().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::IsLastFragment ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet,
uint32_t  fragmentNumber 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
fragmentNumberthe fragment index of the next fragment to send (starts at zero).
Returns
true if this is the last fragment, false otherwise.

Definition at line 537 of file wifi-remote-station-manager.cc.

References GetNFragments(), ns3::Mac48Address::IsGroup(), and NS_ASSERT.

Referenced by ns3::EdcaTxopN::IsLastFragment(), and ns3::DcaTxop::IsLastFragment().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

virtual bool ns3::WifiRemoteStationManager::IsLowLatency ( void  ) const
privatepure virtual
Returns
whether this manager is a manager designed to work in low-latency environments.

Note: In this context, low vs high latency is defined in IEEE 802.11 Rate Adaptation: A Practical Approach, by M. Lacage, M.H. Manshaei, and T. Turletti.

Referenced by GetDataMode(), GetRtsMode(), GetTypeId(), and PrepareForQueue().

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::IsWaitAssocTxOk ( Mac48Address  address) const

Definition at line 307 of file wifi-remote-station-manager.cc.

References ns3::Mac48Address::IsGroup(), LookupState(), ns3::WifiRemoteStationState::m_state, and ns3::WifiRemoteStationState::WAIT_ASSOC_TX_OK.

Referenced by ns3::ApWifiMac::TxFailed(), and ns3::ApWifiMac::TxOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiRemoteStation * ns3::WifiRemoteStationManager::Lookup ( Mac48Address  address,
const WifiMacHeader header 
) const
private

Find a remote station by its remote address and TID taken from MAC header.

Definition at line 688 of file wifi-remote-station-manager.cc.

References ns3::WifiMacHeader::GetQosTid(), ns3::WifiMacHeader::IsQosData(), and Lookup().

+ Here is the call graph for this function:

bool ns3::WifiRemoteStationManager::NeedDataRetransmission ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
Returns
true if we want to resend a packet after a failed transmission attempt, false otherwise.

Definition at line 480 of file wifi-remote-station-manager.cc.

References DoNeedDataRetransmission(), GetMaxSlrc(), ns3::Mac48Address::IsGroup(), Lookup(), and NS_ASSERT.

Referenced by ns3::EdcaTxopN::NeedDataRetransmission(), and ns3::DcaTxop::NeedDataRetransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::NeedFragmentation ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
Returns
true if this packet should be fragmented, false otherwise.

Definition at line 489 of file wifi-remote-station-manager.cc.

References DoNeedFragmentation(), GetFragmentationThreshold(), ns3::WifiMacHeader::GetSize(), ns3::Packet::GetSize(), ns3::Mac48Address::IsGroup(), Lookup(), and ns3::WIFI_MAC_FCS_LENGTH.

Referenced by ns3::EdcaTxopN::NeedFragmentation(), and ns3::DcaTxop::NeedFragmentation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::NeedRts ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
Returns
true if we want to use an RTS/CTS handshake for this packet before sending it, false otherwise.

Definition at line 460 of file wifi-remote-station-manager.cc.

References DoNeedRts(), GetRtsCtsThreshold(), ns3::WifiMacHeader::GetSize(), ns3::Packet::GetSize(), ns3::Mac48Address::IsGroup(), Lookup(), and ns3::WIFI_MAC_FCS_LENGTH.

Referenced by ns3::EdcaTxopN::NeedRts(), and ns3::DcaTxop::NeedRts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::WifiRemoteStationManager::NeedRtsRetransmission ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet 
)
Parameters
addressremote address
headerMAC header
packetthe packet to send
Returns
true if we want to restart a failed RTS/CTS handshake, false otherwise.

Definition at line 471 of file wifi-remote-station-manager.cc.

References DoNeedRtsRetransmission(), GetMaxSsrc(), ns3::Mac48Address::IsGroup(), Lookup(), and NS_ASSERT.

Referenced by ns3::EdcaTxopN::NeedRtsRetransmission(), and ns3::DcaTxop::NeedRtsRetransmission().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::PrepareForQueue ( Mac48Address  address,
const WifiMacHeader header,
Ptr< const Packet packet,
uint32_t  fullPacketSize 
)
Parameters
addressremote address
headerMAC header
packetthe packet to queue
fullPacketSizethe size of the packet after its 802.11 MAC header has been added.

This method is typically invoked just before queuing a packet for transmission. It is a no-op unless the IsLowLatency attribute of the attached ns3::WifiRemoteStationManager is set to false, in which case, the tx parameters of the packet are calculated and stored in the packet as a tag. These tx parameters are later retrieved from GetDadaMode and GetRtsMode.

Definition at line 340 of file wifi-remote-station-manager.cc.

References ns3::Packet::AddPacketTag(), data, DoGetDataMode(), DoGetRtsMode(), ns3::Mac48Address::IsGroup(), IsLowLatency(), and Lookup().

Referenced by ns3::EdcaTxopN::PushFront(), ns3::DcaTxop::Queue(), and ns3::EdcaTxopN::Queue().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::RecordDisassociated ( Mac48Address  address)

Definition at line 334 of file wifi-remote-station-manager.cc.

References ns3::WifiRemoteStationState::DISASSOC, ns3::Mac48Address::IsGroup(), LookupState(), ns3::WifiRemoteStationState::m_state, and NS_ASSERT.

Referenced by ns3::AdhocWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), and ns3::ApWifiMac::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::RecordGotAssocTxFailed ( Mac48Address  address)

Definition at line 328 of file wifi-remote-station-manager.cc.

References ns3::WifiRemoteStationState::DISASSOC, ns3::Mac48Address::IsGroup(), LookupState(), ns3::WifiRemoteStationState::m_state, and NS_ASSERT.

Referenced by ns3::ApWifiMac::TxFailed().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::RecordGotAssocTxOk ( Mac48Address  address)

Definition at line 322 of file wifi-remote-station-manager.cc.

References ns3::WifiRemoteStationState::GOT_ASSOC_TX_OK, ns3::Mac48Address::IsGroup(), LookupState(), ns3::WifiRemoteStationState::m_state, and NS_ASSERT.

Referenced by ns3::ApWifiMac::TxOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::RecordWaitAssocTxOk ( Mac48Address  address)

Definition at line 316 of file wifi-remote-station-manager.cc.

References ns3::Mac48Address::IsGroup(), LookupState(), ns3::WifiRemoteStationState::m_state, NS_ASSERT, and ns3::WifiRemoteStationState::WAIT_ASSOC_TX_OK.

Referenced by ns3::ApWifiMac::Receive().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportDataFailed ( Mac48Address  address,
const WifiMacHeader header 
)

Should be invoked whenever the AckTimeout associated to a transmission attempt expires.

Definition at line 400 of file wifi-remote-station-manager.cc.

References DoReportDataFailed(), ns3::Mac48Address::IsGroup(), Lookup(), m_macTxDataFailed, and NS_ASSERT.

Referenced by ns3::MacLow::BlockAckTimeout(), ns3::MacLow::FastAckTimeout(), ns3::MacLow::NormalAckTimeout(), and ns3::MacLow::SuperFastAckTimeout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportDataOk ( Mac48Address  address,
const WifiMacHeader header,
double  ackSnr,
WifiMode  ackMode,
double  dataSnr 
)

Should be invoked whenever we receive the Ack associated to a data packet we just sent.

Definition at line 419 of file wifi-remote-station-manager.cc.

References DoReportDataOk(), ns3::Mac48Address::IsGroup(), Lookup(), and NS_ASSERT.

Referenced by ns3::MacLow::ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportFinalDataFailed ( Mac48Address  address,
const WifiMacHeader header 
)

Should be invoked after calling ReportDataFailed if NeedDataRetransmission returns false

Definition at line 439 of file wifi-remote-station-manager.cc.

References DoReportFinalDataFailed(), ns3::Mac48Address::IsGroup(), Lookup(), m_macTxFinalDataFailed, and NS_ASSERT.

Referenced by ns3::EdcaTxopN::MissedAck(), and ns3::DcaTxop::MissedAck().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportFinalRtsFailed ( Mac48Address  address,
const WifiMacHeader header 
)

Should be invoked after calling ReportRtsFailed if NeedRtsRetransmission returns false

Definition at line 429 of file wifi-remote-station-manager.cc.

References DoReportFinalRtsFailed(), ns3::Mac48Address::IsGroup(), Lookup(), m_macTxFinalRtsFailed, and NS_ASSERT.

Referenced by ns3::EdcaTxopN::MissedCts(), and ns3::DcaTxop::MissedCts().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportRtsFailed ( Mac48Address  address,
const WifiMacHeader header 
)

Should be invoked whenever the RtsTimeout associated to a transmission attempt expires.

Definition at line 391 of file wifi-remote-station-manager.cc.

References DoReportRtsFailed(), ns3::Mac48Address::IsGroup(), Lookup(), m_macTxRtsFailed, and NS_ASSERT.

Referenced by ns3::MacLow::CtsTimeout().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportRtsOk ( Mac48Address  address,
const WifiMacHeader header,
double  ctsSnr,
WifiMode  ctsMode,
double  rtsSnr 
)

Should be invoked whenever we receive the Cts associated to an RTS we just sent.

Definition at line 409 of file wifi-remote-station-manager.cc.

References DoReportRtsOk(), ns3::Mac48Address::IsGroup(), Lookup(), and NS_ASSERT.

Referenced by ns3::MacLow::ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::ReportRxOk ( Mac48Address  address,
const WifiMacHeader header,
double  rxSnr,
WifiMode  txMode 
)
Parameters
addressremote address
headerMAC header
rxSnrthe snr of the packet received
txModethe transmission mode used for the packet received.

Should be invoked whenever a packet is successfully received.

Definition at line 449 of file wifi-remote-station-manager.cc.

References DoReportRxOk(), ns3::Mac48Address::IsGroup(), and Lookup().

Referenced by ns3::MacLow::ReceiveOk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::Reset ( void  )

Definition at line 731 of file wifi-remote-station-manager.cc.

References ns3::WifiMode::IsMandatory(), m_bssBasicRateSet, m_defaultTxMode, m_stations, and NS_ASSERT.

Referenced by ns3::MacLow::NotifySwitchingStartNow(), and SetupPhy().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::WifiRemoteStationManager::Reset ( Mac48Address  address)

Invoked in an AP upon disassociation of a specific STA.

Definition at line 266 of file wifi-remote-station-manager.cc.

References AddSupportedMode(), GetDefaultMode(), ns3::Mac48Address::IsGroup(), LookupState(), and NS_ASSERT.

+ Here is the call graph for this function:

void ns3::WifiRemoteStationManager::SetFragmentationThreshold ( uint32_t  threshold)

Definition at line 260 of file wifi-remote-station-manager.cc.

References m_fragmentationThreshold.

void ns3::WifiRemoteStationManager::SetMaxSlrc ( uint32_t  maxSlrc)

Definition at line 250 of file wifi-remote-station-manager.cc.

References m_maxSlrc.

void ns3::WifiRemoteStationManager::SetMaxSsrc ( uint32_t  maxSsrc)

Definition at line 245 of file wifi-remote-station-manager.cc.

References m_maxSsrc.

void ns3::WifiRemoteStationManager::SetRtsCtsThreshold ( uint32_t  threshold)

Definition at line 255 of file wifi-remote-station-manager.cc.

References m_rtsCtsThreshold.

void ns3::WifiRemoteStationManager::SetupPhy ( Ptr< WifiPhy phy)
virtual

Reimplemented in ns3::MinstrelWifiManager, and ns3::IdealWifiManager.

Definition at line 212 of file wifi-remote-station-manager.cc.

References ns3::WifiPhy::GetMode(), m_defaultTxMode, m_wifiPhy, and Reset().

Referenced by ns3::WifiNetDevice::CompleteConfig().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

double ns3::WifiRemoteStationManager::m_avgSlrcCoefficient
private

Definition at line 430 of file wifi-remote-station-manager.h.

WifiModeList ns3::WifiRemoteStationManager::m_bssBasicRateSet
private

This member is the list of WifiMode objects that comprise the BSSBasicRateSet parameter. This list is constructed through calls to WifiRemoteStationManager::AddBasicMode(), and an API that allows external access to it is available through WifiRemoteStationManager::GetNBasicModes() and WifiRemoteStationManager::GetBasicMode().

Definition at line 422 of file wifi-remote-station-manager.h.

Referenced by AddBasicMode(), GetBasicMode(), GetControlAnswerMode(), GetNBasicModes(), and Reset().

WifiMode ns3::WifiRemoteStationManager::m_defaultTxMode
private

Definition at line 412 of file wifi-remote-station-manager.h.

Referenced by GetDefaultMode(), Reset(), and SetupPhy().

uint32_t ns3::WifiRemoteStationManager::m_fragmentationThreshold
private
bool ns3::WifiRemoteStationManager::m_isLowLatency
private

Definition at line 424 of file wifi-remote-station-manager.h.

TracedCallback<Mac48Address> ns3::WifiRemoteStationManager::m_macTxDataFailed
private

The trace source fired when the transmission of a single data packet has failed

Definition at line 438 of file wifi-remote-station-manager.h.

Referenced by GetTypeId(), and ReportDataFailed().

TracedCallback<Mac48Address> ns3::WifiRemoteStationManager::m_macTxFinalDataFailed
private

The trace source fired when the transmission of a data packet has exceeded the maximum number of attempts

Definition at line 448 of file wifi-remote-station-manager.h.

Referenced by GetTypeId(), and ReportFinalDataFailed().

TracedCallback<Mac48Address> ns3::WifiRemoteStationManager::m_macTxFinalRtsFailed
private

The trace source fired when the transmission of a RTS has exceeded the maximum number of attempts

Definition at line 443 of file wifi-remote-station-manager.h.

Referenced by GetTypeId(), and ReportFinalRtsFailed().

TracedCallback<Mac48Address> ns3::WifiRemoteStationManager::m_macTxRtsFailed
private

The trace source fired when the transmission of a single RTS has failed

Definition at line 434 of file wifi-remote-station-manager.h.

Referenced by GetTypeId(), and ReportRtsFailed().

uint32_t ns3::WifiRemoteStationManager::m_maxSlrc
private

Definition at line 426 of file wifi-remote-station-manager.h.

Referenced by GetMaxSlrc(), GetTypeId(), and SetMaxSlrc().

uint32_t ns3::WifiRemoteStationManager::m_maxSsrc
private

Definition at line 425 of file wifi-remote-station-manager.h.

Referenced by GetMaxSsrc(), GetTypeId(), and SetMaxSsrc().

WifiMode ns3::WifiRemoteStationManager::m_nonUnicastMode
private

Definition at line 429 of file wifi-remote-station-manager.h.

Referenced by GetNonUnicastMode(), and GetTypeId().

uint32_t ns3::WifiRemoteStationManager::m_rtsCtsThreshold
private
StationStates ns3::WifiRemoteStationManager::m_states
private

Definition at line 401 of file wifi-remote-station-manager.h.

Referenced by DoDispose(), and LookupState().

Stations ns3::WifiRemoteStationManager::m_stations
private

Definition at line 402 of file wifi-remote-station-manager.h.

Referenced by DoDispose(), Lookup(), and Reset().

Ptr<WifiPhy> ns3::WifiRemoteStationManager::m_wifiPhy
private

This is a pointer to the WifiPhy associated with this WifiRemoteStationManager that is set on call to WifiRemoteStationManager::SetupPhy(). Through this pointer the station manager can determine PHY characteristics, such as the set of all transmission rates that may be supported (the "DeviceRateSet").

Definition at line 411 of file wifi-remote-station-manager.h.

Referenced by GetControlAnswerMode(), and SetupPhy().


The documentation for this class was generated from the following files: