A Discrete-Event Network Simulator
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
13
14#include "ns3/mgt-headers.h"
15#include "ns3/object.h"
16#include "ns3/packet.h"
17
18namespace ns3
19{
20
21class WifiMacHeader;
22class 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 */
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 */
48 {
49 return m_header;
50 }
51
52 /**
53 * Add information element
54 *
55 * @param ie the Wifi information element
56 */
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 */
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 */
79
80 private:
81 /// Beacon header
83 /// List of information elements added
85};
86
87} // namespace ns3
88
89#endif /* MESH_WIFI_BEACON_H */
an EUI-48 address
Beacon is beacon header + list of arbitrary information elements.
WifiMacHeader CreateHeader(Mac48Address address, Mac48Address mpAddress)
Create Wifi header for beacon frame.
Time GetBeaconInterval() const
Returns the beacon interval of Wifi beacon.
Ptr< Packet > CreatePacket()
Create frame = { beacon header + all information elements sorted by ElementId () }...
MgtBeaconHeader BeaconHeader() const
Read standard Wifi beacon header.
MgtBeaconHeader m_header
Beacon header.
void AddInformationElement(Ptr< WifiInformationElement > ie)
Add information element.
MeshWifiBeacon(Ssid ssid, AllSupportedRates rates, uint64_t us)
C-tor.
MeshInformationElementVector m_elements
List of information elements added.
Implement the header for management frames of type beacon.
Smart pointer class similar to boost::intrusive_ptr.
The IEEE 802.11 SSID Information Element.
Definition ssid.h:25
Simulation virtual time values and global simulation resolution.
Definition nstime.h:94
Implements the IEEE 802.11 MAC header.
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
Definition nstime.h:864
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Struct containing all supported rates.