ns3::NqapWifiMac Class Reference

non-QoS AP state machine More...

#include <nqap-wifi-mac.h>

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

List of all members.

Public Member Functions

 NqapWifiMac ()
 ~NqapWifiMac ()
virtual void SetSlot (Time slotTime)
virtual void SetSifs (Time sifs)
virtual void SetEifsNoDifs (Time eifsNoDifs)
virtual void SetAckTimeout (Time ackTimeout)
virtual void SetCtsTimeout (Time ctsTimeout)
virtual void SetPifs (Time pifs)
virtual Time GetSlot (void) const
virtual Time GetSifs (void) const
virtual Time GetEifsNoDifs (void) const
virtual Time GetAckTimeout (void) const
virtual Time GetCtsTimeout (void) const
virtual Time GetPifs (void) const
virtual void SetWifiPhy (Ptr< WifiPhy > phy)
virtual void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
virtual void Enqueue (Ptr< const Packet > packet, Mac48Address to)
virtual bool SupportsSendFrom (void) const
virtual void SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)
virtual void SetLinkUpCallback (Callback< void > linkUp)
virtual void SetLinkDownCallback (Callback< void > linkDown)
virtual Mac48Address GetAddress (void) const
virtual Ssid GetSsid (void) const
virtual void SetAddress (Mac48Address address)
virtual void SetSsid (Ssid ssid)
virtual Mac48Address GetBssid (void) const
void SetBeaconInterval (Time interval)
Time GetBeaconInterval (void) const
void StartBeaconing (void)

Static Public Member Functions

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

Private Member Functions

