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

base class for all MAC-level wifi objects.This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines). More...

#include <regular-wifi-mac.h>

+ Inheritance diagram for ns3::RegularWifiMac:
+ Collaboration diagram for ns3::RegularWifiMac:

Public Types

typedef Callback< void, Ptr
< Packet >, Mac48Address,
Mac48Address
ForwardUpCallback
 

Public Member Functions

 RegularWifiMac ()
 
virtual ~RegularWifiMac ()
 
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
 
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to)=0
 
Time GetAckTimeout (void) const
 
virtual Mac48Address GetAddress (void) const
 
virtual Time GetBasicBlockAckTimeout (void) const
 
virtual Mac48Address GetBssid (void) const
 
virtual Time GetCompressedBlockAckTimeout (void) const
 
Time GetCtsTimeout (void) const
 
bool GetCtsToSelfSupported () const
 
Time GetEifsNoDifs (void) const
 
Time GetPifs (void) const
 
Time GetRifs (void) const
 
Time GetSifs (void) const
 
Time GetSlot (void) const
 
virtual Ssid GetSsid (void) const
 
virtual Ptr< WifiPhyGetWifiPhy () const
 
virtual Ptr
< WifiRemoteStationManager
GetWifiRemoteStationManager () const
 
void SetAckTimeout (Time ackTimeout)
 
virtual void SetAddress (Mac48Address address)
 
virtual void SetBasicBlockAckTimeout (Time blockAckTimeout)
 
virtual void SetBssid (Mac48Address bssid)
 
virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout)
 
void SetCtsTimeout (Time ctsTimeout)
 
void SetCtsToSelfSupported (bool enable)
 
void SetEifsNoDifs (Time eifsNoDifs)
 
virtual void SetForwardUpCallback (ForwardUpCallback upCallback)
 
virtual void SetLinkDownCallback (Callback< void > linkDown)
 
virtual void SetLinkUpCallback (Callback< void > linkUp)
 
void SetPifs (Time pifs)
 
virtual void SetPromisc (void)
 Sets the interface in promiscuous mode. More...
 
void SetRifs (Time rifs)
 
void SetSifs (Time sifs)
 
void SetSlot (Time slotTime)
 
virtual void SetSsid (Ssid ssid)
 
virtual void SetWifiPhy (Ptr< WifiPhy > phy)
 
virtual void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)
 
virtual bool SupportsSendFrom (void) const
 
- Public Member Functions inherited from ns3::WifiMac
void ConfigureStandard (enum WifiPhyStandard standard)
 
Time GetMaxPropagationDelay (void) const
 
Time GetMsduLifetime (void) const
 
void NotifyPromiscRx (Ptr< const Packet > packet)
 
void NotifyRx (Ptr< const Packet > packet)
 
void NotifyRxDrop (Ptr< const Packet > packet)
 
void NotifyTx (Ptr< const Packet > packet)
 
void NotifyTxDrop (Ptr< const Packet > packet)
 
virtual void SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0
 
void SetMaxPropagationDelay (Time delay)
 
- 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 Initialize (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)
 
- Static Public Member Functions inherited from ns3::WifiMac
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 
- Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
static void Cleanup (void)
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 

Protected Types

typedef std::map< AcIndex, Ptr
< EdcaTxopN > > 
EdcaQueues
 

Protected Member Functions

virtual void DeaggregateAmsduAndForward (Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr)
 
virtual void DoDispose ()
 
virtual void DoInitialize ()
 
virtual void FinishConfigureStandard (enum WifiPhyStandard standard)
 
void ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to)
 
bool GetHtSupported () const
 
bool GetQosSupported () const
 
virtual void Receive (Ptr< Packet > packet, const WifiMacHeader *hdr)
 
virtual void SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, Mac48Address originator)
 
void SetHtSupported (bool enable)
 
void SetQosSupported (bool enable)
 
void SetTypeOfStation (TypeOfStation type)
 
virtual void TxFailed (const WifiMacHeader &hdr)
 
virtual void TxOk (const WifiMacHeader &hdr)
 
- Protected Member Functions inherited from ns3::WifiMac
void ConfigureDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac)
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 
virtual void NotifyNewAggregate (void)
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 
virtual void NotifyConstructionCompleted (void)
 

Protected Attributes

Ptr< DcaTxopm_dca
 
DcfManagerm_dcfManager
 
