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 <regular-wifi-mac.h>
Public Types | |
typedef Callback< void, Ptr < Packet >, Mac48Address, Mac48Address > | ForwardUpCallback |
Public Member Functions | |
RegularWifiMac () | |
virtual | ~RegularWifiMac () |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from) |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to)=0 |
Time | GetAckTimeout (void) const |
virtual Mac48Address | GetAddress (void) const |
virtual Time | GetBasicBlockAckTimeout (void) const |
virtual Mac48Address | GetBssid (void) const |
virtual Time | GetCompressedBlockAckTimeout (void) const |
Time | GetCtsTimeout (void) const |
Time | GetEifsNoDifs (void) const |
Time | GetPifs (void) const |
Time | GetSifs (void) const |
Time | GetSlot (void) const |
virtual Ssid | GetSsid (void) const |
virtual Ptr< WifiPhy > | GetWifiPhy () const |
virtual Ptr < WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
void | SetAckTimeout (Time ackTimeout) |
virtual void | SetAddress (Mac48Address address) |
virtual void | SetBasicBlockAckTimeout (Time blockAckTimeout) |
virtual void | SetBssid (Mac48Address bssid) |
virtual void | SetCompressedBlockAckTimeout (Time blockAckTimeout) |
void | SetCtsTimeout (Time ctsTimeout) |
void | SetEifsNoDifs (Time eifsNoDifs) |
virtual void | SetForwardUpCallback (ForwardUpCallback upCallback) |
virtual void | SetLinkDownCallback (Callback< void > linkDown) |
virtual void | SetLinkUpCallback (Callback< void > linkUp) |
void | SetPifs (Time pifs) |
virtual void | SetPromisc (void) |
Sets the interface in promiscuous mode. | |
void | SetSifs (Time sifs) |
void | SetSlot (Time slotTime) |
virtual void | SetSsid (Ssid ssid) |
virtual void | SetWifiPhy (Ptr< WifiPhy > phy) |
virtual void | SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager) |
virtual bool | SupportsSendFrom (void) const |
![]() | |
void | ConfigureStandard (enum WifiPhyStandard standard) |
Time | GetMaxPropagationDelay (void) const |
Time | GetMsduLifetime (void) const |
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 | SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0 |
void | SetMaxPropagationDelay (Time delay) |
![]() | |
Object () | |
virtual | ~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 | Start (void) |
![]() | |
SimpleRefCount () | |
SimpleRefCount (const SimpleRefCount &o) | |
uint32_t | GetReferenceCount (void) const |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
![]() | |
virtual | ~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) |
Protected Types | |
typedef std::map< AcIndex, Ptr < EdcaTxopN > > | EdcaQueues |
Protected Member Functions | |
virtual void | DeaggregateAmsduAndForward (Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr) |
virtual void | DoDispose () |
virtual void | DoStart () |
virtual void | FinishConfigureStandard (enum WifiPhyStandard standard) |
void | ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to) |
bool | GetQosSupported () const |
virtual void | Receive (Ptr< Packet > packet, const WifiMacHeader *hdr) |
virtual void | SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, Mac48Address originator) |
void | SetQosSupported (bool enable) |
void | SetTypeOfStation (TypeOfStation type) |
virtual void | TxFailed (const WifiMacHeader &hdr) |
virtual void | TxOk (const WifiMacHeader &hdr) |
![]() | |
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) |
![]() | |
Object (const Object &o) | |
virtual void | NotifyNewAggregate (void) |
Protected Attributes | |
Ptr< DcaTxop > | m_dca |
DcfManager * | m_dcfManager |
EdcaQueues | m_edca |
ForwardUpCallback | m_forwardUp |
Callback< void > | m_linkDown |
Callback< void > | m_linkUp |
Ptr< MacLow > | m_low |
Ptr< WifiPhy > | m_phy |
bool | m_qosSupported |
MacRxMiddle * | m_rxMiddle |
Ssid | m_ssid |
Ptr< WifiRemoteStationManager > | m_stationManager |
MacTxMiddle * | m_txMiddle |
Private Member Functions | |
RegularWifiMac (const RegularWifiMac &) | |
Ptr< EdcaTxopN > | GetBEQueue (void) const |
Ptr< EdcaTxopN > | GetBKQueue (void) const |
Ptr< DcaTxop > | GetDcaTxop (void) const |
Ptr< EdcaTxopN > | GetVIQueue (void) const |
Ptr< EdcaTxopN > | GetVOQueue (void) const |
RegularWifiMac & | operator= (const RegularWifiMac &) |
void | SetupEdcaQueue (enum AcIndex ac) |
Private Attributes | |
TracedCallback< const WifiMacHeader & > | m_txErrCallback |
TracedCallback< const WifiMacHeader & > | m_txOkCallback |
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::RegularWifiMac is accessible through the following paths with Config::Set and Config::Connect:
Definition at line 50 of file regular-wifi-mac.h.
|
protected |
This type defines a mapping between an Access Category index,
and a pointer to the corresponding channel access function
Definition at line 237 of file regular-wifi-mac.h.
typedef Callback<void, Ptr<Packet>, Mac48Address, Mac48Address> ns3::RegularWifiMac::ForwardUpCallback |
This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack.
packet | the packet that has been received. |
from | the MAC address of the device that sent the packet. |
to | the MAC address ot the device that the packet is destined for. |
Definition at line 191 of file regular-wifi-mac.h.
ns3::RegularWifiMac::RegularWifiMac | ( | ) |
Definition at line 43 of file regular-wifi-mac.cc.
References ns3::AC_BE, ns3::AC_BK, ns3::AC_VI, ns3::AC_VO, m_dca, m_dcfManager, m_low, m_rxMiddle, m_txMiddle, ns3::MakeCallback(), NS_LOG_FUNCTION, ns3::MacRxMiddle::Receive(), Receive(), ns3::MacRxMiddle::SetForwardCallback(), ns3::DcaTxop::SetLow(), ns3::DcaTxop::SetManager(), ns3::MacLow::SetRxCallback(), ns3::DcaTxop::SetTxFailedCallback(), ns3::DcaTxop::SetTxOkCallback(), SetupEdcaQueue(), ns3::DcfManager::SetupLowListener(), TxFailed(), and TxOk().
|
virtual |
Definition at line 72 of file regular-wifi-mac.cc.
References NS_LOG_FUNCTION.
|
private |
|
protectedvirtual |
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack.
aggregatedPacket | the Packet containing the A-MSDU. |
hdr | a pointer to the MAC header for aggregatedPacket . |
Definition at line 525 of file regular-wifi-mac.cc.
References ns3::MsduAggregator::Deaggregate(), and ForwardUp().
Referenced by ns3::AdhocWifiMac::Receive(), and ns3::StaWifiMac::Receive().
|
protectedvirtual |
This method is called by Object::Dispose or by the object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overriden 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 91 of file regular-wifi-mac.cc.
References ns3::Object::Dispose(), m_dca, m_dcfManager, m_edca, m_low, m_phy, m_rxMiddle, m_stationManager, m_txMiddle, and NS_LOG_FUNCTION.
|
protectedvirtual |
This method is called only once by Object::Start. If the user calls Object::Start multiple times, DoStart is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject and AggregateObject from within this method.
Reimplemented from ns3::Object.
Definition at line 78 of file regular-wifi-mac.cc.
References m_dca, m_edca, NS_LOG_FUNCTION, and ns3::Object::Start().
|
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 channel access function determines that access is 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.
Implements ns3::WifiMac.
Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.
Definition at line 400 of file regular-wifi-mac.cc.
References GetAddress(), and NS_FATAL_ERROR.
|
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 channel access function determines that access is granted to this MAC.
Implements ns3::WifiMac.
Implemented in ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, ns3::AdhocWifiMac, and ns3::StaWifiMac.
|
protectedvirtual |
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.
This method may be overriden by a derived class (e.g., in order to apply DCF or EDCA parameters specific to the usage model it is dealing with), in which case the reimplementation may choose to deal with certain values in the WifiPhyStandard enumeration, and chain up to this implementation to deal with the remainder.
Implements ns3::WifiMac.
Reimplemented in ns3::MeshWifiInterfaceMac.
Definition at line 645 of file regular-wifi-mac.cc.
References ns3::AC_BE_NQOS, ns3::WifiMac::ConfigureCCHDcf(), ns3::WifiMac::ConfigureDcf(), m_dca, m_edca, NS_FATAL_ERROR, 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.
|
protected |
Definition at line 418 of file regular-wifi-mac.cc.
References m_forwardUp, and NS_LOG_FUNCTION.
Referenced by ns3::ApWifiMac::DeaggregateAmsduAndForward(), DeaggregateAmsduAndForward(), ns3::AdhocWifiMac::Receive(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), and ns3::MeshWifiInterfaceMac::Receive().
|
virtual |
Implements ns3::WifiMac.
Definition at line 310 of file regular-wifi-mac.cc.
References ns3::MacLow::GetAckTimeout(), and m_low.
|
virtual |
Implements ns3::WifiMac.
Definition at line 362 of file regular-wifi-mac.cc.
References ns3::MacLow::GetAddress(), and m_low.
Referenced by ns3::ApWifiMac::DeaggregateAmsduAndForward(), Enqueue(), ns3::ApWifiMac::ForwardDown(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::dot11s::PeerManagementProtocolMac::GetAddress(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), Receive(), ns3::flame::FlameProtocolMac::Report(), ns3::dot11s::PeerManagementProtocolMac::Report(), ns3::dot11s::HwmpProtocolMac::Report(), ns3::MeshWifiInterfaceMac::Report(), SendAddBaResponse(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::ApWifiMac::SendOneBeacon(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), ns3::dot11s::HwmpProtocolMac::SendPreq(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().
|
virtual |
Reimplemented from ns3::WifiMac.
Definition at line 336 of file regular-wifi-mac.cc.
References ns3::MacLow::GetBasicBlockAckTimeout(), and m_low.
Accessor for the AC_BE channel access function
Definition at line 188 of file regular-wifi-mac.cc.
References ns3::AC_BE, and m_edca.
Referenced by GetTypeId().
Accessor for the AC_BK channel access function
Definition at line 194 of file regular-wifi-mac.cc.
References ns3::AC_BK, and m_edca.
Referenced by GetTypeId().
|
virtual |
Implements ns3::WifiMac.
Definition at line 388 of file regular-wifi-mac.cc.
References ns3::MacLow::GetBssid(), and m_low.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::StaWifiMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), and ns3::StaWifiMac::SetState().
|
virtual |
Reimplemented from ns3::WifiMac.
Definition at line 349 of file regular-wifi-mac.cc.
References ns3::MacLow::GetCompressedBlockAckTimeout(), and m_low.
|
virtual |
Implements ns3::WifiMac.
Definition at line 323 of file regular-wifi-mac.cc.
References ns3::MacLow::GetCtsTimeout(), and m_low.
Accessor for the DCF object
Definition at line 170 of file regular-wifi-mac.cc.
References m_dca.
Referenced by GetTypeId().
|
virtual |
Implements ns3::WifiMac.
Definition at line 284 of file regular-wifi-mac.cc.
References ns3::DcfManager::GetEifsNoDifs(), and m_dcfManager.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().
|
virtual |
Implements ns3::WifiMac.
Definition at line 297 of file regular-wifi-mac.cc.
References ns3::MacLow::GetPifs(), and m_low.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().
|
protected |
Get accessor for the m_qosSupported
member
Definition at line 243 of file regular-wifi-mac.cc.
References m_qosSupported.
Referenced by GetTypeId().
|
virtual |
Implements ns3::WifiMac.
Definition at line 271 of file regular-wifi-mac.cc.
References ns3::MacLow::GetSifs(), and m_low.
|
virtual |
Implements ns3::WifiMac.
Definition at line 257 of file regular-wifi-mac.cc.
References ns3::MacLow::GetSlotTime(), and m_low.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().
|
virtual |
Implements ns3::WifiMac.
Definition at line 375 of file regular-wifi-mac.cc.
References m_ssid.
Referenced by ns3::StaWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), ns3::StaWifiMac::SendAssociationRequest(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::ApWifiMac::SendOneBeacon(), ns3::StaWifiMac::SendProbeRequest(), and ns3::ApWifiMac::SendProbeResp().
|
static |
Reimplemented from ns3::WifiMac.
Reimplemented in ns3::MeshWifiInterfaceMac, ns3::StaWifiMac, ns3::ApWifiMac, and ns3::AdhocWifiMac.
Definition at line 599 of file regular-wifi-mac.cc.
References GetBEQueue(), GetBKQueue(), GetDcaTxop(), GetQosSupported(), GetVIQueue(), GetVOQueue(), m_txErrCallback, m_txOkCallback, ns3::MakeTraceSourceAccessor(), ns3::TypeId::SetParent(), and SetQosSupported().
Accessor for the AC_VI channel access function
Definition at line 182 of file regular-wifi-mac.cc.
References ns3::AC_VI, and m_edca.
Referenced by GetTypeId().
Accessor for the AC_VO channel access function
Definition at line 176 of file regular-wifi-mac.cc.
References ns3::AC_VO, and m_edca.
Referenced by GetTypeId().
Definition at line 209 of file regular-wifi-mac.cc.
References m_phy.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().
|
virtual |
Definition at line 134 of file regular-wifi-mac.cc.
References m_stationManager.
Referenced by ns3::dot11s::AirtimeLinkMetricCalculator::CalculateMetric().
|
private |
|
protectedvirtual |
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received. The implementation is intended to capture logic that is going to be common to all (or most) derived classes. Specifically, handling of Block Ack managment frames is dealt with here.
This method will need, however, to be overriden by derived classes so that they can perform their data handling before invoking the base version.
packet | the packet that has been received. |
hdr | a pointer to the MAC header of the received frame. |
Definition at line 425 of file regular-wifi-mac.cc.
References ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_REQUEST, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::BLOCK_ACK_DELBA, ns3::WifiActionHeader::ActionValue::blockAck, ns3::MacLow::DestroyBlockAckAgreement(), ns3::WifiActionHeader::GetAction(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), GetAddress(), ns3::WifiActionHeader::GetCategory(), ns3::MgtAddBaResponseHeader::GetTid(), ns3::MgtDelBaHeader::GetTid(), ns3::WifiMacHeader::GetType(), ns3::WifiMacHeader::IsAction(), ns3::MgtDelBaHeader::IsByOriginator(), ns3::WifiMacHeader::IsMgt(), m_edca, m_low, m_qosSupported, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::Packet::RemoveHeader(), and SendAddBaResponse().
Referenced by RegularWifiMac().
|
protectedvirtual |
This method can be called to accept a received ADDBA Request. An ADDBA Response will be constructed and queued for transmission.
reqHdr | a pointer to the received ADDBA Request header. |
originator | the MAC address of the originator. |
Definition at line 540 of file regular-wifi-mac.cc.
References ns3::Packet::AddHeader(), ns3::WifiActionHeader::BLOCK_ACK, ns3::WifiActionHeader::BLOCK_ACK_ADDBA_RESPONSE, ns3::WifiActionHeader::ActionValue::blockAck, ns3::MacLow::CreateBlockAckAgreement(), GetAddress(), ns3::MgtAddBaRequestHeader::GetStartingSequence(), ns3::MgtAddBaRequestHeader::GetTid(), ns3::MgtAddBaRequestHeader::GetTimeout(), ns3::MgtAddBaRequestHeader::IsAmsduSupported(), ns3::MgtAddBaRequestHeader::IsImmediateBlockAck(), m_edca, m_low, NS_LOG_FUNCTION, ns3::QosUtilsMapTidToAc(), ns3::WifiMacHeader::SetAction(), ns3::WifiActionHeader::SetAction(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::MgtAddBaResponseHeader::SetAmsduSupport(), ns3::MgtAddBaResponseHeader::SetBufferSize(), ns3::MgtAddBaResponseHeader::SetDelayedBlockAck(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::MgtAddBaResponseHeader::SetImmediateBlockAck(), ns3::MgtAddBaResponseHeader::SetStatusCode(), ns3::StatusCode::SetSuccess(), ns3::MgtAddBaResponseHeader::SetTid(), and ns3::MgtAddBaResponseHeader::SetTimeout().
Referenced by Receive().
|
virtual |
ackTimeout | the duration of an ACK timeout. |
Implements ns3::WifiMac.
Definition at line 303 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetAckTimeout().
|
virtual |
address | the current address of this MAC layer. |
Implements ns3::WifiMac.
Reimplemented in ns3::ApWifiMac, and ns3::AdhocWifiMac.
Definition at line 355 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetAddress().
|
virtual |
Reimplemented from ns3::WifiMac.
Definition at line 329 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetBasicBlockAckTimeout().
|
virtual |
bssid | the BSSID of the network that this device belongs to. |
Definition at line 381 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetBssid().
Referenced by ns3::StaWifiMac::Receive(), ns3::AdhocWifiMac::SetAddress(), and ns3::ApWifiMac::SetAddress().
|
virtual |
Reimplemented from ns3::WifiMac.
Definition at line 342 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetCompressedBlockAckTimeout().
|
virtual |
ctsTimeout | the duration of a CTS timeout. |
Implements ns3::WifiMac.
Definition at line 316 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetCtsTimeout().
|
virtual |
eifsNoDifs | the duration of an EIFS minus DIFS. |
This value is used to calculate the EIFS depending on AIFSN.
Implements ns3::WifiMac.
Definition at line 277 of file regular-wifi-mac.cc.
References m_dcfManager, NS_LOG_FUNCTION, and ns3::DcfManager::SetEifsNoDifs().
|
virtual |
upCallback | the callback to invoke when a packet must be forwarded up the stack. |
Definition at line 215 of file regular-wifi-mac.cc.
References m_forwardUp, and NS_LOG_FUNCTION.
|
virtual |
linkDown | the callback to invoke when the link becomes down. |
Implements ns3::WifiMac.
Definition at line 229 of file regular-wifi-mac.cc.
References m_linkDown, and NS_LOG_FUNCTION.
|
virtual |
linkUp | the callback to invoke when the link becomes up. |
Implements ns3::WifiMac.
Reimplemented in ns3::MeshWifiInterfaceMac, ns3::ApWifiMac, and ns3::AdhocWifiMac.
Definition at line 222 of file regular-wifi-mac.cc.
References m_linkUp, and NS_LOG_FUNCTION.
|
virtual |
pifs | the pifs duration. |
Implements ns3::WifiMac.
Definition at line 290 of file regular-wifi-mac.cc.
References m_low, NS_LOG_FUNCTION, and ns3::MacLow::SetPifs().
|
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.
Implements ns3::WifiMac.
Definition at line 394 of file regular-wifi-mac.cc.
References m_low, and ns3::MacLow::SetPromisc().
|
protected |
Set accessor for the m_qosSupported
member
Definition at line 236 of file regular-wifi-mac.cc.
References m_qosSupported, and NS_LOG_FUNCTION.
Referenced by GetTypeId().
|
virtual |
sifs | the sifs duration |
Implements ns3::WifiMac.
Definition at line 263 of file regular-wifi-mac.cc.
References m_dcfManager, m_low, NS_LOG_FUNCTION, ns3::DcfManager::SetSifs(), and ns3::MacLow::SetSifs().
|
virtual |
slotTime | the slot duration |
Implements ns3::WifiMac.
Definition at line 249 of file regular-wifi-mac.cc.
References m_dcfManager, m_low, NS_LOG_FUNCTION, ns3::DcfManager::SetSlot(), and ns3::MacLow::SetSlotTime().
|
virtual |
ssid | the current ssid of this MAC layer. |
Implements ns3::WifiMac.
Definition at line 368 of file regular-wifi-mac.cc.
References m_ssid, and NS_LOG_FUNCTION.
|
protected |
This method is invoked by a subclass to specify what type of station it is implementing. This is something that the channel access functions (instantiated within this class as EdcaTxopN's) need to know.
type | the type of station. |
Definition at line 160 of file regular-wifi-mac.cc.
References m_edca, and NS_LOG_FUNCTION.
Referenced by ns3::AdhocWifiMac::AdhocWifiMac(), ns3::ApWifiMac::ApWifiMac(), ns3::MeshWifiInterfaceMac::MeshWifiInterfaceMac(), and ns3::StaWifiMac::StaWifiMac().
|
private |
This method is a private utility invoked to configure the channel access function for the specified Access Category.
ac | the Access Category index of the queue to initialise. |
Definition at line 140 of file regular-wifi-mac.cc.
References m_dcfManager, m_edca, m_low, m_txMiddle, ns3::MakeCallback(), NS_ASSERT, NS_LOG_FUNCTION, ns3::EdcaTxopN::SetLow(), TxFailed(), and TxOk().
Referenced by RegularWifiMac().
phy | the physical layer attached to this MAC. |
Implements ns3::WifiMac.
Definition at line 200 of file regular-wifi-mac.cc.
References m_dcfManager, m_low, m_phy, NS_LOG_FUNCTION, ns3::MacLow::SetPhy(), and ns3::DcfManager::SetupPhyListener().
|
virtual |
stationManager | the station manager attached to this MAC. |
Implements ns3::WifiMac.
Reimplemented in ns3::ApWifiMac.
Definition at line 119 of file regular-wifi-mac.cc.
References m_dca, m_edca, m_low, m_stationManager, NS_LOG_FUNCTION, ns3::DcaTxop::SetWifiRemoteStationManager(), and ns3::MacLow::SetWifiRemoteStationManager().
|
virtual |
Implements ns3::WifiMac.
Reimplemented in ns3::ApWifiMac, and ns3::MeshWifiInterfaceMac.
Definition at line 412 of file regular-wifi-mac.cc.
|
protectedvirtual |
Definition at line 703 of file regular-wifi-mac.cc.
References m_txErrCallback, and NS_LOG_FUNCTION.
Referenced by RegularWifiMac(), and SetupEdcaQueue().
|
protectedvirtual |
Definition at line 696 of file regular-wifi-mac.cc.
References m_txOkCallback, and NS_LOG_FUNCTION.
Referenced by RegularWifiMac(), and SetupEdcaQueue().
This holds a pointer to the DCF instance for this WifiMac - used
for transmission of frames to non-QoS peers.
Definition at line 233 of file regular-wifi-mac.h.
Referenced by DoDispose(), DoStart(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::FinishConfigureStandard(), FinishConfigureStandard(), ns3::ApWifiMac::ForwardDown(), GetDcaTxop(), RegularWifiMac(), ns3::StaWifiMac::SendAssociationRequest(), ns3::ApWifiMac::SendAssocResp(), ns3::MeshWifiInterfaceMac::SendBeacon(), ns3::StaWifiMac::SendProbeRequest(), ns3::ApWifiMac::SendProbeResp(), and SetWifiRemoteStationManager().
|
protected |
Definition at line 220 of file regular-wifi-mac.h.
Referenced by ns3::ApWifiMac::ApWifiMac(), DoDispose(), GetEifsNoDifs(), RegularWifiMac(), SetEifsNoDifs(), SetSifs(), SetSlot(), SetupEdcaQueue(), SetWifiPhy(), and ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel().
|
protected |
This is a map from Access Category index to the corresponding
channel access function
Definition at line 240 of file regular-wifi-mac.h.
Referenced by DoDispose(), DoStart(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), FinishConfigureStandard(), ns3::ApWifiMac::ForwardDown(), ns3::MeshWifiInterfaceMac::ForwardDown(), GetBEQueue(), GetBKQueue(), GetVIQueue(), GetVOQueue(), Receive(), SendAddBaResponse(), ns3::MeshWifiInterfaceMac::SendManagementFrame(), SetTypeOfStation(), SetupEdcaQueue(), and SetWifiRemoteStationManager().
|
protected |
Definition at line 225 of file regular-wifi-mac.h.
Referenced by ForwardUp(), and SetForwardUpCallback().
|
protected |
Definition at line 227 of file regular-wifi-mac.h.
Referenced by SetLinkDownCallback(), and ns3::StaWifiMac::TryToEnsureAssociated().
|
protected |
Definition at line 226 of file regular-wifi-mac.h.
Referenced by ns3::StaWifiMac::Receive(), and SetLinkUpCallback().
Definition at line 219 of file regular-wifi-mac.h.
Referenced by ns3::ApWifiMac::ApWifiMac(), DoDispose(), ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::Enqueue(), GetAckTimeout(), GetAddress(), GetBasicBlockAckTimeout(), GetBssid(), GetCompressedBlockAckTimeout(), GetCtsTimeout(), GetPifs(), GetSifs(), GetSlot(), Receive(), RegularWifiMac(), SendAddBaResponse(), SetAckTimeout(), SetAddress(), SetBasicBlockAckTimeout(), SetBssid(), SetCompressedBlockAckTimeout(), SetCtsTimeout(), SetPifs(), SetPromisc(), SetSifs(), SetSlot(), SetupEdcaQueue(), SetWifiPhy(), and SetWifiRemoteStationManager().
Definition at line 221 of file regular-wifi-mac.h.
Referenced by DoDispose(), ns3::AdhocWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::MeshWifiInterfaceMac::GetFrequencyChannel(), ns3::StaWifiMac::GetSupportedRates(), ns3::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), GetWifiPhy(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), SetWifiPhy(), and ns3::MeshWifiInterfaceMac::SwitchFrequencyChannel().
|
protected |
This Boolean is set true
iff this WifiMac is to model 802.11e/WMM style Quality of Service. It is exposed through the attribute system.
At the moment, this flag is the sole selection between QoS and non-QoS operation for the STA (whether IBSS, AP, or non-AP). Ultimately, we will want a QoS-enabled STA to be able to fall back to non-QoS operation with a non-QoS peer. This'll require further intelligence - i.e., per-association QoS state. Having a big switch seems like a good intermediate stage, however.
Definition at line 319 of file regular-wifi-mac.h.
Referenced by ns3::StaWifiMac::Enqueue(), ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::ForwardDown(), GetQosSupported(), Receive(), and SetQosSupported().
|
protected |
Definition at line 217 of file regular-wifi-mac.h.
Referenced by DoDispose(), and RegularWifiMac().
|
protected |
Definition at line 229 of file regular-wifi-mac.h.
|
protected |
Definition at line 223 of file regular-wifi-mac.h.
Referenced by ns3::MeshWifiInterfaceMac::CheckSupportedRates(), DoDispose(), ns3::AdhocWifiMac::Enqueue(), ns3::ApWifiMac::Enqueue(), ns3::MeshWifiInterfaceMac::ForwardDown(), ns3::ApWifiMac::GetSupportedRates(), ns3::MeshWifiInterfaceMac::GetSupportedRates(), GetWifiRemoteStationManager(), ns3::StaWifiMac::Receive(), ns3::ApWifiMac::Receive(), ns3::MeshWifiInterfaceMac::Receive(), SetWifiRemoteStationManager(), ns3::ApWifiMac::TxFailed(), and ns3::ApWifiMac::TxOk().
|
private |
Definition at line 349 of file regular-wifi-mac.h.
Referenced by GetTypeId(), and TxFailed().
|
protected |
Definition at line 218 of file regular-wifi-mac.h.
Referenced by DoDispose(), RegularWifiMac(), and SetupEdcaQueue().
|
private |
Definition at line 348 of file regular-wifi-mac.h.
Referenced by GetTypeId(), and TxOk().