void Receive (Ptr< Packet > packet, WifiMacHeader const *hdr)
void ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to)
void ForwardDown (Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
void TxOk (WifiMacHeader const &hdr)
void TxFailed (WifiMacHeader const &hdr)
void SendProbeResp (Mac48Address to)
void SendAssocResp (Mac48Address to, bool success)
void SendOneBeacon (void)
SupportedRates GetSupportedRates (void) const
void SetBeaconGeneration (bool enable)
bool GetBeaconGeneration (void) const
virtual void DoDispose (void)
 NqapWifiMac (const NqapWifiMac &ctor_arg)
NqapWifiMacoperator= (const NqapWifiMac &o)

Private Attributes

Ptr< DcaTxopm_dca
Ptr< DcaTxopm_beaconDca
Ptr< WifiRemoteStationManagerm_stationManager
Ptr< WifiPhym_phy
Callback< void, Ptr< Packet >
, Mac48Address, Mac48Address
m_upCallback
Time m_beaconInterval
DcfManagerm_dcfManager
MacRxMiddlem_rxMiddle
Ptr< MacLowm_low
Ssid m_ssid
EventId m_beaconEvent
Time m_eifsNoDifs

Detailed Description

non-QoS AP state machine

Handle association, dis-association and authentication, of STAs within an IBSS. This class uses two output queues, each of which is server by a single DCF

Definition at line 53 of file nqap-wifi-mac.h.


Constructor & Destructor Documentation

ns3::NqapWifiMac::NqapWifiMac (  ) 
ns3::NqapWifiMac::~NqapWifiMac (  ) 

Definition at line 88 of file nqap-wifi-mac.cc.

References NS_LOG_FUNCTION.

ns3::NqapWifiMac::NqapWifiMac ( const NqapWifiMac ctor_arg  )  [private]

Member Function Documentation

void ns3::NqapWifiMac::DoDispose ( void   )  [private, virtual]

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.

Reimplemented from ns3::Object.

Definition at line 94 of file nqap-wifi-mac.cc.

References ns3::EventId::Cancel(), m_beaconDca, m_beaconEvent, m_dca, m_dcfManager, m_low, m_phy, m_rxMiddle, and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to 
) [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.

Implements ns3::WifiMac.

Definition at line 305 of file nqap-wifi-mac.cc.

References ForwardDown(), m_low, and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::Enqueue ( Ptr< const Packet packet,
Mac48Address  to,
Mac48Address  from 
) [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 addresss.

Implements ns3::WifiMac.

Definition at line 299 of file nqap-wifi-mac.cc.

References ForwardDown(), and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::ForwardDown ( Ptr< const Packet packet,
Mac48Address  from,
Mac48Address  to 
) [private]
void ns3::NqapWifiMac::ForwardUp ( Ptr< Packet packet,
Mac48Address  from,
Mac48Address  to 
) [private]

Definition at line 280 of file nqap-wifi-mac.cc.

References m_upCallback, and NS_LOG_FUNCTION.

Referenced by Receive().

Time ns3::NqapWifiMac::GetAckTimeout ( void   )  const [virtual]
Returns:
the current ACK timeout duration.

Implements ns3::WifiMac.

Definition at line 186 of file nqap-wifi-mac.cc.

References m_low.

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

Implements ns3::WifiMac.

Definition at line 238 of file nqap-wifi-mac.cc.

References m_low.

Referenced by ForwardDown(), Receive(), SendAssocResp(), SendOneBeacon(), and SendProbeResp().

bool ns3::NqapWifiMac::GetBeaconGeneration ( void   )  const [private]

Definition at line 124 of file nqap-wifi-mac.cc.

References ns3::EventId::IsRunning(), and m_beaconEvent.

Referenced by GetTypeId().

Time ns3::NqapWifiMac::GetBeaconInterval ( void   )  const
Returns:
the interval between two beacon transmissions.

Definition at line 129 of file nqap-wifi-mac.cc.

References m_beaconInterval.

Referenced by GetTypeId().

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

Implements ns3::WifiMac.

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

References m_low.

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

Implements ns3::WifiMac.

Definition at line 191 of file nqap-wifi-mac.cc.

References m_low.

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

Implements ns3::WifiMac.

Definition at line 181 of file nqap-wifi-mac.cc.

References m_eifsNoDifs.

Time ns3::NqapWifiMac::GetPifs ( void   )  const [virtual]
Returns:
the current PIFS duration.

Implements ns3::WifiMac.

Definition at line 196 of file nqap-wifi-mac.cc.

References m_low.

Time ns3::NqapWifiMac::GetSifs ( void   )  const [virtual]
Returns:
the current SIFS duration.

Implements ns3::WifiMac.

Definition at line 176 of file nqap-wifi-mac.cc.

References m_low.

Time ns3::NqapWifiMac::GetSlot ( void   )  const [virtual]
Returns:
the current slot duration.

Implements ns3::WifiMac.

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

References m_low.

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

Implements ns3::WifiMac.

Definition at line 243 of file nqap-wifi-mac.cc.

References m_ssid.

Referenced by SendOneBeacon(), and SendProbeResp().

SupportedRates ns3::NqapWifiMac::GetSupportedRates ( void   )  const [private]
TypeId ns3::NqapWifiMac::GetTypeId ( void   )  [static]

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

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

  • /NodeList/[i]/DeviceList/[i]/$ns3WifiNetDevice/Mac/$ns3NqapWifiMac

Attributes defined for this type:

  • BeaconInterval: Delay between two beacons
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 100000000ns
    • Flags: construct write read
  • BeaconGeneration: Whether or not beacons are generated.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read

Attributes defined in parent class ns3::WifiMac:

  • CtsTimeout: When this timeout expires, the RTS/CTS handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 75666ns
    • Flags: construct write read
  • AckTimeout: When this timeout expires, the DATA/ACK handshake has failed.
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: 75666ns
    • 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
  • MaxMsduSize: The maximum size of an MSDU accepted by the MAC layer.This value conforms to the specification.
  • Ssid: The ssid we want to belong to.
    • Set with class: SsidValue
    • Underlying type: Ssid
    • Initial value: default
    • Flags: construct write read

No TraceSources defined for this type.

Reimplemented from ns3::WifiMac.

Definition at line 44 of file nqap-wifi-mac.cc.

References ns3::TypeId::AddAttribute(), GetBeaconGeneration(), GetBeaconInterval(), ns3::Seconds(), SetBeaconGeneration(), SetBeaconInterval(), and ns3::TypeId::SetParent().

NqapWifiMac& ns3::NqapWifiMac::operator= ( const NqapWifiMac o  )  [private]
void ns3::NqapWifiMac::Receive ( Ptr< Packet packet,
WifiMacHeader const *  hdr 
) [private]
void ns3::NqapWifiMac::SendAssocResp ( Mac48Address  to,
bool  success 
) [private]
void ns3::NqapWifiMac::SendOneBeacon ( void   )  [private]
void ns3::NqapWifiMac::SendProbeResp ( Mac48Address  to  )  [private]
void ns3::NqapWifiMac::SetAckTimeout ( Time  ackTimeout  )  [virtual]
Parameters:
ackTimeout the duration of an ACK timeout.

Implements ns3::WifiMac.

Definition at line 156 of file nqap-wifi-mac.cc.

References m_low.

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

Implements ns3::WifiMac.

Definition at line 248 of file nqap-wifi-mac.cc.

References m_low, and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::SetBeaconGeneration ( bool  enable  )  [private]
void ns3::NqapWifiMac::SetBeaconInterval ( Time  interval  ) 
Parameters:
interval the interval between two beacon transmissions.

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

References m_beaconInterval, and NS_LOG_FUNCTION.

Referenced by GetTypeId().

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

Implements ns3::WifiMac.

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

References m_low.

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

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

Implements ns3::WifiMac.

Definition at line 149 of file nqap-wifi-mac.cc.

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

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

Implements ns3::WifiMac.

Definition at line 218 of file nqap-wifi-mac.cc.

References m_upCallback, and NS_LOG_FUNCTION.

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

Implements ns3::WifiMac.

Definition at line 233 of file nqap-wifi-mac.cc.

References NS_LOG_FUNCTION.

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

Implements ns3::WifiMac.

Definition at line 224 of file nqap-wifi-mac.cc.

References ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::SetPifs ( Time  pifs  )  [virtual]
Parameters:
pifs the pifs duration.

Implements ns3::WifiMac.

Definition at line 166 of file nqap-wifi-mac.cc.

References m_low.

void ns3::NqapWifiMac::SetSifs ( Time  sifs  )  [virtual]
Parameters:
sifs the sifs duration

Implements ns3::WifiMac.

Definition at line 142 of file nqap-wifi-mac.cc.

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

void ns3::NqapWifiMac::SetSlot ( Time  slotTime  )  [virtual]
Parameters:
slotTime the slot duration

Implements ns3::WifiMac.

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

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

void ns3::NqapWifiMac::SetSsid ( Ssid  ssid  )  [virtual]
Parameters:
ssid the current ssid of this MAC layer.

Implements ns3::WifiMac.

Definition at line 255 of file nqap-wifi-mac.cc.

References m_ssid, and NS_LOG_FUNCTION.

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

Implements ns3::WifiMac.

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

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

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

Implements ns3::WifiMac.

Definition at line 209 of file nqap-wifi-mac.cc.

References m_beaconDca, m_dca, m_low, m_stationManager, and NS_LOG_FUNCTION.

void ns3::NqapWifiMac::StartBeaconing ( void   ) 

Start beacon transmission immediately.

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

References NS_LOG_FUNCTION, and SendOneBeacon().

bool ns3::NqapWifiMac::SupportsSendFrom ( void   )  const [virtual]

Implements ns3::WifiMac.

Definition at line 311 of file nqap-wifi-mac.cc.

void ns3::NqapWifiMac::TxFailed ( WifiMacHeader const &  hdr  )  [private]
void ns3::NqapWifiMac::TxOk ( WifiMacHeader const &  hdr  )  [private]

Member Data Documentation

Definition at line 124 of file nqap-wifi-mac.h.

Referenced by DoDispose(), NqapWifiMac(), SetEifsNoDifs(), SetSifs(), SetSlot(), and SetWifiPhy().

Definition at line 129 of file nqap-wifi-mac.h.

Referenced by GetEifsNoDifs(), and SetEifsNoDifs().

Definition at line 120 of file nqap-wifi-mac.h.

Referenced by DoDispose(), GetSupportedRates(), Receive(), and SetWifiPhy().

Definition at line 125 of file nqap-wifi-mac.h.

Referenced by DoDispose(), and NqapWifiMac().

Definition at line 127 of file nqap-wifi-mac.h.

Referenced by GetSsid(), and SetSsid().

Definition at line 121 of file nqap-wifi-mac.h.

Referenced by ForwardUp(), and SetForwardUpCallback().


The documentation for this class was generated from the following files:
Generated on Thu Dec 3 14:11:12 2009 for NS-3 by  doxygen 1.6.3