EdcaQueues m_edca
 
ForwardUpCallback m_forwardUp
 
bool m_htSupported
 
Callback< void > m_linkDown
 
Callback< void > m_linkUp
 
Ptr< MacLowm_low
 
Ptr< WifiPhym_phy
 
bool m_qosSupported
 
MacRxMiddlem_rxMiddle
 
Ssid m_ssid
 
Ptr< WifiRemoteStationManagerm_stationManager
 
MacTxMiddlem_txMiddle
 

Private Member Functions

 RegularWifiMac (const RegularWifiMac &)
 
Ptr< EdcaTxopNGetBEQueue (void) const
 
Ptr< EdcaTxopNGetBKQueue (void) const
 
Ptr< DcaTxopGetDcaTxop (void) const
 
Ptr< EdcaTxopNGetVIQueue (void) const
 
Ptr< EdcaTxopNGetVOQueue (void) const
 
RegularWifiMacoperator= (const RegularWifiMac &)
 
void SetupEdcaQueue (enum AcIndex ac)
 

Private Attributes

TracedCallback< const
WifiMacHeader & > 
m_txErrCallback
 
TracedCallback< const
WifiMacHeader & > 
m_txOkCallback
 

Detailed Description

base class for all MAC-level wifi objects.

This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines).

Config Paths

ns3::RegularWifiMac is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac

Attributes

  • QosSupported: This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • HtSupported: This Boolean attribute is set to enable 802.11n support at this STA
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • CtsToSelfSupported: Use CTS to Self when using a rate that is not in the basic set rate
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write read
  • DcaTxop: The DcaTxop object
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::DcaTxop >
    • Flags: read
  • VO_EdcaTxopN: Queue that manages packets belonging to AC_VO access class
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::EdcaTxopN >
    • Flags: read
  • VI_EdcaTxopN: Queue that manages packets belonging to AC_VI access class
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::EdcaTxopN >
    • Flags: read
  • BE_EdcaTxopN: Queue that manages packets belonging to AC_BE access class
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::EdcaTxopN >
    • Flags: read
  • BK_EdcaTxopN: Queue that manages packets belonging to AC_BK access class
    • Set with class: ns3::PointerValue
    • Underlying type: ns3::Ptr< ns3::EdcaTxopN >
    • Flags: read

Attributes defined in parent class ns3::WifiMac

  • CtsTimeout: When this timeout expires, the RTS/CTS handshake has failed.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +75000.0ns
    • Flags: construct write read
  • AckTimeout: When this timeout expires, the DATA/ACK handshake has failed.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +75000.0ns
    • Flags: construct write read
  • BasicBlockAckTimeout: When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +281000.0ns
    • Flags: construct write read
  • CompressedBlockAckTimeout: When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +107000.0ns
    • Flags: construct write read
  • Sifs: The value of the SIFS constant.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +16000.0ns
    • Flags: construct write read
  • EifsNoDifs: The value of EIFS-DIFS
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +60000.0ns
    • Flags: construct write read
  • Slot: The duration of a Slot.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +9000.0ns
    • Flags: construct write read
  • Pifs: The value of the PIFS constant.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +25000.0ns
    • Flags: construct write read
  • Rifs: The value of the RIFS constant.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +2000.0ns
    • Flags: construct write read
  • MaxPropagationDelay: The maximum propagation delay. Unused for now.
    • Set with class: ns3::TimeValue
    • Underlying type: Time -9223372036854775808.0ns:+9223372036854775807.0ns
    • Initial value: +3333.0ns
    • Flags: construct write read
  • Ssid: The ssid we want to belong to.
    • Set with class: SsidValue
    • Underlying type: Ssid
    • Initial value: default
    • Flags: construct write read

TraceSources

  • TxOkHeader: The header of successfully transmitted packet
  • TxErrHeader: The header of unsuccessfully transmitted packet

TraceSources defined in parent class ns3::WifiMac

  • MacTx: A packet has been received from higher layers and is being processed in preparation for queueing for transmission.
  • MacTxDrop: A packet has been dropped in the MAC layer before being queued for transmission.
  • MacPromiscRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a promiscuous trace,
  • MacRx: A packet has been received by this device, has been passed up from the physical layer and is being forwarded up the local protocol stack. This is a non-promiscuous trace,
  • MacRxDrop: A packet has been dropped in the MAC layer after it has been passed up from the physical layer.

