Public Types | Public Member Functions

ns3::MacLow Class Reference

handle RTS/CTS/DATA/ACK transactions. More...

#include <mac-low.h>

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

List of all members.

Public Types

typedef Callback< void, Ptr
< Packet >, const
WifiMacHeader * > 
MacLowRxCallback

Public Member Functions

void SetPhy (Ptr< WifiPhy > phy)
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > manager)
void SetAddress (Mac48Address ad)
void SetAckTimeout (Time ackTimeout)
void SetBasicBlockAckTimeout (Time blockAckTimeout)
void SetCompressedBlockAckTimeout (Time blockAckTimeout)
void SetCtsTimeout (Time ctsTimeout)
void SetSifs (Time sifs)
void SetSlotTime (Time slotTime)
void SetPifs (Time pifs)
void SetBssid (Mac48Address ad)
Mac48Address GetAddress (void) const
Time GetAckTimeout (void) const
Time GetBasicBlockAckTimeout () const
Time GetCompressedBlockAckTimeout () const
Time GetCtsTimeout (void) const
Time GetSifs (void) const
Time GetSlotTime (void) const
Time GetPifs (void) const
Mac48Address GetBssid (void) const
void SetRxCallback (Callback< void, Ptr< Packet >, const WifiMacHeader * > callback)
void RegisterDcfListener (MacLowDcfListener *listener)
Time CalculateTransmissionTime (Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters &parameters) const
void StartTransmission (Ptr< const Packet > packet, const WifiMacHeader *hdr, MacLowTransmissionParameters parameters, MacLowTransmissionListener *listener)
void ReceiveOk (Ptr< Packet > packet, double rxSnr, WifiMode txMode, WifiPreamble preamble)
void ReceiveError (Ptr< const Packet > packet, double rxSnr)
void NotifySwitchingStartNow (Time duration)
void CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq)
void DestroyBlockAckAgreement (Mac48Address originator, uint8_t tid)
void RegisterBlockAckListenerForAc (enum AcIndex ac, MacLowBlockAckEventListener *listener)

Detailed Description

handle RTS/CTS/DATA/ACK transactions.


Member Function Documentation

Time ns3::MacLow::CalculateTransmissionTime ( Ptr< const Packet packet,
const WifiMacHeader hdr,
const MacLowTransmissionParameters parameters 
) const
Parameters:
packet to send (does not include the 802.11 MAC header and checksum)
hdr header associated to the packet to send.
parameters transmission parameters of packet.

This transmission time includes the time required for the next packet transmission if one was selected.

void ns3::MacLow::CreateBlockAckAgreement ( const MgtAddBaResponseHeader respHdr,
Mac48Address  originator,
uint16_t  startingSeq 
)
Parameters:
respHdr Add block ack response from originator (action frame).
originator Address of peer station involved in block ack mechanism.
startingSeq Sequence number of the first MPDU of all packets for which block ack was negotiated.

This function is typically invoked only by ns3::QapWifiMac and ns3::QstaWifiMac. If we are transmitting an Add block ack response, MacLow must allocate buffers to collect all correctly received packets belonging to category for which block ack was negotiated. It's needed in order to send a Block ack after corresponding originator's Block ack request.

void ns3::MacLow::DestroyBlockAckAgreement ( Mac48Address  originator,
uint8_t  tid 
)
Parameters:
originator Address of peer participating in Block Ack mechanism.
tid TID for which Block Ack was created.

Checks if exists an established block ack agreement with originator for tid tid. If the agreement exists, tears down it. This function is typically invoked when a DELBA frame is received from originator.

void ns3::MacLow::NotifySwitchingStartNow ( Time  duration  ) 
Parameters:
duration switching delay duration.

This method is typically invoked by the PhyMacLowListener to notify the MAC layer that a channel switching occured. When a channel switching occurs, pending MAC transmissions (RTS, CTS, DATA and ACK) are cancelled.

void ns3::MacLow::ReceiveError ( Ptr< const Packet packet,
double  rxSnr 
)
Parameters:
packet packet received.
rxSnr snr of packet received.

This method is typically invoked by the lower PHY layer to notify the MAC layer that a packet was unsuccessfully received.

void ns3::MacLow::ReceiveOk ( Ptr< Packet packet,
double  rxSnr,
WifiMode  txMode,
WifiPreamble  preamble 
)
Parameters:
packet packet received
rxSnr snr of packet received
txMode transmission mode of packet received
preamble type of preamble used for the packet received

This method is typically invoked by the lower PHY layer to notify the MAC layer that a packet was successfully received.

void ns3::MacLow::RegisterBlockAckListenerForAc ( enum AcIndex  ac,
MacLowBlockAckEventListener listener 
)
Parameters:
ac Access class managed by the queue.
listener The listener for the queue.

The lifetime of the registered listener is typically equal to the lifetime of the queue associated to this AC.

void ns3::MacLow::RegisterDcfListener ( MacLowDcfListener listener  ) 
Parameters:
listener listen to NAV events for every incoming and outgoing packet.
void ns3::MacLow::SetRxCallback ( Callback< void, Ptr< Packet >, const WifiMacHeader * >  callback  ) 
Parameters:
callback the callback which receives every incoming packet.

This callback typically forwards incoming packets to an instance of ns3::MacRxMiddle.

void ns3::MacLow::StartTransmission ( Ptr< const Packet packet,
const WifiMacHeader hdr,
MacLowTransmissionParameters  parameters,
MacLowTransmissionListener listener 
)
Parameters:
packet packet to send
hdr 802.11 header for packet to send
parameters the transmission parameters to use for this packet.
listener listen to transmission events.

Start the transmission of the input packet and notify the listener of transmission events.


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