Information element vector. 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. More... | |
Public Member Functions | |
WifiInformationElementVector () | |
virtual | ~WifiInformationElementVector () |
bool | AddInformationElement (Ptr< WifiInformationElement > element) |
add an IE, if maxSize has exceeded, returns false More... | |
Iterator | Begin () |
Returns Begin of the vector. More... | |
uint32_t | Deserialize (Buffer::Iterator start) override |
uint32_t | Deserialize (Buffer::Iterator start, Buffer::Iterator end) override |
Deserialize a number of WifiInformationElements. More... | |
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. More... | |
Ptr< WifiInformationElement > | FindFirst (WifiInformationElementId id) const |
vector of pointers to information elements is the body of IeVector More... | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. More... | |
uint32_t | GetSerializedSize () const override |
virtual bool | operator== (const WifiInformationElementVector &a) const |
Check if the given WifiInformationElementVectors are equivalent. More... | |
void | Print (std::ostream &os) const override |
void | Serialize (Buffer::Iterator start) const override |
Public Member Functions inherited from ns3::Header | |
virtual | ~Header () |
virtual uint32_t | Deserialize (Buffer::Iterator start)=0 |
Deserialize the object from a buffer iterator. More... | |
virtual uint32_t | Deserialize (Buffer::Iterator start, Buffer::Iterator end) |
Deserialize the object from a buffer iterator. More... | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. More... | |
void | GetAttribute (std::string name, AttributeValue &value) const |
Get the value of an attribute, raising fatal errors if unsuccessful. More... | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising erros. More... | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. More... | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. More... | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. More... | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. More... | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. More... | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Header | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::Chunk | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Protected Types | |
typedef std::vector< Ptr< WifiInformationElement > > | IE_VECTOR |
typedef for a vector of WifiInformationElements. More... | |
Protected Member Functions | |
uint32_t | GetSize () const |
Current number of bytes. More... | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. More... | |
virtual void | NotifyConstructionCompleted (void) |
Notifier called once the ObjectBase is fully constructed. More... | |
Protected Attributes | |
IE_VECTOR | m_elements |
Information element vector. More... | |
uint16_t | m_maxSize |
Size in bytes (actually, max packet length) More... | |
Additional Inherited Members | |
Related Functions inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid (void) |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. More... | |
Information element vector.
Introspection did not find any typical Config paths.
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.
No Attributes are defined for this type.
No TraceSources are defined for this type.
Size of this type is 40 bytes (on a 64-bit architecture).
Definition at line 39 of file wifi-information-element-vector.h.
|
protected |
typedef for a vector of WifiInformationElements.
Definition at line 124 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 83 of file wifi-information-element-vector.h.
ns3::WifiInformationElementVector::WifiInformationElementVector | ( | ) |
Definition at line 27 of file wifi-information-element-vector.cc.
|
virtual |
Definition at line 32 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
element | wifi information element to add |
Definition at line 147 of file wifi-information-element-vector.cc.
References ns3::WifiInformationElement::GetInformationFieldSize(), GetSize(), m_elements, and m_maxSize.
Referenced by ns3::MeshWifiBeacon::AddInformationElement(), MeshInformationElementVectorBist::DoRun(), ns3::dot11s::HwmpProtocolMac::ForwardPerr(), ns3::dot11s::PeerManagementProtocolMac::SendPeerLinkManagementFrame(), ns3::dot11s::HwmpProtocolMac::SendPrep(), and ns3::dot11s::HwmpProtocolMac::SendPreqVector().
WifiInformationElementVector::Iterator ns3::WifiInformationElementVector::Begin | ( | void | ) |
Returns Begin of the vector.
Definition at line 135 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().
|
overridevirtual |
start | buffer location to start deserializing from |
Implements ns3::Header.
Definition at line 73 of file wifi-information-element-vector.cc.
References NS_FATAL_ERROR.
|
overridevirtual |
Deserialize a number of WifiInformationElements.
The size of this Header should equal start.GetDistanceFrom (end).
start | starting buffer location |
end | ending buffer location |
Reimplemented from ns3::Chunk.
Definition at line 80 of file wifi-information-element-vector.cc.
References DeserializeSingleIe(), NS_ASSERT, NS_ASSERT_MSG, 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 96 of file wifi-information-element-vector.cc.
References NS_FATAL_ERROR, ns3::Buffer::Iterator::ReadU8(), and visualizer.core::start().
Referenced by Deserialize(), and ns3::MeshInformationElementVector::DeserializeSingleIe().
WifiInformationElementVector::Iterator ns3::WifiInformationElementVector::End | ( | void | ) |
Returns End of the vector.
Definition at line 141 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
id | the element id to find |
Definition at line 158 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by ns3::dot11s::PeerManagementProtocolMac::Receive().
|
overridevirtual |
Get the most derived TypeId for this Object.
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 52 of file wifi-information-element-vector.cc.
References GetTypeId().
|
overridevirtual |
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 58 of file wifi-information-element-vector.cc.
References GetSize().
Referenced by MeshInformationElementVectorBist::DoRun().
|
protected |
Current number of bytes.
Definition at line 171 of file wifi-information-element-vector.cc.
References m_elements.
Referenced by AddInformationElement(), ns3::MeshInformationElementVector::DeserializeSingleIe(), and GetSerializedSize().
|
static |
Get the type ID.
Definition at line 42 of file wifi-information-element-vector.cc.
References ns3::TypeId::SetParent().
Referenced by GetInstanceTypeId().
|
virtual |
Check if the given WifiInformationElementVectors are equivalent.
a | another WifiInformationElementVector |
Definition at line 182 of file wifi-information-element-vector.cc.
References m_elements, and NS_ASSERT.
|
overridevirtual |
os | output stream This method is used by Packet::Print to print the content of a header as ascii data to a c++ output stream. Although the header 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 124 of file wifi-information-element-vector.cc.
References m_elements.
|
overridevirtual |
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 64 of file wifi-information-element-vector.cc.
References m_elements, and visualizer.core::start().
|
protected |
Information element vector.
Definition at line 130 of file wifi-information-element-vector.h.
Referenced by ~WifiInformationElementVector(), AddInformationElement(), Begin(), ns3::MeshInformationElementVector::DeserializeSingleIe(), End(), FindFirst(), GetSize(), operator==(), Print(), and Serialize().
|
protected |
Size in bytes (actually, max packet length)
Definition at line 131 of file wifi-information-element-vector.h.
Referenced by AddInformationElement(), and ns3::MeshInformationElementVector::DeserializeSingleIe().