A Discrete-Event Network Simulator
API
ns3::PacketTagIterator::Item Class Reference

Identifies a packet tag within a packet. More...

#include "packet.h"

+ Collaboration diagram for ns3::PacketTagIterator::Item:

Public Member Functions

void GetTag (Tag &tag) const
 Read the requested tag and store it in the user-provided tag instance. More...
 
TypeId GetTypeId (void) const
 

Private Member Functions

 Item (const struct PacketTagList::TagData *data)
 Constructor. More...
 

Private Attributes

const struct PacketTagList::TagDatam_data
 the tag data More...
 

Friends

class PacketTagIterator
 Friend class. More...
 

Detailed Description

Identifies a packet tag within a packet.

Definition at line 137 of file packet.h.

Constructor & Destructor Documentation

◆ Item()

ns3::PacketTagIterator::Item::Item ( const struct PacketTagList::TagData data)
private

Constructor.

Parameters
datathe data to copy.

Definition at line 102 of file packet.cc.

Member Function Documentation

◆ GetTag()

void ns3::PacketTagIterator::Item::GetTag ( Tag tag) const

Read the requested tag and store it in the user-provided tag instance.

Parameters
tagthe user tag to which the data should be copied.

This method will crash if the type of the tag provided by the user does not match the type of the underlying tag.

Definition at line 112 of file packet.cc.

References ns3::Tag::Deserialize(), ns3::ObjectBase::GetInstanceTypeId(), and NS_ASSERT.

Referenced by ns3::Packet::PrintPacketTags().

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

◆ GetTypeId()

TypeId ns3::PacketTagIterator::Item::GetTypeId ( void  ) const
Returns
the ns3::TypeId associated to this tag.

Definition at line 107 of file packet.cc.

Referenced by ns3::Packet::PrintPacketTags().

+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ PacketTagIterator

friend class PacketTagIterator
friend

Friend class.

Definition at line 155 of file packet.h.

Member Data Documentation

◆ m_data

const struct PacketTagList::TagData* ns3::PacketTagIterator::Item::m_data
private

the tag data

Definition at line 161 of file packet.h.


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