Public Member Functions | Static Public Member Functions | Protected Member Functions

ns3::WifiMac Class Reference

base class for all MAC-level wifi objects. More...

#include <wifi-mac.h>

Inheritance diagram for ns3::WifiMac:
Inheritance graph
[legend]
Collaboration diagram for ns3::WifiMac:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual void SetSlot (Time slotTime)=0
virtual void SetSifs (Time sifs)=0
virtual void SetEifsNoDifs (Time eifsNoDifs)=0
virtual void SetPifs (Time pifs)=0
virtual void SetCtsTimeout (Time ctsTimeout)=0
virtual void SetAckTimeout (Time ackTimeout)=0
void SetMaxPropagationDelay (Time delay)
virtual Time GetPifs (void) const =0
virtual Time GetSifs (void) const =0
virtual Time GetSlot (void) const =0
virtual Time GetEifsNoDifs (void) const =0
virtual Time GetCtsTimeout (void) const =0
virtual Time GetAckTimeout (void) const =0
Time GetMsduLifetime (void) const
Time GetMaxPropagationDelay (void) const
virtual Mac48Address GetAddress (void) const =0
virtual Ssid GetSsid (void) const =0
virtual void SetAddress (Mac48Address address)=0
virtual void SetSsid (Ssid ssid)=0
virtual Mac48Address GetBssid (void) const =0
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from)=0
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to)=0
virtual bool SupportsSendFrom (void) const =0
virtual void SetWifiPhy (Ptr< WifiPhy > phy)=0
virtual void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)=0
virtual void SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0
virtual void SetLinkUpCallback (Callback< void > linkUp)=0
virtual void SetLinkDownCallback (Callback< void > linkDown)=0
virtual void SetBasicBlockAckTimeout (Time blockAckTimeout)
virtual Time GetBasicBlockAckTimeout (void) const
virtual void SetCompressedBlockAckTimeout (Time blockAckTimeout)
virtual Time GetCompressedBlockAckTimeout (void) const
void NotifyTx (Ptr< const Packet > packet)
void NotifyTxDrop (Ptr< const Packet > packet)
void NotifyRx (Ptr< const Packet > packet)
void NotifyPromiscRx (Ptr< const Packet > packet)
void NotifyRxDrop (Ptr< const Packet > packet)
void ConfigureStandard (enum WifiPhyStandard standard)

Static Public Member Functions

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

Protected Member Functions

void ConfigureDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac)
void ConfigureCCHDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac)

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).


Member Function Documentation

void ns3::WifiMac::ConfigureStandard ( enum WifiPhyStandard  standard  ) 
Parameters:
standard the wifi standard to be configured
virtual void ns3::WifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to 
) [pure virtual]
Parameters:
packet the packet to send.
to the 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 DCF function determines that access it granted to this MAC.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to,
Mac48Address  from 
) [pure virtual]
Parameters:
packet the packet to send.
to the address to which the packet should be sent.
from the 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 DCF function determines that access it 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.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual Time ns3::WifiMac::GetAckTimeout ( void   )  const [pure virtual]
virtual Mac48Address ns3::WifiMac::GetAddress ( void   )  const [pure virtual]
Returns:
the MAC address associated to this MAC layer.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual Mac48Address ns3::WifiMac::GetBssid ( void   )  const [pure virtual]
Returns:
the bssid of the network this device belongs to.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual Time ns3::WifiMac::GetCtsTimeout ( void   )  const [pure virtual]
virtual Time ns3::WifiMac::GetEifsNoDifs ( void   )  const [pure virtual]
Time ns3::WifiMac::GetMaxPropagationDelay ( void   )  const

Unused for now.

Time ns3::WifiMac::GetMsduLifetime ( void   )  const

Unused for now.

virtual Time ns3::WifiMac::GetPifs ( void   )  const [pure virtual]
virtual Time ns3::WifiMac::GetSifs ( void   )  const [pure virtual]
virtual Time ns3::WifiMac::GetSlot ( void   )  const [pure virtual]
virtual Ssid ns3::WifiMac::GetSsid ( void   )  const [pure virtual]
Returns:
the ssid which this MAC layer is going to try to stay in.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

static TypeId ns3::WifiMac::GetTypeId ( void   )  [static]

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

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

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/NoiseModel/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Channel/PropagationModel/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Mac/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Phy/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::UanNetDevice/Transducer/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/BsIpcsPacketClassifier/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/LinkManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/SSManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::BaseStationNetDevice/ServiceFlowManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/Classifier/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/LinkManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/$ns3::SubscriberStationNetDevice/SSScheduler/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BandwidthManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/BurstProfileManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/NoiseModel/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Channel/$ns3::UanChannel/PropagationModel/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/ConnectionManager/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/NoiseModel/$ns3::WifiNetDevice/Mac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::WifiMac
  • /NodeList/[i]/DeviceList/[i]/$ns3::WimaxNetDevice/Phy/Channel/$ns3::UanChannel/PropagationModel/$ns3::WifiNetDevice/Mac

