A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
wifi-information-element-vector.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2009 IITP RAS
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Kirill Andreev <andreev@iitp.ru>
18
* Pavel Boyko <boyko.iitp.ru>
19
*/
20
21
#ifndef WIFI_INFORMATION_ELEMENT_VECTOR_H
22
#define WIFI_INFORMATION_ELEMENT_VECTOR_H
23
24
#include "
wifi-information-element.h
"
25
26
namespace
ns3
27
{
28
39
class
WifiInformationElementVector
:
public
Header
40
{
41
public
:
42
WifiInformationElementVector
();
43
~WifiInformationElementVector
()
override
;
44
49
static
TypeId
GetTypeId
();
50
51
TypeId
GetInstanceTypeId
()
const override
;
52
uint32_t
GetSerializedSize
()
const override
;
53
void
Serialize
(
Buffer::Iterator
start
)
const override
;
61
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
71
uint32_t
Deserialize
(
Buffer::Iterator
start
,
Buffer::Iterator
end)
override
;
72
void
Print
(std::ostream& os)
const override
;
73
81
virtual
uint32_t
DeserializeSingleIe
(
Buffer::Iterator
start
);
83
typedef
std::vector<Ptr<WifiInformationElement>>::iterator
Iterator
;
88
Iterator
Begin
();
93
Iterator
End
();
100
bool
AddInformationElement
(
Ptr<WifiInformationElement>
element);
107
Ptr<WifiInformationElement>
FindFirst
(
WifiInformationElementId
id
)
const
;
108
117
virtual
bool
operator==
(
const
WifiInformationElementVector
& a)
const
;
118
119
protected
:
123
typedef
std::vector<Ptr<WifiInformationElement>>
IE_VECTOR
;
128
uint32_t
GetSize
()
const
;
129
IE_VECTOR
m_elements
;
130
uint16_t
m_maxSize
;
131
};
132
133
}
// namespace ns3
134
135
#endif
/* WIFI_INFORMATION_ELEMENT_VECTOR_H */
ns3::Buffer::Iterator
iterator in a Buffer instance
Definition:
buffer.h:100
ns3::Header
Protocol header serialization and deserialization.
Definition:
header.h:44
ns3::Header::Deserialize
virtual uint32_t Deserialize(Buffer::Iterator start)=0
Deserialize the object from a buffer iterator.
ns3::Ptr< WifiInformationElement >
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:60
ns3::WifiInformationElementVector
Information element vector.
Definition:
wifi-information-element-vector.h:40
ns3::WifiInformationElementVector::m_elements
IE_VECTOR m_elements
Information element vector.
Definition:
wifi-information-element-vector.h:129
ns3::WifiInformationElementVector::WifiInformationElementVector
WifiInformationElementVector()
Definition:
wifi-information-element-vector.cc:27
ns3::WifiInformationElementVector::Iterator
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
Definition:
wifi-information-element-vector.h:83
ns3::WifiInformationElementVector::DeserializeSingleIe
virtual uint32_t DeserializeSingleIe(Buffer::Iterator start)
Needed when you try to deserialize a lonely IE inside other header.
Definition:
wifi-information-element-vector.cc:96
ns3::WifiInformationElementVector::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
wifi-information-element-vector.cc:58
ns3::WifiInformationElementVector::GetSize
uint32_t GetSize() const
Current number of bytes.
Definition:
wifi-information-element-vector.cc:171
ns3::WifiInformationElementVector::End
Iterator End()
Returns End of the vector.
Definition:
wifi-information-element-vector.cc:141
ns3::WifiInformationElementVector::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
wifi-information-element-vector.cc:42
ns3::WifiInformationElementVector::Begin
Iterator Begin()
Returns Begin of the vector.
Definition:
wifi-information-element-vector.cc:135
ns3::WifiInformationElementVector::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
wifi-information-element-vector.cc:64
ns3::WifiInformationElementVector::IE_VECTOR
std::vector< Ptr< WifiInformationElement > > IE_VECTOR
typedef for a vector of WifiInformationElements.
Definition:
wifi-information-element-vector.h:123
ns3::WifiInformationElementVector::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
wifi-information-element-vector.cc:52
ns3::WifiInformationElementVector::Print
void Print(std::ostream &os) const override
Definition:
wifi-information-element-vector.cc:124
ns3::WifiInformationElementVector::AddInformationElement
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
Definition:
wifi-information-element-vector.cc:147
ns3::WifiInformationElementVector::FindFirst
Ptr< WifiInformationElement > FindFirst(WifiInformationElementId id) const
vector of pointers to information elements is the body of IeVector
Definition:
wifi-information-element-vector.cc:158
ns3::WifiInformationElementVector::~WifiInformationElementVector
~WifiInformationElementVector() override
Definition:
wifi-information-element-vector.cc:32
ns3::WifiInformationElementVector::m_maxSize
uint16_t m_maxSize
Size in bytes (actually, max packet length)
Definition:
wifi-information-element-vector.h:130
ns3::WifiInformationElementVector::operator==
virtual bool operator==(const WifiInformationElementVector &a) const
Check if the given WifiInformationElementVectors are equivalent.
Definition:
wifi-information-element-vector.cc:182
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::WifiInformationElementId
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
Definition:
wifi-information-element.h:45
two-ray-to-three-gpp-ch-calibration.start
start
Definition:
two-ray-to-three-gpp-ch-calibration.py:474
wifi-information-element.h
src
wifi
model
wifi-information-element-vector.h
Generated on Fri Mar 31 2023 13:30:54 for ns-3 by
1.9.1