Beacon is beacon header + list of arbitrary information elements. More...
#include <mesh-wifi-beacon.h>
Public Member Functions | |
MeshWifiBeacon (Ssid ssid, SupportedRates rates, uint64_t us) | |
C-tor. More... | |
void | AddInformationElement (Ptr< WifiInformationElement > ie) |
Add information element. More... | |
MgtBeaconHeader | BeaconHeader () const |
Read standard Wifi beacon header. More... | |
WifiMacHeader | CreateHeader (Mac48Address address, Mac48Address mpAddress) |
Create wifi header for beacon frame. More... | |
Ptr< Packet > | CreatePacket () |
Create frame = { beacon header + all information elements sorted by ElementId () }. More... | |
Time | GetBeaconInterval () const |
Returns a beacon interval of wifi beacon. More... | |
Private Attributes | |
WifiInformationElementVector | m_elements |
List of information elements added. More... | |
MgtBeaconHeader | m_header |
Beacon header. More... | |
Beacon is beacon header + list of arbitrary information elements.
It is supposed that distinct mesh protocols can use beacons to transport their own information elements.
Definition at line 38 of file mesh-wifi-beacon.h.
ns3::MeshWifiBeacon::MeshWifiBeacon | ( | Ssid | ssid, |
SupportedRates | rates, | ||
uint64_t | us | ||
) |
C-tor.
ssid | is SSID for beacon header |
rates | is a set of supported rates |
us | beacon interval in microseconds |
Definition at line 26 of file mesh-wifi-beacon.cc.
References m_header, ns3::MgtProbeResponseHeader::SetBeaconIntervalUs(), ns3::MgtProbeResponseHeader::SetSsid(), and ns3::MgtProbeResponseHeader::SetSupportedRates().
void ns3::MeshWifiBeacon::AddInformationElement | ( | Ptr< WifiInformationElement > | ie | ) |
Add information element.
Definition at line 33 of file mesh-wifi-beacon.cc.
References ns3::WifiInformationElementVector::AddInformationElement(), and m_elements.
Referenced by ns3::dot11s::PeerManagementProtocolMac::UpdateBeacon().
|
inline |
Read standard Wifi beacon header.
Definition at line 50 of file mesh-wifi-beacon.h.
References m_header.
Referenced by CreatePacket().
WifiMacHeader ns3::MeshWifiBeacon::CreateHeader | ( | Mac48Address | address, |
Mac48Address | mpAddress | ||
) |
Create wifi header for beacon frame.
address | is sender address |
mpAddress | is mesh point address |
Definition at line 53 of file mesh-wifi-beacon.cc.
References ns3::Mac48Address::GetBroadcast(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetBeacon(), ns3::WifiMacHeader::SetDsNotFrom(), and ns3::WifiMacHeader::SetDsNotTo().
Create frame = { beacon header + all information elements sorted by ElementId () }.
Definition at line 45 of file mesh-wifi-beacon.cc.
References ns3::Packet::AddHeader(), BeaconHeader(), and m_elements.
Time ns3::MeshWifiBeacon::GetBeaconInterval | ( | ) | const |
Returns a beacon interval of wifi beacon.
Definition at line 39 of file mesh-wifi-beacon.cc.
References ns3::MgtProbeResponseHeader::GetBeaconIntervalUs(), and m_header.
Referenced by ns3::dot11s::PeerManagementProtocolMac::UpdateBeacon().
|
private |
List of information elements added.
Definition at line 70 of file mesh-wifi-beacon.h.
Referenced by AddInformationElement(), and CreatePacket().
|
private |
Beacon header.
Definition at line 68 of file mesh-wifi-beacon.h.
Referenced by BeaconHeader(), GetBeaconInterval(), and MeshWifiBeacon().