Definition at line 50 of file regular-wifi-mac.h.

Member Typedef Documentation

typedef std::map<AcIndex, Ptr<EdcaTxopN> > ns3::RegularWifiMac::EdcaQueues
protected

This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function

Definition at line 245 of file regular-wifi-mac.h.

This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack.

Parameters
packetthe packet that has been received.
fromthe MAC address of the device that sent the packet.
tothe MAC address ot the device that the packet is destined for.

Definition at line 199 of file regular-wifi-mac.h.

Constructor & Destructor Documentation

ns3::RegularWifiMac::~RegularWifiMac ( )
virtual

Definition at line 72 of file regular-wifi-mac.cc.

References NS_LOG_FUNCTION.

ns3::RegularWifiMac::RegularWifiMac ( const RegularWifiMac )
private

Member Function Documentation

void ns3::RegularWifiMac::DeaggregateAmsduAndForward ( Ptr< Packet aggregatedPacket,
const WifiMacHeader hdr 
)
protectedvirtual

This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.

Parameters
aggregatedPacketthe Packet containing the A-MSDU.
hdra pointer to the MAC header for aggregatedPacket.

Reimplemented in ns3::ApWifiMac.

Definition at line 565 of file regular-wifi-mac.cc.

References ns3::MsduAggregator::Deaggregate(), and ForwardUp().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::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.

Reimplemented in ns3::MeshWifiInterfaceMac, and ns3::ApWifiMac.

Definition at line 91 of file regular-wifi-mac.cc.

References m_dca, m_dcfManager, m_edca, m_low, m_phy, m_rxMiddle, m_stationManager, m_txMiddle, and NS_LOG_FUNCTION.

Referenced by ns3::ApWifiMac::DoDispose(), and ns3::MeshWifiInterfaceMac::DoDispose().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::DoInitialize ( void  )
protectedvirtual

This method is called only once by Object::Initialize. If the user calls Object::Initialize multiple times, DoInitialize is called only the first time.

Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.

Reimplemented from ns3::Object.

Reimplemented in ns3::MeshWifiInterfaceMac, and ns3::ApWifiMac.

Definition at line 78 of file regular-wifi-mac.cc.

References m_dca, m_edca, and NS_LOG_FUNCTION.

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

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to,
Mac48Address  from 
)
virtual
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.
fromthe address from which the packet should be sent.

The packet should be enqueued in a tx queue, and should be dequeued as soon as the channel access function determines that access is granted to this MAC. The extra parameter "from" allows this device to operate in a bridged mode, forwarding received frames without altering the source address.

Implements ns3::WifiMac.

Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 437 of file regular-wifi-mac.cc.

References GetAddress(), and NS_FATAL_ERROR.

+ Here is the call graph for this function:

virtual void ns3::RegularWifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to 
)
pure virtual
Parameters
packetthe packet to send.
tothe address to which the packet should be sent.

The packet should be enqueued in a tx queue, and should be dequeued as soon as the channel access function determines that access is granted to this MAC.

Implements ns3::WifiMac.

Implemented in ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, ns3::AdhocWifiMac, and ns3::StaWifiMac.

void ns3::RegularWifiMac::FinishConfigureStandard ( enum WifiPhyStandard  standard)
protectedvirtual
Parameters
standardthe phy standard to be used

This method is called by ns3::WifiMac::ConfigureStandard to complete the configuration process for a requested phy standard.

This method may be overriden by a derived class (e.g., in order to apply DCF or EDCA parameters specific to the usage model it is dealing with), in which case the reimplementation may choose to deal with certain values in the WifiPhyStandard enumeration, and chain up to this implementation to deal with the remainder.

Implements ns3::WifiMac.

Reimplemented in ns3::MeshWifiInterfaceMac.

Definition at line 697 of file regular-wifi-mac.cc.

References ns3::AC_BE_NQOS, ns3::WifiMac::ConfigureDcf(), m_dca, m_edca, NS_FATAL_ERROR, ns3::WIFI_PHY_STANDARD_80211_10MHZ, ns3::WIFI_PHY_STANDARD_80211_5MHZ, ns3::WIFI_PHY_STANDARD_80211a, ns3::WIFI_PHY_STANDARD_80211b, ns3::WIFI_PHY_STANDARD_80211g, ns3::WIFI_PHY_STANDARD_80211n_2_4GHZ, ns3::WIFI_PHY_STANDARD_80211n_5GHZ, and ns3::WIFI_PHY_STANDARD_holland.

Referenced by ns3::MeshWifiInterfaceMac::FinishConfigureStandard().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::ForwardUp ( Ptr< Packet packet,
Mac48Address  from,
Mac48Address  to 
)
protected
Time ns3::RegularWifiMac::GetAckTimeout ( void  ) const
virtual
Returns
the current ACK timeout duration.

Implements ns3::WifiMac.

Definition at line 347 of file regular-wifi-mac.cc.

References m_low.

Time ns3::RegularWifiMac::GetBasicBlockAckTimeout ( void  ) const
virtual

Reimplemented from ns3::WifiMac.

Definition at line 373 of file regular-wifi-mac.cc.

References m_low.

Ptr< EdcaTxopN > ns3::RegularWifiMac::GetBEQueue ( void  ) const
private

Accessor for the AC_BE channel access function

Definition at line 189 of file regular-wifi-mac.cc.

References ns3::AC_BE, and m_edca.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Ptr< EdcaTxopN > ns3::RegularWifiMac::GetBKQueue ( void  ) const
private

Accessor for the AC_BK channel access function

Definition at line 195 of file regular-wifi-mac.cc.

References ns3::AC_BK, and m_edca.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Mac48Address ns3::RegularWifiMac::GetBssid ( void  ) const
virtual
Returns
the bssid of the network this device belongs to.

Implements ns3::WifiMac.

Definition at line 425 of file regular-wifi-mac.cc.

References m_low.

Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), and ns3::StaWifiMac::SetState().

+ Here is the caller graph for this function:

Time ns3::RegularWifiMac::GetCompressedBlockAckTimeout ( void  ) const
virtual

Reimplemented from ns3::WifiMac.

Definition at line 386 of file regular-wifi-mac.cc.

References m_low.

Time ns3::RegularWifiMac::GetCtsTimeout ( void  ) const
virtual
Returns
the current CTS timeout duration.

Implements ns3::WifiMac.

Definition at line 360 of file regular-wifi-mac.cc.

References m_low.

bool ns3::RegularWifiMac::GetCtsToSelfSupported ( ) const

Definition at line 268 of file regular-wifi-mac.cc.

References m_low.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Ptr< DcaTxop > ns3::RegularWifiMac::GetDcaTxop ( void  ) const
private

Accessor for the DCF object

Definition at line 171 of file regular-wifi-mac.cc.

References m_dca.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Time ns3::RegularWifiMac::GetEifsNoDifs ( void  ) const
virtual
Returns
the current EIFS minus DIFS duration

Implements ns3::WifiMac.

Definition at line 309 of file regular-wifi-mac.cc.

References ns3::DcfManager::GetEifsNoDifs(), and m_dcfManager.

+ Here is the call graph for this function:

bool ns3::RegularWifiMac::GetHtSupported ( ) const
protected

Get accessor for the m_htSupported member

Definition at line 256 of file regular-wifi-mac.cc.

References m_htSupported.

Referenced by GetTypeId(), and SetWifiRemoteStationManager().

+ Here is the caller graph for this function:

Time ns3::RegularWifiMac::GetPifs ( void  ) const
virtual
Returns
the current PIFS duration.

Implements ns3::WifiMac.

Definition at line 334 of file regular-wifi-mac.cc.

References m_low.

bool ns3::RegularWifiMac::GetQosSupported ( ) const
protected

Get accessor for the m_qosSupported member

Definition at line 244 of file regular-wifi-mac.cc.

References m_qosSupported.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Time ns3::RegularWifiMac::GetRifs ( void  ) const
virtual
Returns
the current RIFS duration.

Implements ns3::WifiMac.

Definition at line 321 of file regular-wifi-mac.cc.

References m_low.

Time ns3::RegularWifiMac::GetSifs ( void  ) const
virtual
Returns
the current SIFS duration.

Implements ns3::WifiMac.

Definition at line 296 of file regular-wifi-mac.cc.

References m_low.

Time ns3::RegularWifiMac::GetSlot ( void  ) const
virtual
Returns
the current slot duration.

Implements ns3::WifiMac.

Definition at line 282 of file regular-wifi-mac.cc.

References m_low.

Ssid ns3::RegularWifiMac::GetSsid ( void  ) const
virtual
Returns
the ssid which this MAC layer is going to try to stay in.

