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

STAs communicate with each directly outside the context of a BSS. More...

#include "ocb-wifi-mac.h"

+ Inheritance diagram for ns3::OcbWifiMac:
+ Collaboration diagram for ns3::OcbWifiMac:

Public Member Functions

 OcbWifiMac (void)
 
virtual ~OcbWifiMac (void)
 
void AddReceiveVscCallback (OrganizationIdentifier oi, VscCallback cb)
 
void CancleTx (enum AcIndex ac)
 
virtual bool CanForwardPacketsTo (Mac48Address to) const
 Return true if packets can be forwarded to the given destination, false otherwise. More...
 
void ConfigureEdca (uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac)
 
virtual void ConfigureStandard (enum WifiStandard standard)
 
void EnableForWave (Ptr< WaveNetDevice > device)
 
virtual void Enqueue (Ptr< Packet > packet, Mac48Address to)
 
virtual Mac48Address GetBssid (void) const
 This method shall not be used in WAVE environment and here it will overloaded to log warn message. More...
 
virtual Ssid GetSsid (void) const
 
void MakeVirtualBusy (Time duration)
 
void RemoveReceiveVscCallback (OrganizationIdentifier oi)
 
void Reset (void)
 To support MAC extension for multiple channel operation, Reset current MAC entity and flush its internal queues. More...
 
void Resume (void)
 To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity. More...
 
