|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
23 #include "ns3/event-id.h"
24 #include "ns3/pointer.h"
26 #include "ns3/string.h"
27 #include "ns3/mac-rx-middle.h"
28 #include "ns3/ht-capabilities.h"
29 #include "ns3/vht-capabilities.h"
30 #include "ns3/channel-access-manager.h"
50 .SetGroupName (
"Wave")
88 tid = tid > 7 ? 0 : tid;
114 NS_LOG_WARN (
"in OCB mode we should not call SetSsid");
120 NS_LOG_WARN (
"in OCB mode we should not call GetSsid");
129 NS_LOG_WARN (
"in OCB mode we should not call SetBsid");
135 NS_LOG_WARN (
"in OCB mode we should not call GetBssid");
156 NS_LOG_WARN (
"in OCB mode the like will never down, so linkDown will never be called");
312 NS_LOG_DEBUG (
"cannot find VscCallback for OrganizationIdentifier=" << oi);
315 bool succeed = cb (
this, oi,packet, from);
319 NS_LOG_DEBUG (
"vsc callback could not handle the packet successfully");
340 dcf->
SetMinCw ((cwmin + 1) / 4 - 1);
341 dcf->
SetMaxCw ((cwmin + 1) / 2 - 1);
346 dcf->
SetMinCw ((cwmin + 1) / 2 - 1);
384 uint32_t cwmax = 1023;
399 m_feManager = CreateObject<WaveFrameExchangeManager> ();
407 for (
const auto& pair :
m_edca)
409 pair.second->SetQosFrameExchangeManager (DynamicCast<QosFrameExchangeManager> (
m_feManager));
462 StaticCast<WaveFrameExchangeManager> (
m_feManager)->SetWaveNetDevice (device);
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const Packet > GetPacket(void) const
Get the packet stored in this item.
uint32_t PeekHeader(Header &header) const
Deserialize but does not remove the header from the internal buffer.
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
void Suspend(void)
To support MAC extension for multiple channel operation, Suspend the activity in current MAC entity.
void AddReceiveVscCallback(OrganizationIdentifier oi, VscCallback cb)
void AddHeader(const Header &header)
Add header to this packet.
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
Ssid GetSsid(void) const override
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool IsNull(void) const
Check for null implementation.
void SetBssid(Mac48Address bssid)
virtual void DoDispose(void)
Destructor implementation.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
virtual void SetSsid(Ssid ssid)
void SetLinkDownCallback(Callback< void > linkDown) override
void CancleTx(enum AcIndex ac)
Ptr< MacRxMiddle > m_rxMiddle
RX middle (defragmentation etc.)
void SetLinkUpCallback(Callback< void > linkUp) override
base class for all MAC-level wifi objects.
const WifiMacHeader & GetHeader(void) const
Get the header stored in this item.
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.
void AddAllSupportedModes(Mac48Address address)
Invoked in a STA or AP to store all of the modes supported by a destination which is also supported l...
bool GetQosSupported() const
Return whether the device supports QoS.
void AddAllSupportedMcs(Mac48Address address)
Invoked in a STA or AP to store all of the MCS supported by a destination which is also supported loc...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
VscCallback FindVscCallback(OrganizationIdentifier &oi)
The IEEE 802.11 SSID Information Element.
void DeregisterVscCallback(OrganizationIdentifier &oi)
STAs communicate with each directly outside the context of a BSS.
virtual void NotifyChannelSwitching(void)
When a channel switching occurs, enqueued packets are removed.
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
Mac48Address GetAddress(void) const override
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to)
static Mac48Address GetBroadcast(void)
EdcaQueues m_edca
This is a map from Access Category index to the corresponding channel access function.
virtual Ssid GetSsid(void) const
bool GetVhtSupported() const
Return whether the device supports VHT.
virtual void SetBssid(Mac48Address bssid)
AcIndex QosUtilsMapTidToAc(uint8_t tid)
Maps TID (Traffic ID) to Access classes.
void DoDispose() override
Destructor implementation.
void Reset(void)
To support MAC extension for multiple channel operation, Reset current MAC entity and flush its inter...
@ AC_UNDEF
Total number of ACs.
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer.
Ptr< Txop > m_txop
This holds a pointer to the TXOP instance for this WifiMac - used for transmission of frames to non-Q...
Ptr< Txop > GetTxop(void) const
Accessor for the DCF object.
Ptr< WifiRemoteStationManager > m_stationManager
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.)
bool IsBrandNew(Mac48Address address) const
Return whether the station state is brand new.
virtual Mac48Address GetBssid(void) const
This method shall not be used in WAVE environment and here it will overloaded to log warn message.
Simulation virtual time values and global simulation resolution.
virtual ~OcbWifiMac(void)
void SetTypeOfStation(TypeOfStation type) override
This method is invoked by a subclass to specify what type of station it is implementing.
void ForwardUp(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Forward the packet up to the device.
void AddStationHtCapabilities(Mac48Address from, HtCapabilities htCapabilities)
Records HT capabilities of the remote station.
void EnableForWave(Ptr< WaveNetDevice > device)
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC.
void AddStationVhtCapabilities(Mac48Address from, VhtCapabilities vhtCapabilities)
Records VHT capabilities of the remote station.
void MakeVirtualBusy(Time duration)
void NotifyRxDrop(Ptr< const Packet > packet)
static TypeId GetTypeId(void)
Get the type ID.
void RemoveReceiveVscCallback(OrganizationIdentifier oi)
void RecordDisassociated(Mac48Address address)
Records that the STA was disassociated.
void SendVsc(Ptr< Packet > vsc, Mac48Address peer, OrganizationIdentifier oi)
void Resume(void)
To support MAC extension for multiple channel operation, Resume the activity of suspended MAC entity.
HtCapabilities GetHtCapabilities(void) const
Return the HT capabilities of the device.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Ptr< FrameExchangeManager > m_feManager
Frame Exchange Manager.
Ptr< Packet > Copy(void) const
performs a COW copy of the packet.
Ptr< QosTxop > GetBKQueue(void) const
Accessor for the AC_BK channel access function.
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< MacTxMiddle > m_txMiddle
TX middle (aggregation etc.)
virtual void ConfigureStandard(enum WifiStandard standard)
Ptr< ChannelAccessManager > m_channelAccessManager
channel access manager
virtual void SetLinkDownCallback(Callback< void > linkDown)
void RegisterVscCallback(OrganizationIdentifier oi, VscCallback cb)
virtual void SetLinkUpCallback(Callback< void > linkUp)
SetLinkUpCallback and SetLinkDownCallback will be overloaded In OCB mode, stations can send packets d...
VhtCapabilities GetVhtCapabilities(void) const
Return the VHT capabilities of the device.
Ptr< QosTxop > GetBEQueue(void) const
Accessor for the AC_BE channel access function.
WifiStandard
Identifies the allowed configurations that a Wifi device is configured to use.
void ConfigureEdca(uint32_t cwmin, uint32_t cwmax, uint32_t aifsn, enum AcIndex ac)
Ptr< QosTxop > GetVOQueue(void) const
Accessor for the AC_VO channel access function.
bool GetHtSupported() const
Return whether the device supports HT.
virtual void Queue(Ptr< Packet > packet, const WifiMacHeader &hdr)
static const uint8_t CATEGORY_OF_VSA
see IEEE 802.11-2007 chapter 7.3.1.11 Table 7-24—Category values
Ptr< QosTxop > GetVIQueue(void) const
Accessor for the AC_VI channel access function.
virtual void Receive(Ptr< WifiMacQueueItem > mpdu)
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has bee...
VendorSpecificContentManager m_vscManager
VSC manager.
uint8_t QosUtilsGetTidForPacket(Ptr< const Packet > packet)
If a QoS tag is attached to the packet, returns a value < 8.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.
static const Mac48Address WILDCARD_BSSID
Wildcard BSSID.
the organization identifier is a public organizationally unique identifier assigned by the IEEE.