A Discrete-Event Network Simulator
API
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
ns3::ByteTagList::Iterator Class Reference

An iterator for iterating through a byte tag list. More...

#include "byte-tag-list.h"

Classes

struct  Item
 An item specifies an individual tag within a byte buffer. More...
 

Public Member Functions

uint32_t GetOffsetStart (void) const
 Returns the offset from the start of the virtual byte buffer to the ByteTagList. More...
 
bool HasNext (void) const
 Used to determine if the iterator is at the end of the byteTagList. More...
 
struct ByteTagList::Iterator::Item Next (void)
 Returns the next Item from the ByteTagList. More...
 

Private Member Functions

 Iterator (uint8_t *start, uint8_t *end, int32_t offsetStart, int32_t offsetEnd, int32_t adjustment)
 Constructor. More...
 
void PrepareForNext (void)
 Prepare the iterator for the next tag. More...
 

Private Attributes

int32_t m_adjustment
 Adjustment to byte tag offsets. More...
 
uint8_t * m_current
 Current tag. More...
 
uint8_t * m_end
 End tag. More...
 
int32_t m_nextEnd
 End of the next tag. More...
 
uint32_t m_nextSize
 Size of the next tag. More...
 
int32_t m_nextStart
 Start of the next tag. More...
 
uint32_t m_nextTid
 TypeId of the next tag. More...
 
int32_t m_offsetEnd
 Offset to the end of the tag from the virtual byte buffer. More...
 
int32_t m_offsetStart
 Offset to the start of the tag from the virtual byte buffer. More...
 

Friends

class ByteTagList
 Friend class. More...
 

Detailed Description

An iterator for iterating through a byte tag list.

An iterator for iterating through a byte tag list

Definition at line 72 of file byte-tag-list.h.

Constructor & Destructor Documentation

◆ Iterator()

ns3::ByteTagList::Iterator::Iterator ( uint8_t *  start,
uint8_t *  end,
int32_t  offsetStart,
int32_t  offsetEnd,
int32_t  adjustment 
)
private

Constructor.

Parameters
startStarting tag
endEnd tag
offsetStartoffset to the start of the tag from the virtual byte buffer
offsetEndoffset to the end of the tag from the virtual byte buffer
adjustmentadjustment to byte tag offsets

Definition at line 122 of file byte-tag-list.cc.

References NS_LOG_FUNCTION, PrepareForNext(), and visualizer.core::start().

Member Function Documentation

◆ GetOffsetStart()

uint32_t ns3::ByteTagList::Iterator::GetOffsetStart ( void  ) const

Returns the offset from the start of the virtual byte buffer to the ByteTagList.

Returns
offset to the start of this ByteTagList

Definition at line 134 of file byte-tag-list.cc.

References NS_LOG_FUNCTION.

Referenced by ns3::ByteTagIterator::Next().

◆ HasNext()

bool ns3::ByteTagList::Iterator::HasNext ( void  ) const

Used to determine if the iterator is at the end of the byteTagList.

Returns
true if there are more Items in the list

Definition at line 82 of file byte-tag-list.cc.

References m_current, m_end, and NS_LOG_FUNCTION.

Referenced by ns3::ByteTagList::Add(), ns3::ByteTagList::AddAtEnd(), ns3::ByteTagList::AddAtStart(), ns3::ByteTagIterator::HasNext(), and Next().

◆ Next()

struct ByteTagList::Iterator::Item ns3::ByteTagList::Iterator::Next ( void  )

◆ PrepareForNext()

void ns3::ByteTagList::Iterator::PrepareForNext ( void  )
private

Prepare the iterator for the next tag.

Definition at line 102 of file byte-tag-list.cc.

References m_adjustment, m_current, m_end, m_nextEnd, m_nextSize, m_nextStart, m_nextTid, m_offsetEnd, m_offsetStart, NS_LOG_FUNCTION, and ns3::TagBuffer::ReadU32().

Referenced by Iterator(), and Next().

Friends And Related Function Documentation

◆ ByteTagList

friend class ByteTagList
friend

Friend class.

Definition at line 121 of file byte-tag-list.h.

Member Data Documentation

◆ m_adjustment

int32_t ns3::ByteTagList::Iterator::m_adjustment
private

Adjustment to byte tag offsets.

Definition at line 141 of file byte-tag-list.h.

Referenced by PrepareForNext().

◆ m_current

uint8_t* ns3::ByteTagList::Iterator::m_current
private

Current tag.

Definition at line 137 of file byte-tag-list.h.

Referenced by HasNext(), Next(), and PrepareForNext().

◆ m_end

uint8_t* ns3::ByteTagList::Iterator::m_end
private

End tag.

Definition at line 138 of file byte-tag-list.h.

Referenced by HasNext(), Next(), and PrepareForNext().

◆ m_nextEnd

int32_t ns3::ByteTagList::Iterator::m_nextEnd
private

End of the next tag.

Definition at line 145 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

◆ m_nextSize

uint32_t ns3::ByteTagList::Iterator::m_nextSize
private

Size of the next tag.

Definition at line 143 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

◆ m_nextStart

int32_t ns3::ByteTagList::Iterator::m_nextStart
private

Start of the next tag.

Definition at line 144 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

◆ m_nextTid

uint32_t ns3::ByteTagList::Iterator::m_nextTid
private

TypeId of the next tag.

Definition at line 142 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

◆ m_offsetEnd

int32_t ns3::ByteTagList::Iterator::m_offsetEnd
private

Offset to the end of the tag from the virtual byte buffer.

Definition at line 140 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().

◆ m_offsetStart

int32_t ns3::ByteTagList::Iterator::m_offsetStart
private

Offset to the start of the tag from the virtual byte buffer.

Definition at line 139 of file byte-tag-list.h.

Referenced by Next(), and PrepareForNext().


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