A Discrete-Event Network Simulator
API
ns3::WaveMacLow Class Reference

This class is the subclass of MacLow to provide support for MAC extension (1) allows higher layer control data rate and tx power level. More...

#include "wave-mac-low.h"

+ Inheritance diagram for ns3::WaveMacLow:
+ Collaboration diagram for ns3::WaveMacLow:

Public Member Functions

 WaveMacLow ()
 
virtual ~WaveMacLow ()
 
void SetWaveNetDevice (Ptr< WaveNetDevice > device)
 
virtual void StartTransmission (Ptr< WifiMacQueueItem > mpdu, MacLowTransmissionParameters parameters, Ptr< Txop > txop)
 
- Public Member Functions inherited from ns3::MacLow
 MacLow ()
 
virtual ~MacLow ()
 
Time CalculateOverallTxTime (Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters &params, uint32_t fragmentSize=0) const
 
Time CalculateOverheadTxTime (Ptr< const WifiMacQueueItem > item, const MacLowTransmissionParameters &params) const
 
Time CalculateTransmissionTime (Ptr< const Packet > packet, const WifiMacHeader *hdr, const MacLowTransmissionParameters &parameters) const
 
bool CanTransmitNextCfFrame (void) const
 This function decides if a CF frame can be transmitted in the current CFP. More...
 
void CreateBlockAckAgreement (const MgtAddBaResponseHeader *respHdr, Mac48Address originator, uint16_t startingSeq)
 
void DeaggregateAmpduAndReceive (Ptr< WifiPsdu > aggregatedPacket, double rxSnr, WifiTxVector txVector, std::vector< bool > statusPerMpdu)
 
void DestroyBlockAckAgreement (Mac48Address originator, uint8_t tid)
 
bool DoNavStartNow (Time duration)
 Start NAV with the given duration. More...
 
Time GetAckTimeout (void) const
 Return ACK timeout of this MacLow. More...
 
Mac48Address GetAddress (void) const
 Return the MAC address of this MacLow. More...
 
Time GetBasicBlockAckTimeout (void) const
 Return Basic Block ACK timeout of this MacLow. More...
 
Time GetBeaconInterval (void) const
 
Mac48Address GetBssid (void) const
 Return the Basic Service Set Identification. More...
 
Time GetCfpMaxDuration (void) const
 
Time GetCompressedBlockAckTimeout (void) const
 Return Compressed Block ACK timeout of this MacLow. More...
 
Time GetCtsTimeout (void) const
 Return CTS timeout of this MacLow. More...
 
bool GetCtsToSelfSupported (void) const
 Return whether CTS-to-self capability is supported. More...
 
Ptr< MpduAggregatorGetMpduAggregator (void) const
 Returns the aggregator used to construct A-MPDU subframes. More...
 
Ptr< MsduAggregatorGetMsduAggregator (void) const
 Returns the aggregator used to construct A-MSDU subframes. More...
 
Ptr< WifiPhyGetPhy (void) const
 
Time GetPifs (void) const
 Return PCF Interframe Space (PIFS) of this MacLow. More...
 
Time GetRemainingCfpDuration (void) const
 
Time GetRifs (void) const
 Return Reduced Interframe Space (RIFS) of this MacLow. More...
 
Time GetSifs (void) const
 Return Short Interframe Space (SIFS) of this MacLow. More...
 
Time GetSlotTime (void) const
 Return slot duration of this MacLow. More...
 
virtual bool IsCfPeriod (void) const
 This function indicates whether Simulator::Now is in the CF period. More...
 
bool IsPromisc (void) const
 Check if MacLow is operating in promiscuous mode. More...
 
bool IsWithinSizeAndTimeLimits (Ptr< const WifiMacQueueItem > mpdu, WifiTxVector txVector, uint32_t ampduSize, Time ppduDurationLimit)
 Check whether the given MPDU, if transmitted according to the given TX vector, meets the constraint on the maximum A-MPDU size (by assuming that the frame has to be aggregated to an existing A-MPDU of the given size) and its transmission time exceeds neither the max PPDU duration (depending on the PPDU format) nor the given PPDU duration limit (if strictly positive). More...
 
bool IsWithinSizeAndTimeLimits (uint32_t mpduSize, Mac48Address receiver, uint8_t tid, WifiTxVector txVector, uint32_t ampduSize, Time ppduDurationLimit)
 Check whether an MPDU of the given size, destined to the given receiver and belonging to the given TID, if transmitted according to the given TX vector, meets the constraint on the maximum A-MPDU size (by assuming that the frame has to be aggregated to an existing A-MPDU of the given size) and its transmission time exceeds neither the max PPDU duration (depending on the PPDU format) nor the given PPDU duration limit (if strictly positive). More...
 
void NotifyOffNow (void)
 This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into off mode. More...
 
