A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
erp-information.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2015 Sébastien Deronne
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Sébastien Deronne <sebastien.deronne@gmail.com>
7 */
8
9#ifndef ERP_INFORMATION_H
10#define ERP_INFORMATION_H
11
12#include "ns3/wifi-export.h"
13#include "ns3/wifi-information-element.h"
14
15namespace ns3
16{
17
18/**
19 * @brief The ErpInformation Information Element
20 * @ingroup wifi
21 *
22 * This class knows how to serialize and deserialize the ErpInformation Information Element.
23 */
24class WIFI_EXPORT ErpInformation : public WifiInformationElement
25{
26 public:
28
29 // Implementations of pure virtual methods of WifiInformationElement
30 WifiInformationElementId ElementId() const override;
31 uint16_t GetInformationFieldSize() const override;
32 void SerializeInformationField(Buffer::Iterator start) const override;
33 uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override;
34 void Print(std::ostream& os) const override;
35
36 /**
37 * Set the Barker_Preamble_Mode field in the ErpInformation information element.
38 *
39 * @param barkerPreambleMode the Barker_Preamble_Mode field in the ErpInformation information
40 * element
41 */
42 void SetBarkerPreambleMode(uint8_t barkerPreambleMode);
43 /**
44 * Set the Use_Protection field in the ErpInformation information element.
45 *
46 * @param useProtection the Use_Protection field in the ErpInformation information element
47 */
48 void SetUseProtection(uint8_t useProtection);
49 /**
50 * Set the Non_Erp_Present field in the ErpInformation information element.
51 *
52 * @param nonErpPresent the Non_Erp_Present field in the ErpInformation information element
53 */
54 void SetNonErpPresent(uint8_t nonErpPresent);
55
56 /**
57 * Return the Barker_Preamble_Mode field in the ErpInformation information element.
58 *
59 * @return the Barker_Preamble_Mode field in the ErpInformation information element
60 */
61 uint8_t GetBarkerPreambleMode() const;
62 /**
63 * Return the Use_Protection field in the ErpInformation information element.
64 *
65 * @return the Use_Protection field in the ErpInformation information element
66 */
67 uint8_t GetUseProtection() const;
68 /**
69 * Return the Non_Erp_Present field in the ErpInformation information element.
70 *
71 * @return the Non_Erp_Present field in the ErpInformation information element
72 */
73 uint8_t GetNonErpPresent() const;
74
75 private:
76 uint8_t m_erpInformation; ///< ERP information
77};
78
79} // namespace ns3
80
81#endif /* ERP_INFORMATION_H */
iterator in a Buffer instance
Definition buffer.h:109
uint8_t m_erpInformation
ERP information.
void SetBarkerPreambleMode(uint8_t barkerPreambleMode)
Set the Barker_Preamble_Mode field in the ErpInformation information element.
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
uint8_t GetNonErpPresent() const
Return the Non_Erp_Present field in the ErpInformation information element.
uint16_t DeserializeInformationField(Buffer::Iterator start, uint16_t length) override
Deserialize information (i.e., the body of the IE, not including the Element ID and length octets).
uint8_t GetBarkerPreambleMode() const
Return the Barker_Preamble_Mode field in the ErpInformation information element.
void SetUseProtection(uint8_t useProtection)
Set the Use_Protection field in the ErpInformation information element.
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets).
uint8_t GetUseProtection() const
Return the Use_Protection field in the ErpInformation information element.
void SetNonErpPresent(uint8_t nonErpPresent)
Set the Non_Erp_Present field in the ErpInformation information element.
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Information element, as defined in 802.11-2007 standard.
void Print(ComponentCarrier cc)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.