A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ns3::MeshInformationElementVector Class Reference

Information element vector. More...

#include "mesh-information-element-vector.h"

+ Inheritance diagram for ns3::MeshInformationElementVector:
+ Collaboration diagram for ns3::MeshInformationElementVector:

Public Types

typedef std::vector< Ptr< WifiInformationElement > >::iterator Iterator
 As soon as this is a vector, we define an Iterator.
 

Public Member Functions

 MeshInformationElementVector ()
 
 ~MeshInformationElementVector () override
 
bool AddInformationElement (Ptr< WifiInformationElement > element)
 add an IE, if maxSize has exceeded, returns false
 
Iterator Begin ()
 Returns Begin of the vector.
 
uint32_t Deserialize (Buffer::Iterator start) override
 
uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end) override
 Deserialize a number of WifiInformationElements.
 
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< WifiInformationElementFindFirst (WifiInformationElementId id) const
 vector of pointers to information elements is the body of IeVector
 
TypeId GetInstanceTypeId () const override
 Get the most derived TypeId for this Object.
 
uint32_t GetSerializedSize () const override
 
virtual bool operator== (const MeshInformationElementVector &a) const
 Check if the given WifiInformationElementVectors are equivalent.
 
void Print (std::ostream &os) const override
 
void Serialize (Buffer::Iterator start) const override
 
- Public Member Functions inherited from ns3::Header
 ~Header () override
 
uint32_t Deserialize (Buffer::Iterator start) override=0
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator.
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
virtual uint32_t GetSerializedSize () const =0
 
void Print (std::ostream &os) const override=0
 
virtual void Serialize (Buffer::Iterator start) const =0
 
virtual uint32_t Deserialize (Buffer::Iterator start)=0
 Deserialize the object from a buffer iterator.
 
virtual uint32_t Deserialize (Buffer::Iterator start, Buffer::Iterator end)
 Deserialize the object from a buffer iterator.
 
virtual void Print (std::ostream &os) const =0
 Print the object contents.
 
- Public Member Functions inherited from ns3::ObjectBase
virtual ~ObjectBase ()
 Virtual destructor.
 
void GetAttribute (std::string name, AttributeValue &value) const
 Get the value of an attribute, raising fatal errors if unsuccessful.
 
bool GetAttributeFailSafe (std::string name, AttributeValue &value) const
 Get the value of an attribute without raising errors.
 
virtual TypeId GetInstanceTypeId () const =0
 Get the most derived TypeId for this Object.
 
void SetAttribute (std::string name, const AttributeValue &value)
 Set a single attribute, raising fatal errors if unsuccessful.
 
bool SetAttributeFailSafe (std::string name, const AttributeValue &value)
 Set a single attribute without raising errors.
 
bool TraceConnect (std::string name, std::string context, const CallbackBase &cb)
 Connect a TraceSource to a Callback with a context.
 
bool TraceConnectWithoutContext (std::string name, const CallbackBase &cb)
 Connect a TraceSource to a Callback without a context.
 
bool TraceDisconnect (std::string name, std::string context, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected with a context.
 
bool TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb)
 Disconnect from a TraceSource a Callback previously connected without a context.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Header
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::Chunk
static TypeId GetTypeId ()
 Get the type ID.
 
- Static Public Member Functions inherited from ns3::ObjectBase
static TypeId GetTypeId ()
 Get the type ID.
 

Protected Types

typedef std::vector< Ptr< WifiInformationElement > > IE_VECTOR
 typedef for a vector of WifiInformationElements.
 

Protected Member Functions

uint32_t GetSize () const
 Current number of bytes.
 
- Protected Member Functions inherited from ns3::ObjectBase
void ConstructSelf (const AttributeConstructionList &attributes)
 Complete construction of ObjectBase; invoked by derived classes.
 
virtual void NotifyConstructionCompleted ()
 Notifier called once the ObjectBase is fully constructed.
 

Protected Attributes

IE_VECTOR m_elements
 Information element vector.
 
uint16_t m_maxSize
 Size in bytes (actually, max packet length)
 

Additional Inherited Members

Detailed Description

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 43 of file mesh-information-element-vector.h.

Member Typedef Documentation

◆ IE_VECTOR

typedef for a vector of WifiInformationElements.

Definition at line 128 of file mesh-information-element-vector.h.

◆ Iterator

As soon as this is a vector, we define an Iterator.

Definition at line 88 of file mesh-information-element-vector.h.

Constructor & Destructor Documentation

◆ MeshInformationElementVector()

ns3::MeshInformationElementVector::MeshInformationElementVector ( )

Definition at line 43 of file mesh-information-element-vector.cc.

◆ ~MeshInformationElementVector()

ns3::MeshInformationElementVector::~MeshInformationElementVector ( )
override

Definition at line 48 of file mesh-information-element-vector.cc.

References m_elements.

Member Function Documentation

◆ AddInformationElement()

bool ns3::MeshInformationElementVector::AddInformationElement ( Ptr< WifiInformationElement element)

add an IE, if maxSize has exceeded, returns false

Parameters
elementwifi information element to add
Returns
true is added

Definition at line 188 of file mesh-information-element-vector.cc.

References 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().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Begin()

MeshInformationElementVector::Iterator ns3::MeshInformationElementVector::Begin ( )

Returns Begin of the vector.

Returns
the begin of the vector

Definition at line 176 of file mesh-information-element-vector.cc.

References m_elements.

Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().

+ Here is the caller graph for this function:

◆ Deserialize() [1/2]

uint32_t ns3::MeshInformationElementVector::Deserialize ( Buffer::Iterator  start)
overridevirtual
Attention
This variant should not be used but is implemented due to backward compatibility reasons
Parameters
startbuffer location to start deserializing from
Returns
number of bytes deserialized

Implements ns3::Header.

Definition at line 89 of file mesh-information-element-vector.cc.

References NS_FATAL_ERROR.

◆ Deserialize() [2/2]

uint32_t ns3::MeshInformationElementVector::Deserialize ( Buffer::Iterator  start,
Buffer::Iterator  end 
)
overridevirtual

Deserialize a number of WifiInformationElements.

The size of this Header should equal start.GetDistanceFrom (end).

Parameters
startstarting buffer location
endending buffer location
Returns
number of bytes deserialized

Reimplemented from ns3::Chunk.

Definition at line 96 of file mesh-information-element-vector.cc.

References DeserializeSingleIe(), NS_ASSERT, and NS_ASSERT_MSG.

+ Here is the call graph for this function:

◆ DeserializeSingleIe()

uint32_t ns3::MeshInformationElementVector::DeserializeSingleIe ( Buffer::Iterator  start)

Needed when you try to deserialize a lonely IE inside other header.

Parameters
startis the start of the buffer
Returns
deserialized bytes

Definition at line 112 of file mesh-information-element-vector.cc.

References ns3::Buffer::Iterator::GetDistanceFrom(), GetSize(), IE11S_MESH_PEERING_PROTOCOL_VERSION, IE_BEACON_TIMING, IE_MESH_CONFIGURATION, IE_MESH_ID, IE_MESH_LINK_METRIC_REPORT, IE_MESH_PEERING_MANAGEMENT, IE_PERR, IE_PREP, IE_PREQ, IE_RANN, m_elements, m_maxSize, NS_FATAL_ERROR, ns3::Buffer::Iterator::Prev(), and ns3::Buffer::Iterator::ReadU8().

Referenced by Deserialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ End()

MeshInformationElementVector::Iterator ns3::MeshInformationElementVector::End ( )

Returns End of the vector.

Returns
the end of the vector

Definition at line 182 of file mesh-information-element-vector.cc.

References m_elements.

Referenced by ns3::dot11s::HwmpProtocolMac::ReceiveAction().

+ Here is the caller graph for this function:

◆ FindFirst()

Ptr< WifiInformationElement > ns3::MeshInformationElementVector::FindFirst ( WifiInformationElementId  id) const

vector of pointers to information elements is the body of IeVector

Parameters
idthe element id to find
Returns
the information element

Definition at line 199 of file mesh-information-element-vector.cc.

References m_elements.

Referenced by ns3::dot11s::PeerManagementProtocolMac::Receive().

+ Here is the caller graph for this function:

◆ GetInstanceTypeId()

TypeId ns3::MeshInformationElementVector::GetInstanceTypeId ( ) const
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.

Returns
The TypeId associated to the most-derived type of this instance.

Implements ns3::ObjectBase.

Definition at line 68 of file mesh-information-element-vector.cc.

References GetTypeId().

+ Here is the call graph for this function:

◆ GetSerializedSize()

uint32_t ns3::MeshInformationElementVector::GetSerializedSize ( ) const
overridevirtual
Returns
the expected size of the header.

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 74 of file mesh-information-element-vector.cc.

References GetSize().

Referenced by MeshInformationElementVectorBist::DoRun().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetSize()

uint32_t ns3::MeshInformationElementVector::GetSize ( ) const
protected

Current number of bytes.

Returns
the number of bytes

Definition at line 212 of file mesh-information-element-vector.cc.

References m_elements.

Referenced by AddInformationElement(), DeserializeSingleIe(), and GetSerializedSize().

+ Here is the caller graph for this function:

◆ GetTypeId()

TypeId ns3::MeshInformationElementVector::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 58 of file mesh-information-element-vector.cc.

References ns3::TypeId::SetParent().

Referenced by GetInstanceTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ operator==()

bool ns3::MeshInformationElementVector::operator== ( const MeshInformationElementVector a) const
virtual

Check if the given WifiInformationElementVectors are equivalent.

Parameters
aanother WifiInformationElementVector
Returns
true if the given WifiInformationElementVectors are equivalent, false otherwise

Definition at line 223 of file mesh-information-element-vector.cc.

References m_elements, and NS_ASSERT.

◆ Print()

void ns3::MeshInformationElementVector::Print ( std::ostream &  os) const
overridevirtual
Parameters
osoutput 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 165 of file mesh-information-element-vector.cc.

References m_elements.

◆ Serialize()

void ns3::MeshInformationElementVector::Serialize ( Buffer::Iterator  start) const
overridevirtual
Parameters
startan 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 80 of file mesh-information-element-vector.cc.

References m_elements.

Member Data Documentation

◆ m_elements

IE_VECTOR ns3::MeshInformationElementVector::m_elements
protected

◆ m_maxSize

uint16_t ns3::MeshInformationElementVector::m_maxSize
protected

Size in bytes (actually, max packet length)

Definition at line 135 of file mesh-information-element-vector.h.

Referenced by AddInformationElement(), and DeserializeSingleIe().


The documentation for this class was generated from the following files: