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