A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
26namespace 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
44{
45 public:
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;
76 void Print(std::ostream& os) const override;
77
86
88 typedef std::vector<Ptr<WifiInformationElement>>::iterator Iterator;
98 Iterator End();
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;
135 uint16_t m_maxSize;
136};
137
138} // namespace ns3
139
140#endif
iterator in a Buffer instance
Definition: buffer.h:100
Protocol header serialization and deserialization.
Definition: header.h:44
Iterator End()
Returns End of the vector.
uint32_t Deserialize(Buffer::Iterator start) override
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
IE_VECTOR m_elements
Information element vector.
uint32_t GetSize() const
Current number of bytes.
TypeId GetInstanceTypeId() const override
Get the most derived TypeId for this Object.
uint16_t m_maxSize
Size in bytes (actually, max packet length)
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
Ptr< WifiInformationElement > FindFirst(WifiInformationElementId id) const
vector of pointers to information elements is the body of IeVector
std::vector< Ptr< WifiInformationElement > > IE_VECTOR
typedef for a vector of WifiInformationElements.
Iterator Begin()
Returns Begin of the vector.
void Serialize(Buffer::Iterator start) const override
void Print(std::ostream &os) const override
virtual bool operator==(const MeshInformationElementVector &a) const
Check if the given WifiInformationElementVectors are equivalent.
uint32_t DeserializeSingleIe(Buffer::Iterator start)
Needed when you try to deserialize a lonely IE inside other header.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
a unique identifier for an interface.
Definition: type-id.h:59
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.