24 #include <ns3/application-packet-probe.h>
25 #include <ns3/application.h>
26 #include <ns3/boolean.h>
27 #include <ns3/callback.h>
28 #include <ns3/data-collection-object.h>
29 #include <ns3/distribution-collector.h>
31 #include <ns3/inet-socket-address.h>
32 #include <ns3/interval-rate-collector.h>
35 #include <ns3/mac48-address.h>
36 #include <ns3/magister-gnuplot-aggregator.h>
37 #include <ns3/multi-file-aggregator.h>
38 #include <ns3/net-device.h>
39 #include <ns3/node-container.h>
40 #include <ns3/packet.h>
41 #include <ns3/probe.h>
42 #include <ns3/satellite-geo-net-device.h>
43 #include <ns3/satellite-helper.h>
44 #include <ns3/satellite-id-mapper.h>
45 #include <ns3/satellite-mac.h>
46 #include <ns3/satellite-net-device.h>
47 #include <ns3/satellite-phy.h>
48 #include <ns3/scalar-collector.h>
49 #include <ns3/singleton.h>
50 #include <ns3/string.h>
51 #include <ns3/unit-conversion-collector.h>
55 NS_LOG_COMPONENT_DEFINE(
"SatStatsThroughputHelper");
60 NS_OBJECT_ENSURE_REGISTERED(SatStatsThroughputHelper);
64 m_averagingMode(false)
66 NS_LOG_FUNCTION(
this << satHelper);
71 NS_LOG_FUNCTION(
this);
78 TypeId(
"ns3::SatStatsThroughputHelper")
80 .AddAttribute(
"AveragingMode",
81 "If true, all samples will be averaged before passed to aggregator. "
82 "Only affects histogram, PDF, and CDF output types.",
86 MakeBooleanChecker());
93 NS_LOG_FUNCTION(
this << averagingMode);
106 NS_LOG_FUNCTION(
this);
112 <<
" is not a valid output type for this statistics.");
122 "EnableContextPrinting",
130 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
133 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SECOND));
137 &MultiFileAggregator::Write1d);
142 EnumValue(UnitConversionCollector::FROM_BYTES_TO_KBIT));
146 &ScalarCollector::TraceSinkDouble);
161 EnumValue(IntervalRateCollector::INPUT_DATA_TYPE_DOUBLE));
165 &MultiFileAggregator::Write2d);
168 &MultiFileAggregator::AddContextHeading);
173 EnumValue(UnitConversionCollector::FROM_BYTES_TO_KBIT));
177 &IntervalRateCollector::TraceSinkDouble);
186 NS_FATAL_ERROR(
"This statistics require AveragingMode to be enabled");
195 "EnableContextPrinting",
199 Ptr<MultiFileAggregator> fileAggregator =
m_aggregator->GetObject<MultiFileAggregator>();
200 NS_ASSERT(fileAggregator !=
nullptr);
204 DistributionCollector::OutputType_t outputType =
205 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
208 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
212 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
219 MakeCallback(&MultiFileAggregator::Write2d, fileAggregator));
223 MakeCallback(&MultiFileAggregator::AddContextHeading, fileAggregator));
227 MakeCallback(&MultiFileAggregator::EnableContextWarning, fileAggregator));
232 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
235 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SECOND));
237 Callback<void, double> callback =
243 it->second->TraceConnectWithoutContext(
"Output", callback);
249 EnumValue(UnitConversionCollector::FROM_BYTES_TO_KBIT));
253 &ScalarCollector::TraceSinkDouble);
260 <<
" is not a valid output type for this statistics.");
270 Ptr<MagisterGnuplotAggregator> plotAggregator =
272 NS_ASSERT(plotAggregator !=
nullptr);
274 plotAggregator->SetLegend(
"Time (in seconds)",
275 "Received throughput (in kilobits per second)");
276 plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
281 EnumValue(IntervalRateCollector::INPUT_DATA_TYPE_DOUBLE));
287 const std::string context = it->second->GetName();
288 plotAggregator->Add2dDataset(context, context);
292 &MagisterGnuplotAggregator::Write2d);
297 EnumValue(UnitConversionCollector::FROM_BYTES_TO_KBIT));
301 &IntervalRateCollector::TraceSinkDouble);
310 NS_FATAL_ERROR(
"This statistics require AveragingMode to be enabled");
319 Ptr<MagisterGnuplotAggregator> plotAggregator =
321 NS_ASSERT(plotAggregator !=
nullptr);
323 plotAggregator->SetLegend(
"Received throughput (in kilobits per second)",
"Frequency");
324 plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
330 DistributionCollector::OutputType_t outputType =
331 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
334 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
338 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
345 MakeCallback(&MagisterGnuplotAggregator::Write2d, plotAggregator));
351 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
354 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SECOND));
356 Callback<void, double> callback =
362 it->second->TraceConnectWithoutContext(
"Output", callback);
368 EnumValue(UnitConversionCollector::FROM_BYTES_TO_KBIT));
372 &ScalarCollector::TraceSinkDouble);
377 NS_FATAL_ERROR(
"SatStatsThroughputHelper - Invalid output type");
389 NS_LOG_FUNCTION(
this);
398 NS_LOG_FUNCTION(
this << packet->GetSize() << from);
400 if (from.IsInvalid())
402 NS_LOG_WARN(
this <<
" discarding packet " << packet <<
" (" << packet->GetSize()
404 <<
" from statistics collection because of"
405 <<
" invalid sender address");
410 std::map<const Address, uint32_t>::const_iterator it =
m_identifierMap.find(from);
414 NS_LOG_WARN(
this <<
" discarding packet " << packet <<
" (" << packet->GetSize()
416 <<
" from statistics collection because of"
417 <<
" unknown sender address " << from);
423 NS_ASSERT_MSG(collector !=
nullptr,
424 "Unable to find collector with identifier " << it->second);
425 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
426 NS_ASSERT(c !=
nullptr);
429 c->TraceSinkUinteger32(0, packet->GetSize());
438 NS_LOG_FUNCTION(
this << utNode->GetId());
440 const SatIdMapper* satIdMapper = Singleton<SatIdMapper>::Get();
443 if (addr.IsInvalid())
445 NS_LOG_WARN(
this <<
" Node " << utNode->GetId() <<
" is not a valid UT");
451 NS_LOG_INFO(
this <<
" associated address " << addr <<
" with identifier " << identifier);
462 NS_LOG_FUNCTION(
this << satHelper);
467 NS_LOG_FUNCTION(
this);
481 NS_LOG_FUNCTION(
this);
484 for (NodeContainer::Iterator it = utUsers.Begin(); it != utUsers.End(); ++it)
487 NS_ASSERT_MSG(utUserId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT user");
490 for (uint32_t i = 0; i < (*it)->GetNApplications(); i++)
493 std::ostringstream probeName;
494 probeName << utUserId <<
"-" << i;
495 Ptr<ApplicationPacketProbe> probe = CreateObject<ApplicationPacketProbe>();
496 probe->SetName(probeName.str());
499 if (probe->ConnectByObject(
"Rx", (*it)->GetApplication(i)))
503 probe->GetObject<Probe>(),
506 &UnitConversionCollector::TraceSinkUinteger32))
508 NS_LOG_INFO(
this <<
" created probe " << probeName.str()
509 <<
", connected to collector " << identifier);
510 m_probes.push_back(probe->GetObject<Probe>());
514 NS_LOG_WARN(
this <<
" unable to connect probe " << probeName.str()
515 <<
" to collector " << identifier);
525 NS_LOG_WARN(
this <<
" unable to connect probe " << probeName.str()
526 <<
" with node ID " << (*it)->GetId() <<
" application #" << i);
540 Ptr<const SatHelper> satHelper)
543 NS_LOG_FUNCTION(
this << satHelper);
548 NS_LOG_FUNCTION(
this);
562 NS_LOG_FUNCTION(
this);
564 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
565 Callback<void, Ptr<const Packet>,
const Address&> callback =
568 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
572 NS_ASSERT(satGeoDev !=
nullptr);
573 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
575 if (satGeoDev->TraceConnectWithoutContext(
"RxFeeder", callback))
577 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
578 <<
" device #" << satGeoDev->GetIfIndex());
581 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
585 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatNetDevice"
586 <<
" at node ID " << (*it)->GetId() <<
" device #"
587 << satGeoDev->GetIfIndex());
591 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
593 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
599 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
600 NS_ASSERT(satDev !=
nullptr);
602 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
607 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
608 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
612 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
614 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
615 NS_ASSERT(satDev !=
nullptr);
617 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
627 Ptr<const SatHelper> satHelper)
630 NS_LOG_FUNCTION(
this << satHelper);
635 NS_LOG_FUNCTION(
this);
649 NS_LOG_FUNCTION(
this);
650 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
652 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
654 const int32_t utId =
GetUtId(*it);
655 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
659 std::ostringstream probeName;
661 Ptr<ApplicationPacketProbe> probe = CreateObject<ApplicationPacketProbe>();
662 probe->SetName(probeName.str());
667 if (probe->ConnectByObject(
"Rx", dev))
671 probe->GetObject<Probe>(),
674 &UnitConversionCollector::TraceSinkUinteger32))
676 NS_LOG_INFO(
this <<
" created probe " << probeName.str()
677 <<
", connected to collector " << identifier);
678 m_probes.push_back(probe->GetObject<Probe>());
681 dev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
685 NS_LOG_WARN(
this <<
" unable to connect probe " << probeName.str()
686 <<
" to collector " << identifier);
692 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatNetDevice"
693 <<
" at node ID " << (*it)->GetId() <<
" device #2");
699 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
700 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
704 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
706 NS_ASSERT((*itDev)->GetObject<
SatNetDevice>() !=
nullptr);
707 (*itDev)->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
718 Ptr<const SatHelper> satHelper)
721 NS_LOG_FUNCTION(
this << satHelper);
726 NS_LOG_FUNCTION(
this);
740 NS_LOG_FUNCTION(
this);
742 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
743 Callback<void, Ptr<const Packet>,
const Address&> callback =
746 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
750 NS_ASSERT(satGeoDev !=
nullptr);
751 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
752 std::map<uint32_t, Ptr<SatMac>> satGeoFeederMacs = satGeoDev->GetAllFeederMac();
754 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoFeederMacs.begin();
755 it2 != satGeoFeederMacs.end();
758 satMac = it2->second;
759 NS_ASSERT(satMac !=
nullptr);
760 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
763 if (satMac->TraceConnectWithoutContext(
"Rx", callback))
765 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
766 <<
" device #" << satGeoDev->GetIfIndex());
770 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatMac"
771 <<
" at node ID " << (*it)->GetId() <<
" device #"
772 << satGeoDev->GetIfIndex());
775 std::map<uint32_t, Ptr<SatMac>> satGeoUserMacs = satGeoDev->GetUserMac();
776 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoUserMacs.begin();
777 it2 != satGeoUserMacs.end();
780 satMac = it2->second;
781 NS_ASSERT(satMac !=
nullptr);
782 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
786 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
788 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
794 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
795 NS_ASSERT(satDev !=
nullptr);
796 Ptr<SatMac> satMac = satDev->GetMac();
797 NS_ASSERT(satMac !=
nullptr);
799 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
800 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
805 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
806 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
810 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
812 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
813 NS_ASSERT(satDev !=
nullptr);
814 Ptr<SatMac> satMac = satDev->GetMac();
815 NS_ASSERT(satMac !=
nullptr);
817 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
818 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
829 Ptr<const SatHelper> satHelper)
832 NS_LOG_FUNCTION(
this << satHelper);
837 NS_LOG_FUNCTION(
this);
851 NS_LOG_FUNCTION(
this);
853 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
855 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
859 NS_ASSERT(satGeoDev !=
nullptr);
860 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
861 std::map<uint32_t, Ptr<SatMac>> satGeoFeederMacs = satGeoDev->GetAllFeederMac();
863 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoFeederMacs.begin();
864 it2 != satGeoFeederMacs.end();
867 satMac = it2->second;
868 NS_ASSERT(satMac !=
nullptr);
869 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
871 std::map<uint32_t, Ptr<SatMac>> satGeoUserMacs = satGeoDev->GetUserMac();
872 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoUserMacs.begin();
873 it2 != satGeoUserMacs.end();
876 satMac = it2->second;
877 NS_ASSERT(satMac !=
nullptr);
878 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
882 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
884 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
886 const int32_t utId =
GetUtId(*it);
887 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
891 std::ostringstream probeName;
893 Ptr<ApplicationPacketProbe> probe = CreateObject<ApplicationPacketProbe>();
894 probe->SetName(probeName.str());
897 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
898 NS_ASSERT(satDev !=
nullptr);
899 Ptr<SatMac> satMac = satDev->GetMac();
900 NS_ASSERT(satMac !=
nullptr);
903 if (probe->ConnectByObject(
"Rx", satMac))
907 probe->GetObject<Probe>(),
910 &UnitConversionCollector::TraceSinkUinteger32))
912 m_probes.push_back(probe->GetObject<Probe>());
915 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
916 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
920 NS_LOG_WARN(
this <<
" unable to connect probe " << probeName.str()
921 <<
" to collector " << identifier);
926 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatMac"
927 <<
" at node ID " << (*it)->GetId() <<
" device #2");
932 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
933 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
937 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
939 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
940 NS_ASSERT(satDev !=
nullptr);
941 Ptr<SatMac> satMac = satDev->GetMac();
942 NS_ASSERT(satMac !=
nullptr);
944 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
945 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
956 Ptr<const SatHelper> satHelper)
959 NS_LOG_FUNCTION(
this << satHelper);
964 NS_LOG_FUNCTION(
this);
978 NS_LOG_FUNCTION(
this);
980 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
981 Callback<void, Ptr<const Packet>,
const Address&> callback =
984 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
988 NS_ASSERT(satGeoDev !=
nullptr);
989 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
990 std::map<uint32_t, Ptr<SatPhy>> satGeoFeederPhys = satGeoDev->GetFeederPhy();
992 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoFeederPhys.begin();
993 it2 != satGeoFeederPhys.end();
996 satPhy = it2->second;
997 NS_ASSERT(satPhy !=
nullptr);
998 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1001 if (satPhy->TraceConnectWithoutContext(
"Rx", callback))
1003 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1004 <<
" device #" << satGeoDev->GetIfIndex());
1007 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1011 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatPhy"
1012 <<
" at node ID " << (*it)->GetId() <<
" device #"
1013 << satGeoDev->GetIfIndex());
1016 std::map<uint32_t, Ptr<SatPhy>> satGeoUserPhys = satGeoDev->GetUserPhy();
1017 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoUserPhys.begin();
1018 it2 != satGeoUserPhys.end();
1021 satPhy = it2->second;
1022 NS_ASSERT(satPhy !=
nullptr);
1023 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1027 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1029 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1035 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1036 NS_ASSERT(satDev !=
nullptr);
1037 Ptr<SatPhy> satPhy = satDev->GetPhy();
1038 NS_ASSERT(satPhy !=
nullptr);
1040 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1041 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1046 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1047 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1051 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1053 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1054 NS_ASSERT(satDev !=
nullptr);
1055 Ptr<SatPhy> satPhy = satDev->GetPhy();
1056 NS_ASSERT(satPhy !=
nullptr);
1058 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1059 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1070 Ptr<const SatHelper> satHelper)
1073 NS_LOG_FUNCTION(
this << satHelper);
1078 NS_LOG_FUNCTION(
this);
1092 NS_LOG_FUNCTION(
this);
1094 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1096 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1100 NS_ASSERT(satGeoDev !=
nullptr);
1101 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1102 std::map<uint32_t, Ptr<SatPhy>> satGeoFeederPhys = satGeoDev->GetFeederPhy();
1104 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoFeederPhys.begin();
1105 it2 != satGeoFeederPhys.end();
1108 satPhy = it2->second;
1109 NS_ASSERT(satPhy !=
nullptr);
1110 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1112 std::map<uint32_t, Ptr<SatPhy>> satGeoUserPhys = satGeoDev->GetUserPhy();
1113 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoUserPhys.begin();
1114 it2 != satGeoUserPhys.end();
1117 satPhy = it2->second;
1118 NS_ASSERT(satPhy !=
nullptr);
1119 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1123 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1125 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1127 const int32_t utId =
GetUtId(*it);
1128 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1132 std::ostringstream probeName;
1134 Ptr<ApplicationPacketProbe> probe = CreateObject<ApplicationPacketProbe>();
1135 probe->SetName(probeName.str());
1138 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1139 NS_ASSERT(satDev !=
nullptr);
1140 Ptr<SatPhy> satPhy = satDev->GetPhy();
1141 NS_ASSERT(satPhy !=
nullptr);
1144 if (probe->ConnectByObject(
"Rx", satPhy))
1147 probe->GetObject<Probe>(),
1150 &UnitConversionCollector::TraceSinkUinteger32))
1152 m_probes.push_back(probe->GetObject<Probe>());
1155 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1156 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1160 NS_LOG_WARN(
this <<
" unable to connect probe " << probeName.str()
1161 <<
" to collector " << identifier);
1166 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatPhy"
1167 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1172 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1173 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1177 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1179 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1180 NS_ASSERT(satDev !=
nullptr);
1181 Ptr<SatPhy> satPhy = satDev->GetPhy();
1182 NS_ASSERT(satPhy !=
nullptr);
1184 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1185 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1198 NS_LOG_FUNCTION(
this << satHelper);
1203 NS_LOG_FUNCTION(
this);
1217 NS_LOG_FUNCTION(
this);
1221 for (NodeContainer::Iterator it = utUsers.Begin(); it != utUsers.End(); ++it)
1229 Callback<void, Ptr<const Packet>,
const Address&> callback =
1232 for (NodeContainer::Iterator it = gwUsers.Begin(); it != gwUsers.End(); ++it)
1234 for (uint32_t i = 0; i < (*it)->GetNApplications(); i++)
1236 Ptr<Application> app = (*it)->GetApplication(i);
1238 if (app->TraceConnectWithoutContext(
"Rx", callback))
1240 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1241 <<
" application #" << i);
1250 NS_LOG_WARN(
this <<
" unable to connect with node ID " << (*it)->GetId()
1251 <<
" application #" << i);
1263 if (InetSocketAddress::IsMatchingType(from))
1266 const Address ipv4Addr = InetSocketAddress::ConvertFrom(from).GetIpv4();
1267 std::map<const Address, uint32_t>::const_iterator it1 =
m_identifierMap.find(ipv4Addr);
1271 NS_LOG_WARN(
this <<
" discarding packet " << packet <<
" (" << packet->GetSize()
1273 <<
" from statistics collection because of"
1274 <<
" unknown sender IPv4 address " << ipv4Addr);
1280 NS_ASSERT_MSG(collector !=
nullptr,
1281 "Unable to find collector with identifier " << it1->second);
1282 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
1283 NS_ASSERT(c !=
nullptr);
1286 c->TraceSinkUinteger32(0, packet->GetSize());
1292 this <<
" discarding packet " << packet <<
" (" << packet->GetSize() <<
" bytes)"
1293 <<
" from statistics collection"
1294 <<
" because it comes from sender " << from <<
" without valid InetSocketAddress");
1302 NS_LOG_FUNCTION(
this << utUserNode->GetId());
1304 Ptr<Ipv4> ipv4 = utUserNode->GetObject<Ipv4>();
1306 if (ipv4 ==
nullptr)
1308 NS_LOG_INFO(
this <<
" Node " << utUserNode->GetId() <<
" does not support IPv4 protocol");
1310 else if (ipv4->GetNInterfaces() >= 2)
1318 for (uint32_t i = 0; i < ipv4->GetNAddresses(1); i++)
1320 const Address addr = ipv4->GetAddress(1, i).GetLocal();
1322 NS_LOG_INFO(
this <<
" associated address " << addr <<
" with identifier "
1328 NS_LOG_WARN(
this <<
" Node " << utUserNode->GetId() <<
" is not a valid UT user");
1337 Ptr<const SatHelper> satHelper)
1340 NS_LOG_FUNCTION(
this << satHelper);
1345 NS_LOG_FUNCTION(
this);
1359 NS_LOG_FUNCTION(
this);
1361 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1362 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1369 dev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1374 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1375 Callback<void, Ptr<const Packet>,
const Address&> callback =
1378 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1382 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1384 NS_ASSERT((*itDev)->GetObject<
SatNetDevice>() !=
nullptr);
1386 if ((*itDev)->TraceConnectWithoutContext(
"Rx", callback))
1388 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1389 <<
" device #" << (*itDev)->GetIfIndex());
1392 (*itDev)->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1396 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatNetDevice"
1397 <<
" at node ID " << (*it)->GetId() <<
" device #"
1398 << (*itDev)->GetIfIndex());
1412 Ptr<const SatHelper> satHelper)
1415 NS_LOG_FUNCTION(
this << satHelper);
1420 NS_LOG_FUNCTION(
this);
1434 NS_LOG_FUNCTION(
this);
1436 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1437 Callback<void, Ptr<const Packet>,
const Address&> callback =
1440 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1444 NS_ASSERT(satGeoDev !=
nullptr);
1445 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1448 if (satGeoDev->TraceConnectWithoutContext(
"RxUser", callback))
1450 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1451 <<
" device #" << satGeoDev->GetIfIndex());
1455 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatMac"
1456 <<
" at node ID " << (*it)->GetId() <<
" device #"
1457 << satGeoDev->GetIfIndex());
1461 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1462 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1469 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1470 NS_ASSERT(satDev !=
nullptr);
1471 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1476 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1478 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1482 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1484 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1485 NS_ASSERT(satDev !=
nullptr);
1487 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1499 Ptr<const SatHelper> satHelper)
1502 NS_LOG_FUNCTION(
this << satHelper);
1507 NS_LOG_FUNCTION(
this);
1521 NS_LOG_FUNCTION(
this);
1523 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1525 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1530 NS_ASSERT(satGeoDev !=
nullptr);
1531 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1532 std::map<uint32_t, Ptr<SatMac>> satGeoFeederMacs = satGeoDev->GetAllFeederMac();
1533 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoFeederMacs.begin();
1534 it2 != satGeoFeederMacs.end();
1537 satMac = it2->second;
1538 NS_ASSERT(satMac !=
nullptr);
1539 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1541 std::map<uint32_t, Ptr<SatMac>> satGeoUserMacs = satGeoDev->GetUserMac();
1542 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoUserMacs.begin();
1543 it2 != satGeoUserMacs.end();
1546 satMac = it2->second;
1547 NS_ASSERT(satMac !=
nullptr);
1548 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1552 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1553 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1560 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1561 NS_ASSERT(satDev !=
nullptr);
1562 Ptr<SatMac> satMac = satDev->GetMac();
1563 NS_ASSERT(satMac !=
nullptr);
1564 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1565 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1570 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1571 Callback<void, Ptr<const Packet>,
const Address&> callback =
1574 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1578 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1580 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1581 NS_ASSERT(satDev !=
nullptr);
1582 Ptr<SatMac> satMac = satDev->GetMac();
1583 NS_ASSERT(satMac !=
nullptr);
1586 if (satMac->TraceConnectWithoutContext(
"Rx", callback))
1588 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1589 <<
" device #" << satDev->GetIfIndex());
1592 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1593 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1597 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatMac"
1598 <<
" at node ID " << (*it)->GetId() <<
" device #"
1599 << satDev->GetIfIndex());
1613 Ptr<const SatHelper> satHelper)
1616 NS_LOG_FUNCTION(
this << satHelper);
1621 NS_LOG_FUNCTION(
this);
1635 NS_LOG_FUNCTION(
this);
1637 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1638 Callback<void, Ptr<const Packet>,
const Address&> callback =
1641 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1645 NS_ASSERT(satGeoDev !=
nullptr);
1646 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1647 std::map<uint32_t, Ptr<SatMac>> satGeoFeederMacs = satGeoDev->GetAllFeederMac();
1649 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoFeederMacs.begin();
1650 it2 != satGeoFeederMacs.end();
1653 satMac = it2->second;
1654 NS_ASSERT(satMac !=
nullptr);
1655 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1657 std::map<uint32_t, Ptr<SatMac>> satGeoUserMacs = satGeoDev->GetUserMac();
1658 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satGeoUserMacs.begin();
1659 it2 != satGeoUserMacs.end();
1662 satMac = it2->second;
1663 NS_ASSERT(satMac !=
nullptr);
1664 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1667 if (satMac->TraceConnectWithoutContext(
"Rx", callback))
1669 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1670 <<
" device #" << satGeoDev->GetIfIndex());
1674 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatMac"
1675 <<
" at node ID " << (*it)->GetId() <<
" device #"
1676 << satGeoDev->GetIfIndex());
1681 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1682 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1689 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1690 NS_ASSERT(satDev !=
nullptr);
1691 Ptr<SatMac> satMac = satDev->GetMac();
1692 NS_ASSERT(satMac !=
nullptr);
1693 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1694 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1699 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1701 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1705 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1707 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1708 NS_ASSERT(satDev !=
nullptr);
1709 Ptr<SatMac> satMac = satDev->GetMac();
1710 NS_ASSERT(satMac !=
nullptr);
1712 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1713 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1725 Ptr<const SatHelper> satHelper)
1728 NS_LOG_FUNCTION(
this << satHelper);
1733 NS_LOG_FUNCTION(
this);
1747 NS_LOG_FUNCTION(
this);
1749 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1751 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1756 NS_ASSERT(satGeoDev !=
nullptr);
1757 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1758 std::map<uint32_t, Ptr<SatPhy>> satGeoFeederPhys = satGeoDev->GetFeederPhy();
1759 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoFeederPhys.begin();
1760 it2 != satGeoFeederPhys.end();
1763 satPhy = it2->second;
1764 NS_ASSERT(satPhy !=
nullptr);
1765 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1767 std::map<uint32_t, Ptr<SatPhy>> satGeoUserPhys = satGeoDev->GetUserPhy();
1768 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoUserPhys.begin();
1769 it2 != satGeoUserPhys.end();
1772 satPhy = it2->second;
1773 NS_ASSERT(satPhy !=
nullptr);
1774 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1778 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1779 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1786 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1787 NS_ASSERT(satDev !=
nullptr);
1788 Ptr<SatPhy> satPhy = satDev->GetPhy();
1789 NS_ASSERT(satPhy !=
nullptr);
1790 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1791 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1796 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1797 Callback<void, Ptr<const Packet>,
const Address&> callback =
1800 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1804 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1806 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1807 NS_ASSERT(satDev !=
nullptr);
1808 Ptr<SatPhy> satPhy = satDev->GetPhy();
1809 NS_ASSERT(satPhy !=
nullptr);
1812 if (satPhy->TraceConnectWithoutContext(
"Rx", callback))
1814 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1815 <<
" device #" << satDev->GetIfIndex());
1818 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1819 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1823 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatPhy"
1824 <<
" at node ID " << (*it)->GetId() <<
" device #"
1825 << satDev->GetIfIndex());
1839 Ptr<const SatHelper> satHelper)
1842 NS_LOG_FUNCTION(
this << satHelper);
1847 NS_LOG_FUNCTION(
this);
1861 NS_LOG_FUNCTION(
this);
1863 NodeContainer sats =
GetSatHelper()->GetBeamHelper()->GetGeoSatNodes();
1864 Callback<void, Ptr<const Packet>,
const Address&> callback =
1867 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1871 NS_ASSERT(satGeoDev !=
nullptr);
1872 satGeoDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1873 std::map<uint32_t, Ptr<SatPhy>> satGeoFeederPhys = satGeoDev->GetFeederPhy();
1875 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoFeederPhys.begin();
1876 it2 != satGeoFeederPhys.end();
1879 satPhy = it2->second;
1880 NS_ASSERT(satPhy !=
nullptr);
1881 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1883 std::map<uint32_t, Ptr<SatPhy>> satGeoUserPhys = satGeoDev->GetUserPhy();
1884 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satGeoUserPhys.begin();
1885 it2 != satGeoUserPhys.end();
1888 satPhy = it2->second;
1889 NS_ASSERT(satPhy !=
nullptr);
1890 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1893 if (satPhy->TraceConnectWithoutContext(
"Rx", callback))
1895 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1896 <<
" device #" << satGeoDev->GetIfIndex());
1900 NS_FATAL_ERROR(
"Error connecting to Rx trace source of SatPhy"
1901 <<
" at node ID " << (*it)->GetId() <<
" device #"
1902 << satGeoDev->GetIfIndex());
1907 NodeContainer uts =
GetSatHelper()->GetBeamHelper()->GetUtNodes();
1908 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1915 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1916 NS_ASSERT(satDev !=
nullptr);
1917 Ptr<SatPhy> satPhy = satDev->GetPhy();
1918 NS_ASSERT(satPhy !=
nullptr);
1919 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1920 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1925 NodeContainer gws =
GetSatHelper()->GetBeamHelper()->GetGwNodes();
1927 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1931 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1933 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1934 NS_ASSERT(satDev !=
nullptr);
1935 Ptr<SatPhy> satPhy = satDev->GetPhy();
1936 NS_ASSERT(satPhy !=
nullptr);
1938 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1939 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
SatGeoNetDevice to be utilized in geostationary satellite.
Address GetUtMacWithNode(Ptr< Node > utNode) const
SatNetDevice to be utilized in the UT and GW nodes.
Produce forward link application-level throughput statistics from a satellite module simulation.
SatStatsFwdAppThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdAppThroughputHelper()
/ Destructor.
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward feeder link device-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdFeederDevThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdFeederDevThroughputHelper()
/ Destructor.
Produce forward feeder link MAC-level throughput statistics from a satellite module simulation.
SatStatsFwdFeederMacThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdFeederMacThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward feeder link PHY-level throughput statistics from a satellite module simulation.
SatStatsFwdFeederPhyThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdFeederPhyThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link device-level throughput statistics from a satellite module simulation.
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
SatStatsFwdUserDevThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsFwdUserDevThroughputHelper()
/ Destructor.
Produce forward user link MAC-level throughput statistics from a satellite module simulation.
virtual ~SatStatsFwdUserMacThroughputHelper()
/ Destructor.
SatStatsFwdUserMacThroughputHelper(Ptr< const SatHelper > satHelper)
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link PHY-level throughput statistics from a satellite module simulation.
SatStatsFwdUserPhyThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::list< Ptr< Probe > > m_probes
Maintains a list of probes created by this helper.
virtual ~SatStatsFwdUserPhyThroughputHelper()
/ Destructor.
Parent abstract class of all satellite statistics helpers.
Ptr< const SatHelper > GetSatHelper() const
uint32_t GetIdentifierForUtUser(Ptr< Node > utUserNode) const
static NetDeviceContainer GetGwSatNetDevice(Ptr< Node > gwNode)
static std::string GetOutputTypeName(OutputType_t outputType)
static Ptr< NetDevice > GetSatSatGeoNetDevice(Ptr< Node > satNode)
virtual std::string GetIdentifierHeading(std::string dataLabel) const
virtual std::string GetOutputPath() const
Ptr< DataCollectionObject > CreateAggregator(std::string aggregatorTypeId, std::string n1="", const AttributeValue &v1=EmptyAttributeValue(), std::string n2="", const AttributeValue &v2=EmptyAttributeValue(), std::string n3="", const AttributeValue &v3=EmptyAttributeValue(), std::string n4="", const AttributeValue &v4=EmptyAttributeValue(), std::string n5="", const AttributeValue &v5=EmptyAttributeValue())
Create the aggregator according to the output type.
virtual std::string GetOutputFileName() const
Compute the path and file name where statistics output should be written to.
uint32_t GetUtId(Ptr< Node > utNode) const
uint32_t CreateCollectorPerIdentifier(CollectorMap &collectorMap) const
Create one collector instance for each identifier in the simulation.
static Ptr< NetDevice > GetUtSatNetDevice(Ptr< Node > utNode)
OutputType_t GetOutputType() const
uint32_t GetIdentifierForUt(Ptr< Node > utNode) const
uint32_t GetUtUserId(Ptr< Node > utUserNode) const
std::string GetName() const
virtual std::string GetTimeHeading(std::string dataLabel) const
virtual std::string GetDistributionHeading(std::string dataLabel) const
Produce return link application-level throughput statistics from a satellite module simulation.
void Ipv4Callback(Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
SatStatsRtnAppThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnAppThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
void SaveIpv4AddressAndIdentifier(Ptr< Node > utUserNode)
Save the IPv4 address and the proper identifier from the given UT user node.
Produce return feeder link device-level throughput statistics from a satellite module simulation.
SatStatsRtnFeederDevThroughputHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnFeederDevThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link MAC-level throughput statistics from a satellite module simulation.
virtual ~SatStatsRtnFeederMacThroughputHelper()
/ Destructor.
SatStatsRtnFeederMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link PHY-level throughput statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsRtnFeederPhyThroughputHelper()
/ Destructor.
SatStatsRtnFeederPhyThroughputHelper(Ptr< const SatHelper > satHelper)
Produce return user link device-level throughput statistics from a satellite module simulation.
virtual ~SatStatsRtnUserDevThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserDevThroughputHelper(Ptr< const SatHelper > satHelper)
Produce return user link MAC-level throughput statistics from a satellite module simulation.
SatStatsRtnUserMacThroughputHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsRtnUserMacThroughputHelper()
/ Destructor.
Produce return user link PHY-level throughput statistics from a satellite module simulation.
virtual ~SatStatsRtnUserPhyThroughputHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserPhyThroughputHelper(Ptr< const SatHelper > satHelper)
CollectorMap m_conversionCollectors
Maintains a list of first-level collectors created by this helper.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the first-level collectors.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
void RxCallback(Ptr< const Packet > packet, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
void SetAveragingMode(bool averagingMode)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void DoInstallProbes()=0
virtual ~SatStatsThroughputHelper()
/ Destructor.
CollectorMap m_terminalCollectors
Maintains a list of second-level collectors created by this helper.
SatStatsThroughputHelper(Ptr< const SatHelper > satHelper)
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for return link).
bool m_averagingMode
AveragingMode attribute.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
bool GetAveragingMode() const
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.