Implements ns3::WifiMac.

Definition at line 412 of file regular-wifi-mac.cc.

References m_ssid.

Referenced by ns3::StaWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().

+ Here is the caller graph for this function:

Ptr< EdcaTxopN > ns3::RegularWifiMac::GetVIQueue ( void  ) const
private

Accessor for the AC_VI channel access function

Definition at line 183 of file regular-wifi-mac.cc.

References ns3::AC_VI, and m_edca.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Ptr< EdcaTxopN > ns3::RegularWifiMac::GetVOQueue ( void  ) const
private

Accessor for the AC_VO channel access function

Definition at line 177 of file regular-wifi-mac.cc.

References ns3::AC_VO, and m_edca.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

Ptr< WifiPhy > ns3::RegularWifiMac::GetWifiPhy ( ) const
virtual
Returns
the physical layer attached to this MAC.

Definition at line 210 of file regular-wifi-mac.cc.

References m_phy.

Ptr< WifiRemoteStationManager > ns3::RegularWifiMac::GetWifiRemoteStationManager ( ) const
virtual
Returns
the station manager attached to this MAC.

Definition at line 135 of file regular-wifi-mac.cc.

References m_stationManager.

RegularWifiMac& ns3::RegularWifiMac::operator= ( const RegularWifiMac )
private
void ns3::RegularWifiMac::Receive ( Ptr< Packet packet,
const WifiMacHeader hdr 
)
protectedvirtual

This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received. The implementation is intended to capture logic that is going to be common to all (or most) derived classes. Specifically, handling of Block Ack managment frames is dealt with here.

This method will need, however, to be overriden by derived classes so that they can perform their data handling before invoking the base version.

Parameters
packetthe packet that has been received.
hdra pointer to the MAC header of the received frame.

Reimplemented in ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, ns3::StaWifiMac, and ns3::AdhocWifiMac.

Definition at line 462 of file regular-wifi-mac.cc.

