base class for all MAC-level wifi objects.This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines). More...
#include <wifi-mac.h>
Public Member Functions | |
void | ConfigureStandard (enum WifiPhyStandard standard) |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from)=0 |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to)=0 |
virtual Time | GetAckTimeout (void) const =0 |
virtual Mac48Address | GetAddress (void) const =0 |
virtual Time | GetBasicBlockAckTimeout (void) const |
virtual Mac48Address | GetBssid (void) const =0 |
virtual Time | GetCompressedBlockAckTimeout (void) const |
virtual Time | GetCtsTimeout (void) const =0 |
virtual Time | GetEifsNoDifs (void) const =0 |
Time | GetMaxPropagationDelay (void) const |
Time | GetMsduLifetime (void) const |
virtual Time | GetPifs (void) const =0 |
virtual Time | GetSifs (void) const =0 |
virtual Time | GetSlot (void) const =0 |
virtual Ssid | GetSsid (void) const =0 |
virtual bool | IsRxRadio (void)=0 |
virtual bool | IsTxRadio (void)=0 |
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) |
virtual void | SetAckTimeout (Time ackTimeout)=0 |
virtual void | SetAddress (Mac48Address address)=0 |
virtual void | SetBasicBlockAckTimeout (Time blockAckTimeout) |
virtual void | SetCompressedBlockAckTimeout (Time blockAckTimeout) |
virtual void | SetCtsTimeout (Time ctsTimeout)=0 |
virtual void | SetEifsNoDifs (Time eifsNoDifs)=0 |
virtual void | SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0 |
virtual void | SetLinkDownCallback (Callback< void > linkDown)=0 |
virtual void | SetLinkUpCallback (Callback< void > linkUp)=0 |
void | SetMaxPropagationDelay (Time delay) |
virtual void | SetPifs (Time pifs)=0 |
virtual void | SetPromisc (void)=0 |
Sets the interface in promiscuous mode. More... | |
virtual void | SetRxRadio (bool isRx, Ptr< Node > node, Ptr< Repository > repo, Ptr< PUModel > puModel, Ptr< WifiPhy > phy)=0 |
virtual void | SetSifs (Time sifs)=0 |
virtual void | SetSlot (Time slotTime)=0 |
virtual void | SetSsid (Ssid ssid)=0 |
virtual void | SetTxRadio (bool isTx)=0 |
virtual void | SetWifiPhy (Ptr< WifiPhy > phy)=0 |
virtual void | SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager)=0 |
virtual bool | SupportsSendFrom (void) const =0 |
Public Member Functions inherited from ns3::Object | |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
AggregateIterator | GetAggregateIterator (void) const |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Initialize (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Protected Member Functions | |
void | ConfigureCCHDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) |
void | ConfigureDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) |
Protected Member Functions inherited from ns3::Object | |
Object (const Object &o) | |
virtual void | DoDispose (void) |
virtual void | DoInitialize (void) |
virtual void | NotifyNewAggregate (void) |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
Private Member Functions | |
void | Configure80211_10Mhz (void) |
void | Configure80211_5Mhz () |
void | Configure80211a (void) |
void | Configure80211b (void) |
void | Configure80211g (void) |
void | Configure80211p_CCH (void) |
void | Configure80211p_SCH (void) |
virtual void | FinishConfigureStandard (enum WifiPhyStandard standard)=0 |
Static Private Member Functions | |
static Time | GetDefaultBasicBlockAckDelay (void) |
static Time | GetDefaultBasicBlockAckTimeout (void) |
static Time | GetDefaultCompressedBlockAckDelay (void) |
static Time | GetDefaultCompressedBlockAckTimeout (void) |
static Time | GetDefaultCtsAckDelay (void) |
static Time | GetDefaultCtsAckTimeout (void) |
static Time | GetDefaultEifsNoDifs (void) |
static Time | GetDefaultMaxPropagationDelay (void) |
static Time | GetDefaultSifs (void) |
static Time | GetDefaultSlot (void) |
Private Attributes | |
TracedCallback< Ptr< const Packet > > | m_macPromiscRxTrace |
TracedCallback< Ptr< const Packet > > | m_macRxDropTrace |
TracedCallback< Ptr< const Packet > > | m_macRxTrace |
TracedCallback< Ptr< const Packet > > | m_macTxDropTrace |
TracedCallback< Ptr< const Packet > > | m_macTxTrace |
Time | m_maxPropagationDelay |
base class for all MAC-level wifi objects.
This class encapsulates all the low-level MAC functionality DCA, EDCA, etc) and all the high-level MAC functionality (association/disassociation state machines).
ns3::WifiMac is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 47 of file wifi-mac.h.
void ns3::WifiMac::ConfigureStandard | ( | enum WifiPhyStandard | standard | ) |
standard | the wifi standard to be configured |
Definition at line 261 of file wifi-mac.cc.
References FinishConfigureStandard(), NS_ASSERT, ns3::WIFI_PHY_STANDARD_80211_10MHZ, ns3::WIFI_PHY_STANDARD_80211_5MHZ, ns3::WIFI_PHY_STANDARD_80211a, ns3::WIFI_PHY_STANDARD_80211b, ns3::WIFI_PHY_STANDARD_80211g, ns3::WIFI_PHY_STANDARD_80211p_CCH, ns3::WIFI_PHY_STANDARD_80211p_SCH, and ns3::WIFI_PHY_STANDARD_holland.
Referenced by ns3::Bug555TestCase::DoRun().
|
pure virtual |
packet | the packet to send. |
to | the address to which the packet should be sent. |
from | the address from which the packet should be sent. |
The packet should be enqueued in a tx queue, and should be dequeued as soon as the DCF function determines that access it granted to this MAC. The extra parameter "from" allows this device to operate in a bridged mode, forwarding received frames without altering the source address.
Implemented in ns3::RegularWifiMac, ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.
|
pure virtual |
packet | the packet to send. |
to | the 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 DCF function determines that access it granted to this MAC.
Implemented in ns3::RegularWifiMac, ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, ns3::AdhocWifiMac, and ns3::StaWifiMac.
|
privatepure virtual |
standard | the phy standard to be used |
This method is called by ns3::WifiMac::ConfigureStandard to complete the configuration process for a requested phy standard. Subclasses should implement this method to configure their dcf queues according to the requested standard.
Implemented in ns3::RegularWifiMac, and ns3::MeshWifiInterfaceMac.
Referenced by ConfigureStandard().
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
Time ns3::WifiMac::GetMaxPropagationDelay | ( | void | ) | const |
Unused for now.
Definition at line 225 of file wifi-mac.cc.
Time ns3::WifiMac::GetMsduLifetime | ( | void | ) | const |
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Implemented in ns3::RegularWifiMac.
Public method used to fire a MacPromiscRx trace. Implemented for encapsulation purposes.
Definition at line 249 of file wifi-mac.cc.
References m_macPromiscRxTrace.
Public method used to fire a MacRx trace. Implemented for encapsulation purposes.
Definition at line 243 of file wifi-mac.cc.
References m_macRxTrace.
Public method used to fire a MacRxDrop trace. Implemented for encapsulation purposes.
Definition at line 255 of file wifi-mac.cc.
References m_macRxDropTrace.
Referenced by ns3::StaWifiMac::Receive(), and ns3::ApWifiMac::Receive().
Public method used to fire a MacTx trace. Implemented for encapsulation purposes.
Definition at line 231 of file wifi-mac.cc.
References m_macTxTrace.
Public method used to fire a MacTxDrop trace. Implemented for encapsulation purposes.
Definition at line 237 of file wifi-mac.cc.
References m_macTxDropTrace.
Referenced by ns3::StaWifiMac::Enqueue().
|
pure virtual |
ackTimeout | the duration of an ACK timeout. |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
address | the current address of this MAC layer. |
Implemented in ns3::RegularWifiMac, ns3::ApWifiMac, and ns3::AdhocWifiMac.
|
pure virtual |
ctsTimeout | the duration of a CTS timeout. |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
eifsNoDifs | the duration of an EIFS minus DIFS. |
This value is used to calculate the EIFS depending on AIFSN.
Implemented in ns3::RegularWifiMac.
|
pure virtual |
upCallback | the callback to invoke when a packet must be forwarded up the stack. |
|
pure virtual |
linkDown | the callback to invoke when the link becomes down. |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
linkUp | the callback to invoke when the link becomes up. |
Implemented in ns3::RegularWifiMac, ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, and ns3::AdhocWifiMac.
void ns3::WifiMac::SetMaxPropagationDelay | ( | Time | delay | ) |
delay | the max propagation delay. |
Unused for now.
Definition at line 214 of file wifi-mac.cc.
|
pure virtual |
pifs | the pifs duration. |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
Sets the interface in promiscuous mode.
Enables promiscuous mode on the interface. Note that any further filtering on the incoming frame path may affect the overall behavior.
Implemented in ns3::RegularWifiMac.
|
pure virtual |
sifs | the sifs duration |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
slotTime | the slot duration |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
ssid | the current ssid of this MAC layer. |
Implemented in ns3::RegularWifiMac.
phy | the physical layer attached to this MAC. |
Implemented in ns3::RegularWifiMac.
|
pure virtual |
stationManager | the station manager attached to this MAC. |
Implemented in ns3::RegularWifiMac, and ns3::ApWifiMac.
|
private |
The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition). This is a promiscuous trace.
Definition at line 294 of file wifi-mac.h.
Referenced by NotifyPromiscRx().
|
private |
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer during reception.
Definition at line 311 of file wifi-mac.h.
Referenced by NotifyRxDrop().
|
private |
The trace source fired for packets successfully received by the device immediately before being forwarded up to higher layers (at the L2/L3 transition). This is a non- promiscuous trace.
Definition at line 303 of file wifi-mac.h.
Referenced by NotifyRx().
|
private |
The trace source fired when packets coming into the "top" of the device are dropped at the MAC layer during transmission.
Definition at line 285 of file wifi-mac.h.
Referenced by NotifyTxDrop().
|
private |
The trace source fired when packets come into the "top" of the device at the L3/L2 transition, before being queued for transmission.
Definition at line 277 of file wifi-mac.h.
Referenced by NotifyTx().