5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
Loading...
Searching...
No Matches
ns3::TrafficGenerator Class Referenceabstract
+ Inheritance diagram for ns3::TrafficGenerator:
+ Collaboration diagram for ns3::TrafficGenerator:

Public Types

typedef TracedCallback< Ptr< const Packet > > TxTracedCallback
 Traced Callback: sent packets.
 

Public Member Functions

int64_t AssignStreams (int64_t stream) override
 
Ptr< Socket > GetSocket () const
 Get the socket this application is attached to.
 
uint64_t GetTotalBytes () const
 Get the total number of bytes that have been sent during this object's lifetime.
 
uint64_t GetTotalPackets () const
 Get the total number of packets that have been sent during this object's lifetime.
 
bool SendPacketBurst ()
 Send another packet burst, which can be e.g., a file, or a video frame.
 
void SetPacketSize (uint32_t packetSize)
 Sets the packet size.
 
void SetProtocol (TypeId protocol)
 Sets the protocol.
 
void SetRemote (Address remote)
 Sets the remote address.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Get the type ID.
 

Public Attributes

TxTracedCallback m_txTrace
 

Protected Member Functions

void DoDispose () override
 
void DoInitialize () override
 
uint32_t GetPacketBurstSizeInBytes () const
 
uint32_t GetPacketBurstSizeInPackets () const
 
Address GetPeer () const
 
uint16_t GetTgId () const
 
void SetPacketBurstSizeInBytes (uint32_t burstSize)
 
void SetPacketBurstSizeInPackets (uint32_t burstSize)
 
void StopApplication () override
 

Detailed Description

Definition at line 38 of file traffic-generator.h.

Member Typedef Documentation

◆ TxTracedCallback

typedef TracedCallback<Ptr<const Packet> > ns3::TrafficGenerator::TxTracedCallback

Traced Callback: sent packets.

Definition at line 95 of file traffic-generator.h.

Constructor & Destructor Documentation

◆ TrafficGenerator()

ns3::TrafficGenerator::TrafficGenerator ( )

Definition at line 38 of file traffic-generator.cc.

◆ ~TrafficGenerator()

ns3::TrafficGenerator::~TrafficGenerator ( )
override

Definition at line 52 of file traffic-generator.cc.

Member Function Documentation

◆ AssignStreams()

int64_t ns3::TrafficGenerator::AssignStreams ( int64_t  stream)
override

Assign a fixed random variable stream number to the random variables used by this model. Return the number of streams (possibly zero) that have been assigned.

Parameters
streamfirst stream index to use
Returns
the number of stream indices assigned by this model

Definition at line 442 of file traffic-generator.cc.

◆ DoDispose()

void ns3::TrafficGenerator::DoDispose ( )
overrideprotected

Definition at line 87 of file traffic-generator.cc.

◆ DoInitialize()

void ns3::TrafficGenerator::DoInitialize ( )
overrideprotected

Definition at line 96 of file traffic-generator.cc.

◆ GetPacketBurstSizeInBytes()

uint32_t ns3::TrafficGenerator::GetPacketBurstSizeInBytes ( ) const
protected

Definition at line 236 of file traffic-generator.cc.

◆ GetPacketBurstSizeInPackets()

uint32_t ns3::TrafficGenerator::GetPacketBurstSizeInPackets ( ) const
protected

Definition at line 242 of file traffic-generator.cc.

◆ GetPeer()

Address ns3::TrafficGenerator::GetPeer ( ) const
protected

Definition at line 436 of file traffic-generator.cc.

◆ GetSocket()

Ptr< Socket > ns3::TrafficGenerator::GetSocket ( ) const

Get the socket this application is attached to.

Returns
pointer to associated socket

Definition at line 72 of file traffic-generator.cc.

◆ GetTgId()

uint16_t ns3::TrafficGenerator::GetTgId ( ) const
protected

Definition at line 430 of file traffic-generator.cc.

◆ GetTotalBytes()

uint64_t ns3::TrafficGenerator::GetTotalBytes ( ) const

Get the total number of bytes that have been sent during this object's lifetime.

return the total number of bytes that have been sent

Definition at line 58 of file traffic-generator.cc.

◆ GetTotalPackets()

uint64_t ns3::TrafficGenerator::GetTotalPackets ( ) const

Get the total number of packets that have been sent during this object's lifetime.

return the total number of packets that have been sent

Definition at line 65 of file traffic-generator.cc.

◆ GetTypeId()

TypeId ns3::TrafficGenerator::GetTypeId ( )
static

Get the type ID.

Returns
the object TypeId

Definition at line 31 of file traffic-generator.cc.

◆ SendPacketBurst()

bool ns3::TrafficGenerator::SendPacketBurst ( )

Send another packet burst, which can be e.g., a file, or a video frame.

return true if another packet burst was started; false if the request didn't succeed (possibly because another transfer is ongoing)

Definition at line 103 of file traffic-generator.cc.

◆ SetPacketBurstSizeInBytes()

void ns3::TrafficGenerator::SetPacketBurstSizeInBytes ( uint32_t  burstSize)
protected

Definition at line 224 of file traffic-generator.cc.

◆ SetPacketBurstSizeInPackets()

void ns3::TrafficGenerator::SetPacketBurstSizeInPackets ( uint32_t  burstSize)
protected

Definition at line 230 of file traffic-generator.cc.

◆ SetProtocol()

◆ SetRemote()

◆ StopApplication()

void ns3::TrafficGenerator::StopApplication ( )
overrideprotected

Definition at line 189 of file traffic-generator.cc.

Member Data Documentation

◆ m_txTrace

TxTracedCallback ns3::TrafficGenerator::m_txTrace

Definition at line 96 of file traffic-generator.h.


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