satellite-traffic-helper.cc File Reference
#include "satellite-traffic-helper.h"
#include "satellite-on-off-helper.h"
#include "simulation-helper.h"
#include <ns3/cbr-helper.h>
#include <ns3/log.h>
#include <ns3/lora-periodic-sender.h>
#include <ns3/nrtv-helper.h>
#include <ns3/packet-sink-helper.h>
#include <ns3/packet-sink.h>
#include <ns3/satellite-topology.h>
#include <ns3/singleton.h>
#include <ns3/three-gpp-http-satellite-helper.h>
#include <ns3/type-id.h>
#include <string>
#include <utility>
#include <vector>
+ Include dependency graph for satellite-traffic-helper.cc:

Go to the source code of this file.

Namespaces

 ns3
 SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
 

Macros

#define SIM_ADD_TRAFFIC_MODEL_CODEC_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_DATA_RATE_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_DIRECTION_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_OFF_TIME_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_OFF_TIME_PATTERN_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_ON_TIME_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_ON_TIME_PATTERN_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_PROTOCOL_ATTRIBUTE(index, value)
 .SIM_ADD_TRAFFIC_MODEL_ATTRIBUTES macro helps defining specific attribute for traffic models in method GetTypeId. More...
 
#define SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(index, value)
 
#define SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(index, value)
 

Macro Definition Documentation

◆ SIM_ADD_TRAFFIC_MODEL_CODEC_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_CODEC_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "Codec", \
"Codec used for VoIP traffic", \
EnumValue(value), \
MakeEnumAccessor<SatTrafficHelper::VoipCodec_t>( \
&SatTrafficHelperConf::SetTraffic##index##Codec, \
&SatTrafficHelperConf::GetTraffic##index##Codec), \
MakeEnumChecker(SatTrafficHelper::G_711_1, \
"G_711_1", \
SatTrafficHelper::G_711_2, \
"G_711_2", \
SatTrafficHelper::G_723_1, \
"G_723_1", \
SatTrafficHelper::G_729_2, \
"G_729_2", \
SatTrafficHelper::G_729_3, \
"G_729_3"))
#define TOSTRING(x)

Definition at line 142 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_DATA_RATE_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_DATA_RATE_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "DataRate", \
"Data rate of traffic", \
DataRateValue(value), \
MakeDataRateAccessor(&SatTrafficHelperConf::SetTraffic##index##DataRate, \
&SatTrafficHelperConf::GetTraffic##index##DataRate), \
MakeDataRateChecker())

Definition at line 94 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_DIRECTION_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_DIRECTION_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "Direction", \
"Satellite link direction that this traffic model will use", \
EnumValue(value), \
MakeEnumAccessor<SatTrafficHelperConf::TrafficDirection_t>( \
&SatTrafficHelperConf::SetTraffic##index##Direction, \
&SatTrafficHelperConf::GetTraffic##index##Direction), \
MakeEnumChecker(SatTrafficHelperConf::RTN_LINK, \
"ReturnLink", \
SatTrafficHelperConf::FWD_LINK, \
"ForwardLink", \
SatTrafficHelperConf::BOTH_LINK, \
"BothLinks"))

Definition at line 72 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "Interval", \
"Interval between packets", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##Interval, \
&SatTrafficHelperConf::GetTraffic##index##Interval), \
MakeTimeChecker())

Definition at line 86 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_OFF_TIME_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_OFF_TIME_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "OffTime", \
"Off time value for Poisson traffic", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##OffTime, \
&SatTrafficHelperConf::GetTraffic##index##OffTime), \
MakeTimeChecker())

Definition at line 134 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_OFF_TIME_PATTERN_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_OFF_TIME_PATTERN_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "OffTimePattern", \
"Off time patter for on/off traffic", \
StringValue(value), \
MakeStringAccessor(&SatTrafficHelperConf::SetTraffic##index##OffTimePattern, \
&SatTrafficHelperConf::GetTraffic##index##OffTimePattern), \
MakeStringChecker())

Definition at line 118 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_ON_TIME_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_ON_TIME_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "OnTime", \
"On time value for Poisson traffic", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##OnTime, \
&SatTrafficHelperConf::GetTraffic##index##OnTime), \
MakeTimeChecker())

Definition at line 126 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_ON_TIME_PATTERN_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_ON_TIME_PATTERN_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "OnTimePattern", \
"On time patter for on/off traffic", \
StringValue(value), \
MakeStringAccessor(&SatTrafficHelperConf::SetTraffic##index##OnTimePattern, \
&SatTrafficHelperConf::GetTraffic##index##OnTimePattern), \
MakeStringChecker())

Definition at line 110 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "PacketSize", \
"Packet size in bytes", \
UintegerValue(value), \
MakeUintegerAccessor(&SatTrafficHelperConf::SetTraffic##index##PacketSize, \
&SatTrafficHelperConf::GetTraffic##index##PacketSize), \
MakeUintegerChecker<uint32_t>())

Definition at line 102 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "Percentage", \
"Percentage of final users that will use this traffic model", \
DoubleValue(value), \
MakeDoubleAccessor(&SatTrafficHelperConf::SetTraffic##index##Percentage, \
&SatTrafficHelperConf::GetTraffic##index##Percentage), \
MakeDoubleChecker<double>(0, 1))

Definition at line 185 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_PROTOCOL_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_PROTOCOL_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "Protocol", \
"Network protocol that this traffic model will use", \
EnumValue(value), \
MakeEnumAccessor<SatTrafficHelperConf::TransportLayerProtocol_t>( \
&SatTrafficHelperConf::SetTraffic##index##Protocol, \
&SatTrafficHelperConf::GetTraffic##index##Protocol), \
MakeEnumChecker(SatTrafficHelperConf::PROTOCOL_UDP, \
"UDP", \
SatTrafficHelperConf::PROTOCOL_TCP, \
"TCP", \
SatTrafficHelperConf::PROTOCOL_BOTH, \
"BOTH"))

.SIM_ADD_TRAFFIC_MODEL_ATTRIBUTES macro helps defining specific attribute for traffic models in method GetTypeId.

Parameters
indexName of the traffic model which attributes are added to the configuration.
valueAttribute value
Returns
TypeId

Definition at line 58 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "StartDelay", \
"Cummulative delay for each user before starting this traffic model", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##StartDelay, \
&SatTrafficHelperConf::GetTraffic##index##StartDelay), \
MakeTimeChecker())

Definition at line 177 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "StartTime", \
"Time into the simulation when this traffic model will be started on each user", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##StartTime, \
&SatTrafficHelperConf::GetTraffic##index##StartTime), \
MakeTimeChecker())

Definition at line 160 of file satellite-traffic-helper.cc.

◆ SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE

#define SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE (   index,
  value 
)
Value:
AddAttribute("Traffic" TOSTRING(index) "StopTime", \
"Time into the simulation when this traffic model will be stopped " \
"on each user. 0 means endless traffic generation.", \
TimeValue(value), \
MakeTimeAccessor(&SatTrafficHelperConf::SetTraffic##index##StopTime, \
&SatTrafficHelperConf::GetTraffic##index##StopTime), \
MakeTimeChecker())

Definition at line 168 of file satellite-traffic-helper.cc.