|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
22 #include "ns3/packet.h"
27 #include "ns3/ht-configuration.h"
28 #include "ns3/vht-configuration.h"
29 #include "ns3/he-configuration.h"
42 .SetGroupName (
"Wifi")
43 .AddAttribute (
"Ssid",
"The ssid we want to belong to.",
48 .AddTraceSource (
"MacTx",
49 "A packet has been received from higher layers and is being processed in preparation for "
50 "queueing for transmission.",
52 "ns3::Packet::TracedCallback")
53 .AddTraceSource (
"MacTxDrop",
54 "A packet has been dropped in the MAC layer before being queued for transmission. "
55 "This trace source is fired, e.g., when an AP's MAC receives from the upper layer "
56 "a packet destined to a station that is not associated with the AP or a STA's MAC "
57 "receives a packet from the upper layer while it is not associated with any AP.",
59 "ns3::Packet::TracedCallback")
60 .AddTraceSource (
"MacPromiscRx",
61 "A packet has been received by this device, has been passed up from the physical layer "
62 "and is being forwarded up the local protocol stack. This is a promiscuous trace.",
64 "ns3::Packet::TracedCallback")
65 .AddTraceSource (
"MacRx",
66 "A packet has been received by this device, has been passed up from the physical layer "
67 "and is being forwarded up the local protocol stack. This is a non-promiscuous trace.",
69 "ns3::Packet::TracedCallback")
70 .AddTraceSource (
"MacRxDrop",
71 "A packet has been dropped in the MAC layer after it has been passed up from the physical layer.",
73 "ns3::Packet::TracedCallback")
134 dcf->
SetMinCw ((cwmin + 1) / 4 - 1);
135 dcf->
SetMaxCw ((cwmin + 1) / 2 - 1);
147 dcf->
SetMinCw ((cwmin + 1) / 2 - 1);
void NotifyPromiscRx(Ptr< const Packet > packet)
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetDevice(const Ptr< NetDevice > device)
Sets the device this PHY is associated with.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Ptr< HtConfiguration > GetHtConfiguration(void) const
void NotifyTxDrop(Ptr< const Packet > packet)
void SetMaxCw(uint32_t maxCw)
Set the maximum contention window size.
Ptr< const AttributeChecker > MakeSsidChecker(void)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void NotifyTx(Ptr< const Packet > packet)
virtual void DoDispose()
Destructor implementation.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
void NotifyRx(Ptr< const Packet > packet)
Ptr< NetDevice > m_device
Pointer to the device.
TracedCallback< Ptr< const Packet > > m_macRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
TypeId SetParent(TypeId tid)
Set the parent TypeId.
AttributeValue implementation for Ssid.
The IEEE 802.11 SSID Information Element.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< HeConfiguration > GetHeConfiguration(void) const
void SetMinCw(uint32_t minCw)
Set the minimum contention window size.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
A base class which provides memory management and object aggregation.
Ptr< VhtConfiguration > GetVhtConfiguration(void) const
@ AC_UNDEF
Total number of ACs.
Ptr< HeConfiguration > GetHeConfiguration(void) const
static TypeId GetTypeId(void)
Get the type ID.
TracedCallback< Ptr< const Packet > > m_macPromiscRxTrace
The trace source fired for packets successfully received by the device immediately before being forwa...
void NotifyRxDrop(Ptr< const Packet > packet)
virtual Ssid GetSsid(void) const =0
TracedCallback< Ptr< const Packet > > m_macTxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
Ptr< HtConfiguration > GetHtConfiguration(void) const
virtual void SetSsid(Ssid ssid)=0
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
AcIndex
This enumeration defines the Access Categories as an enumeration with values corresponding to the AC ...
void SetTxopLimit(Time txopLimit)
Set the TXOP limit.
TracedCallback< Ptr< const Packet > > m_macRxDropTrace
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer ...
void ConfigureDcf(Ptr< Txop > dcf, uint32_t cwmin, uint32_t cwmax, bool isDsss, AcIndex ac)
Ptr< const AttributeAccessor > MakeSsidAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
TracedCallback< Ptr< const Packet > > m_macTxTrace
The trace source fired when packets come into the "top" of the device at the L3/L2 transition,...
Ptr< NetDevice > GetDevice(void) const
Return the device this PHY is associated with.
void SetAifsn(uint8_t aifsn)
Set the number of slots that make up an AIFS.