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 | |
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. More... | |
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. | |
Public Member Functions inherited from ns3::ObjectBase | |
void | GetAttribute (std::string name, AttributeValue &value) const |
bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
void | SetAttribute (std::string name, const AttributeValue &value) |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Protected Types | |
typedef std::vector< Ptr < WifiInformationElement > > | IE_VECTOR |
Protected Member Functions | |
uint32_t | GetSize () const |
Current number of bytes. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
virtual void | NotifyConstructionCompleted (void) |
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 () |
Additional Inherited Members | |
Static Public Member Functions inherited from ns3::Header | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::Chunk | |
static TypeId | GetTypeId (void) |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
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.
Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Definition at line 43 of file wifi-information-element-vector.h.
|
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(), and ns3::Buffer::Iterator::Next().
|
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_maxSize, ns3::Buffer::Iterator::Next(), NS_FATAL_ERROR, and ns3::Buffer::Iterator::ReadU8().
Referenced by Deserialize(), and ns3::MeshInformationElementVector::DeserializeSingleIe().
|
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.
|
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().
|
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.