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-remote-station-manager.h"
33 #include "ns3/regular-wifi-mac.h"
34 #include "ns3/mesh-wifi-interface-mac-plugin.h"
35 #include "ns3/event-id.h"
42 class UniformRandomVariable;
133 void Report (std::ostream &)
const;
164 typedef std::vector<Ptr<MeshWifiInterfaceMacPlugin> >
PluginList;
198 Print (std::ostream & os)
const;
keep track of time values and allow control of global simulation resolution
MeshWifiInterfaceMac()
C-tor.
Time GetBeaconInterval() const
Ptr< UniformRandomVariable > m_coefficient
Add randomness to beacon generation.
bool m_beaconEnable
whether beaconing is enabled
virtual ~MeshWifiInterfaceMac()
D-tor.
SupportedRates GetSupportedRates() const
WifiPhyStandard GetPhyStandard() const
bool CheckSupportedRates(SupportedRates rates) const
virtual void DoDispose()
Real d-tor.
void SetLinkMetricCallback(Callback< uint32_t, Mac48Address, Ptr< MeshWifiInterfaceMac > > cb)
std::vector< Ptr< MeshWifiInterfaceMacPlugin > > PluginList
void SwitchFrequencyChannel(uint16_t new_id)
Switch channel.
void SendBeacon()
Send beacon.
The Supported Rates Information ElementThis class knows how to serialise and deserialise the Supporte...
WifiPhyStandard m_standard
Current PHY standard: needed to configure metric.
virtual void Enqueue(Ptr< const Packet > packet, Mac48Address to, Mac48Address from)
Time GetTbtt() const
Next beacon frame time.
void SendManagementFrame(Ptr< Packet > frame, const WifiMacHeader &hdr)
To be used by plugins sending management frames.
void ScheduleNextBeacon()
Schedule next beacon.
virtual void DoInitialize()
This method is called only once by Object::Initialize.
WifiPhyStandard
Identifies the PHY specification that a Wifi device is configured to use.
base class for all MAC-level wifi objects.
uint16_t GetFrequencyChannel() const
Current channel Id.
virtual void FinishConfigureStandard(enum WifiPhyStandard standard)
bool GetBeaconGeneration() const
Get current beaconing status.
uint32_t GetLinkMetric(Mac48Address peerAddress)
PluginList m_plugins
List of all installed plugins.
Mac48Address GetMeshPointAddress() const
virtual bool SupportsSendFrom() const
Mac48Address m_mpAddress
Mesh point address.
Time m_beaconInterval
Beaconing interval.
void Receive(Ptr< Packet > packet, WifiMacHeader const *hdr)
Frame receive handler.
Time m_randomStart
Maximum delay before first beacon.
static TypeId GetTypeId()
Never forget to support typeid.
virtual void SetLinkUpCallback(Callback< void > linkUp)
Callback< uint32_t, Mac48Address, Ptr< MeshWifiInterfaceMac > > m_linkMetricCallback
void ForwardDown(Ptr< const Packet > packet, Mac48Address from, Mac48Address to)
Send frame.
void SetRandomStartDelay(Time interval)
Set maximum initial random delay before first beacon.
an identifier for simulation events.
void InstallPlugin(Ptr< MeshWifiInterfaceMacPlugin > plugin)
Install plugin.
void Report(std::ostream &) const
Statistics:
void SetBeaconGeneration(bool enable)
Enable/disable beacons.
EventId m_beaconSendEvent
"Timer" for the next beacon
void SetBeaconInterval(Time interval)
Set interval between two successive beacons.
void Print(std::ostream &os) const
void SetMeshPointAddress(Mac48Address)
Time m_tbtt
Time for the next frame.
void ShiftTbtt(Time shift)
Shift TBTT.
a unique identifier for an interface.
Basic MAC of mesh point Wi-Fi interface.
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...