Attributes defined for this type:

  • CtsTimeout: When this timeout expires, the RTS/CTS handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 75000ns
    • Flags: construct write read
  • AckTimeout: When this timeout expires, the DATA/ACK handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 75000ns
    • Flags: construct write read
  • BasicBlockAckTimeout: When this timeout expires, the BASIC_BLOCK_ACK_REQ/BASIC_BLOCK_ACK handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 281000ns
    • Flags: construct write read
  • CompressedBlockAckTimeout: When this timeout expires, the COMPRESSED_BLOCK_ACK_REQ/COMPRESSED_BLOCK_ACK handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 99000ns
    • Flags: construct write read
  • Sifs: The value of the SIFS constant.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 16000ns
    • Flags: construct write read
  • EifsNoDifs: The value of EIFS-DIFS
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 60000ns
    • Flags: construct write read
  • Slot: The duration of a Slot.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 9000ns
    • Flags: construct write read
  • Pifs: The value of the PIFS constant.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 25000ns
    • Flags: construct write read
  • MaxPropagationDelay: The maximum propagation delay. Unused for now.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 3333ns
    • 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 defined for this type:

  • 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.

Reimplemented from ns3::Object.

Reimplemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

void ns3::WifiMac::NotifyPromiscRx ( Ptr< const Packet packet  ) 

Public method used to fire a MacPromiscRx trace. Implemented for encapsulation purposes.

void ns3::WifiMac::NotifyRx ( Ptr< const Packet packet  ) 

Public method used to fire a MacRx trace. Implemented for encapsulation purposes.

void ns3::WifiMac::NotifyRxDrop ( Ptr< const Packet packet  ) 

Public method used to fire a MacRxDrop trace. Implemented for encapsulation purposes.

void ns3::WifiMac::NotifyTx ( Ptr< const Packet packet  ) 

Public method used to fire a MacTx trace. Implemented for encapsulation purposes.

void ns3::WifiMac::NotifyTxDrop ( Ptr< const Packet packet  ) 

Public method used to fire a MacTxDrop trace. Implemented for encapsulation purposes.

virtual void ns3::WifiMac::SetAckTimeout ( Time  ackTimeout  )  [pure virtual]
Parameters:
ackTimeout the duration of an ACK timeout.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetAddress ( Mac48Address  address  )  [pure virtual]
Parameters:
address the current address of this MAC layer.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetCtsTimeout ( Time  ctsTimeout  )  [pure virtual]
Parameters:
ctsTimeout the duration of a CTS timeout.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetEifsNoDifs ( Time  eifsNoDifs  )  [pure virtual]
Parameters:
eifsNoDifs the duration of an EIFS minus DIFS.

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

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetForwardUpCallback ( Callback< void, Ptr< Packet >, Mac48Address, Mac48Address upCallback  )  [pure virtual]
Parameters:
upCallback the callback to invoke when a packet must be forwarded up the stack.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetLinkDownCallback ( Callback< void >  linkDown  )  [pure virtual]
Parameters:
linkDown the callback to invoke when the link becomes down.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetLinkUpCallback ( Callback< void >  linkUp  )  [pure virtual]
Parameters:
linkUp the callback to invoke when the link becomes up.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

void ns3::WifiMac::SetMaxPropagationDelay ( Time  delay  ) 
Parameters:
delay the max propagation delay.

Unused for now.

virtual void ns3::WifiMac::SetPifs ( Time  pifs  )  [pure virtual]
virtual void ns3::WifiMac::SetSifs ( Time  sifs  )  [pure virtual]
virtual void ns3::WifiMac::SetSlot ( Time  slotTime  )  [pure virtual]
virtual void ns3::WifiMac::SetSsid ( Ssid  ssid  )  [pure virtual]
Parameters:
ssid the current ssid of this MAC layer.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetWifiPhy ( Ptr< WifiPhy phy  )  [pure virtual]
Parameters:
phy the physical layer attached to this MAC.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.

virtual void ns3::WifiMac::SetWifiRemoteStationManager ( Ptr< WifiRemoteStationManager stationManager  )  [pure virtual]
Parameters:
stationManager the station manager attached to this MAC.

Implemented in ns3::MeshWifiInterfaceMac, ns3::AdhocWifiMac, ns3::NqapWifiMac, ns3::NqstaWifiMac, ns3::QadhocWifiMac, ns3::QapWifiMac, and ns3::QstaWifiMac.


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