void SendVsc (Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
 
virtual void SetBssid (Mac48Address bssid)
 
virtual void SetLinkDownCallback (Callback< void > linkDown)
 
virtual void SetLinkUpCallback (Callback< void > linkUp)
 SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets directly whenever they want so the link is always up and never down even during channel switch. More...
 
virtual void SetSsid (Ssid ssid)
 
void SetWifiPhy (Ptr< WifiPhy > phy)
 Set the PHY. More...
 
void Suspend (void)
 To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity. More...
 
- Public Member Functions inherited from ns3::WifiMac
 WifiMac ()
 
 WifiMac (const WifiMac &)=delete
 
virtual ~WifiMac ()
 
virtual bool CanForwardPacketsTo (Mac48Address to) const =0
 Return true if packets can be forwarded to the given destination, false otherwise. More...
 
virtual void ConfigureStandard (WifiStandard standard)
 
virtual void Enqueue (Ptr< Packet > packet, Mac48Address to)=0
 
virtual void Enqueue (Ptr< Packet > packet, Mac48Address to, Mac48Address from)
 
Mac48Address GetAddress (void) const
 
Mac48Address GetBssid (void) const
 
Ptr< ChannelAccessManagerGetChannelAccessManager (uint8_t linkId=SINGLE_LINK_OP_ID) const
 Get the Channel Access Manager associated with the given link. More...
 
Ptr< WifiNetDeviceGetDevice (void) const
 Return the device this PHY is associated with. More...
 
bool GetDsssSupported (uint8_t linkId) const
 Return whether the device supports DSSS on the given link. More...
 
EhtCapabilities GetEhtCapabilities (void) const
 Return the EHT capabilities of the device. More...
 
Ptr< EhtConfigurationGetEhtConfiguration (void) const
 
bool GetEhtSupported () const
 Return whether the device supports EHT. More...
 
bool GetErpSupported (uint8_t linkId) const
 Return whether the device supports ERP on the given link. More...
 
ExtendedCapabilities GetExtendedCapabilities (void) const
 Return the extended capabilities of the device. More...
 
Ptr< FrameExchangeManagerGetFrameExchangeManager (uint8_t linkId=SINGLE_LINK_OP_ID) const
 Get the Frame Exchange Manager associated with the given link. More...
 
HeCapabilities GetHeCapabilities (void) const
 Return the HE capabilities of the device. More...
 
Ptr< HeConfigurationGetHeConfiguration (void) const
 
bool GetHeSupported () const
 Return whether the device supports HE. More...
 
HtCapabilities GetHtCapabilities (void) const
 Return the HT capabilities of the device. More...
 
Ptr< HtConfigurationGetHtConfiguration (void) const
 
bool GetHtSupported () const
 Return whether the device supports HT. More...
 
virtual std::optional< uint8_t > GetLinkIdByAddress (const Mac48Address &address) const
 Get the ID of the link having the given MAC address, if any. More...
 
uint32_t GetMaxAmpduSize (AcIndex ac) const
 Return the maximum A-MPDU size of the given Access Category. More...
 
uint16_t GetMaxAmsduSize (AcIndex ac) const
 Return the maximum A-MSDU size of the given Access Category. More...
 
uint8_t GetNLinks (void) const
 Get the number of links (can be greater than 1 for 11be devices only). More...
 
bool GetQosSupported () const
 Return whether the device supports QoS. More...
 
Ptr< QosTxopGetQosTxop (AcIndex ac) const
 Accessor for a specified EDCA object. More...
 
Ptr< QosTxopGetQosTxop (uint8_t tid) const
 Accessor for a specified EDCA object. More...
 
Ssid GetSsid (void) const
 
Ptr< TxopGetTxop (void) const
 Accessor for the Txop object. More...
 
virtual Ptr< WifiMacQueueGetTxopQueue (AcIndex ac) const
 Get the wifi MAC queue of the (Qos)Txop associated with the given AC, if such (Qos)Txop is installed, or a null pointer, otherwise. More...
 
TypeOfStation GetTypeOfStation (void) const
 Return the type of station. More...
 
VhtCapabilities GetVhtCapabilities (void) const
 Return the VHT capabilities of the device. More...
 
Ptr< VhtConfigurationGetVhtConfiguration (void) const
 
bool GetVhtSupported () const
 Return whether the device supports VHT. More...
 
Ptr< WifiPhyGetWifiPhy (uint8_t linkId=SINGLE_LINK_OP_ID) const
 
Ptr< WifiRemoteStationManagerGetWifiRemoteStationManager (uint8_t linkId=0) const
 
virtual void NotifyChannelSwitching (void)
 Notify that channel has been switched. More...
 
void NotifyPromiscRx (Ptr< const Packet > packet)
 
void NotifyRx (Ptr< const Packet > packet)
 
void NotifyRxDrop (Ptr< const Packet > packet)
 
void NotifyTx (Ptr< const Packet > packet)
 
void NotifyTxDrop (Ptr< const Packet > packet)
 
WifiMacoperator= (const WifiMac &)=delete
 
void ResetWifiPhys (void)
 Remove currently attached WifiPhy objects from this MAC. More...
 
virtual void SetAddress (Mac48Address address)
 
void SetBssid (Mac48Address bssid)
 
void SetCtsToSelfSupported (bool enable)
 Enable or disable CTS-to-self feature. More...
 
void SetDevice (const Ptr< WifiNetDevice > device)
 Sets the device this PHY is associated with. More...
 
void SetForwardUpCallback (ForwardUpCallback upCallback)
 
void SetLinkDownCallback (Callback< void > linkDown)
 
virtual void SetLinkUpCallback (Callback< void > linkUp)
 
void SetPromisc (void)
 Sets the interface in promiscuous mode. More...
 
void SetSsid (Ssid ssid)
 
void SetTypeOfStation (TypeOfStation type)
 This method is invoked by a subclass to specify what type of station it is implementing. More...
 
virtual void SetWifiPhys (const std::vector< Ptr< WifiPhy > > &phys)
 
void SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)
 
void SetWifiRemoteStationManagers (const std::vector< Ptr< WifiRemoteStationManager > > &stationManagers)
 
virtual bool SupportsSendFrom (void) const
 
- 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<>
Ptr< ObjectGetObject () const
 Specialization of () for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (TypeId tid) const
 Get a pointer to the requested aggregated Object by TypeId. More...
 
template<>
Ptr< ObjectGetObject (TypeId tid) const
 Specialization of (TypeId tid) for objects of type ns3::Object. More...
 
template<typename T >
Ptr< T > GetObject (void) const
 Get a pointer to the requested aggregated Object. 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...
 
virtual TypeId GetInstanceTypeId (void) const =0
 Get the most derived TypeId for this Object. 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::WifiMac
static TypeId GetTypeId (void)
 Get the type ID. 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...
 

Protected Member Functions

virtual void DoDispose (void)
 Destructor implementation. More...
 
- Protected Member Functions inherited from ns3::WifiMac
virtual void ConfigureContentionWindow (uint32_t cwMin, uint32_t cwMax)
 
virtual void DeaggregateAmsduAndForward (Ptr< WifiMacQueueItem > mpdu)
 This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack. More...
 
void DoDispose () override
 Destructor implementation. More...
 
void DoInitialize () override
 Initialize() implementation. More...
 