References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, ns3::WifiActionHeader::GetAction(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetAddress(), ns3::WifiActionHeader::GetCategory(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::MgtDelBaHeader::GetTid(), ns3::WifiMacHeader::GetType(), ns3::WifiMacHeader::IsAction(), ns3::MgtDelBaHeader::IsByOriginator(), ns3::WifiMacHeader::IsMgt(), m_edca, m_low, m_qosSupported, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::Packet::RemoveHeader(), and SendAddBaResponse().

Referenced by ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), and RegularWifiMac().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SendAddBaResponse ( const MgtAddBaRequestHeader reqHdr,
Mac48Address  originator 
)
protectedvirtual
void ns3::RegularWifiMac::SetAckTimeout ( Time  ackTimeout)
virtual
Parameters
ackTimeoutthe duration of an ACK timeout.

Implements ns3::WifiMac.

Definition at line 340 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetAddress ( Mac48Address  address)
virtual
Parameters
addressthe current address of this MAC layer.

Implements ns3::WifiMac.

Reimplemented in ns3::ApWifiMac, and ns3::AdhocWifiMac.

Definition at line 392 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::SetAddress(), and ns3::ApWifiMac::SetAddress().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetBasicBlockAckTimeout ( Time  blockAckTimeout)
virtual

Reimplemented from ns3::WifiMac.

Definition at line 366 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetBssid ( Mac48Address  bssid)
virtual
Parameters
bssidthe BSSID of the network that this device belongs to.

Definition at line 418 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

Referenced by ns3::StaWifiMac::Receive(), ns3::AdhocWifiMac::SetAddress(), and ns3::ApWifiMac::SetAddress().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetCompressedBlockAckTimeout ( Time  blockAckTimeout)
virtual

Reimplemented from ns3::WifiMac.

Definition at line 379 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetCtsTimeout ( Time  ctsTimeout)
virtual
Parameters
ctsTimeoutthe duration of a CTS timeout.

Implements ns3::WifiMac.

Definition at line 353 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetCtsToSelfSupported ( bool  enable)

Definition at line 261 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetEifsNoDifs ( Time  eifsNoDifs)
virtual
Parameters
eifsNoDifsthe duration of an EIFS minus DIFS.

This value is used to calculate the EIFS depending on AIFSN.

Implements ns3::WifiMac.

Definition at line 302 of file regular-wifi-mac.cc.

References m_dcfManager, NS_LOG_FUNCTION, and ns3::DcfManager::SetEifsNoDifs().

+ Here is the call graph for this function:

void ns3::RegularWifiMac::SetForwardUpCallback ( ForwardUpCallback  upCallback)
virtual
Parameters
upCallbackthe callback to invoke when a packet must be forwarded up the stack.

Definition at line 216 of file regular-wifi-mac.cc.

References m_forwardUp, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetHtSupported ( bool  enable)
protected

Set accessor for the m_htSupported member

Definition at line 249 of file regular-wifi-mac.cc.

References m_htSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetLinkDownCallback ( Callback< void >  linkDown)
virtual
Parameters
linkDownthe callback to invoke when the link becomes down.

Implements ns3::WifiMac.

Definition at line 230 of file regular-wifi-mac.cc.

References m_linkDown, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetLinkUpCallback ( Callback< void >  linkUp)
virtual
Parameters
linkUpthe callback to invoke when the link becomes up.

Implements ns3::WifiMac.

Reimplemented in ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, and ns3::AdhocWifiMac.

Definition at line 223 of file regular-wifi-mac.cc.

References m_linkUp, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::SetLinkUpCallback(), ns3::ApWifiMac::SetLinkUpCallback(), and ns3::MeshWifiInterfaceMac::SetLinkUpCallback().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetPifs ( Time  pifs)
virtual
Parameters
pifsthe pifs duration.

Implements ns3::WifiMac.

Definition at line 327 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetPromisc ( void  )
virtual

Sets the interface in promiscuous mode.

Enables promiscuous mode on the interface. Note that any further filtering on the incoming frame path may affect the overall behavior.

Implements ns3::WifiMac.

Definition at line 431 of file regular-wifi-mac.cc.

References m_low.

void ns3::RegularWifiMac::SetQosSupported ( bool  enable)
protected

Set accessor for the m_qosSupported member

Definition at line 237 of file regular-wifi-mac.cc.

References m_qosSupported, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetRifs ( Time  rifs)
virtual
Parameters
rifsthe rifs duration.

Implements ns3::WifiMac.

Definition at line 314 of file regular-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetSifs ( Time  sifs)
virtual
Parameters
sifsthe sifs duration

Implements ns3::WifiMac.

Definition at line 288 of file regular-wifi-mac.cc.

References m_dcfManager, m_low, NS_LOG_FUNCTION, and ns3::DcfManager::SetSifs().

+ Here is the call graph for this function:

void ns3::RegularWifiMac::SetSlot ( Time  slotTime)
virtual
Parameters
slotTimethe slot duration

Implements ns3::WifiMac.

Definition at line 274 of file regular-wifi-mac.cc.

References m_dcfManager, m_low, NS_LOG_FUNCTION, and ns3::DcfManager::SetSlot().

+ Here is the call graph for this function:

void ns3::RegularWifiMac::SetSsid ( Ssid  ssid)
virtual
Parameters
ssidthe current ssid of this MAC layer.

Implements ns3::WifiMac.

Definition at line 405 of file regular-wifi-mac.cc.

References m_ssid, and NS_LOG_FUNCTION.

void ns3::RegularWifiMac::SetTypeOfStation ( TypeOfStation  type)
protected

This method is invoked by a subclass to specify what type of station it is implementing. This is something that the channel access functions (instantiated within this class as EdcaTxopN's) need to know.

Parameters
typethe type of station.

Definition at line 161 of file regular-wifi-mac.cc.

References m_edca, and NS_LOG_FUNCTION.

Referenced by ns3::AdhocWifiMac::AdhocWifiMac(), ns3::ApWifiMac::ApWifiMac(), ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac(), and ns3::StaWifiMac::StaWifiMac().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetupEdcaQueue ( enum AcIndex  ac)
private

This method is a private utility invoked to configure the channel access function for the specified Access Category.

Parameters
acthe Access Category index of the queue to initialise.

Definition at line 141 of file regular-wifi-mac.cc.

References m_dcfManager, m_edca, m_low, m_txMiddle, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::EdcaTxopN::SetLow(), TxFailed(), and TxOk().

Referenced by RegularWifiMac().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::SetWifiPhy ( Ptr< WifiPhy phy)
virtual
Parameters
phythe physical layer attached to this MAC.

Implements ns3::WifiMac.

Definition at line 201 of file regular-wifi-mac.cc.

References m_dcfManager, m_low, m_phy, NS_LOG_FUNCTION, and ns3::DcfManager::SetupPhyListener().

+ Here is the call graph for this function:

void ns3::RegularWifiMac::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager stationManager)
virtual
Parameters
stationManagerthe station manager attached to this MAC.

Implements ns3::WifiMac.

Reimplemented in ns3::ApWifiMac.

Definition at line 119 of file regular-wifi-mac.cc.

References GetHtSupported(), m_dca, m_edca, m_low, m_stationManager, and NS_LOG_FUNCTION.

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool ns3::RegularWifiMac::SupportsSendFrom ( void  ) const
virtual

Implements ns3::WifiMac.

Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.

Definition at line 449 of file regular-wifi-mac.cc.

void ns3::RegularWifiMac::TxFailed ( const WifiMacHeader hdr)
protectedvirtual

Reimplemented in ns3::ApWifiMac.

Definition at line 743 of file regular-wifi-mac.cc.

References m_txErrCallback, and NS_LOG_FUNCTION.

Referenced by RegularWifiMac(), SetupEdcaQueue(), and ns3::ApWifiMac::TxFailed().

+ Here is the caller graph for this function:

void ns3::RegularWifiMac::TxOk ( const WifiMacHeader hdr)
protectedvirtual

Reimplemented in ns3::ApWifiMac.

Definition at line 736 of file regular-wifi-mac.cc.

References m_txOkCallback, and NS_LOG_FUNCTION.

Referenced by RegularWifiMac(), SetupEdcaQueue(), and ns3::ApWifiMac::TxOk().

+ Here is the caller graph for this function:

Member Data Documentation

ForwardUpCallback ns3::RegularWifiMac::m_forwardUp
protected

Definition at line 233 of file regular-wifi-mac.h.

Referenced by ForwardUp(), and SetForwardUpCallback().

bool ns3::RegularWifiMac::m_htSupported
protected

This Boolean is set true iff this WifiMac is to model 802.11n. It is exposed through the attribute system.

At the moment, this flag is the sole selection between HT and non-HT operation for the STA (whether IBSS, AP, or non-AP). Ultimately, we will want a HT-enabled STA to be able to fall back to non-HT operation with a non-HT peer. This'll require further intelligence - i.e., per-association HT state. Having a big switch seems like a good intermediate stage, however.

Definition at line 346 of file regular-wifi-mac.h.

Referenced by ns3::StaWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), GetHtSupported(), ns3::StaWifiMac::GetSupportedRates(), ns3::ApWifiMac::GetSupportedRates(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and SetHtSupported().

Callback<void> ns3::RegularWifiMac::m_linkDown
protected
Callback<void> ns3::RegularWifiMac::m_linkUp
protected

Definition at line 234 of file regular-wifi-mac.h.

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

bool ns3::RegularWifiMac::m_qosSupported
protected

This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service. It is exposed through the attribute system.

At the moment, this flag is the sole selection between QoS and non-QoS operation for the STA (whether IBSS, AP, or non-AP). Ultimately, we will want a QoS-enabled STA to be able to fall back to non-QoS operation with a non-QoS peer. This'll require further intelligence - i.e., per-association QoS state. Having a big switch seems like a good intermediate stage, however.

Definition at line 327 of file regular-wifi-mac.h.

Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), GetQosSupported(), Receive(), and SetQosSupported().

MacRxMiddle* ns3::RegularWifiMac::m_rxMiddle
protected

Definition at line 225 of file regular-wifi-mac.h.

Referenced by DoDispose(), and RegularWifiMac().

Ssid ns3::RegularWifiMac::m_ssid
protected

Definition at line 237 of file regular-wifi-mac.h.

Referenced by GetSsid(), and SetSsid().

TracedCallback<const WifiMacHeader &> ns3::RegularWifiMac::m_txErrCallback
private

Definition at line 377 of file regular-wifi-mac.h.

Referenced by GetTypeId(), and TxFailed().

MacTxMiddle* ns3::RegularWifiMac::m_txMiddle
protected

Definition at line 226 of file regular-wifi-mac.h.

Referenced by DoDispose(), RegularWifiMac(), and SetupEdcaQueue().

TracedCallback<const WifiMacHeader &> ns3::RegularWifiMac::m_txOkCallback
private

Definition at line 376 of file regular-wifi-mac.h.

Referenced by GetTypeId(), and TxOk().


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