ns-3
|
Basic MAC of mesh point Wi-Fi interface. Its function is extendable through plugins mechanism. More...
#include <mesh-wifi-interface-mac.h>
Classes | |
struct | Statistics |
Public Member Functions | |
MeshWifiInterfaceMac () | |
C-tor. | |
virtual | ~MeshWifiInterfaceMac () |
D-tor. | |
void | SendManagementFrame (Ptr< Packet > frame, const WifiMacHeader &hdr) |
To be used by plugins sending management frames. | |
bool | CheckSupportedRates (SupportedRates rates) const |
SupportedRates | GetSupportedRates () const |
void | Report (std::ostream &) const |
Statistics: | |
void | ResetStats () |
void | SetBeaconGeneration (bool enable) |
Enable/disable beacons. | |
WifiPhyStandard | GetPhyStandard () const |
virtual void | FinishConfigureStandard (enum WifiPhyStandard standard) |
Inherited from WifiMac | |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to, Mac48Address from) |
virtual void | Enqueue (Ptr< const Packet > packet, Mac48Address to) |
virtual bool | SupportsSendFrom () const |
virtual void | SetLinkUpCallback (Callback< void > linkUp) |
Each mesh point interfaces must know the mesh point address | |
void | SetMeshPointAddress (Mac48Address) |
Mac48Address | GetMeshPointAddress () const |
Beacons | |
void | SetRandomStartDelay (Time interval) |
Set maximum initial random delay before first beacon. | |
void | SetBeaconInterval (Time interval) |
Set interval between two successive beacons. | |
Time | GetBeaconInterval () const |
Time | GetTbtt () const |
Next beacon frame time. | |
void | ShiftTbtt (Time shift) |
Shift TBTT. | |
Plugins | |
void | InstallPlugin (Ptr< MeshWifiInterfaceMacPlugin > plugin) |
Install plugin. TODO return unique ID to allow unregister plugins. | |
Channel switching | |
uint16_t | GetFrequencyChannel () const |
Current channel Id. | |
void | SwitchFrequencyChannel (uint16_t new_id) |
Switch channel. | |
Metric Calculation routines: | |
void | SetLinkMetricCallback (Callback< uint32_t, Mac48Address, Ptr< MeshWifiInterfaceMac > > cb) |
uint32_t | GetLinkMetric (Mac48Address peerAddress) |
![]() | |
void | SetSlot (Time slotTime) |
void | SetSifs (Time sifs) |
void | SetEifsNoDifs (Time eifsNoDifs) |
void | SetPifs (Time pifs) |
void | SetCtsTimeout (Time ctsTimeout) |
void | SetAckTimeout (Time ackTimeout) |
Time | GetPifs (void) const |
Time | GetSifs (void) const |
Time | GetSlot (void) const |
Time | GetEifsNoDifs (void) const |
Time | GetCtsTimeout (void) const |
Time | GetAckTimeout (void) const |
virtual Mac48Address | GetAddress (void) const |
virtual Ssid | GetSsid (void) const |
virtual void | SetAddress (Mac48Address address) |
virtual void | SetSsid (Ssid ssid) |
virtual void | SetBssid (Mac48Address bssid) |
virtual Mac48Address | GetBssid (void) const |
virtual void | SetPromisc (void) |
Sets the interface in promiscuous mode. | |
virtual void | SetWifiPhy (Ptr< WifiPhy > phy) |
virtual Ptr< WifiPhy > | GetWifiPhy () const |
virtual void | SetWifiRemoteStationManager (Ptr< WifiRemoteStationManager > stationManager) |
virtual Ptr < WifiRemoteStationManager > | GetWifiRemoteStationManager () const |
virtual void | SetForwardUpCallback (ForwardUpCallback upCallback) |
virtual void | SetLinkDownCallback (Callback< void > linkDown) |
virtual void | SetBasicBlockAckTimeout (Time blockAckTimeout) |
virtual Time | GetBasicBlockAckTimeout (void) const |
virtual void | SetCompressedBlockAckTimeout (Time blockAckTimeout) |
virtual Time | GetCompressedBlockAckTimeout (void) const |
![]() | |
void | SetMaxPropagationDelay (Time delay) |
Time | GetMsduLifetime (void) const |
Time | GetMaxPropagationDelay (void) const |
virtual void | SetForwardUpCallback (Callback< void, Ptr< Packet >, Mac48Address, Mac48Address > upCallback)=0 |
void | NotifyTx (Ptr< const Packet > packet) |
void | NotifyTxDrop (Ptr< const Packet > packet) |
void | NotifyRx (Ptr< const Packet > packet) |
void | NotifyPromiscRx (Ptr< const Packet > packet) |
void | NotifyRxDrop (Ptr< const Packet > packet) |
void | ConfigureStandard (enum WifiPhyStandard standard) |
![]() | |
virtual TypeId | GetInstanceTypeId (void) const |
template<typename T > | |
Ptr< T > | GetObject (void) const |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
void | Dispose (void) |
void | AggregateObject (Ptr< Object > other) |
AggregateIterator | GetAggregateIterator (void) const |
void | Start (void) |
![]() | |
SimpleRefCount (const SimpleRefCount &o) | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
void | Ref (void) const |
void | Unref (void) const |
uint32_t | GetReferenceCount (void) const |
![]() | |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
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 () |
Never forget to support typeid. |
Additional Inherited Members | |
![]() | |
typedef Callback< void, Ptr < Packet >, Mac48Address, Mac48Address > | ForwardUpCallback |
![]() | |
typedef std::map< AcIndex, Ptr < EdcaTxopN > > | EdcaQueues |
![]() | |
virtual void | DoStart () |
void | SetTypeOfStation (TypeOfStation type) |
virtual void | TxOk (const WifiMacHeader &hdr) |
virtual void | TxFailed (const WifiMacHeader &hdr) |
void | ForwardUp (Ptr< Packet > packet, Mac48Address from, Mac48Address to) |
virtual void | DeaggregateAmsduAndForward (Ptr< Packet > aggregatedPacket, const WifiMacHeader *hdr) |
virtual void | SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, Mac48Address originator) |
void | SetQosSupported (bool enable) |
bool | GetQosSupported () const |
![]() | |
void | ConfigureDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) |
void | ConfigureCCHDcf (Ptr< Dcf > dcf, uint32_t cwmin, uint32_t cwmax, enum AcIndex ac) |
![]() | |
virtual void | NotifyNewAggregate (void) |
Object (const Object &o) | |
![]() | |
MacRxMiddle * | m_rxMiddle |
MacTxMiddle * | m_txMiddle |
Ptr< MacLow > | m_low |
DcfManager * | m_dcfManager |
Ptr< WifiPhy > | m_phy |
Ptr< WifiRemoteStationManager > | m_stationManager |
ForwardUpCallback | m_forwardUp |
Callback< void > | m_linkUp |
Callback< void > | m_linkDown |
Ssid | m_ssid |
Ptr< DcaTxop > | m_dca |
EdcaQueues | m_edca |
bool | m_qosSupported |
Basic MAC of mesh point Wi-Fi interface. Its function is extendable through plugins mechanism.
Now only three output queues are used:
bool ns3::MeshWifiInterfaceMac::CheckSupportedRates | ( | SupportedRates | rates | ) | const |
References ns3::WifiMode::GetDataRate().
Referenced by ns3::dot11s::PeerManagementProtocolMac::Receive().
|
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.
Reimplemented from ns3::RegularWifiMac.
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.
References NS_LOG_FUNCTION.
|
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.
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.
Reimplemented from ns3::RegularWifiMac.
References ns3::RegularWifiMac::m_dca.
Time ns3::MeshWifiInterfaceMac::GetBeaconInterval | ( | ) | const |
Referenced by Report().
SupportedRates ns3::MeshWifiInterfaceMac::GetSupportedRates | ( | ) | const |
References ns3::WifiMode::GetDataRate(), ns3::WifiPhy::GetMode(), and ns3::WifiPhy::GetNModes().
Time ns3::MeshWifiInterfaceMac::GetTbtt | ( | ) | const |
Next beacon frame time.
This is supposed to be used by any entity managing beacon collision avoidance (e.g. Peer management protocol in 802.11s)
Referenced by ShiftTbtt().
|
static |
Never forget to support typeid.
This method returns the TypeId associated to ns3::MeshWifiInterfaceMac.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::RegularWifiMac:
Attributes defined in parent class ns3::WifiMac:
No TraceSources defined for this type.
TraceSources defined in parent class ns3::RegularWifiMac:
TraceSources defined in parent class ns3::WifiMac:
Reimplemented from ns3::RegularWifiMac.
References ns3::Seconds(), SetBeaconGeneration(), and ns3::TypeId::SetParent().
|
virtual |
linkUp | the callback to invoke when the link becomes up. |
Reimplemented from ns3::RegularWifiMac.
References NS_LOG_FUNCTION.
void ns3::MeshWifiInterfaceMac::ShiftTbtt | ( | Time | shift | ) |
Shift TBTT.
This is supposed to be used by any entity managing beacon collision avoidance (e.g. Peer management protocol in 802.11s)
References ns3::Simulator::Cancel(), GetTbtt(), ns3::Simulator::Now(), NS_ASSERT, and ns3::Simulator::Schedule().