void ForwardUp (Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
 Forward the packet up to the device. More...
 
Ptr< QosTxopGetBEQueue (void) const
 Accessor for the AC_BE channel access function. More...
 
Ptr< QosTxopGetBKQueue (void) const
 Accessor for the AC_BK channel access function. More...
 
LinkEntityGetLink (uint8_t linkId) const
 Get a reference to the link associated with the given ID. More...
 
bool GetShortSlotTimeSupported (void) const
 
Ptr< QosTxopGetVIQueue (void) const
 Accessor for the AC_VI channel access function. More...
 
Ptr< QosTxopGetVOQueue (void) const
 Accessor for the AC_VO channel access function. More...
 
virtual void Receive (Ptr< WifiMacQueueItem > mpdu, uint8_t linkId)
 This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received on the given link. More...
 
void SetQosSupported (bool enable)
 Enable or disable QoS support for the device. More...
 
void SetShortSlotTimeSupported (bool enable)
 Enable or disable short slot time feature. More...
 
- Protected Member Functions inherited from ns3::Object
 Object (const Object &o)
 Copy an Object. More...
 
virtual void DoDispose (void)
 Destructor implementation. 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...
 

Private Member Functions

virtual std::optional< uint8_t > GetLinkIdByAddress (const Mac48Address &address) const
 Get the ID of the link having the given MAC address, if any. More...
 
virtual void Receive (Ptr< WifiMacQueueItem > mpdu, uint8_t linkId)
 This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received on the given link. More...
 

Private Attributes

VendorSpecificContentManager m_vscManager
 VSC manager. More...
 

Additional Inherited Members

- Public Types inherited from ns3::WifiMac
typedef Callback< void, Ptr< const Packet >, Mac48Address, Mac48AddressForwardUpCallback
 This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack. More...
 
- Protected Attributes inherited from ns3::WifiMac
Callback< void > m_linkDown
 Callback when a link is down. More...
 
Callback< void > m_linkUp
 Callback when a link is up. More...
 
Ptr< MacRxMiddlem_rxMiddle
 RX middle (defragmentation etc.) More...
 
Ptr< MacTxMiddlem_txMiddle
 TX middle (aggregation etc.) More...
 
Ptr< Txopm_txop
 TXOP used for transmission of frames to non-QoS peers. More...
 

Detailed Description

STAs communicate with each directly outside the context of a BSS.

In OCB mac mode,synchronization, association, dis-association and authentication of normal wifi are not used for wireless access in vehicular environments.

Although Timing Advertisement frame is a specific management frame defined in 802.11p. It is mainly used by IEEE Std 1609.4 for channel switch synchronization. However in simulation nodes are supposed to have GPS synchronization ability, so we will not implement this feature.

Config Paths

ns3::OcbWifiMac is accessible through the following paths with Config::Set and Config::Connect:

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/Mac/$ns3::OcbWifiMac"
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WaveNetDevice/MacEntities/[i]"

No Attributes are defined for this type.

Attributes defined in parent class ns3::WifiMac

  • Ssid: The ssid we want to belong to.
    • Set with class: SsidValue
    • Underlying type: Ssid
    • Initial value: default
    • Flags: construct write read
  • QosSupported: This Boolean attribute is set to enable 802.11e/WMM-style QoS support at this STA.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct read
  • CtsToSelfSupported: Use CTS to Self when using a rate that is not in the basic rate set.
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: false
    • Flags: construct write
  • ShortSlotTimeSupported: Whether or not short slot time is supported (only used by ERP APs or STAs).
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • Txop: The Txop object.
  • VO_Txop: Queue that manages packets belonging to AC_VO access class.
  • VI_Txop: Queue that manages packets belonging to AC_VI access class.
  • BE_Txop: Queue that manages packets belonging to AC_BE access class.
  • BK_Txop: Queue that manages packets belonging to AC_BK access class.
  • VO_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_VO access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE/EHT PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • VI_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_VI access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE/EHT PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • BE_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_BE access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE/EHT PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • BK_MaxAmsduSize: Maximum length in bytes of an A-MSDU for AC_BK access class (capped to 7935 for HT PPDUs and 11398 for VHT/HE/EHT PPDUs). Value 0 means A-MSDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:11398
    • Initial value: 0
    • Flags: construct write read
  • VO_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_VO access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, 6500631 for HE PPDUs and 15523200 for EHT PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:15523200
    • Initial value: 0
    • Flags: construct write read
  • VI_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_VI access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, 6500631 for HE PPDUs and 15523200 for EHT PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:15523200
    • Initial value: 65535
    • Flags: construct write read
  • BE_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_BE access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, 6500631 for HE PPDUs and 15523200 for EHT PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:15523200
    • Initial value: 65535
    • Flags: construct write read
  • BK_MaxAmpduSize: Maximum length in bytes of an A-MPDU for AC_BK access class (capped to 65535 for HT PPDUs, 1048575 for VHT PPDUs, 6500631 for HE PPDUs and 15523200 for EHT PPDUs). Value 0 means A-MPDU aggregation is disabled for that AC.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint32_t 0:15523200
    • Initial value: 0
    • Flags: construct write read
  • VO_BlockAckThreshold: If number of packets in VO queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • VI_BlockAckThreshold: If number of packets in VI queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • BE_BlockAckThreshold: If number of packets in BE queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • BK_BlockAckThreshold: If number of packets in BK queue reaches this value, block ack mechanism is used. If this value is 0, block ack is never used.When A-MPDU is enabled, block ack mechanism is used regardless of this value.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint8_t 0:64
    • Initial value: 0
    • Flags: construct write
  • VO_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_VO. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • VI_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_VI. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • BE_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_BE. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write
  • BK_BlockAckInactivityTimeout: Represents max time (blocks of 1024 microseconds) allowed for block ackinactivity for AC_BK. If this value isn't equal to 0 a timer start after that ablock ack setup is completed and will be reset every time that a block ackframe is received. If this value is 0, block ack inactivity timeout won't be used.
    • Set with class: ns3::UintegerValue
    • Underlying type: uint16_t 0:65535
    • Initial value: 0
    • Flags: construct write

No TraceSources are defined for this type.

TraceSources defined in parent class ns3::WifiMac

  • MacTx: A packet has been received from higher layers and is being processed in preparation for queueing for transmission.
    Callback signature: ns3::Packet::TracedCallback
  • MacTxDrop: A packet has been dropped in the MAC layer before being queued for transmission. This trace source is fired, e.g., when an AP's MAC receives from the upper layer a packet destined to a station that is not associated with the AP or a STA's MAC receives a packet from the upper layer while it is not associated with any AP.
    Callback signature: ns3::Packet::TracedCallback
  • 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.
    Callback signature: ns3::Packet::TracedCallback
  • 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.
    Callback signature: ns3::Packet::TracedCallback
  • MacRxDrop: A packet has been dropped in the MAC layer after it has been passed up from the physical layer.
    Callback signature: ns3::Packet::TracedCallback
  • TxOkHeader: The header of successfully transmitted packet.
    Callback signature: ns3::WifiMacHeader::TracedCallback
  • TxErrHeader: The header of unsuccessfully transmitted packet.
    Callback signature: ns3::WifiMacHeader::TracedCallback
  • AckedMpdu: An MPDU that was successfully acknowledged, via either a Normal Ack or a Block Ack.
    Callback signature: ns3::WifiMacQueueItem::TracedCallback
  • NAckedMpdu: An MPDU that was negatively acknowledged via a Block Ack.
    Callback signature: ns3::WifiMacQueueItem::TracedCallback
  • DroppedMpdu: An MPDU that was dropped for the given reason (see WifiMacDropReason).
    Callback signature: ns3::WifiMac::DroppedMpduCallback
  • MpduResponseTimeout: An MPDU whose response was not received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason) and the TXVECTOR used to transmit the MPDU. This trace source is fired when a CTS is missing after an RTS or a Normal Ack is missing after an MPDU or after a DL MU PPDU acknowledged in SU format.
    Callback signature: ns3::WifiMac::MpduResponseTimeoutCallback
  • PsduResponseTimeout: A PSDU whose response was not received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason) and the TXVECTOR used to transmit the PSDU. This trace source is fired when a BlockAck is missing after an A-MPDU, a BlockAckReq (possibly in the context of the acknowledgment of a DL MU PPDU in SU format) or a TB PPDU (in the latter case the missing BlockAck is a Multi-STA BlockAck).
    Callback signature: ns3::WifiMac::PsduResponseTimeoutCallback
  • PsduMapResponseTimeout: A PSDU map for which not all the responses were received before the timeout, along with an identifier of the type of timeout (see WifiTxTimer::Reason), the set of MAC addresses of the stations that did not respond and the total number of stations that had to respond. This trace source is fired when not all the addressed stations responded to an MU-BAR Trigger frame (either sent as a SU frame or aggregated to PSDUs in the DL MU PPDU), a Basic Trigger Frame or a BSRP Trigger Frame.
    Callback signature: ns3::WifiMac::PsduMapResponseTimeoutCallback

