![]() |
5G-LENA nr-v3.3-159-ga6832aa7
The 5G/NR module for the ns-3 simulator
|
#include "traffic-generator-ngmn-voip.h"
Public Types | |
enum | VoipState { INACTIVE_STATE , ACTIVE_STATE } |
![]() | |
typedef TracedCallback< Ptr< const Packet > > | TxTracedCallback |
Traced Callback: sent packets. | |
Public Member Functions | |
int64_t | AssignStreams (int64_t stream) override |
![]() | |
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. | |
![]() | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
void | DoDispose () override |
void | DoInitialize () override |
![]() | |
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 |
Additional Inherited Members | |
![]() | |
TxTracedCallback | m_txTrace |
This class implements a traffic generator for the VoIP traffic. Follows the traffic gaming model for VOIP described in the Annex B of White Paper by the NGMN Alliance.
Basically, according to the NGMN document, the VOIP traffic can be modeled as a simple 2-state voice activity model. The states are:
In the model, the probability of transitioning from state 1 (the active speech state) to state 0 (the inactive or silent state) while in state 1 is equal to "a", while the probability of transitioning from state 0 to state 1 while in state 0 is "c". The model is assumed updated at the speech encoder frame rate R=1/T, where T is the encoder frame duration (typically, 20ms).
Clearly, a 2-state model is extremely simplistic, and many more complex models are available. However, it is amenable to rapid analysis and initial estimation of talk spurt arrival statistics and hence reservation activity/ The main purpose of this traffic model is not to favour any codec but to specify a model to obtain results which are comparable.
Definition at line 43 of file traffic-generator-ngmn-voip.h.
enum ns3::TrafficGeneratorNgmnVoip::VoipState |
Definition at line 56 of file traffic-generator-ngmn-voip.h.
ns3::TrafficGeneratorNgmnVoip::TrafficGeneratorNgmnVoip | ( | ) |
Definition at line 88 of file traffic-generator-ngmn-voip.cc.
|
override |
Definition at line 94 of file traffic-generator-ngmn-voip.cc.
|
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.
stream | first stream index to use |
Definition at line 218 of file traffic-generator-ngmn-voip.cc.
|
overrideprotected |
Definition at line 194 of file traffic-generator-ngmn-voip.cc.
|
overrideprotected |
Definition at line 204 of file traffic-generator-ngmn-voip.cc.
|
static |
Get the type ID.
Definition at line 30 of file traffic-generator-ngmn-voip.cc.
References ns3::TrafficGenerator::SetProtocol(), and ns3::TrafficGenerator::SetRemote().