22 #ifndef MESH_WIFI_INTERFACE_MAC_H
23 #define MESH_WIFI_INTERFACE_MAC_H
27 #include "ns3/mac48-address.h"
28 #include "ns3/mgt-headers.h"
29 #include "ns3/callback.h"
30 #include "ns3/packet.h"
31 #include "ns3/nstime.h"
32 #include "ns3/wifi-mac.h"
33 #include "ns3/mesh-wifi-interface-mac-plugin.h"
34 #include "ns3/event-id.h"
38 class UniformRandomVariable;
180 void Report (std::ostream & os)
const;
243 typedef std::vector<Ptr<MeshWifiInterfaceMacPlugin> >
PluginList;
280 void Print (std::ostream & os)
const;
An identifier for simulation events.
Basic MAC of mesh point Wi-Fi interface.
void ForwardDown(Ptr< Packet > packet, Mac48Address from, Mac48Address to)
Send frame.
MeshWifiInterfaceMac()
C-tor.
bool CheckSupportedRates(SupportedRates rates) const
Check supported rates.
Time m_beaconInterval
Beaconing interval.
void SetLinkMetricCallback(Callback< uint32_t, Mac48Address, Ptr< MeshWifiInterfaceMac > > cb)
Set the link metric callback.
Mac48Address m_mpAddress
Mesh point address.
void SetBeaconInterval(Time interval)
Set interval between two successive beacons.
virtual void SetLinkUpCallback(Callback< void > linkUp)
void SwitchFrequencyChannel(uint16_t new_id)
Switch frequency channel.
void ShiftTbtt(Time shift)
Shift TBTT.
Statistics m_stats
statistics
Time GetTbtt() const
Next beacon frame time.
void SetRandomStartDelay(Time interval)
Set maximum initial random delay before first beacon.
void ResetStats()
Reset statistics function.
void Receive(Ptr< WifiMacQueueItem > mpdu)
Frame receive handler.
void SendManagementFrame(Ptr< Packet > frame, const WifiMacHeader &hdr)
To be used by plugins sending management frames.
virtual void ConfigureContentionWindow(uint32_t cwMin, uint32_t cwMax)
Callback< uint32_t, Mac48Address, Ptr< MeshWifiInterfaceMac > > m_linkMetricCallback
linkMetricCallback
EventId m_beaconSendEvent
"Timer" for the next beacon
void InstallPlugin(Ptr< MeshWifiInterfaceMacPlugin > plugin)
Install plugin.
WifiStandard m_standard
Current standard: needed to configure metric.
void ScheduleNextBeacon()
Schedule next beacon.
virtual ~MeshWifiInterfaceMac()
D-tor.
virtual bool CanForwardPacketsTo(Mac48Address to) const
Return true if packets can be forwarded to the given destination, false otherwise.
uint32_t GetLinkMetric(Mac48Address peerAddress)
Get the link metric.
uint16_t GetFrequencyChannel() const
Current channel Id.
void SetBeaconGeneration(bool enable)
Enable/disable beacons.
bool GetBeaconGeneration() const
Get current beaconing status.
virtual void ConfigureStandard(enum WifiStandard standard)
Finish configuration based on the WifiStandard being provided.
void SetMeshPointAddress(Mac48Address addr)
Set the mesh point address.
Mac48Address GetMeshPointAddress() const
Get the mesh point address.
void Report(std::ostream &os) const
Report statistics.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model.
virtual bool SupportsSendFrom() const
Time GetBeaconInterval() const
bool m_beaconEnable
Beaconing interval.
Time m_randomStart
Maximum delay before first beacon.
static TypeId GetTypeId()
Get the type ID.
virtual void Enqueue(Ptr< Packet > packet, Mac48Address to, Mac48Address from)
PluginList m_plugins
List of all installed plugins.
virtual void DoDispose()
Real d-tor.
void SendBeacon()
Send beacon.
SupportedRates GetSupportedRates() const
std::vector< Ptr< MeshWifiInterfaceMacPlugin > > PluginList
PluginList typedef.
Ptr< UniformRandomVariable > m_coefficient
Add randomness to beacon generation.
Time m_tbtt
Time for the next frame.
virtual void DoInitialize()
Initialize() implementation.
The Supported Rates Information Element.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
base class for all MAC-level wifi objects.
WifiStandard
Identifies the IEEE 802.11 specifications that a Wifi device can be configured to use.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t sentFrames
sent frames
uint32_t recvBytes
receive bytes
uint32_t sentBytes
sent bytes
uint32_t recvFrames
receive frames
void Print(std::ostream &os) const
Print statistics.
uint16_t recvBeacons
receive beacons