Size of this type is 520 bytes (on a 64-bit architecture).

Definition at line 49 of file ocb-wifi-mac.h.

Constructor & Destructor Documentation

◆ OcbWifiMac()

ns3::OcbWifiMac::OcbWifiMac ( void  )

Definition at line 56 of file ocb-wifi-mac.cc.

References NS_LOG_FUNCTION, ns3::OCB, ns3::WifiMac::SetBssid(), ns3::WifiMac::SetTypeOfStation(), and ns3::WILDCARD_BSSID.

+ Here is the call graph for this function:

◆ ~OcbWifiMac()

ns3::OcbWifiMac::~OcbWifiMac ( void  )
virtual

Definition at line 65 of file ocb-wifi-mac.cc.

References NS_LOG_FUNCTION.

Member Function Documentation

◆ AddReceiveVscCallback()

void ns3::OcbWifiMac::AddReceiveVscCallback ( OrganizationIdentifier  oi,
VscCallback  cb 
)
Parameters
oiOrganization Identifier
cbcallback to invoke whenever a vender specific action frame has been received and must be forwarded to the higher layers. every node shall register first if it wants to receive specific vendor specific content.

Definition at line 98 of file ocb-wifi-mac.cc.

References m_vscManager, NS_LOG_FUNCTION, and ns3::VendorSpecificContentManager::RegisterVscCallback().

+ Here is the call graph for this function:

◆ CancleTx()

void ns3::OcbWifiMac::CancleTx ( enum AcIndex  ac)
Parameters
acthe specified access category

To support MAC extension for multiple channel operation, Cancel transmit operation for internal queue associated with a specified Access Category.

Definition at line 484 of file ocb-wifi-mac.cc.

References ns3::WifiMac::GetQosTxop(), ns3::Txop::GetWifiMacQueue(), NS_ASSERT, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ CanForwardPacketsTo()

bool ns3::OcbWifiMac::CanForwardPacketsTo ( Mac48Address  to) const
virtual

Return true if packets can be forwarded to the given destination, false otherwise.

Parameters
tothe address to which the packet should be sent
Returns
whether packets can be forwarded to the given destination

Implements ns3::WifiMac.

Definition at line 160 of file ocb-wifi-mac.cc.

◆ ConfigureEdca()

void ns3::OcbWifiMac::ConfigureEdca ( uint32_t  cwmin,
uint32_t  cwmax,
uint32_t  aifsn,
enum AcIndex  ac 
)
Parameters
cwminthe min contention window
cwmaxthe max contention window
aifsnthe arbitration inter-frame space
acthe access category index

configure EDCA queue parameters

Definition at line 338 of file ocb-wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BE_NQOS, ns3::AC_BEACON, ns3::AC_BK, ns3::AC_UNDEF, ns3::AC_VI, ns3::AC_VO, ns3::WifiMac::LinkEntity::channelAccessManager, ns3::WifiMac::GetBEQueue(), ns3::WifiMac::GetBKQueue(), ns3::WifiMac::GetLink(), ns3::WifiMac::GetTxop(), ns3::WifiMac::GetVIQueue(), ns3::WifiMac::GetVOQueue(), NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::Txop::SetAifsn(), ns3::Txop::SetMaxCw(), ns3::Txop::SetMinCw(), ns3::Txop::SetWifiMac(), and ns3::SINGLE_LINK_OP_ID.

Referenced by ConfigureStandard().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConfigureStandard()

void ns3::OcbWifiMac::ConfigureStandard ( enum WifiStandard  standard)
virtual
Parameters
standardthe wifi standard to be configured

This method completes the configuration process for a requested PHY standard by creating the Frame Exchange Manager and the Channel Access Manager and configuring the PHY dependent parameters. This method can only be called after a configured PHY has been set.

Reimplemented from ns3::WifiMac.

Definition at line 409 of file ocb-wifi-mac.cc.

