A Discrete-Event Network Simulator
API
wifi-information-element-vector.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2009 IITP RAS
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Authors: Kirill Andreev <andreev@iitp.ru>
19  * Pavel Boyko <boyko.iitp.ru>
20  */
21 
22 #ifndef WIFI_INFORMATION_ELEMENT_VECTOR_H
23 #define WIFI_INFORMATION_ELEMENT_VECTOR_H
24 
26 
27 namespace ns3 {
28 
40 {
41 public:
44 
49  static TypeId GetTypeId ();
50  TypeId GetInstanceTypeId () const;
51  virtual uint32_t GetSerializedSize () const;
52  virtual void Serialize (Buffer::Iterator start) const;
60  virtual uint32_t Deserialize (Buffer::Iterator start);
70  virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end);
71  virtual void Print (std::ostream &os) const;
72 
80  virtual uint32_t DeserializeSingleIe (Buffer::Iterator start);
82  typedef std::vector<Ptr<WifiInformationElement> >::iterator Iterator;
87  Iterator Begin ();
92  Iterator End ();
107 
116  virtual bool operator== (const WifiInformationElementVector & a) const;
117 
118 
119 protected:
123  typedef std::vector<Ptr<WifiInformationElement> > IE_VECTOR;
128  uint32_t GetSize () const;
130  uint16_t m_maxSize;
132 };
133 
134 } //namespace ns3
135 
136 #endif /* WIFI_INFORMATION_ELEMENT_VECTOR_H */
Protocol header serialization and deserialization.
Definition: header.h:42
static TypeId GetTypeId()
Get the type ID.
IE_VECTOR m_elements
Information element vector.
def start()
Definition: core.py:1844
virtual bool operator==(const WifiInformationElementVector &a) const
Check if the given WifiInformationElementVectors are equivalent.
bool AddInformationElement(Ptr< WifiInformationElement > element)
add an IE, if maxSize has exceeded, returns false
virtual void Serialize(Buffer::Iterator start) const
iterator in a Buffer instance
Definition: buffer.h:98
Iterator End()
Returns End of the vector.
std::vector< Ptr< WifiInformationElement > >::iterator Iterator
As soon as this is a vector, we define an Iterator.
TypeId GetInstanceTypeId() const
Get the most derived TypeId for this Object.
virtual uint32_t DeserializeSingleIe(Buffer::Iterator start)
Needed when you try to deserialize a lonely IE inside other header.
uint16_t m_maxSize
Size in bytes (actually, max packet length)
Iterator Begin()
Returns Begin of the vector.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
std::vector< Ptr< WifiInformationElement > > IE_VECTOR
typedef for a vector of WifiInformationElements.
virtual void Print(std::ostream &os) const
virtual uint32_t Deserialize(Buffer::Iterator start)
Information element vectorImplements a vector of WifiInformationElements.
uint32_t GetSize() const
Current number of bytes.
uint8_t WifiInformationElementId
This type is used to represent an Information Element ID.
a unique identifier for an interface.
Definition: type-id.h:58
Ptr< WifiInformationElement > FindFirst(WifiInformationElementId id) const
vector of pointers to information elements is the body of IeVector