#include <adhoc-wifi-mac.h>
Public Member Functions | |
AdhocWifiMac () | |
virtual | ~AdhocWifiMac () |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to) |
virtual void | SetAddress (Mac48Address address) |
virtual void | SetLinkUpCallback (Callback< void > linkUp) |
Public Member Functions inherited from ns3::RegularWifiMac | |
RegularWifiMac () | |
virtual | ~RegularWifiMac () |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from) |
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 |
bool | GetCtsToSelfSupported () const |
Return whether the device supports CTS-to-self capability. More... | |
Time | GetEifsNoDifs (void) const |
Time | GetPifs (void) const |
Time | GetRifs (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 | SetBasicBlockAckTimeout (Time blockAckTimeout) |
virtual void | SetBssid (Mac48Address bssid) |
virtual void | SetCompressedBlockAckTimeout (Time blockAckTimeout) |
void | SetCtsTimeout (Time ctsTimeout) |
void | SetCtsToSelfSupported (bool enable) |
Enable or disable CTS-to-self feature. More... | |
void | SetEifsNoDifs (Time eifsNoDifs) |
virtual void | SetForwardUpCallback (ForwardUpCallback upCallback) |
virtual void | SetLinkDownCallback (Callback< void > linkDown) |
void | SetPifs (Time pifs) |
virtual void | SetPromisc (void) |
Sets the interface in promiscuous mode. More... | |
void | SetRifs (Time rifs) |
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 |
Public Member Functions inherited from ns3::WifiMac | |
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) |
Public Member Functions inherited from ns3::Object | |
Object () | |
virtual | ~Object () |
void | AggregateObject (Ptr< Object > other) |
void | Dispose (void) |
Run the DoDispose methods of this object and all the objects aggregated to it. More... | |
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) |
This method calls the virtual DoInitialize method on all the objects aggregated to this object. More... | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Constructor. More... | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. More... | |
uint32_t | GetReferenceCount (void) const |
Get the reference count of the object. More... | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment. 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 |
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::RegularWifiMac | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::WifiMac | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Object | |
static TypeId | GetTypeId (void) |
Register this type. More... | |
Static Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
static void | Cleanup (void) |
Noop. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
virtual void | Receive (Ptr< Packet > packet, const WifiMacHeader *hdr) |
This method acts as the MacRxMiddle receive callback and is invoked to notify us that a frame has been received. More... | |
Additional Inherited Members | |
Public Types inherited from ns3::RegularWifiMac | |
typedef Callback< void, Ptr < Packet >, Mac48Address, Mac48Address > | ForwardUpCallback |
This type defines the callback of a higher layer that a WifiMac(-derived) object invokes to pass a packet up the stack. More... | |
Protected Types inherited from ns3::RegularWifiMac | |
typedef std::map< AcIndex, Ptr < EdcaTxopN > > | EdcaQueues |
This type defines a mapping between an Access Category index, and a pointer to the corresponding channel access function. More... | |
Protected Member Functions inherited from ns3::RegularWifiMac | |
virtual void | DeaggregateAmsduAndForward (Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr) |
This method can be called to de-aggregate an A-MSDU and forward the constituent packets up the stack. More... | |
virtual void | DoDispose () |
This method is called by Object::Dispose or by the object's destructor, whichever comes first. More... | |
virtual void | DoInitialize () |
This method is called only once by Object::Initialize. More... | |
virtual void | FinishConfigureStandard (enum WifiPhyStandard standard) |
void | ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to) |
Forward the packet up to the device. More... | |
Ptr< EdcaTxopN > | GetBEQueue (void) const |
Accessor for the AC_BE channel access function. More... | |
Ptr< EdcaTxopN > | GetBKQueue (void) const |
Accessor for the AC_BK channel access function. More... | |
Ptr< DcaTxop > | GetDcaTxop (void) const |
Accessor for the DCF object. More... | |
bool | GetHtSupported () const |
Return whether the device supports QoS. More... | |
bool | GetQosSupported () const |
Return whether the device supports QoS. More... | |
Ptr< EdcaTxopN > | GetVIQueue (void) const |
Accessor for the AC_VI channel access function. More... | |
Ptr< EdcaTxopN > | GetVOQueue (void) const |
Accessor for the AC_VO channel access function. More... | |
virtual void | SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, Mac48Address originator) |
This method can be called to accept a received ADDBA Request. More... | |
void | SetHtSupported (bool enable) |
Enable or disable HT support for the device. More... | |
void | SetQosSupported (bool enable) |
Enable or disable QoS support for the device. More... | |
void | SetTypeOfStation (TypeOfStation type) |
This method is invoked by a subclass to specify what type of station it is implementing. More... | |
virtual void | TxFailed (const WifiMacHeader &hdr) |
The packet we sent was successfully received by the receiver (i.e. More... | |
virtual void | TxOk (const WifiMacHeader &hdr) |
The packet we sent was successfully received by the receiver (i.e. More... | |
Protected Member Functions inherited from ns3::WifiMac | |
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 | NotifyNewAggregate (void) |
This method is invoked whenever two sets of objects are aggregated together. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
This method is invoked once all member attributes have been initialized. More... | |
Protected Attributes inherited from ns3::RegularWifiMac | |
Ptr< DcaTxop > | m_dca |
This holds a pointer to the DCF instance for this WifiMac - used for transmission of frames to non-QoS peers. More... | |
DcfManager * | m_dcfManager |
DCF manager (access to channel) More... | |
EdcaQueues | m_edca |
This is a map from Access Category index to the corresponding channel access function. More... | |
ForwardUpCallback | m_forwardUp |
Callback to forward packet up the stack. More... | |
bool | m_htSupported |
This Boolean is set true iff this WifiMac is to model 802.11n. More... | |
Callback< void > | m_linkDown |
Callback when a link is down. More... | |
Callback< void > | m_linkUp |
Callback when a link is up. More... | |
Ptr< MacLow > | m_low |
MacLow (RTS, CTS, DATA, ACK etc.) More... | |
Ptr< WifiPhy > | m_phy |
Wifi PHY. More... | |
bool | m_qosSupported |
This Boolean is set true iff this WifiMac is to model 802.11e/WMM style Quality of Service. More... | |
MacRxMiddle * | m_rxMiddle |
RX middle (de-fragmentation etc.) More... | |
Ssid | m_ssid |
Service Set ID (SSID) More... | |
Ptr< WifiRemoteStationManager > | m_stationManager |
Remote station manager (rate control, RTS/CTS/fragmentation thresholds etc.) More... | |
MacTxMiddle * | m_txMiddle |
TX middle (aggregation etc.) More... | |
ns3::AdhocWifiMac is accessible through the following paths with Config::Set and Config::Connect:
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 36 of file adhoc-wifi-mac.h.
ns3::AdhocWifiMac::AdhocWifiMac | ( | ) |
Definition at line 56 of file adhoc-wifi-mac.cc.
References ns3::ADHOC_STA, NS_LOG_FUNCTION, and ns3::RegularWifiMac::SetTypeOfStation().
|
virtual |
Definition at line 64 of file adhoc-wifi-mac.cc.
References NS_LOG_FUNCTION.
|
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::RegularWifiMac.
Definition at line 84 of file adhoc-wifi-mac.cc.
References ns3::RegularWifiMac::GetBssid(), ns3::WifiPhy::GetMode(), ns3::WifiPhy::GetNModes(), ns3::RegularWifiMac::m_dca, ns3::RegularWifiMac::m_edca, ns3::RegularWifiMac::m_low, ns3::RegularWifiMac::m_phy, ns3::RegularWifiMac::m_qosSupported, ns3::RegularWifiMac::m_stationManager, ns3::WifiMacHeader::NORMAL_ACK, NS_ASSERT, NS_LOG_FUNCTION, ns3::QosUtilsGetTidForPacket(), ns3::QosUtilsMapTidToAc(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetQosAckPolicy(), ns3::WifiMacHeader::SetQosNoAmsdu(), ns3::WifiMacHeader::SetQosNoEosp(), ns3::WifiMacHeader::SetQosTid(), ns3::WifiMacHeader::SetQosTxopLimit(), ns3::WifiMacHeader::SetType(), ns3::WifiMacHeader::SetTypeData(), and ns3::WIFI_MAC_QOSDATA.
|
static |
Definition at line 47 of file adhoc-wifi-mac.cc.
References ns3::TypeId::SetParent().
|
privatevirtual |
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. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 167 of file adhoc-wifi-mac.cc.
References ns3::RegularWifiMac::DeaggregateAmsduAndForward(), ns3::RegularWifiMac::ForwardUp(), ns3::WifiMacHeader::GetAddr1(), ns3::WifiMacHeader::GetAddr2(), ns3::WifiMacHeader::IsCtl(), ns3::WifiMacHeader::IsData(), ns3::WifiMacHeader::IsQosAmsdu(), ns3::WifiMacHeader::IsQosData(), NS_ASSERT, NS_LOG_DEBUG, NS_LOG_FUNCTION, and ns3::RegularWifiMac::Receive().
|
virtual |
address | the current address of this MAC layer. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 70 of file adhoc-wifi-mac.cc.
References NS_LOG_FUNCTION, ns3::RegularWifiMac::SetAddress(), and ns3::RegularWifiMac::SetBssid().
|
virtual |
linkUp | the callback to invoke when the link becomes up. |
Reimplemented from ns3::RegularWifiMac.
Definition at line 155 of file adhoc-wifi-mac.cc.
References NS_LOG_FUNCTION, and ns3::RegularWifiMac::SetLinkUpCallback().