References ns3::AC_BE, ns3::AC_BE_NQOS, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, ConfigureEdca(), ns3::WifiMac::GetAddress(), ns3::WifiMac::GetLink(), ns3::WifiMac::GetNLinks(), ns3::WifiMac::GetQosSupported(), ns3::WifiMac::GetWifiPhy(), ns3::WifiMac::m_rxMiddle, ns3::WifiMac::m_txMiddle, NS_ASSERT, NS_LOG_FUNCTION, third::phy, ns3::WifiMac::SetWifiPhys(), ns3::SINGLE_LINK_OP_ID, and ns3::WIFI_STANDARD_80211p.

+ Here is the call graph for this function:

◆ DoDispose()

void ns3::OcbWifiMac::DoDispose ( void  )
protectedvirtual

Destructor implementation.

This method is called by Dispose() or by the Object's destructor, whichever comes first.

Subclasses are expected to implement their real destruction code in an overridden 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.

It is safe to call GetObject() from within this method.

Reimplemented from ns3::Object.

Definition at line 517 of file ocb-wifi-mac.cc.

References ns3::WifiMac::DoDispose(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ EnableForWave()

void ns3::OcbWifiMac::EnableForWave ( Ptr< WaveNetDevice device)
Parameters
devicemake current MAC entity associated with WaveNetDevice

To support MAC extension for multiple channel operation, WaveMacLow object will be used to replace original MacLow object.

Definition at line 503 of file ocb-wifi-mac.cc.

References ns3::WifiMac::GetLink(), NS_LOG_FUNCTION, and ns3::SINGLE_LINK_OP_ID.

Referenced by ns3::WaveHelper::Install().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Enqueue()

void ns3::OcbWifiMac::Enqueue ( Ptr< Packet packet,
Mac48Address  to 
)
virtual
Parameters
packetthe packet to send.
tothe 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 channel access function determines that access is granted to this MAC.

Implements ns3::WifiMac.

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

References ns3::WifiRemoteStationManager::AddAllSupportedMcs(), ns3::WifiRemoteStationManager::AddAllSupportedModes(), ns3::WifiRemoteStationManager::AddStationHtCapabilities(), ns3::WifiRemoteStationManager::AddStationVhtCapabilities(), ns3::WifiMac::GetAddress(), ns3::WifiMac::GetHtCapabilities(), ns3::WifiMac::GetHtSupported(), ns3::WifiMac::GetQosSupported(), ns3::WifiMac::GetQosTxop(), ns3::WifiMac::GetTxop(), ns3::WifiMac::GetVhtCapabilities(), ns3::WifiMac::GetVhtSupported(), ns3::WifiMac::GetWifiRemoteStationManager(), ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_FUNCTION, ns3::QosUtilsGetTidForPacket(), ns3::Txop::Queue(), ns3::WifiRemoteStationManager::RecordDisassociated(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetNoOrder(), ns3::WifiMacHeader::SetQosAckPolicy(), ns3::WifiMacHeader::SetQosNoAmsdu(), ns3::WifiMacHeader::SetQosNoEosp(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetQosTxopLimit(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_DATA, ns3::WIFI_MAC_QOSDATA, and ns3::WILDCARD_BSSID.

+ Here is the call graph for this function:

◆ GetBssid()

Mac48Address ns3::OcbWifiMac::GetBssid ( void  ) const
virtual

This method shall not be used in WAVE environment and here it will overloaded to log warn message.

Returns
An invalid BSSID.

Definition at line 133 of file ocb-wifi-mac.cc.

References NS_LOG_WARN, and ns3::WILDCARD_BSSID.

◆ GetLinkIdByAddress()

std::optional< uint8_t > ns3::OcbWifiMac::GetLinkIdByAddress ( const Mac48Address address) const
privatevirtual

Get the ID of the link having the given MAC address, if any.

Parameters
addressthe given MAC address
Returns
the ID of the link having the given MAC address, if any

Reimplemented from ns3::WifiMac.

Definition at line 511 of file ocb-wifi-mac.cc.

◆ GetSsid()

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

This method shall not be used in WAVE environment and here it will overloaded to log warn message

Definition at line 118 of file ocb-wifi-mac.cc.

References ns3::WifiMac::GetSsid(), and NS_LOG_WARN.

+ Here is the call graph for this function:

◆ GetTypeId()

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

Get the type ID.

Returns
the object TypeId

Definition at line 46 of file ocb-wifi-mac.cc.

References ns3::TypeId::SetParent().

+ Here is the call graph for this function:

◆ MakeVirtualBusy()

void ns3::OcbWifiMac::MakeVirtualBusy ( Time  duration)
Parameters
durationthe virtual busy time for MAC entity

To support MAC extension for multiple channel operation, Notify MAC entity busy for some time to prevent transmission

Definition at line 477 of file ocb-wifi-mac.cc.

References ns3::WifiMac::LinkEntity::channelAccessManager, ns3::WifiMac::GetLink(), ns3::ChannelAccessManager::NotifyCcaBusyStartNow(), NS_LOG_FUNCTION, ns3::SINGLE_LINK_OP_ID, and ns3::WIFI_CHANLIST_PRIMARY.

Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Receive()

void ns3::OcbWifiMac::Receive ( Ptr< WifiMacQueueItem mpdu,
uint8_t  linkId 
)
privatevirtual

This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received on the given link.

The implementation is intended to capture logic that is going to be common to all (or most) derived classes. Specifically, handling of Block Ack management frames is dealt with here.

This method will need, however, to be overridden by derived classes so that they can perform their data handling before invoking the base version.

The given link may be undefined in some cases (e.g., in case of QoS Data frames received in the context of a Block Ack agreement – because the BlockAckManager does not have to record the link each buffered MPDU has been received on); in such a cases, the value of linkId should be WIFI_LINKID_UNDEFINED.

Parameters
mpduthe MPDU that has been received.
linkIdthe ID of the given link

Reimplemented from ns3::WifiMac.

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

References ns3::WifiRemoteStationManager::AddAllSupportedMcs(), ns3::WifiRemoteStationManager::AddAllSupportedModes(), ns3::WifiRemoteStationManager::AddStationHtCapabilities(), ns3::WifiRemoteStationManager::AddStationVhtCapabilities(), ns3::CATEGORY_OF_VSA, ns3::WifiMac::DeaggregateAmsduAndForward(), ns3::VendorSpecificContentManager::FindVscCallback(), ns3::WifiMac::ForwardUp(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::GetAddr3(), ns3::WifiMac::GetAddress(), ns3::VendorSpecificActionHeader::GetCategory(), ns3::WifiMac::GetHtCapabilities(), ns3::WifiMac::GetHtSupported(), ns3::VendorSpecificActionHeader::GetOrganizationIdentifier(), ns3::WifiMac::GetVhtCapabilities(), ns3::WifiMac::GetVhtSupported(), ns3::WifiMac::GetWifiRemoteStationManager(), ns3::WifiMacHeader::IsAction(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsData(), ns3::Mac48Address::IsGroup(), ns3::WifiMacHeader::IsMgt(), ns3::Callback< R, T1, T2, T3, T4, T5, T6, T7, T8, T9 >::IsNull(), ns3::WifiMacHeader::IsQosAmsdu(), ns3::WifiMacHeader::IsQosData(), m_vscManager, ns3::WifiMac::NotifyRxDrop(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, NS_LOG_LOGIC, ns3::Packet::PeekHeader(), ns3::WifiMac::Receive(), ns3::WifiRemoteStationManager::RecordDisassociated(), ns3::Packet::RemoveHeader(), and ns3::WILDCARD_BSSID.

+ Here is the call graph for this function:

◆ RemoveReceiveVscCallback()

void ns3::OcbWifiMac::RemoveReceiveVscCallback ( OrganizationIdentifier  oi)
Parameters
oiOrganization Identifier

Definition at line 105 of file ocb-wifi-mac.cc.

References ns3::VendorSpecificContentManager::DeregisterVscCallback(), m_vscManager, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ Reset()

void ns3::OcbWifiMac::Reset ( void  )

To support MAC extension for multiple channel operation, Reset current MAC entity and flush its internal queues.

Definition at line 494 of file ocb-wifi-mac.cc.

References ns3::WifiMac::LinkEntity::channelAccessManager, ns3::WifiMac::LinkEntity::feManager, ns3::WifiMac::GetLink(), ns3::ChannelAccessManager::NotifySwitchingStartNow(), NS_LOG_FUNCTION, and ns3::SINGLE_LINK_OP_ID.

+ Here is the call graph for this function:

◆ Resume()

void ns3::OcbWifiMac::Resume ( void  )

To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity.

Definition at line 469 of file ocb-wifi-mac.cc.

References ns3::WifiMac::LinkEntity::channelAccessManager, ns3::WifiMac::GetLink(), ns3::ChannelAccessManager::NotifyWakeupNow(), NS_LOG_FUNCTION, and ns3::SINGLE_LINK_OP_ID.

Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SendVsc()

void ns3::OcbWifiMac::SendVsc ( Ptr< Packet vsc,
Mac48Address  peer,
OrganizationIdentifier  oi 
)
Parameters
vscmanagement packet to send.
peerthe address to which the packet should be sent.
oiOrganization Identifier field see 7.3.1.31 Organization Identifier field and 10.3.29 Vendor-specific action

management information can be transmitted over vender specific action frame. This will be mainly called by IEEE Std 1609.4 to send WSA from IEEE Std 1609.3

Definition at line 71 of file ocb-wifi-mac.cc.

References ns3::Packet::AddHeader(), ns3::WifiMac::GetAddress(), ns3::WifiMac::GetQosSupported(), ns3::WifiMac::GetQosTxop(), ns3::WifiMac::GetTxop(), NS_LOG_FUNCTION, ns3::QosUtilsGetTidForPacket(), ns3::Txop::Queue(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::VendorSpecificActionHeader::SetOrganizationIdentifier(), ns3::WifiMacHeader::SetType(), ns3::WIFI_MAC_MGT_ACTION, and ns3::WILDCARD_BSSID.

+ Here is the call graph for this function:

◆ SetBssid()

void ns3::OcbWifiMac::SetBssid ( Mac48Address  bssid)
virtual
Parameters
bssidthe BSSID of the network that this device belongs to. This method shall not be used in WAVE environment and here it will overloaded to log warn message

Definition at line 127 of file ocb-wifi-mac.cc.

References NS_LOG_WARN.

◆ SetLinkDownCallback()

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

Definition at line 152 of file ocb-wifi-mac.cc.

References NS_LOG_FUNCTION, NS_LOG_WARN, and ns3::WifiMac::SetLinkDownCallback().

+ Here is the call graph for this function:

◆ SetLinkUpCallback()

void ns3::OcbWifiMac::SetLinkUpCallback ( Callback< void >  linkUp)
virtual

SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets directly whenever they want so the link is always up and never down even during channel switch.

Parameters
linkUpthe callback to invoke when the link becomes up.

Reimplemented from ns3::WifiMac.

Definition at line 140 of file ocb-wifi-mac.cc.

References NS_LOG_FUNCTION, and ns3::WifiMac::SetLinkUpCallback().

+ Here is the call graph for this function:

◆ SetSsid()

void ns3::OcbWifiMac::SetSsid ( Ssid  ssid)
virtual
Parameters
ssidthe current ssid of this MAC layer.

This method shall not be used in WAVE environment and here it will overloaded to log warn message

Definition at line 112 of file ocb-wifi-mac.cc.

References NS_LOG_WARN.

◆ SetWifiPhy()

void ns3::OcbWifiMac::SetWifiPhy ( Ptr< WifiPhy phy)

Set the PHY.

Parameters
phythe PHY object

Definition at line 391 of file ocb-wifi-mac.cc.

References ns3::WifiMac::GetLink(), NS_ABORT_MSG_IF, NS_LOG_FUNCTION, third::phy, ns3::WifiMac::SetWifiPhys(), and ns3::SINGLE_LINK_OP_ID.

Referenced by ns3::DefaultChannelScheduler::AssignDefaultCchAccess(), and ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Suspend()

void ns3::OcbWifiMac::Suspend ( void  )

To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity.

Definition at line 461 of file ocb-wifi-mac.cc.

References ns3::WifiMac::LinkEntity::channelAccessManager, ns3::WifiMac::LinkEntity::feManager, ns3::WifiMac::GetLink(), ns3::ChannelAccessManager::NotifySleepNow(), NS_LOG_FUNCTION, and ns3::SINGLE_LINK_OP_ID.

Referenced by ns3::DefaultChannelScheduler::SwitchToNextChannel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_vscManager

VendorSpecificContentManager ns3::OcbWifiMac::m_vscManager
private

VSC manager.

Definition at line 192 of file ocb-wifi-mac.h.

Referenced by AddReceiveVscCallback(), Receive(), and RemoveReceiveVscCallback().


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