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
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-information-element.h"
13
14
namespace
ns3
15
{
16
17
/**
18
* \brief The ErpInformation Information Element
19
* \ingroup wifi
20
*
21
* This class knows how to serialise and deserialise the ErpInformation Information Element.
22
*/
23
class
ErpInformation
:
public
WifiInformationElement
24
{
25
public
:
26
ErpInformation
();
27
28
// Implementations of pure virtual methods of WifiInformationElement
29
WifiInformationElementId
ElementId
()
const override
;
30
uint16_t
GetInformationFieldSize
()
const override
;
31
void
SerializeInformationField
(
Buffer::Iterator
start)
const override
;
32
uint16_t
DeserializeInformationField
(
Buffer::Iterator
start, uint16_t length)
override
;
33
34
/**
35
* Set the Barker_Preamble_Mode field in the ErpInformation information element.
36
*
37
* \param barkerPreambleMode the Barker_Preamble_Mode field in the ErpInformation information
38
* element
39
*/
40
void
SetBarkerPreambleMode
(uint8_t barkerPreambleMode);
41
/**
42
* Set the Use_Protection field in the ErpInformation information element.
43
*
44
* \param useProtection the Use_Protection field in the ErpInformation information element
45
*/
46
void
SetUseProtection
(uint8_t useProtection);
47
/**
48
* Set the Non_Erp_Present field in the ErpInformation information element.
49
*
50
* \param nonErpPresent the Non_Erp_Present field in the ErpInformation information element
51
*/
52
void
SetNonErpPresent
(uint8_t nonErpPresent);
53
54
/**
55
* Return the Barker_Preamble_Mode field in the ErpInformation information element.
56
*
57
* \return the Barker_Preamble_Mode field in the ErpInformation information element
58
*/
59
uint8_t
GetBarkerPreambleMode
()
const
;
60
/**
61
* Return the Use_Protection field in the ErpInformation information element.
62
*
63
* \return the Use_Protection field in the ErpInformation information element
64
*/
65
uint8_t
GetUseProtection
()
const
;
66
/**
67
* Return the Non_Erp_Present field in the ErpInformation information element.
68
*
69
* \return the Non_Erp_Present field in the ErpInformation information element
70
*/
71
uint8_t
GetNonErpPresent
()
const
;
72
73
private
:
74
uint8_t
m_erpInformation
;
///< ERP information
75
};
76
77
/**
78
* output stream output operator
79
*
80
* \param os output stream
81
* \param erpInformation the ERP Information
82
*
83
* \returns output stream
84
*/
85
std::ostream&
operator<<
(std::ostream& os,
const
ErpInformation
& erpInformation);
86
87
}
// namespace ns3
88
89
#endif
/* ERP_INFORMATION_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition
buffer.h:89
ns3::ErpInformation
The ErpInformation Information Element.
Definition
erp-information.h:24
ns3::ErpInformation::m_erpInformation
uint8_t m_erpInformation
ERP information.
Definition
erp-information.h:74
ns3::ErpInformation::SetBarkerPreambleMode
void SetBarkerPreambleMode(uint8_t barkerPreambleMode)
Set the Barker_Preamble_Mode field in the ErpInformation information element.
Definition
erp-information.cc:26
ns3::ErpInformation::ElementId
WifiInformationElementId ElementId() const override
Get the wifi information element ID.
Definition
erp-information.cc:20
ns3::ErpInformation::GetNonErpPresent
uint8_t GetNonErpPresent() const
Return the Non_Erp_Present field in the ErpInformation information element.
Definition
erp-information.cc:56
ns3::ErpInformation::DeserializeInformationField
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)
Definition
erp-information.cc:74
ns3::ErpInformation::GetBarkerPreambleMode
uint8_t GetBarkerPreambleMode() const
Return the Barker_Preamble_Mode field in the ErpInformation information element.
Definition
erp-information.cc:44
ns3::ErpInformation::SetUseProtection
void SetUseProtection(uint8_t useProtection)
Set the Use_Protection field in the ErpInformation information element.
Definition
erp-information.cc:32
ns3::ErpInformation::SerializeInformationField
void SerializeInformationField(Buffer::Iterator start) const override
Serialize information (i.e., the body of the IE, not including the Element ID and length octets)
Definition
erp-information.cc:68
ns3::ErpInformation::ErpInformation
ErpInformation()
Definition
erp-information.cc:14
ns3::ErpInformation::GetUseProtection
uint8_t GetUseProtection() const
Return the Use_Protection field in the ErpInformation information element.
Definition
erp-information.cc:50
ns3::ErpInformation::SetNonErpPresent
void SetNonErpPresent(uint8_t nonErpPresent)
Set the Non_Erp_Present field in the ErpInformation information element.
Definition
erp-information.cc:38
ns3::ErpInformation::GetInformationFieldSize
uint16_t GetInformationFieldSize() const override
Length of serialized information (i.e., the length of the body of the IE, not including the Element I...
Definition
erp-information.cc:62
ns3::WifiInformationElement
Information element, as defined in 802.11-2007 standard.
Definition
wifi-information-element.h:278
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition
angles.cc:148
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition
wifi-information-element.h:34
src
wifi
model
non-ht
erp-information.h
Generated on Fri Nov 8 2024 13:59:07 for ns-3 by
1.11.0