A Discrete-Event Network Simulator
API
ns3::MeshWifiBeacon Class Reference

Beacon is beacon header + list of arbitrary information elements. More...

#include "mesh-wifi-beacon.h"

+ Collaboration diagram for ns3::MeshWifiBeacon:

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< PacketCreatePacket ()
 Create frame = { beacon header + all information elements sorted by ElementId () }. More...
 
Time GetBeaconInterval () const
 Returns the beacon interval of Wifi beacon. More...
 

Private Attributes

MeshInformationElementVector m_elements
 List of information elements added. More...
 
MgtBeaconHeader m_header
 Beacon header. More...
 

Detailed Description

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 40 of file mesh-wifi-beacon.h.

Constructor & Destructor Documentation

ns3::MeshWifiBeacon::MeshWifiBeacon ( Ssid  ssid,
SupportedRates  rates,
uint64_t  us 
)

C-tor.

Parameters
ssidis SSID for beacon header
ratesis a set of supported rates
usbeacon interval in microseconds

Definition at line 27 of file mesh-wifi-beacon.cc.

References m_header, ns3::MgtProbeResponseHeader::SetBeaconIntervalUs(), ns3::MgtProbeResponseHeader::SetSsid(), and ns3::MgtProbeResponseHeader::SetSupportedRates().

+ Here is the call graph for this function:

Member Function Documentation

void ns3::MeshWifiBeacon::AddInformationElement ( Ptr< WifiInformationElement ie)

Add information element.

Parameters
iethe Wifi information element

Definition at line 35 of file mesh-wifi-beacon.cc.

References ns3::WifiInformationElementVector::AddInformationElement(), and m_elements.

Referenced by BeaconHeader(), and ns3::dot11s::PeerManagementProtocolMac::UpdateBeacon().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

MgtBeaconHeader ns3::MeshWifiBeacon::BeaconHeader ( ) const
inline

Read standard Wifi beacon header.

Returns
the management beacon header

Definition at line 56 of file mesh-wifi-beacon.h.

References AddInformationElement(), first::address, CreateHeader(), CreatePacket(), GetBeaconInterval(), and m_header.

Referenced by CreatePacket().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

WifiMacHeader ns3::MeshWifiBeacon::CreateHeader ( Mac48Address  address,
Mac48Address  mpAddress 
)

Create Wifi header for beacon frame.

Parameters
addressis sender address
mpAddressis mesh point address
Returns
the WifiMacHeader

Definition at line 56 of file mesh-wifi-beacon.cc.

References ns3::Mac48Address::GetBroadcast(), ns3::WifiMacHeader::SetAddr1(), ns3::WifiMacHeader::SetAddr2(), ns3::WifiMacHeader::SetAddr3(), ns3::WifiMacHeader::SetDsNotFrom(), ns3::WifiMacHeader::SetDsNotTo(), ns3::WifiMacHeader::SetType(), and ns3::WIFI_MAC_MGT_BEACON.

Referenced by BeaconHeader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Ptr< Packet > ns3::MeshWifiBeacon::CreatePacket ( )

Create frame = { beacon header + all information elements sorted by ElementId () }.

Returns
the frame

Definition at line 47 of file mesh-wifi-beacon.cc.

References ns3::Packet::AddHeader(), BeaconHeader(), and m_elements.

Referenced by BeaconHeader().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Time ns3::MeshWifiBeacon::GetBeaconInterval ( ) const

Returns the beacon interval of Wifi beacon.

Returns
the beacon interval time

Definition at line 41 of file mesh-wifi-beacon.cc.

References ns3::MgtProbeResponseHeader::GetBeaconIntervalUs(), m_header, and ns3::MicroSeconds().

Referenced by BeaconHeader(), and ns3::dot11s::PeerManagementProtocolMac::UpdateBeacon().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

MeshInformationElementVector ns3::MeshWifiBeacon::m_elements
private

List of information elements added.

Definition at line 89 of file mesh-wifi-beacon.h.

Referenced by AddInformationElement(), and CreatePacket().

MgtBeaconHeader ns3::MeshWifiBeacon::m_header
private

Beacon header.

Definition at line 87 of file mesh-wifi-beacon.h.

Referenced by BeaconHeader(), GetBeaconInterval(), and MeshWifiBeacon().


The documentation for this class was generated from the following files: