A Discrete-Event Network Simulator
API
ns3::PbbAddressTlvBlock Class Reference

A block of Address TLVs (PbbAddressTlv). More...

#include "packetbb.h"

+ Collaboration diagram for ns3::PbbAddressTlvBlock:

Public Types

typedef std::list< Ptr< PbbAddressTlv > >::const_iterator ConstIterator
 PbbAddressTlv const iterator for PbbAddressTlvBlock. More...
 
typedef std::list< Ptr< PbbAddressTlv > >::iterator Iterator
 PbbAddressTlv iterator for PbbAddressTlvBlock. More...
 

Public Member Functions

 PbbAddressTlvBlock ()
 
 ~PbbAddressTlvBlock ()
 
Ptr< PbbAddressTlvBack () const
 
Iterator Begin ()
 
ConstIterator Begin () const
 
void Clear ()
 Removes all Address TLVs from this block. More...
 
void Deserialize (Buffer::Iterator &start)
 Deserializes a block from the specified buffer. More...
 
bool Empty () const
 
Iterator End ()
 
ConstIterator End () const
 
Iterator Erase (Iterator first, Iterator last)
 Removes all Address TLVs from [first, last) (includes first, not includes last). More...
 
Iterator Erase (Iterator position)
 Removes the Address TLV at the specified position. More...
 
Ptr< PbbAddressTlvFront () const
 
uint32_t GetSerializedSize () const
 
Iterator Insert (Iterator position, const Ptr< PbbAddressTlv > tlv)
 Inserts an Address TLV at the specified position in this block. More...
 
bool operator!= (const PbbAddressTlvBlock &other) const
 Inequality operator for PbbAddressTlvBlock. More...
 
bool operator== (const PbbAddressTlvBlock &other) const
 Equality operator for PbbAddressTlvBlock. More...
 
void PopBack ()
 Removes an Address TLV from the back of this block. More...
 
void PopFront ()
 Removes an AddressTLV from the front of this block. More...
 
void Print (std::ostream &os) const
 Pretty-prints the contents of this block. More...
 
void Print (std::ostream &os, int level) const
 Pretty-prints the contents of this block, with specified indentation. More...
 
void PushBack (Ptr< PbbAddressTlv > tlv)
 Appends an Address TLV to the back of this block. More...
 
void PushFront (Ptr< PbbAddressTlv > tlv)
 Prepends an Address TLV to the front of this block. More...
 
void Serialize (Buffer::Iterator &start) const
 Serializes this block into the specified buffer. More...
 
int Size () const
 

Private Attributes

std::list< Ptr< PbbAddressTlv > > m_tlvList
 PbbAddressTlv container. More...
 

Detailed Description

A block of Address TLVs (PbbAddressTlv).

Acts similar to a C++ STL container.

Definition at line 220 of file packetbb.h.

Member Typedef Documentation

◆ ConstIterator

PbbAddressTlv const iterator for PbbAddressTlvBlock.

Definition at line 226 of file packetbb.h.

◆ Iterator

PbbAddressTlv iterator for PbbAddressTlvBlock.

Definition at line 224 of file packetbb.h.

Constructor & Destructor Documentation

◆ PbbAddressTlvBlock()

ns3::PbbAddressTlvBlock::PbbAddressTlvBlock ( )

Definition at line 304 of file packetbb.cc.

References NS_LOG_FUNCTION.

◆ ~PbbAddressTlvBlock()

ns3::PbbAddressTlvBlock::~PbbAddressTlvBlock ( )

Definition at line 309 of file packetbb.cc.

References Clear(), and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Member Function Documentation

◆ Back()

Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Back ( ) const
Returns
the last AddressTLV in this block.

Definition at line 365 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvBack().

+ Here is the caller graph for this function:

◆ Begin() [1/2]

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Begin ( )
Returns
an iterator to the first Address TLV in this block.

Definition at line 316 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvBegin().

+ Here is the caller graph for this function:

◆ Begin() [2/2]

PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::Begin ( ) const
Returns
a const iterator to the first Address TLV in this block.

Definition at line 323 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

◆ Clear()

void ns3::PbbAddressTlvBlock::Clear ( )

Removes all Address TLVs from this block.

Definition at line 421 of file packetbb.cc.

References Begin(), End(), m_tlvList, and NS_LOG_FUNCTION.

Referenced by ~PbbAddressTlvBlock(), and ns3::PbbAddressBlock::TlvClear().

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

◆ Deserialize()

void ns3::PbbAddressTlvBlock::Deserialize ( Buffer::Iterator start)

Deserializes a block from the specified buffer.

Parameters
starta reference to the point in a buffer to begin deserializing.

Users should not need to call this. Blocks will be deserialized by their containing packet.

Definition at line 468 of file packetbb.cc.

References NS_LOG_FUNCTION, PushBack(), and two-ray-to-three-gpp-ch-calibration::start.

Referenced by ns3::PbbAddressBlock::Deserialize().

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

◆ Empty()

bool ns3::PbbAddressTlvBlock::Empty ( ) const
Returns
true if there are no Address TLVs in this block, false otherwise.

Definition at line 351 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by Serialize(), and ns3::PbbAddressBlock::TlvEmpty().

+ Here is the caller graph for this function:

◆ End() [1/2]

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::End ( )
Returns
an iterator to the past-the-end element in this block.

Definition at line 330 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by Clear(), GetSerializedSize(), operator==(), Print(), Serialize(), and ns3::PbbAddressBlock::TlvEnd().

+ Here is the caller graph for this function:

◆ End() [2/2]

PbbAddressTlvBlock::ConstIterator ns3::PbbAddressTlvBlock::End ( ) const
Returns
a const iterator to the past-the-end element in this block.

Definition at line 337 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

◆ Erase() [1/2]

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase ( PbbAddressTlvBlock::Iterator  first,
PbbAddressTlvBlock::Iterator  last 
)

Removes all Address TLVs from [first, last) (includes first, not includes last).

Parameters
firstan Iterator pointing to the first Address TLV to erase (inclusive).
lastan Iterator pointing to the element past the last Address TLV to erase.
Returns
an iterator pointing to the next Address TLV in the block.

Definition at line 414 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

◆ Erase() [2/2]

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Erase ( PbbAddressTlvBlock::Iterator  position)

Removes the Address TLV at the specified position.

Parameters
positionan Iterator pointing to the Address TLV to erase.
Returns
an iterator pointing to the next Address TLV in the block.

Definition at line 407 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvErase().

+ Here is the caller graph for this function:

◆ Front()

Ptr< PbbAddressTlv > ns3::PbbAddressTlvBlock::Front ( ) const
Returns
the first Address TLV in this block.

Definition at line 358 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvFront().

+ Here is the caller graph for this function:

◆ GetSerializedSize()

uint32_t ns3::PbbAddressTlvBlock::GetSerializedSize ( ) const
Returns
The size (in bytes) needed to serialize this block.

Definition at line 432 of file packetbb.cc.

References Begin(), End(), and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::GetSerializedSize().

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

◆ Insert()

PbbAddressTlvBlock::Iterator ns3::PbbAddressTlvBlock::Insert ( PbbAddressTlvBlock::Iterator  position,
const Ptr< PbbAddressTlv tlv 
)

Inserts an Address TLV at the specified position in this block.

Parameters
positionan Iterator pointing to the position in this block to insert the Address TLV.
tlva smart pointer to the Address TLV to insert.
Returns
An iterator pointing to the newly inserted Address TLV.

Definition at line 400 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

◆ operator!=()

bool ns3::PbbAddressTlvBlock::operator!= ( const PbbAddressTlvBlock other) const

Inequality operator for PbbAddressTlvBlock.

Parameters
otherPbbAddressTlvBlock to compare to this one
Returns
true if PbbAddressTlvBlock are not equal

Definition at line 536 of file packetbb.cc.

◆ operator==()

bool ns3::PbbAddressTlvBlock::operator== ( const PbbAddressTlvBlock other) const

Equality operator for PbbAddressTlvBlock.

Parameters
otherPbbAddressTlvBlock to compare to this one
Returns
true if PbbAddressTlvBlock are equal

Definition at line 516 of file packetbb.cc.

References Begin(), End(), and Size().

+ Here is the call graph for this function:

◆ PopBack()

void ns3::PbbAddressTlvBlock::PopBack ( )

Removes an Address TLV from the back of this block.

Definition at line 393 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvPopBack().

+ Here is the caller graph for this function:

◆ PopFront()

void ns3::PbbAddressTlvBlock::PopFront ( )

Removes an AddressTLV from the front of this block.

Definition at line 379 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvPopFront().

+ Here is the caller graph for this function:

◆ Print() [1/2]

void ns3::PbbAddressTlvBlock::Print ( std::ostream &  os) const

Pretty-prints the contents of this block.

Parameters
osa stream object to print to.

Definition at line 486 of file packetbb.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::Print().

+ Here is the caller graph for this function:

◆ Print() [2/2]

void ns3::PbbAddressTlvBlock::Print ( std::ostream &  os,
int  level 
) const

Pretty-prints the contents of this block, with specified indentation.

Parameters
osa stream object to print to.
levellevel of indentation.

This probably never needs to be called by users. This is used when recursively printing sub-objects.

Definition at line 493 of file packetbb.cc.

References Begin(), End(), NS_LOG_FUNCTION, and Size().

+ Here is the call graph for this function:

◆ PushBack()

void ns3::PbbAddressTlvBlock::PushBack ( Ptr< PbbAddressTlv tlv)

Appends an Address TLV to the back of this block.

Parameters
tlva smart pointer to the Address TLV to append.

Definition at line 386 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by Deserialize(), and ns3::PbbAddressBlock::TlvPushBack().

+ Here is the caller graph for this function:

◆ PushFront()

void ns3::PbbAddressTlvBlock::PushFront ( Ptr< PbbAddressTlv tlv)

Prepends an Address TLV to the front of this block.

Parameters
tlva smart pointer to the Address TLV to prepend.

Definition at line 372 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by ns3::PbbAddressBlock::TlvPushFront().

+ Here is the caller graph for this function:

◆ Serialize()

void ns3::PbbAddressTlvBlock::Serialize ( Buffer::Iterator start) const

Serializes this block into the specified buffer.

Parameters
starta reference to the point in a buffer to begin serializing.

Users should not need to call this. Blocks will be serialized by their containing packet.

Definition at line 445 of file packetbb.cc.

References Begin(), Empty(), End(), NS_LOG_FUNCTION, two-ray-to-three-gpp-ch-calibration::start, and ns3::Buffer::Iterator::WriteHtonU16().

Referenced by ns3::PbbAddressBlock::Serialize().

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

◆ Size()

int ns3::PbbAddressTlvBlock::Size ( ) const
Returns
the number of Address TLVs in this block.

Definition at line 344 of file packetbb.cc.

References m_tlvList, and NS_LOG_FUNCTION.

Referenced by operator==(), Print(), and ns3::PbbAddressBlock::TlvSize().

+ Here is the caller graph for this function:

Member Data Documentation

◆ m_tlvList

std::list<Ptr<PbbAddressTlv> > ns3::PbbAddressTlvBlock::m_tlvList
private

PbbAddressTlv container.

Definition at line 379 of file packetbb.h.

Referenced by Back(), Begin(), Clear(), Empty(), End(), Erase(), Front(), Insert(), PopBack(), PopFront(), PushBack(), PushFront(), and Size().


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