ns-3
ns3::DcaTxop Class Reference

handle packet fragmentation and retransmissions.This class implements the packet fragmentation and retransmission policy. It uses the ns3::MacLow and ns3::DcfManager helper classes to respectively send packets and decide when to send them. Packets are stored in a ns3::WifiMacQueue until they can be sent. More...

#include <dca-txop.h>

Inheritance diagram for ns3::DcaTxop:
Collaboration diagram for ns3::DcaTxop:

List of all members.

Public Types

typedef Callback< void, const
WifiMacHeader & > 
TxOk
typedef Callback< void, const
WifiMacHeader & > 
TxFailed

Public Member Functions

void SetLow (Ptr< MacLow > low)
void SetManager (DcfManager *manager)
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > remoteManager)
void SetTxOkCallback (TxOk callback)
void SetTxFailedCallback (TxFailed callback)
Ptr< WifiMacQueueGetQueue () const
virtual void SetMinCw (uint32_t minCw)
virtual void SetMaxCw (uint32_t maxCw)
virtual void SetAifsn (uint32_t aifsn)
virtual uint32_t GetMinCw (void) const
virtual uint32_t GetMaxCw (void) const
virtual uint32_t GetAifsn (void) const
void Queue (Ptr< const Packet > packet, const WifiMacHeader &hdr)

Static Public Member Functions

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

Friends

class Dcf
class TransmissionListener

Detailed Description

handle packet fragmentation and retransmissions.

This class implements the packet fragmentation and retransmission policy. It uses the ns3::MacLow and ns3::DcfManager helper classes to respectively send packets and decide when to send them. Packets are stored in a ns3::WifiMacQueue until they can be sent.

The policy currently implemented uses a simple fragmentation threshold: any packet bigger than this threshold is fragmented in fragments whose size is smaller than the threshold.

The retransmission policy is also very simple: every packet is retransmitted until it is either successfully transmitted or it has been retransmitted up until the ssrc or slrc thresholds.

The rts/cts policy is similar to the fragmentation policy: when a packet is bigger than a threshold, the rts/cts protocol is used.


Member Function Documentation

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

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

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

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Dcf/$ns3::DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiMac/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Dcf/$ns3::DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiMac/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/DcaTxop
  • /NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::RegularWifiMac/DcaTxop

Attributes defined for this type:

Attributes defined in parent class ns3::Dcf:

  • MinCw: The minimum value of the contention window.
  • MaxCw: The maximum value of the contention window.
  • Aifsn: The AIFSN: the default value conforms to simple DCA.

No TraceSources defined for this type.

Reimplemented from ns3::Dcf.

References ns3::TypeId::AddConstructor(), ns3::Dcf::GetTypeId(), and ns3::TypeId::SetParent().

void ns3::DcaTxop::Queue ( Ptr< const Packet packet,
const WifiMacHeader hdr 
)
Parameters:
packetpacket to send
hdrheader of packet to send.

Store the packet in the internal queue until it can be sent safely.

References ns3::WifiMacTrailer::GetSerializedSize(), ns3::WifiMacHeader::GetSerializedSize(), ns3::Packet::GetSize(), NS_LOG_FUNCTION, and ns3::WifiRemoteStationManager::PrepareForQueue().

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

Parameters:
callbackthe callback to invoke when a packet transmission was completed unsuccessfully.
void ns3::DcaTxop::SetTxOkCallback ( TxOk  callback)
Parameters:
callbackthe callback to invoke when a packet transmission was completed successfully.

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