Creates pre-defined trafics. More...
#include "satellite-traffic-helper.h"
Classes | |
struct | CustomTrafficInfo_s |
Struct for info on last custom trafic created. More... | |
Public Types | |
enum | TrafficDirection_t { RTN_LINK , FWD_LINK } |
enum | TrafficType_t { CBR , HTTP , NRTV , CUSTOM , POISSON , VISIO , VOIP } |
List of available traffics. More... | |
enum | VoipCodec_t { G_711_1 , G_711_2 , G_723_1 , G_729_2 , G_729_3 } |
Public Member Functions | |
SatTrafficHelper () | |
Default constructor. More... | |
SatTrafficHelper (Ptr< SatHelper > satHelper, Ptr< SatStatsHelperContainer > satStatsHelperContainer) | |
Create a base SatTrafficHelper for creating customized traffics. More... | |
virtual | ~SatTrafficHelper () |
Destructor for SatTrafficHelper. More... | |
void | AddCbrTraffic (TrafficDirection_t direction, std::string interval, uint32_t packetSize, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new UDP/CBR traffic between chosen GWs and UTs. More... | |
void | AddCustomTraffic (TrafficDirection_t direction, std::string interval, uint32_t packetSize, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new CBR traffic between chosen GWs and UTs that can be customized. More... | |
void | AddHttpTraffic (TrafficDirection_t direction, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new TCP/HTTP traffic between chosen GWs and UTs. More... | |
void | AddNrtvTraffic (TrafficDirection_t direction, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new TCP/NRTV traffic between chosen GWs and UTs. More... | |
void | AddPoissonTraffic (TrafficDirection_t direction, Time onTime, Time offTimeExpMean, std::string rate, uint32_t packetSize, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new Poisson traffic between chosen GWs and UTs. More... | |
void | AddVoipTraffic (TrafficDirection_t direction, VoipCodec_t codec, NodeContainer gws, NodeContainer uts, Time startTime, Time stopTime, Time startDelay) |
Add a new Poisson traffic between chosen GWs and UTs. More... | |
void | ChangeCustomTraffic (Time delay, std::string interval, uint32_t packetSize) |
Change the parameters of the last custom traffic created. More... | |
TypeId | GetInstanceTypeId (void) const |
Get the type ID of object instance. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
Get the type ID. More... | |
Private Member Functions | |
bool | HasSinkInstalled (Ptr< Node > node, uint16_t port) |
Check if node has a PacketSink installed at certain port. More... | |
void | UpdateAttribute (Ptr< CbrApplication > application, std::string interval, uint32_t packetSize) |
Update the chosen attribute of a custom traffic. More... | |
Private Attributes | |
CustomTrafficInfo_s | m_last_custom_application |
Ptr< SatHelper > | m_satHelper |
Ptr< SatStatsHelperContainer > | m_satStatsHelperContainer |
Creates pre-defined trafics.
Use SatUserHelper and SatBeamHelper helper objects. TODO update
Definition at line 39 of file satellite-traffic-helper.h.
Enumerator | |
---|---|
RTN_LINK | |
FWD_LINK |
Definition at line 65 of file satellite-traffic-helper.h.
List of available traffics.
Enumerator | |
---|---|
CBR | |
HTTP | |
NRTV | |
CUSTOM | |
POISSON | |
VISIO | |
VOIP |
Definition at line 45 of file satellite-traffic-helper.h.
Enumerator | |
---|---|
G_711_1 | |
G_711_2 | |
G_723_1 | |
G_729_2 | |
G_729_3 |
Definition at line 56 of file satellite-traffic-helper.h.
ns3::SatTrafficHelper::SatTrafficHelper | ( | ) |
ns3::SatTrafficHelper::SatTrafficHelper | ( | Ptr< SatHelper > | satHelper, |
Ptr< SatStatsHelperContainer > | satStatsHelperContainer | ||
) |
Create a base SatTrafficHelper for creating customized traffics.
Definition at line 64 of file satellite-traffic-helper.cc.
References ns3::SatTrafficHelper::CustomTrafficInfo_s::created, and m_last_custom_application.
|
inlinevirtual |
Destructor for SatTrafficHelper.
Definition at line 97 of file satellite-traffic-helper.h.
void ns3::SatTrafficHelper::AddCbrTraffic | ( | TrafficDirection_t | direction, |
std::string | interval, | ||
uint32_t | packetSize, | ||
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new UDP/CBR traffic between chosen GWs and UTs.
direction | Direction of traffic |
interval | Wait time between transmission of two packets |
packetSize | Packet size in bytes |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 73 of file satellite-traffic-helper.cc.
References FWD_LINK, HasSinkInstalled(), m_satHelper, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and RTN_LINK.
void ns3::SatTrafficHelper::AddCustomTraffic | ( | TrafficDirection_t | direction, |
std::string | interval, | ||
uint32_t | packetSize, | ||
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new CBR traffic between chosen GWs and UTs that can be customized.
direction | Direction of traffic |
interval | Initial wait time between transmission of two packets |
packetSize | Packet size in bytes |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 948 of file satellite-traffic-helper.cc.
References ns3::SatTrafficHelper::CustomTrafficInfo_s::application, ns3::SatTrafficHelper::CustomTrafficInfo_s::created, FWD_LINK, HasSinkInstalled(), m_last_custom_application, m_satHelper, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, RTN_LINK, ns3::SatTrafficHelper::CustomTrafficInfo_s::start, and ns3::SatTrafficHelper::CustomTrafficInfo_s::stop.
void ns3::SatTrafficHelper::AddHttpTraffic | ( | TrafficDirection_t | direction, |
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new TCP/HTTP traffic between chosen GWs and UTs.
direction | Direction of traffic |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 234 of file satellite-traffic-helper.cc.
References FWD_LINK, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and RTN_LINK.
void ns3::SatTrafficHelper::AddNrtvTraffic | ( | TrafficDirection_t | direction, |
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new TCP/NRTV traffic between chosen GWs and UTs.
direction | Direction of traffic |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 384 of file satellite-traffic-helper.cc.
References FWD_LINK, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, and RTN_LINK.
void ns3::SatTrafficHelper::AddPoissonTraffic | ( | TrafficDirection_t | direction, |
Time | onTime, | ||
Time | offTimeExpMean, | ||
std::string | rate, | ||
uint32_t | packetSize, | ||
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new Poisson traffic between chosen GWs and UTs.
direction | Direction of traffic |
onTime | On time duration in seconds |
offTimeExpMean | Off time mean in seconds. The off time follows an exponential law of mean offTimeExpMean |
rate | The rate with the unit |
packetSize | Packet size in bytes |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 516 of file satellite-traffic-helper.cc.
References FWD_LINK, HasSinkInstalled(), ns3::SatOnOffHelper::Install(), m_satHelper, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, RTN_LINK, and ns3::SatOnOffHelper::SetAttribute().
void ns3::SatTrafficHelper::AddVoipTraffic | ( | TrafficDirection_t | direction, |
VoipCodec_t | codec, | ||
NodeContainer | gws, | ||
NodeContainer | uts, | ||
Time | startTime, | ||
Time | stopTime, | ||
Time | startDelay | ||
) |
Add a new Poisson traffic between chosen GWs and UTs.
direction | Direction of traffic |
codec | the Codec used |
gws | The Gateways |
uts | The User Terminals |
startTime | Application Start time |
stopTime | Application stop time |
startDelay | application start delay between each user |
Definition at line 700 of file satellite-traffic-helper.cc.
References FWD_LINK, G_711_1, G_711_2, G_723_1, G_729_2, G_729_3, HasSinkInstalled(), ns3::SatOnOffHelper::Install(), m_satHelper, m_satStatsHelperContainer, ns3::SatStatsHelper::OUTPUT_SCALAR_FILE, ns3::SatStatsHelper::OUTPUT_SCATTER_FILE, RTN_LINK, and ns3::SatOnOffHelper::SetAttribute().
void ns3::SatTrafficHelper::ChangeCustomTraffic | ( | Time | delay, |
std::string | interval, | ||
uint32_t | packetSize | ||
) |
Change the parameters of the last custom traffic created.
delay | Delay after traffic launch to apply the changes |
interval | New wait time between transmission of two packets |
packetSize | New packet size in bytes |
Definition at line 1124 of file satellite-traffic-helper.cc.
References ns3::SatTrafficHelper::CustomTrafficInfo_s::application, ns3::SatTrafficHelper::CustomTrafficInfo_s::created, m_last_custom_application, ns3::SatTrafficHelper::CustomTrafficInfo_s::start, ns3::SatTrafficHelper::CustomTrafficInfo_s::stop, and UpdateAttribute().
TypeId ns3::SatTrafficHelper::GetInstanceTypeId | ( | void | ) | const |
Get the type ID of object instance.
Definition at line 50 of file satellite-traffic-helper.cc.
References GetTypeId().
|
static |
Get the type ID.
Definition at line 42 of file satellite-traffic-helper.cc.
Referenced by GetInstanceTypeId().
|
private |
Check if node has a PacketSink installed at certain port.
Definition at line 1163 of file satellite-traffic-helper.cc.
Referenced by AddCbrTraffic(), AddCustomTraffic(), AddPoissonTraffic(), and AddVoipTraffic().
|
private |
Update the chosen attribute of a custom traffic.
application | The CBR application to update |
interval | The new interval |
packetSize | the new packet size |
Definition at line 1152 of file satellite-traffic-helper.cc.
Referenced by ChangeCustomTraffic().
|
private |
Definition at line 242 of file satellite-traffic-helper.h.
Referenced by SatTrafficHelper(), AddCustomTraffic(), and ChangeCustomTraffic().
|
private |
Definition at line 238 of file satellite-traffic-helper.h.
Referenced by AddCbrTraffic(), AddCustomTraffic(), AddPoissonTraffic(), and AddVoipTraffic().
|
private |
Definition at line 240 of file satellite-traffic-helper.h.
Referenced by AddCbrTraffic(), AddCustomTraffic(), AddHttpTraffic(), AddNrtvTraffic(), AddPoissonTraffic(), and AddVoipTraffic().