Information element vectorImplements a vector of WifiInformationElements. Information elements typically come in groups, and the WifiInformationElementVector class provides a representation of a series of IEs, and the facility for serialisation to and deserialisation from the over-the-air format. More...
#include <wifi-information-element-vector.h>
Public Types | |
typedef std::vector< Ptr < WifiInformationElement > >::iterator | Iterator |
As soon as this is a vector, we define an Iterator. |
Public Member Functions | |
WifiInformationElementVector () | |
~WifiInformationElementVector () | |
bool | AddInformationElement (Ptr< WifiInformationElement > element) |
add an IE, if maxSize has exceeded, returns false | |
Iterator | Begin () |
Returns Begin of the vector. | |
virtual uint32_t | DeserializeSingleIe (Buffer::Iterator start) |
Needed when you try to deserialize a lonely IE inside other header. | |
Iterator | End () |
Returns End of the vector. | |
Ptr< WifiInformationElement > | FindFirst (WifiInformationElementId id) const |
vector of pointers to information elements is the body of IeVector | |
virtual bool | operator== (const WifiInformationElementVector &a) const |
void | SetMaxSize (uint16_t size) |
Set maximum size to control overflow of the max packet length. | |
![]() | |
virtual | ~Header () |
Protected Types | |
typedef std::vector< Ptr < WifiInformationElement > > | IE_VECTOR |
Protected Member Functions | |
uint32_t | GetSize () const |
Current number of bytes. |
Protected Attributes | |
IE_VECTOR | m_elements |
uint16_t | m_maxSize |
Size in bytes (actually, max packet length) |
Inherited from Header | |
TypeId | GetInstanceTypeId () const |
virtual uint32_t | GetSerializedSize () const |
virtual void | Serialize (Buffer::Iterator start) const |
virtual uint32_t | Deserialize (Buffer::Iterator start) |
virtual void | Print (std::ostream &os) const |
static TypeId | GetTypeId () |
This method returns the TypeId associated to ns3::WifiInformationElementVector. |
Information element vector
Implements a vector of WifiInformationElements. Information elements typically come in groups, and the WifiInformationElementVector class provides a representation of a series of IEs, and the facility for serialisation to and deserialisation from the over-the-air format.
Definition at line 43 of file wifi-information-element-vector.h.
|
protected |
Definition at line 84 of file wifi-information-element-vector.h.
typedef std::vector<Ptr<WifiInformationElement> >::iterator ns3::WifiInformationElementVector::Iterator |
As soon as this is a vector, we define an Iterator.
Definition at line 72 of file wifi-information-element-vector.h.
ns3::WifiInformationElementVector::WifiInformationElementVector | ( | ) |
Definition at line 29 of file wifi-information-element-vector.cc.
ns3::WifiInformationElementVector::~WifiInformationElementVector | ( | ) |
Definition at line 33 of file wifi-information-element-vector.cc.
References m_elements.
bool ns3::WifiInformationElementVector::AddInformationElement | ( | Ptr< WifiInformationElement > | element | ) |
add an IE, if maxSize has exceeded, returns false
Definition at line 123 of file wifi-information-element-vector.cc.
References ns3::WifiInformationElement::GetInformationFieldSize(), GetSize(), m_elements, and m_maxSize.
Referenced by ns3::MeshWifiBeacon::AddInformationElement(), ns3::MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), and ns3::dot11s::HwmpProtocolMac::SendPreq().
WifiInformationElementVector::Iterator ns3::WifiInformationElementVector::Begin | ( | void | ) |
Returns Begin of the vector.
Definition at line 113 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
|
virtual |
start |
Implements ns3::Header.
Definition at line 68 of file wifi-information-element-vector.cc.
References DeserializeSingleIe(), ns3::Buffer::Iterator::GetDistanceFrom(), ns3::Buffer::Iterator::GetSize(), ns3::Buffer::Iterator::Next(), and visualizer.core::start().
|
virtual |
Needed when you try to deserialize a lonely IE inside other header.
start | is the start of the buffer |
Reimplemented in ns3::MeshInformationElementVector.
Definition at line 81 of file wifi-information-element-vector.cc.
References ns3::WifiInformationElement::DeserializeInformationField(), ns3::Buffer::Iterator::GetDistanceFrom(), GetSize(), m_elements, m_maxSize, ns3::Buffer::Iterator::Next(), NS_FATAL_ERROR, ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
Referenced by Deserialize().
WifiInformationElementVector::Iterator ns3::WifiInformationElementVector::End | ( | void | ) |
Returns End of the vector.
Definition at line 118 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
Ptr< WifiInformationElement > ns3::WifiInformationElementVector::FindFirst | ( | WifiInformationElementId | id | ) | const |
vector of pointers to information elements is the body of IeVector
Definition at line 133 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by ns3::dot11s::PeerManagementProtocolMac::Receive().
|
virtual |
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.
Implements ns3::ObjectBase.
Definition at line 50 of file wifi-information-element-vector.cc.
References GetTypeId().
|
virtual |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. This method should return the number of bytes which are needed to store the full header data by Serialize.
Implements ns3::Header.
Definition at line 55 of file wifi-information-element-vector.cc.
References GetSize().
|
protected |
Current number of bytes.
Definition at line 155 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by AddInformationElement(), ns3::MeshInformationElementVector::DeserializeSingleIe(), DeserializeSingleIe(), and GetSerializedSize().
|
static |
This method returns the TypeId associated to ns3::WifiInformationElementVector.
No Attributes defined for this type.
No TraceSources defined for this type.
Reimplemented from ns3::Header.
Definition at line 42 of file wifi-information-element-vector.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
Definition at line 166 of file wifi-information-element-vector.cc.
References m_elements, and NS_ASSERT.
|
virtual |
os | output stream This method is used by Packet::Print to print the content of a trailer as ascii data to a c++ output stream. Although the trailer is free to format its output as it wishes, it is recommended to follow a few rules to integrate with the packet pretty printer: start with flags, small field values located between a pair of parens. Values should be separated by whitespace. Follow the parens with the important fields, separated by whitespace. i.e.: (field1 val1 field2 val2 field3 val3) field4 val4 field5 val5 |
Implements ns3::Header.
Definition at line 103 of file wifi-information-element-vector.cc.
|
virtual |
start | an iterator which points to where the header should be written. |
This method is used by Packet::AddHeader to store a header into the byte buffer of a packet. The data written is expected to match bit-for-bit the representation of this header in a real network.
Implements ns3::Header.
Definition at line 60 of file wifi-information-element-vector.cc.
References m_elements.
void ns3::WifiInformationElementVector::SetMaxSize | ( | uint16_t | size | ) |
Set maximum size to control overflow of the max packet length.
Definition at line 108 of file wifi-information-element-vector.cc.
References m_maxSize.
|
protected |
Definition at line 87 of file wifi-information-element-vector.h.
Referenced by AddInformationElement(), Begin(), ns3::MeshInformationElementVector::DeserializeSingleIe(), DeserializeSingleIe(), End(), FindFirst(), GetSize(), operator==(), Serialize(), and ~WifiInformationElementVector().
|
protected |
Size in bytes (actually, max packet length)
Definition at line 89 of file wifi-information-element-vector.h.
Referenced by AddInformationElement(), ns3::MeshInformationElementVector::DeserializeSingleIe(), DeserializeSingleIe(), and SetMaxSize().