197 TypeId(
"ns3::SatTrafficHelperConf")
199 .AddConstructor<SatTrafficHelperConf>()
200 .SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE(LoraPeriodic, Seconds(1))
201 .SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(LoraPeriodic, 512)
202 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(LoraPeriodic, Seconds(0.1))
203 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(LoraPeriodic, Seconds(0))
204 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(LoraPeriodic, MilliSeconds(10))
205 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(LoraPeriodic, 0)
207 .SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE(LoraCbr, Seconds(1))
208 .SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(LoraCbr, 512)
209 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(LoraCbr, Seconds(0.1))
210 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(LoraCbr, Seconds(0))
211 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(LoraCbr, MilliSeconds(10))
212 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(LoraCbr, 0)
216 .SIM_ADD_TRAFFIC_MODEL_INTERVAL_ATTRIBUTE(Cbr, Seconds(1))
217 .SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(Cbr, 512)
218 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(Cbr, Seconds(0.1))
219 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(Cbr, Seconds(0))
220 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(Cbr, MilliSeconds(10))
221 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(Cbr, 1)
225 .SIM_ADD_TRAFFIC_MODEL_DATA_RATE_ATTRIBUTE(OnOff, DataRate(
"500kb/s"))
226 .SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(OnOff, 512)
227 .SIM_ADD_TRAFFIC_MODEL_ON_TIME_PATTERN_ATTRIBUTE(
229 "ns3::ConstantRandomVariable[Constant=1000]")
230 .SIM_ADD_TRAFFIC_MODEL_OFF_TIME_PATTERN_ATTRIBUTE(
232 "ns3::ConstantRandomVariable[Constant=0]")
233 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(OnOff, Seconds(0.1))
234 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(OnOff, Seconds(0))
235 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(OnOff, MilliSeconds(10))
236 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(OnOff, 0)
239 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(Http, Seconds(0.1))
240 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(Http, Seconds(0))
241 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(Http, MilliSeconds(10))
242 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(Http, 0)
245 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(Nrtv, Seconds(0.1))
246 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(Nrtv, Seconds(0))
247 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(Nrtv, MilliSeconds(10))
248 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(Nrtv, 0)
251 .SIM_ADD_TRAFFIC_MODEL_ON_TIME_ATTRIBUTE(Poisson, Seconds(1))
252 .SIM_ADD_TRAFFIC_MODEL_OFF_TIME_ATTRIBUTE(Poisson, MilliSeconds(100))
253 .SIM_ADD_TRAFFIC_MODEL_DATA_RATE_ATTRIBUTE(Poisson, DataRate(
"500kb/s"))
254 .SIM_ADD_TRAFFIC_MODEL_PACKET_SIZE_ATTRIBUTE(Poisson, 512)
255 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(Poisson, Seconds(0.1))
256 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(Poisson, Seconds(0))
257 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(Poisson, MilliSeconds(10))
258 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(Poisson, 0)
262 .SIM_ADD_TRAFFIC_MODEL_START_TIME_ATTRIBUTE(Voip, Seconds(0.1))
263 .SIM_ADD_TRAFFIC_MODEL_STOP_TIME_ATTRIBUTE(Voip, Seconds(0))
264 .SIM_ADD_TRAFFIC_MODEL_START_DELAY_ATTRIBUTE(Voip, MilliSeconds(10))
265 .SIM_ADD_TRAFFIC_MODEL_PERCENTAGE_ATTRIBUTE(Voip, 0);
394 NodeContainer gwUsers,
395 NodeContainer utUsers,
400 NS_LOG_FUNCTION(
this << interval << packetSize << startTime << stopTime << startDelay);
402 if (gwUsers.GetN() == 0)
404 NS_LOG_WARN(
"Gateway users container is empty");
407 if (utUsers.GetN() == 0)
409 NS_LOG_WARN(
"UT users container is empty");
415 PacketSinkHelper sinkHelper(
"ns3::UdpSocketFactory", Address());
416 CbrHelper cbrHelper(
"ns3::UdpSocketFactory", Address());
417 ApplicationContainer sinkContainer;
418 ApplicationContainer cbrContainer;
421 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
423 for (uint32_t i = 0; i < utUsers.GetN(); i++)
425 InetSocketAddress gwUserAddr =
426 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
429 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
430 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
433 cbrHelper.SetConstantTraffic(interval, packetSize);
434 cbrHelper.SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
435 auto app = cbrHelper.Install(utUsers.Get(i)).Get(0);
436 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
437 cbrContainer.Add(app);
441 sinkContainer.Start(startTime);
442 sinkContainer.Stop(stopTime);
483 NodeContainer gwUsers,
484 NodeContainer utUsers,
489 NS_LOG_FUNCTION(
this << interval << packetSize << startTime << stopTime << startDelay);
491 if (gwUsers.GetN() == 0)
493 NS_LOG_WARN(
"Gateway users container is empty");
496 if (utUsers.GetN() == 0)
498 NS_LOG_WARN(
"UT users container is empty");
502 std::string socketFactory =
506 PacketSinkHelper sinkHelper(socketFactory, Address());
507 CbrHelper cbrHelper(socketFactory, Address());
508 ApplicationContainer sinkContainer;
509 ApplicationContainer cbrContainer;
512 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
514 for (uint32_t i = 0; i < utUsers.GetN(); i++)
518 InetSocketAddress gwUserAddr =
519 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
522 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
523 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
526 cbrHelper.SetConstantTraffic(interval, packetSize);
527 cbrHelper.SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
528 auto app = cbrHelper.Install(utUsers.Get(i)).Get(0);
529 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
530 cbrContainer.Add(app);
534 InetSocketAddress utUserAddr =
535 InetSocketAddress(
m_satHelper->GetUserAddress(utUsers.Get(i)), port);
538 sinkHelper.SetAttribute(
"Local", AddressValue(Address(utUserAddr)));
539 sinkContainer.Add(sinkHelper.Install(utUsers.Get(i)));
542 cbrHelper.SetConstantTraffic(interval, packetSize);
543 cbrHelper.SetAttribute(
"Remote", AddressValue(Address(utUserAddr)));
544 auto app = cbrHelper.Install(gwUsers.Get(j)).Get(0);
545 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
546 cbrContainer.Add(app);
551 sinkContainer.Start(startTime);
552 sinkContainer.Stop(stopTime);
698 NodeContainer gwUsers,
699 NodeContainer utUsers,
700 std::string onTimePattern,
701 std::string offTimePattern,
706 NS_LOG_FUNCTION(
this << dataRate << packetSize << onTimePattern << offTimePattern << startTime
707 << stopTime << startDelay);
709 if (gwUsers.GetN() == 0)
711 NS_LOG_WARN(
"Gateway users container is empty");
714 if (utUsers.GetN() == 0)
716 NS_LOG_WARN(
"UT users container is empty");
720 std::string socketFactory =
724 PacketSinkHelper sinkHelper(socketFactory, Address());
726 ApplicationContainer sinkContainer;
727 ApplicationContainer onOffContainer;
729 onOffHelper.
SetAttribute(
"OnTime", StringValue(onTimePattern));
730 onOffHelper.
SetAttribute(
"OffTime", StringValue(offTimePattern));
731 onOffHelper.
SetAttribute(
"DataRate", DataRateValue(dataRate));
732 onOffHelper.
SetAttribute(
"PacketSize", UintegerValue(packetSize));
735 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
737 for (uint32_t i = 0; i < utUsers.GetN(); i++)
741 InetSocketAddress gwUserAddr =
742 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
745 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
746 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
749 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
750 auto app = onOffHelper.
Install(utUsers.Get(i)).Get(0);
751 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
752 onOffContainer.Add(app);
756 InetSocketAddress utUserAddr =
757 InetSocketAddress(
m_satHelper->GetUserAddress(utUsers.Get(i)), port);
760 sinkHelper.SetAttribute(
"Local", AddressValue(Address(utUserAddr)));
761 sinkContainer.Add(sinkHelper.Install(utUsers.Get(i)));
764 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(utUserAddr)));
765 auto app = onOffHelper.
Install(gwUsers.Get(j)).Get(0);
766 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
767 onOffContainer.Add(app);
772 sinkContainer.Start(startTime);
773 sinkContainer.Stop(stopTime);
920 NodeContainer gwUsers,
921 NodeContainer utUsers,
926 NS_LOG_FUNCTION(
this << direction << startTime << stopTime << startDelay);
928 if (gwUsers.GetN() == 0)
930 NS_LOG_WARN(
"Gateway users container is empty");
933 if (utUsers.GetN() == 0)
935 NS_LOG_WARN(
"UT users container is empty");
939 ThreeGppHttpHelper httpHelper;
942 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
944 auto app = httpHelper.InstallUsingIpv4(gwUsers.Get(j), utUsers).Get(1);
945 app->SetStartTime(startTime + (j + 1) * startDelay);
946 httpHelper.GetServer().Start(startTime);
947 httpHelper.GetServer().Stop(stopTime);
952 for (uint32_t i = 0; i < utUsers.GetN(); i++)
954 auto app = httpHelper.InstallUsingIpv4(utUsers.Get(i), gwUsers).Get(1);
955 app->SetStartTime(startTime + (i + 1) * startDelay);
956 httpHelper.GetServer().Start(startTime);
957 httpHelper.GetServer().Stop(stopTime);
1110 NodeContainer gwUsers,
1111 NodeContainer utUsers,
1116 NS_LOG_FUNCTION(
this << direction << startTime << stopTime << startDelay);
1118 if (gwUsers.GetN() == 0)
1120 NS_LOG_WARN(
"Gateway users container is empty");
1123 if (utUsers.GetN() == 0)
1125 NS_LOG_WARN(
"UT users container is empty");
1129 std::string socketFactory =
"ns3::TcpSocketFactory";
1131 NrtvHelper nrtvHelper(TypeId::LookupByName(socketFactory));
1134 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
1136 auto app = nrtvHelper.InstallUsingIpv4(gwUsers.Get(j), utUsers).Get(1);
1137 app->SetStartTime(startTime + (j + 1) * startDelay);
1138 nrtvHelper.GetServer().Start(startTime);
1139 nrtvHelper.GetServer().Stop(stopTime);
1144 for (uint32_t i = 0; i < utUsers.GetN(); i++)
1146 auto app = nrtvHelper.InstallUsingIpv4(utUsers.Get(i), gwUsers).Get(1);
1147 app->SetStartTime(startTime + (i + 1) * startDelay);
1148 nrtvHelper.GetServer().Start(startTime);
1149 nrtvHelper.GetServer().Stop(stopTime);
1283 Time offTimeExpMean,
1285 uint32_t packetSize,
1286 NodeContainer gwUsers,
1287 NodeContainer utUsers,
1292 NS_LOG_FUNCTION(
this << direction << onTime << offTimeExpMean << rate << packetSize << startTime
1293 << stopTime << startDelay);
1295 if (gwUsers.GetN() == 0)
1297 NS_LOG_WARN(
"Gateway users container is empty");
1300 if (utUsers.GetN() == 0)
1302 NS_LOG_WARN(
"UT users container is empty");
1306 std::string socketFactory =
"ns3::UdpSocketFactory";
1310 PacketSinkHelper sinkHelper(socketFactory, Address());
1312 ApplicationContainer sinkContainer;
1313 ApplicationContainer onOffContainer;
1316 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
1318 for (uint32_t i = 0; i < utUsers.GetN(); i++)
1322 InetSocketAddress gwUserAddr =
1323 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
1327 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
1328 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
1332 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1333 std::to_string(onTime.GetSeconds()) +
"]"));
1335 StringValue(
"ns3::ExponentialRandomVariable[Mean=" +
1336 std::to_string(offTimeExpMean.GetSeconds()) +
1338 onOffHelper.
SetAttribute(
"DataRate", DataRateValue(rate));
1339 onOffHelper.
SetAttribute(
"PacketSize", UintegerValue(packetSize));
1340 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
1342 auto app = onOffHelper.
Install(utUsers.Get(i)).Get(0);
1343 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1344 onOffContainer.Add(app);
1348 InetSocketAddress utUserAddr =
1349 InetSocketAddress(
m_satHelper->GetUserAddress(utUsers.Get(i)), port);
1353 sinkHelper.SetAttribute(
"Local", AddressValue(Address(utUserAddr)));
1354 sinkContainer.Add(sinkHelper.Install(utUsers.Get(i)));
1358 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1359 std::to_string(onTime.GetSeconds()) +
"]"));
1361 StringValue(
"ns3::ExponentialRandomVariable[Mean=" +
1362 std::to_string(offTimeExpMean.GetSeconds()) +
1364 onOffHelper.
SetAttribute(
"DataRate", DataRateValue(rate));
1365 onOffHelper.
SetAttribute(
"PacketSize", UintegerValue(packetSize));
1366 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(utUserAddr)));
1368 auto app = onOffHelper.
Install(gwUsers.Get(j)).Get(0);
1369 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1370 onOffContainer.Add(app);
1374 sinkContainer.Start(startTime);
1375 sinkContainer.Stop(stopTime);
1521 NodeContainer gwUsers,
1522 NodeContainer utUsers,
1527 NS_LOG_FUNCTION(
this << direction << codec << startTime << stopTime << startDelay);
1529 if (gwUsers.GetN() == 0)
1531 NS_LOG_WARN(
"Gateway users container is empty");
1534 if (utUsers.GetN() == 0)
1536 NS_LOG_WARN(
"UT users container is empty");
1540 std::string socketFactory =
"ns3::UdpSocketFactory";
1546 uint32_t packetSize;
1581 NS_FATAL_ERROR(
"VoIP codec does not exist or is not implemented");
1584 PacketSinkHelper sinkHelper(socketFactory, Address());
1586 ApplicationContainer sinkContainer;
1587 ApplicationContainer onOffContainer;
1590 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
1592 for (uint32_t i = 0; i < utUsers.GetN(); i++)
1596 InetSocketAddress gwUserAddr =
1597 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
1601 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
1602 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
1606 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1607 std::to_string(onTime) +
"]"));
1609 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1610 std::to_string(offTime) +
"]"));
1611 onOffHelper.
SetAttribute(
"DataRate", DataRateValue(rate));
1612 onOffHelper.
SetAttribute(
"PacketSize", UintegerValue(packetSize));
1613 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(gwUserAddr)));
1615 auto app = onOffHelper.
Install(utUsers.Get(i)).Get(0);
1616 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1617 onOffContainer.Add(app);
1621 InetSocketAddress utUserAddr =
1622 InetSocketAddress(
m_satHelper->GetUserAddress(utUsers.Get(i)), port);
1626 sinkHelper.SetAttribute(
"Local", AddressValue(Address(utUserAddr)));
1627 sinkContainer.Add(sinkHelper.Install(utUsers.Get(i)));
1631 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1632 std::to_string(onTime) +
"]"));
1634 StringValue(
"ns3::ConstantRandomVariable[Constant=" +
1635 std::to_string(offTime) +
"]"));
1636 onOffHelper.
SetAttribute(
"DataRate", DataRateValue(rate));
1637 onOffHelper.
SetAttribute(
"PacketSize", UintegerValue(packetSize));
1638 onOffHelper.
SetAttribute(
"Remote", AddressValue(Address(utUserAddr)));
1640 auto app = onOffHelper.
Install(gwUsers.Get(j)).Get(0);
1641 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1642 onOffContainer.Add(app);
1646 sinkContainer.Start(startTime);
1647 sinkContainer.Stop(stopTime);
1810 std::string interval,
1811 uint32_t packetSize,
1812 NodeContainer gwUsers,
1813 NodeContainer utUsers,
1818 NS_LOG_FUNCTION(
this << direction << interval << packetSize << startTime << stopTime
1821 if (gwUsers.GetN() == 0)
1823 NS_LOG_WARN(
"Gateway users container is empty");
1826 if (utUsers.GetN() == 0)
1828 NS_LOG_WARN(
"UT users container is empty");
1832 std::string socketFactory =
"ns3::UdpSocketFactory";
1835 PacketSinkHelper sinkHelper(socketFactory, Address());
1837 ObjectFactory factory;
1838 factory.SetTypeId(
"ns3::CbrApplication");
1839 factory.Set(
"Protocol", StringValue(socketFactory));
1840 ApplicationContainer sinkContainer;
1841 ApplicationContainer cbrContainer;
1844 for (uint32_t j = 0; j < gwUsers.GetN(); j++)
1846 for (uint32_t i = 0; i < utUsers.GetN(); i++)
1850 InetSocketAddress gwUserAddr =
1851 InetSocketAddress(
m_satHelper->GetUserAddress(gwUsers.Get(j)), port);
1854 sinkHelper.SetAttribute(
"Local", AddressValue(Address(gwUserAddr)));
1855 sinkContainer.Add(sinkHelper.Install(gwUsers.Get(j)));
1858 factory.Set(
"Interval", TimeValue(Time(interval)));
1859 factory.Set(
"PacketSize", UintegerValue(packetSize));
1860 factory.Set(
"Remote", AddressValue(Address(gwUserAddr)));
1861 Ptr<CbrApplication> p_app = factory.Create<CbrApplication>();
1862 utUsers.Get(i)->AddApplication(p_app);
1863 auto app = ApplicationContainer(p_app).Get(0);
1864 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1865 cbrContainer.Add(app);
1869 InetSocketAddress utUserAddr =
1870 InetSocketAddress(
m_satHelper->GetUserAddress(utUsers.Get(i)), port);
1873 sinkHelper.SetAttribute(
"Local", AddressValue(Address(utUserAddr)));
1874 sinkContainer.Add(sinkHelper.Install(utUsers.Get(i)));
1877 factory.Set(
"Interval", TimeValue(Time(interval)));
1878 factory.Set(
"PacketSize", UintegerValue(packetSize));
1879 factory.Set(
"Remote", AddressValue(Address(utUserAddr)));
1880 Ptr<CbrApplication> p_app = factory.Create<CbrApplication>();
1881 gwUsers.Get(j)->AddApplication(p_app);
1882 auto app = ApplicationContainer(p_app).Get(0);
1883 app->SetStartTime(startTime + (i + j * gwUsers.GetN() + 1) * startDelay);
1884 cbrContainer.Add(app);
1889 sinkContainer.Start(startTime);
1890 sinkContainer.Stop(stopTime);
2062 NS_LOG_FUNCTION(
this);
2064 NS_ASSERT_MSG(
m_trafficHelper !=
nullptr,
"Traffic helper must be defined");
2066 for (
const std::pair<const std::string, SatTrafficHelperConf::TrafficConfiguration_t>&
2070 if (trafficModel.first ==
"LoraCbr")
2074 else if (trafficModel.first ==
"LoraPeriodic")
2078 else if (trafficModel.first ==
"Cbr")
2082 else if (trafficModel.first ==
"OnOff")
2086 else if (trafficModel.first ==
"Http")
2090 else if (trafficModel.first ==
"Nrtv")
2094 else if (trafficModel.first ==
"Poisson")
2098 else if (trafficModel.first ==
"Voip")
2104 NS_FATAL_ERROR(
"Unknown traffic model has been configured: " << trafficModel.first);
2107 std::vector<SatTrafficHelper::TransportLayerProtocol_t> protocols;
2108 switch (trafficModel.second.m_protocol)
2124 NS_FATAL_ERROR(
"Unknown traffic protocol");
2128 std::vector<SatTrafficHelper::TrafficDirection_t> directions;
2129 switch (trafficModel.second.m_direction)
2145 NS_FATAL_ERROR(
"Unknown traffic protocol");
2149 if (trafficModel.second.m_percentage > 0.0)
2151 SatTrafficHelperConf::TrafficConfiguration_t conf = trafficModel.second;
2152 Time startTime = conf.m_startTime;
2155 NS_FATAL_ERROR(
"Traffic model "
2156 << trafficModel.first
2157 <<
" configured to start after the simulation ended");
2160 Time stopTime = conf.m_stopTime;
2161 if (stopTime == Seconds(0))
2165 if (stopTime < startTime)
2167 NS_FATAL_ERROR(
"Traffic model " << trafficModel.first
2168 <<
" configured to stop before it is started");
2171 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwUserNodes();
2175 uts = Singleton<SatTopology>::Get()->GetUtNodes();
2179 uts = Singleton<SatTopology>::Get()->GetUtUserNodes();
2229 conf.m_onTimePattern,
2230 conf.m_offTimePattern,
2283 NS_FATAL_ERROR(
"Unknown traffic model has been configured: " << modelName);