A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
mesh-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 MESH_INFORMATION_ELEMENT_VECTOR_H
22
#define MESH_INFORMATION_ELEMENT_VECTOR_H
23
24
#include "ns3/wifi-information-element.h"
25
26
namespace
ns3
27
{
28
29
#define IE11S_MESH_PEERING_PROTOCOL_VERSION \
30
((WifiInformationElementId)74)
// to be removed (Protocol ID should be part of the Mesh Peering
31
// Management IE)
32
43
class
MeshInformationElementVector
:
public
Header
44
{
45
public
:
46
MeshInformationElementVector
();
47
~MeshInformationElementVector
()
override
;
48
53
static
TypeId
GetTypeId
();
54
55
TypeId
GetInstanceTypeId
()
const override
;
56
uint32_t
GetSerializedSize
()
const override
;
57
void
Serialize
(
Buffer::Iterator
start
)
const override
;
65
uint32_t
Deserialize
(
Buffer::Iterator
start
)
override
;
75
uint32_t
Deserialize
(
Buffer::Iterator
start
,
Buffer::Iterator
end)
override
;
76
void
Print
(std::ostream& os)
const override
;
77
85
uint32_t
DeserializeSingleIe
(
Buffer::Iterator
start
);
86
88
typedef
std::vector<Ptr<WifiInformationElement>>::iterator
Iterator
;
93
Iterator
Begin
();
98
Iterator
End
();
105
bool
AddInformationElement
(
Ptr<WifiInformationElement>
element);
112
Ptr<WifiInformationElement>
FindFirst
(
WifiInformationElementId
id
)
const
;
113
122
virtual
bool
operator==
(
const
MeshInformationElementVector
& a)
const
;
123
124
protected
:
128
typedef
std::vector<Ptr<WifiInformationElement>>
IE_VECTOR
;
133
uint32_t
GetSize
()
const
;
134
IE_VECTOR
m_elements
;
135
uint16_t
m_maxSize
;
136
};
137
138
}
// namespace ns3
139
140
#endif
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::MeshInformationElementVector
Information element vector.
Definition:
mesh-information-element-vector.h:44
ns3::MeshInformationElementVector::End
Iterator End()
Returns End of the vector.
Definition:
mesh-information-element-vector.cc:182
ns3::MeshInformationElementVector::AddInformationElement
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
Definition:
mesh-information-element-vector.cc:188
ns3::MeshInformationElementVector::m_elements
IE_VECTOR m_elements
Information element vector.
Definition:
mesh-information-element-vector.h:134
ns3::MeshInformationElementVector::MeshInformationElementVector
MeshInformationElementVector()
Definition:
mesh-information-element-vector.cc:43
ns3::MeshInformationElementVector::~MeshInformationElementVector
~MeshInformationElementVector() override
Definition:
mesh-information-element-vector.cc:48
ns3::MeshInformationElementVector::GetSize
uint32_t GetSize() const
Current number of bytes.
Definition:
mesh-information-element-vector.cc:212
ns3::MeshInformationElementVector::GetInstanceTypeId
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
Definition:
mesh-information-element-vector.cc:68
ns3::MeshInformationElementVector::Iterator
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
Definition:
mesh-information-element-vector.h:88
ns3::MeshInformationElementVector::m_maxSize
uint16_t m_maxSize
Size in bytes (actually, max packet length)
Definition:
mesh-information-element-vector.h:135
ns3::MeshInformationElementVector::GetSerializedSize
uint32_t GetSerializedSize() const override
Definition:
mesh-information-element-vector.cc:74
ns3::MeshInformationElementVector::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
mesh-information-element-vector.cc:58
ns3::MeshInformationElementVector::FindFirst
Ptr< WifiInformationElement > FindFirst(WifiInformationElementId id) const
vector of pointers to information elements is the body of IeVector
Definition:
mesh-information-element-vector.cc:199
ns3::MeshInformationElementVector::IE_VECTOR
std::vector< Ptr< WifiInformationElement > > IE_VECTOR
typedef for a vector of WifiInformationElements.
Definition:
mesh-information-element-vector.h:128
ns3::MeshInformationElementVector::Begin
Iterator Begin()
Returns Begin of the vector.
Definition:
mesh-information-element-vector.cc:176
ns3::MeshInformationElementVector::Serialize
void Serialize(Buffer::Iterator start) const override
Definition:
mesh-information-element-vector.cc:80
ns3::MeshInformationElementVector::Print
void Print(std::ostream &os) const override
Definition:
mesh-information-element-vector.cc:165
ns3::MeshInformationElementVector::operator==
virtual bool operator==(const MeshInformationElementVector &a) const
Check if the given WifiInformationElementVectors are equivalent.
Definition:
mesh-information-element-vector.cc:223
ns3::MeshInformationElementVector::DeserializeSingleIe
uint32_t DeserializeSingleIe(Buffer::Iterator start)
Needed when you try to deserialize a lonely IE inside other header.
Definition:
mesh-information-element-vector.cc:112
ns3::Ptr< WifiInformationElement >
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
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:520
src
mesh
model
mesh-information-element-vector.h
Generated on Sun Mar 3 2024 17:11:05 for ns-3 by
1.9.1