A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
mesh-wifi-beacon.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Pavel Boyko <boyko@iitp.ru>
7
*/
8
9
#ifndef MESH_WIFI_BEACON_H
10
#define MESH_WIFI_BEACON_H
11
12
#include "
mesh-information-element-vector.h
"
13
14
#include "ns3/mgt-headers.h"
15
#include "ns3/object.h"
16
#include "ns3/packet.h"
17
18
namespace
ns3
19
{
20
21
class
WifiMacHeader;
22
class
Time
;
23
24
/**
25
* \brief Beacon is beacon header + list of arbitrary information elements
26
*
27
* It is supposed that distinct mesh protocols can use beacons to transport
28
* their own information elements.
29
*/
30
class
MeshWifiBeacon
31
{
32
public
:
33
/**
34
* C-tor
35
*
36
* \param ssid is SSID for beacon header
37
* \param rates is a set of supported rates
38
* \param us beacon interval in microseconds
39
*/
40
MeshWifiBeacon
(
Ssid
ssid,
AllSupportedRates
rates, uint64_t us);
41
42
/**
43
* Read standard Wifi beacon header
44
*
45
* \returns the management beacon header
46
*/
47
MgtBeaconHeader
BeaconHeader
()
const
48
{
49
return
m_header
;
50
}
51
52
/**
53
* Add information element
54
*
55
* \param ie the Wifi information element
56
*/
57
void
AddInformationElement
(
Ptr<WifiInformationElement>
ie);
58
59
/**
60
* Create Wifi header for beacon frame.
61
*
62
* \param address is sender address
63
* \param mpAddress is mesh point address
64
* \returns the WifiMacHeader
65
*/
66
WifiMacHeader
CreateHeader
(
Mac48Address
address,
Mac48Address
mpAddress);
67
/**
68
* Returns the beacon interval of Wifi beacon
69
*
70
* \returns the beacon interval time
71
*/
72
Time
GetBeaconInterval
()
const
;
73
/**
74
* Create frame = { beacon header + all information elements sorted by ElementId () }
75
*
76
* \returns the frame
77
*/
78
Ptr<Packet>
CreatePacket
();
79
80
private
:
81
/// Beacon header
82
MgtBeaconHeader
m_header
;
83
/// List of information elements added
84
MeshInformationElementVector
m_elements
;
85
};
86
87
}
// namespace ns3
88
89
#endif
/* MESH_WIFI_BEACON_H */
ns3::Mac48Address
an EUI-48 address
Definition
mac48-address.h:35
ns3::MeshInformationElementVector
Information element vector.
Definition
mesh-information-element-vector.h:33
ns3::MeshWifiBeacon
Beacon is beacon header + list of arbitrary information elements.
Definition
mesh-wifi-beacon.h:31
ns3::MeshWifiBeacon::CreateHeader
WifiMacHeader CreateHeader(Mac48Address address, Mac48Address mpAddress)
Create Wifi header for beacon frame.
Definition
mesh-wifi-beacon.cc:47
ns3::MeshWifiBeacon::GetBeaconInterval
Time GetBeaconInterval() const
Returns the beacon interval of Wifi beacon.
Definition
mesh-wifi-beacon.cc:32
ns3::MeshWifiBeacon::CreatePacket
Ptr< Packet > CreatePacket()
Create frame = { beacon header + all information elements sorted by ElementId () }...
Definition
mesh-wifi-beacon.cc:38
ns3::MeshWifiBeacon::BeaconHeader
MgtBeaconHeader BeaconHeader() const
Read standard Wifi beacon header.
Definition
mesh-wifi-beacon.h:47
ns3::MeshWifiBeacon::m_header
MgtBeaconHeader m_header
Beacon header.
Definition
mesh-wifi-beacon.h:82
ns3::MeshWifiBeacon::AddInformationElement
void AddInformationElement(Ptr< WifiInformationElement > ie)
Add information element.
Definition
mesh-wifi-beacon.cc:26
ns3::MeshWifiBeacon::MeshWifiBeacon
MeshWifiBeacon(Ssid ssid, AllSupportedRates rates, uint64_t us)
C-tor.
Definition
mesh-wifi-beacon.cc:17
ns3::MeshWifiBeacon::m_elements
MeshInformationElementVector m_elements
List of information elements added.
Definition
mesh-wifi-beacon.h:84
ns3::MgtBeaconHeader
Implement the header for management frames of type beacon.
Definition
mgt-headers.h:506
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::Ssid
The IEEE 802.11 SSID Information Element.
Definition
ssid.h:25
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition
nstime.h:94
ns3::WifiMacHeader
Implements the IEEE 802.11 MAC header.
Definition
wifi-mac-header.h:87
mesh-information-element-vector.h
ns3::TracedValueCallback::Time
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition
nstime.h:828
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::AllSupportedRates
Struct containing all supported rates.
Definition
supported-rates.h:77
src
mesh
model
mesh-wifi-beacon.h
Generated on Fri Nov 8 2024 13:59:04 for ns-3 by
1.11.0