void NotifySleepNow (void)
 This method is typically invoked by the PhyMacLowListener to notify the MAC layer that the device has been put into sleep mode. More...
 
void NotifySwitchingStartNow (Time duration)
 
void ReceiveError (Ptr< WifiPsdu > psdu)
 
void ReceiveOk (Ptr< WifiMacQueueItem > mpdu, double rxSnr, WifiTxVector txVector, bool ampduSubframe)
 
void RegisterDcf (Ptr< ChannelAccessManager > dcf)
 
void RegisterEdcaForAc (AcIndex ac, Ptr< QosTxop > edca)
 
void ResetPhy (void)
 Remove WifiPhy associated with this MacLow. More...
 
void SetAckTimeout (Time ackTimeout)
 Set ACK timeout of this MacLow. More...
 
void SetAddress (Mac48Address ad)
 Set MAC address of this MacLow. More...
 
void SetBasicBlockAckTimeout (Time blockAckTimeout)
 Set Basic Block ACK timeout of this MacLow. More...
 
void SetBeaconInterval (Time interval)
 
void SetBssid (Mac48Address ad)
 Set the Basic Service Set Identification. More...
 
void SetCfpMaxDuration (Time duration)
 
void SetCompressedBlockAckTimeout (Time blockAckTimeout)
 Set Compressed Block ACK timeout of this MacLow. More...
 
void SetCtsTimeout (Time ctsTimeout)
 Set CTS timeout of this MacLow. More...
 
void SetCtsToSelfSupported (bool enable)
 Enable or disable CTS-to-self capability. More...
 
void SetMac (const Ptr< WifiMac > mac)
 Set up WifiMac associated with this MacLow. More...
 
void SetMpduAggregator (const Ptr< MpduAggregator > aggr)
 Set the aggregator used to construct A-MPDU subframes. More...
 
void SetMsduAggregator (const Ptr< MsduAggregator > aggr)
 Set the aggregator used to construct A-MSDU subframes. More...
 
void SetPhy (const Ptr< WifiPhy > phy)
 Set up WifiPhy associated with this MacLow. More...
 
void SetPifs (Time pifs)
 Set PCF Interframe Space (PIFS) of this MacLow. More...
 
void SetPromisc (void)
 Enable promiscuous mode. More...
 
void SetRifs (Time rifs)
 Set Reduced Interframe Space (RIFS) of this MacLow. More...
 
void SetRxCallback (Callback< void, Ptr< Packet >, const WifiMacHeader *> callback)
 
void SetSifs (Time sifs)
 Set Short Interframe Space (SIFS) of this MacLow. More...
 
void SetSlotTime (Time slotTime)
 Set slot duration of this MacLow. More...
 
void SetWifiRemoteStationManager (const Ptr< WifiRemoteStationManager > manager)
 Set up WifiRemoteStationManager associated with this MacLow. More...
 
- Public Member Functions inherited from ns3::Object
 Object ()
 Constructor. More...
 
virtual ~Object ()
 Destructor. More...
 
void AggregateObject (Ptr< Object > other)
 Aggregate two Objects together. More...
 
void Dispose (void)
 Dispose of this Object. More...
 
AggregateIterator GetAggregateIterator (void) const
 Get an iterator to the Objects aggregated to this one. More...
 
virtual TypeId GetInstanceTypeId (void) const
 Get the most derived TypeId for this Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
void Initialize (void)
 Invoke DoInitialize on all Objects aggregated to this one. More...
 
bool IsInitialized (void) const
 Check if the object has been initialized. More...
 
- Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >
 SimpleRefCount ()
 Default constructor. More...
 
 SimpleRefCount (const SimpleRefCount &o)
 Copy constructor. More...
 
uint32_t GetReferenceCount (void) const
 Get the reference count of the object. More...
 
SimpleRefCountoperator= (const SimpleRefCount &o)
 Assignment operator. More...
 
void Ref (void) const
 Increment the reference count. More...
 
void Unref (void) const
 Decrement the reference count. More...
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor. More...
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful. More...
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising erros. More...
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful. More...
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors. More...
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context. More...
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context. More...
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context. More...
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context. More...
 

Static Public Member Functions

static TypeId GetTypeId (void)
 Get the type ID. More...
 
- Static Public Member Functions inherited from ns3::MacLow
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::Object
static TypeId GetTypeId (void)
 Register this type. More...
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId (void)
 Get the type ID. More...
 

Private Member Functions

virtual WifiTxVector GetDataTxVector (Ptr< const WifiMacQueueItem > item) const
 Return a TXVECTOR for the DATA frame given the destination. More...
 

Private Attributes

Ptr< ChannelCoordinatorm_coordinator
 the channel coordinator More...
 
Ptr< ChannelSchedulerm_scheduler
 the channel scheduler More...
 

Additional Inherited Members

- Public Types inherited from ns3::MacLow
typedef Callback< void, Ptr< Packet >, const WifiMacHeader * > MacLowRxCallback
 typedef for a callback for MacLowRx More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoInitialize (void)
 Initialize() implementation. More...
 
virtual void NotifyNewAggregate (void)
 Notify all Objects aggregated to this one of a new Object being aggregated. More...
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes. More...
 
virtual void NotifyConstructionCompleted (void)
 Notifier called once the ObjectBase is fully constructed. More...
 

Detailed Description

This class is the subclass of MacLow to provide support for MAC extension (1) allows higher layer control data rate and tx power level.


Introspection did not find any typical Config paths.

If higher layer does not set, they will be determined by WifiRemoteStationManager of MAC layer; If higher layer sets tx parameters in non-adaptable mode, the data rate and tx power level will be used for transmission;. If higher layer sets tx parameters in adaptable mode, the data rate will be lower bound for the actual data rate, and the power level will be upper bound for the actual transmit power. (2) implements the feature described in Annex C : avoid transmission at scheduled guard intervals However, the feature is extended further here that the required transmit time is determined by MAC layer itself rather than PHY layer, which contains RTS/CTS, DATA and ACK time.


No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 704 bytes (on a 64-bit architecture).

Definition at line 49 of file wave-mac-low.h.

Constructor & Destructor Documentation

◆ WaveMacLow()

ns3::WaveMacLow::WaveMacLow ( )

Definition at line 45 of file wave-mac-low.cc.

References NS_LOG_FUNCTION.

◆ ~WaveMacLow()

ns3::WaveMacLow::~WaveMacLow ( )
virtual

Definition at line 49 of file wave-mac-low.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ GetDataTxVector()

WifiTxVector ns3::WaveMacLow::GetDataTxVector ( Ptr< const WifiMacQueueItem item) const
privatevirtual

Return a TXVECTOR for the DATA frame given the destination.

The function consults WifiRemoteStationManager, which controls the rate to different destinations.

Parameters
itemthe item being asked for TXVECTOR
Returns
TXVECTOR for the given item

Reimplemented from ns3::MacLow.

Definition at line 63 of file wave-mac-low.cc.

References ns3::WifiTxVector::GetChannelWidth(), ns3::WifiMode::GetDataRate(), ns3::MacLow::GetDataTxVector(), ns3::WifiTxVector::GetMode(), ns3::WifiTxVector::GetPreambleType(), ns3::WifiTxVector::GetTxPowerLevel(), ns3::HigherLayerTxVectorTag::GetTxVector(), ns3::HigherLayerTxVectorTag::IsAdaptable(), min, NS_LOG_FUNCTION, ns3::WifiTxVector::SetChannelWidth(), ns3::WifiTxVector::SetMode(), ns3::WifiTxVector::SetPreambleType(), and ns3::WifiTxVector::SetTxPowerLevel().

+ Here is the call graph for this function:

◆ GetTypeId()

TypeId ns3::WaveMacLow::GetTypeId ( void  )
static

Get the type ID.

Returns
the object TypeId

Definition at line 36 of file wave-mac-low.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ SetWaveNetDevice()

void ns3::WaveMacLow::SetWaveNetDevice ( Ptr< WaveNetDevice device)
Parameters
deviceWaveNetDevice associated with WaveMacLow

Definition at line 55 of file wave-mac-low.cc.

References ns3::WaveNetDevice::GetChannelCoordinator(), ns3::WaveNetDevice::GetChannelScheduler(), m_coordinator, m_scheduler, and NS_ASSERT.

+ Here is the call graph for this function:

◆ StartTransmission()

void ns3::WaveMacLow::StartTransmission ( Ptr< WifiMacQueueItem mpdu,
MacLowTransmissionParameters  parameters,
Ptr< Txop txop 
)
virtual
Parameters
mpdupacket to send
parametersthe transmission parameters to use for this packet.
txoppointer to the calling Txop.

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

Reimplemented from ns3::MacLow.

Definition at line 109 of file wave-mac-low.cc.

References ns3::MacLow::CalculateTransmissionTime(), ns3::Time::GetMilliSeconds(), ns3::MacLow::GetPhy(), m_coordinator, m_scheduler, ns3::ChannelCoordinator::NeedTimeToGuardInterval(), NS_LOG_DEBUG, NS_LOG_FUNCTION, third::phy, and ns3::MacLow::StartTransmission().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_coordinator

Ptr<ChannelCoordinator> ns3::WaveMacLow::m_coordinator
private

the channel coordinator

Definition at line 88 of file wave-mac-low.h.

Referenced by SetWaveNetDevice(), and StartTransmission().

◆ m_scheduler

Ptr<ChannelScheduler> ns3::WaveMacLow::m_scheduler
private

the channel scheduler

Definition at line 87 of file wave-mac-low.h.

Referenced by SetWaveNetDevice(), and StartTransmission().


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