24 #include <ns3/application-delay-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>
34 #include <ns3/mac48-address.h>
35 #include <ns3/magister-gnuplot-aggregator.h>
36 #include <ns3/multi-file-aggregator.h>
37 #include <ns3/net-device.h>
38 #include <ns3/node-container.h>
39 #include <ns3/nstime.h>
40 #include <ns3/probe.h>
41 #include <ns3/satellite-helper.h>
42 #include <ns3/satellite-id-mapper.h>
43 #include <ns3/satellite-mac.h>
44 #include <ns3/satellite-net-device.h>
45 #include <ns3/satellite-orbiter-net-device.h>
46 #include <ns3/satellite-phy.h>
47 #include <ns3/satellite-time-tag.h>
48 #include <ns3/satellite-topology.h>
49 #include <ns3/scalar-collector.h>
50 #include <ns3/singleton.h>
51 #include <ns3/string.h>
52 #include <ns3/traffic-time-tag.h>
53 #include <ns3/unit-conversion-collector.h>
60 NS_LOG_COMPONENT_DEFINE(
"SatStatsLinkDelayHelper");
65 NS_OBJECT_ENSURE_REGISTERED(SatStatsLinkDelayHelper);
69 m_averagingMode(false)
71 NS_LOG_FUNCTION(
this << satHelper);
76 NS_LOG_FUNCTION(
this);
83 TypeId(
"ns3::SatStatsLinkDelayHelper")
85 .AddAttribute(
"AveragingMode",
86 "If true, all samples will be averaged before passed to aggregator. "
87 "Only affects histogram, PDF, and CDF output types.",
91 MakeBooleanChecker());
98 NS_LOG_FUNCTION(
this << averagingMode);
111 NS_LOG_FUNCTION(
this);
117 <<
" is not a valid output type for this statistics.");
127 "EnableContextPrinting",
135 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
138 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SAMPLE));
142 &MultiFileAggregator::Write1d);
157 EnumValue(UnitConversionCollector::TRANSPARENT));
161 &MultiFileAggregator::Write2d);
176 "EnableContextPrinting",
180 Ptr<MultiFileAggregator> fileAggregator =
182 NS_ASSERT(fileAggregator !=
nullptr);
186 DistributionCollector::OutputType_t outputType =
187 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
190 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
194 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
201 MakeCallback(&MultiFileAggregator::Write2d, fileAggregator));
205 MakeCallback(&MultiFileAggregator::AddContextHeading, fileAggregator));
209 MakeCallback(&MultiFileAggregator::EnableContextWarning, fileAggregator));
214 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
217 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SAMPLE));
219 Callback<void, double> callback =
225 it->second->TraceConnectWithoutContext(
"Output", callback);
239 DistributionCollector::OutputType_t outputType =
240 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
243 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
247 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
253 &MultiFileAggregator::Write2d);
256 &MultiFileAggregator::AddContextHeading);
259 &MultiFileAggregator::EnableContextWarning);
268 <<
" is not a valid output type for this statistics.");
278 Ptr<MagisterGnuplotAggregator> plotAggregator =
280 NS_ASSERT(plotAggregator !=
nullptr);
282 plotAggregator->SetLegend(
"Time (in seconds)",
"Packet delay (in seconds)");
283 plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
288 EnumValue(UnitConversionCollector::TRANSPARENT));
294 const std::string context = it->second->GetName();
295 plotAggregator->Add2dDataset(context, context);
299 &MagisterGnuplotAggregator::Write2d);
314 Ptr<MagisterGnuplotAggregator> plotAggregator =
316 NS_ASSERT(plotAggregator !=
nullptr);
318 plotAggregator->SetLegend(
"Packet delay (in seconds)",
"Frequency");
319 plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
325 DistributionCollector::OutputType_t outputType =
326 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
329 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
333 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
340 MakeCallback(&MagisterGnuplotAggregator::Write2d, plotAggregator));
346 EnumValue(ScalarCollector::INPUT_DATA_TYPE_DOUBLE));
349 EnumValue(ScalarCollector::OUTPUT_TYPE_AVERAGE_PER_SAMPLE));
351 Callback<void, double> callback =
357 it->second->TraceConnectWithoutContext(
"Output", callback);
368 Ptr<MagisterGnuplotAggregator> plotAggregator =
370 NS_ASSERT(plotAggregator !=
nullptr);
372 plotAggregator->SetLegend(
"Packet delay (in seconds)",
"Frequency");
373 plotAggregator->Set2dDatasetDefaultStyle(Gnuplot2dDataset::LINES);
377 DistributionCollector::OutputType_t outputType =
378 DistributionCollector::OUTPUT_TYPE_HISTOGRAM;
381 outputType = DistributionCollector::OUTPUT_TYPE_PROBABILITY;
385 outputType = DistributionCollector::OUTPUT_TYPE_CUMULATIVE;
393 const std::string context = it->second->GetName();
394 plotAggregator->Add2dDataset(context, context);
398 &MagisterGnuplotAggregator::Write2d);
405 NS_FATAL_ERROR(
"SatStatsLinkDelayHelper - Invalid output type");
426 if (from.IsInvalid())
428 NS_LOG_WARN(
this <<
" discarding a packet delay of " << delay.GetSeconds()
429 <<
" from statistics collection because of"
430 <<
" invalid sender address");
432 else if (Mac48Address::ConvertFrom(from).IsBroadcast())
442 std::map<const Address, uint32_t>::const_iterator it =
m_identifierMap.find(from);
450 NS_LOG_WARN(
this <<
" discarding a packet delay of " << delay.GetSeconds()
451 <<
" from statistics collection because of"
452 <<
" unknown sender address " << from);
460 NS_LOG_FUNCTION(
this << probe << probe->GetName() << identifier);
470 &ScalarCollector::TraceSinkDouble);
478 &UnitConversionCollector::TraceSinkDouble);
492 &ScalarCollector::TraceSinkDouble);
499 &DistributionCollector::TraceSinkDouble);
505 <<
" is not a valid output type for this statistics.");
511 NS_LOG_INFO(
this <<
" created probe " << probe->GetName() <<
", connected to collector "
516 NS_LOG_WARN(
this <<
" unable to connect probe " << probe->GetName() <<
" to collector "
526 NS_LOG_FUNCTION(
this << probe << probe->GetName() << identifier);
536 &ScalarCollector::TraceSinkDouble);
544 &UnitConversionCollector::TraceSinkDouble);
558 &ScalarCollector::TraceSinkDouble);
565 &DistributionCollector::TraceSinkDouble);
571 <<
" is not a valid output type for this statistics.");
577 NS_LOG_INFO(
this <<
" probe " << probe->GetName() <<
", disconnected from collector "
582 NS_LOG_WARN(
this <<
" unable to disconnect probe " << probe->GetName() <<
" from collector "
595 NS_ASSERT_MSG(collector !=
nullptr,
"Unable to find collector with identifier " << identifier);
601 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
602 NS_ASSERT(c !=
nullptr);
603 c->TraceSinkDouble(0.0, delay.GetSeconds());
609 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
610 NS_ASSERT(c !=
nullptr);
611 c->TraceSinkDouble(0.0, delay.GetSeconds());
623 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
624 NS_ASSERT(c !=
nullptr);
625 c->TraceSinkDouble(0.0, delay.GetSeconds());
629 Ptr<DistributionCollector> c = collector->GetObject<DistributionCollector>();
630 NS_ASSERT(c !=
nullptr);
631 c->TraceSinkDouble(0.0, delay.GetSeconds());
637 <<
" is not a valid output type for this statistics.");
649 Ptr<const SatHelper> satHelper)
652 NS_LOG_FUNCTION(
this << satHelper);
657 NS_LOG_FUNCTION(
this);
671 NS_LOG_FUNCTION(
this);
673 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
674 Callback<void, const Time&, const Address&> callback =
677 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
681 NS_ASSERT(satOrbiterDev !=
nullptr);
682 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
685 if (satOrbiterDev->TraceConnectWithoutContext(
"RxFeederLinkDelay", callback))
687 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
688 <<
" device #" << satOrbiterDev->GetIfIndex());
692 NS_FATAL_ERROR(
"Error connecting to RxFeederLinkDelay trace source of SatNetDevice"
693 <<
" at node ID " << (*it)->GetId() <<
" device #"
694 << satOrbiterDev->GetIfIndex());
698 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
700 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
706 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
707 NS_ASSERT(satDev !=
nullptr);
709 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
714 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
715 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
719 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
721 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
722 NS_ASSERT(satDev !=
nullptr);
724 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
737 NS_LOG_FUNCTION(
this << satHelper);
742 NS_LOG_FUNCTION(
this);
756 NS_LOG_FUNCTION(
this);
758 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
760 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
764 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
767 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
769 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
771 const int32_t utId =
GetUtId(*it);
772 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
776 std::ostringstream probeName;
778 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
779 probe->SetName(probeName.str());
782 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
783 NS_ASSERT(satDev !=
nullptr);
786 if (probe->ConnectByObject(
"RxLinkDelay", satDev) &&
790 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
793 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
797 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatMac"
798 <<
" at node ID " << (*it)->GetId() <<
" device #2");
804 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
805 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
809 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
811 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
812 NS_ASSERT(satDev !=
nullptr);
814 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
823 NS_LOG_FUNCTION(
this);
825 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
829 Ptr<Probe> probe = it->first;
830 Ptr<Node> node = it->second.first;
831 uint32_t identifier = it->second.second;
835 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
842 NS_FATAL_ERROR(
"Error connecting trace file on handover");
845 it->second.second = identifier;
854 Ptr<const SatHelper> satHelper)
857 NS_LOG_FUNCTION(
this << satHelper);
862 NS_LOG_FUNCTION(
this);
876 NS_LOG_FUNCTION(
this);
878 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
879 Callback<void, const Time&, const Address&> callback =
882 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
886 NS_ASSERT(satOrbiterDev !=
nullptr);
887 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
888 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
890 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
891 it2 != satOrbiterFeederMacs.end();
894 satMac = it2->second;
895 NS_ASSERT(satMac !=
nullptr);
896 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
899 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
901 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
902 <<
" device #" << satOrbiterDev->GetIfIndex());
905 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
909 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
910 <<
" at node ID " << (*it)->GetId() <<
" device #"
911 << satOrbiterDev->GetIfIndex());
914 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
915 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
916 it2 != satOrbiterUserMacs.end();
919 satMac = it2->second;
920 NS_ASSERT(satMac !=
nullptr);
921 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
925 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
927 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
933 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
934 NS_ASSERT(satDev !=
nullptr);
935 Ptr<SatMac> satMac = satDev->GetMac();
936 NS_ASSERT(satMac !=
nullptr);
938 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
939 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
944 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
945 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
949 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
951 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
952 NS_ASSERT(satDev !=
nullptr);
953 Ptr<SatMac> satMac = satDev->GetMac();
954 NS_ASSERT(satMac !=
nullptr);
956 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
957 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
970 NS_LOG_FUNCTION(
this << satHelper);
975 NS_LOG_FUNCTION(
this);
989 NS_LOG_FUNCTION(
this);
991 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
993 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
997 NS_ASSERT(satOrbiterDev !=
nullptr);
998 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
999 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1001 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1002 it2 != satOrbiterFeederMacs.end();
1005 satMac = it2->second;
1006 NS_ASSERT(satMac !=
nullptr);
1007 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1009 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1010 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1011 it2 != satOrbiterUserMacs.end();
1014 satMac = it2->second;
1015 NS_ASSERT(satMac !=
nullptr);
1016 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1020 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1022 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1024 const int32_t utId =
GetUtId(*it);
1025 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1029 std::ostringstream probeName;
1031 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1032 probe->SetName(probeName.str());
1035 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1036 NS_ASSERT(satDev !=
nullptr);
1037 Ptr<SatMac> satMac = satDev->GetMac();
1038 NS_ASSERT(satMac !=
nullptr);
1041 if (probe->ConnectByObject(
"RxLinkDelay", satMac) &&
1045 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1048 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1049 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1053 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatMac"
1054 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1060 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1061 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1065 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1067 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1068 NS_ASSERT(satDev !=
nullptr);
1069 Ptr<SatMac> satMac = satDev->GetMac();
1070 NS_ASSERT(satMac !=
nullptr);
1072 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1073 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1082 NS_LOG_FUNCTION(
this);
1084 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1088 Ptr<Probe> probe = it->first;
1089 Ptr<Node> node = it->second.first;
1090 uint32_t identifier = it->second.second;
1094 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1101 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1104 it->second.second = identifier;
1113 Ptr<const SatHelper> satHelper)
1116 NS_LOG_FUNCTION(
this << satHelper);
1121 NS_LOG_FUNCTION(
this);
1135 NS_LOG_FUNCTION(
this);
1137 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1138 Callback<void, const Time&, const Address&> callback =
1141 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1145 NS_ASSERT(satOrbiterDev !=
nullptr);
1146 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1147 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1149 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1150 it2 != satOrbiterFeederPhys.end();
1153 satPhy = it2->second;
1154 NS_ASSERT(satPhy !=
nullptr);
1155 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1158 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1160 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1161 <<
" device #" << satOrbiterDev->GetIfIndex());
1164 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1168 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1169 <<
" at node ID " << (*it)->GetId() <<
" device #"
1170 << satOrbiterDev->GetIfIndex());
1173 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1174 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1175 it2 != satOrbiterUserPhys.end();
1178 satPhy = it2->second;
1179 NS_ASSERT(satPhy !=
nullptr);
1180 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1184 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1186 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1192 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1193 NS_ASSERT(satDev !=
nullptr);
1194 Ptr<SatPhy> satPhy = satDev->GetPhy();
1195 NS_ASSERT(satPhy !=
nullptr);
1197 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1198 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1203 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1204 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1208 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1210 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1211 NS_ASSERT(satDev !=
nullptr);
1212 Ptr<SatPhy> satPhy = satDev->GetPhy();
1213 NS_ASSERT(satPhy !=
nullptr);
1215 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1216 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1229 NS_LOG_FUNCTION(
this << satHelper);
1234 NS_LOG_FUNCTION(
this);
1248 NS_LOG_FUNCTION(
this);
1250 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1252 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1256 NS_ASSERT(satOrbiterDev !=
nullptr);
1257 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1258 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1260 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1261 it2 != satOrbiterFeederPhys.end();
1264 satPhy = it2->second;
1265 NS_ASSERT(satPhy !=
nullptr);
1266 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1268 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1269 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1270 it2 != satOrbiterUserPhys.end();
1273 satPhy = it2->second;
1274 NS_ASSERT(satPhy !=
nullptr);
1275 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1279 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1281 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1283 const int32_t utId =
GetUtId(*it);
1284 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1288 std::ostringstream probeName;
1290 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1291 probe->SetName(probeName.str());
1294 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1295 NS_ASSERT(satDev !=
nullptr);
1296 Ptr<SatPhy> satPhy = satDev->GetPhy();
1297 NS_ASSERT(satPhy !=
nullptr);
1300 if (probe->ConnectByObject(
"RxLinkDelay", satPhy) &&
1304 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1307 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1308 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1312 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatPhy"
1313 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1319 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1320 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1324 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1326 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1327 NS_ASSERT(satDev !=
nullptr);
1328 Ptr<SatPhy> satPhy = satDev->GetPhy();
1329 NS_ASSERT(satPhy !=
nullptr);
1331 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1332 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1341 NS_LOG_FUNCTION(
this);
1343 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1347 Ptr<Probe> probe = it->first;
1348 Ptr<Node> node = it->second.first;
1349 uint32_t identifier = it->second.second;
1353 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1360 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1363 it->second.second = identifier;
1372 Ptr<const SatHelper> satHelper)
1375 NS_LOG_FUNCTION(
this << satHelper);
1380 NS_LOG_FUNCTION(
this);
1394 NS_LOG_FUNCTION(
this);
1396 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1398 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1403 NS_ASSERT(satOrbiterDev !=
nullptr);
1404 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1407 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1408 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1415 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1416 NS_ASSERT(satDev !=
nullptr);
1417 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1422 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1423 Callback<void, const Time&, const Address&> callback =
1426 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1430 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1432 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1433 NS_ASSERT(satDev !=
nullptr);
1436 if (satDev->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1438 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1439 <<
" device #" << satDev->GetIfIndex());
1442 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1446 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1447 <<
" at node ID " << (*it)->GetId() <<
" device #"
1448 << satDev->GetIfIndex());
1464 NS_LOG_FUNCTION(
this << satHelper);
1469 NS_LOG_FUNCTION(
this);
1483 NS_LOG_FUNCTION(
this);
1485 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1486 Callback<void, const Time&, const Address&> callback =
1489 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1493 NS_ASSERT(satOrbiterDev !=
nullptr);
1494 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1497 if (satOrbiterDev->TraceConnectWithoutContext(
"RxUserLinkDelay", callback))
1499 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1500 <<
" device #" << satOrbiterDev->GetIfIndex());
1504 NS_FATAL_ERROR(
"Error connecting to RxUserLinkDelay trace source of SatNetDevice"
1505 <<
" at node ID " << (*it)->GetId() <<
" device #"
1506 << satOrbiterDev->GetIfIndex());
1510 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1511 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1518 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1519 NS_ASSERT(satDev !=
nullptr);
1520 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1525 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1527 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1531 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1533 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1534 NS_ASSERT(satDev !=
nullptr);
1536 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1548 Ptr<const SatHelper> satHelper)
1551 NS_LOG_FUNCTION(
this << satHelper);
1556 NS_LOG_FUNCTION(
this);
1570 NS_LOG_FUNCTION(
this);
1572 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1574 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1579 NS_ASSERT(satOrbiterDev !=
nullptr);
1580 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1581 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1582 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1583 it2 != satOrbiterFeederMacs.end();
1586 satMac = it2->second;
1587 NS_ASSERT(satMac !=
nullptr);
1588 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1590 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1591 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1592 it2 != satOrbiterUserMacs.end();
1595 satMac = it2->second;
1596 NS_ASSERT(satMac !=
nullptr);
1597 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1601 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1602 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1609 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1610 NS_ASSERT(satDev !=
nullptr);
1611 Ptr<SatMac> satMac = satDev->GetMac();
1612 NS_ASSERT(satMac !=
nullptr);
1613 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1614 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1619 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1620 Callback<void, const Time&, const Address&> callback =
1623 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1627 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1629 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1630 NS_ASSERT(satDev !=
nullptr);
1631 Ptr<SatMac> satMac = satDev->GetMac();
1632 NS_ASSERT(satMac !=
nullptr);
1635 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1637 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1638 <<
" device #" << satDev->GetIfIndex());
1641 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1642 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1646 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1647 <<
" at node ID " << (*it)->GetId() <<
" device #"
1648 << satDev->GetIfIndex());
1664 NS_LOG_FUNCTION(
this << satHelper);
1669 NS_LOG_FUNCTION(
this);
1683 NS_LOG_FUNCTION(
this);
1685 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1686 Callback<void, const Time&, const Address&> callback =
1689 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1693 NS_ASSERT(satOrbiterDev !=
nullptr);
1694 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1695 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1697 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1698 it2 != satOrbiterFeederMacs.end();
1701 satMac = it2->second;
1702 NS_ASSERT(satMac !=
nullptr);
1703 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1705 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1706 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1707 it2 != satOrbiterUserMacs.end();
1710 satMac = it2->second;
1711 NS_ASSERT(satMac !=
nullptr);
1712 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1715 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1717 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1718 <<
" device #" << satOrbiterDev->GetIfIndex());
1722 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1723 <<
" at node ID " << (*it)->GetId() <<
" device #"
1724 << satOrbiterDev->GetIfIndex());
1729 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1730 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1737 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1738 NS_ASSERT(satDev !=
nullptr);
1739 Ptr<SatMac> satMac = satDev->GetMac();
1740 NS_ASSERT(satMac !=
nullptr);
1741 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1742 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1747 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1749 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1753 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1755 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1756 NS_ASSERT(satDev !=
nullptr);
1757 Ptr<SatMac> satMac = satDev->GetMac();
1758 NS_ASSERT(satMac !=
nullptr);
1760 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1761 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1773 Ptr<const SatHelper> satHelper)
1776 NS_LOG_FUNCTION(
this << satHelper);
1781 NS_LOG_FUNCTION(
this);
1795 NS_LOG_FUNCTION(
this);
1797 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1799 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1804 NS_ASSERT(satOrbiterDev !=
nullptr);
1805 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1806 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1807 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1808 it2 != satOrbiterFeederPhys.end();
1811 satPhy = it2->second;
1812 NS_ASSERT(satPhy !=
nullptr);
1813 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1815 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1816 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1817 it2 != satOrbiterUserPhys.end();
1820 satPhy = it2->second;
1821 NS_ASSERT(satPhy !=
nullptr);
1822 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1826 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1827 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1834 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1835 NS_ASSERT(satDev !=
nullptr);
1836 Ptr<SatPhy> satPhy = satDev->GetPhy();
1837 NS_ASSERT(satPhy !=
nullptr);
1838 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1839 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1844 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1845 Callback<void, const Time&, const Address&> callback =
1848 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1852 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1854 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1855 NS_ASSERT(satDev !=
nullptr);
1856 Ptr<SatPhy> satPhy = satDev->GetPhy();
1857 NS_ASSERT(satPhy !=
nullptr);
1860 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1862 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1863 <<
" device #" << satDev->GetIfIndex());
1866 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1867 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1871 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1872 <<
" at node ID " << (*it)->GetId() <<
" device #"
1873 << satDev->GetIfIndex());
1889 NS_LOG_FUNCTION(
this << satHelper);
1894 NS_LOG_FUNCTION(
this);
1908 NS_LOG_FUNCTION(
this);
1910 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1911 Callback<void, const Time&, const Address&> callback =
1914 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1918 NS_ASSERT(satOrbiterDev !=
nullptr);
1919 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1920 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1922 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1923 it2 != satOrbiterFeederPhys.end();
1926 satPhy = it2->second;
1927 NS_ASSERT(satPhy !=
nullptr);
1928 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1930 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1931 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1932 it2 != satOrbiterUserPhys.end();
1935 satPhy = it2->second;
1936 NS_ASSERT(satPhy !=
nullptr);
1937 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1940 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1942 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1943 <<
" device #" << satOrbiterDev->GetIfIndex());
1947 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1948 <<
" at node ID " << (*it)->GetId() <<
" device #"
1949 << satOrbiterDev->GetIfIndex());
1954 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1955 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1962 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1963 NS_ASSERT(satDev !=
nullptr);
1964 Ptr<SatPhy> satPhy = satDev->GetPhy();
1965 NS_ASSERT(satPhy !=
nullptr);
1966 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1967 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1972 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1974 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1978 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1980 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1981 NS_ASSERT(satDev !=
nullptr);
1982 Ptr<SatPhy> satPhy = satDev->GetPhy();
1983 NS_ASSERT(satPhy !=
nullptr);
1985 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1986 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
SatNetDevice to be utilized in the UT and GW nodes.
SatOrbiterNetDevice to be utilized in geostationary satellite.
Produce forward feeder link DEV-level delay statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsFwdFeederDevLinkDelayHelper()
/ Destructor.
SatStatsFwdFeederDevLinkDelayHelper(Ptr< const SatHelper > satHelper)
Produce forward feeder link MAC-level delay statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdFeederMacLinkDelayHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdFeederMacLinkDelayHelper()
/ Destructor.
Produce forward feeder link PHY-level delay statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsFwdFeederPhyLinkDelayHelper()
/ Destructor.
SatStatsFwdFeederPhyLinkDelayHelper(Ptr< const SatHelper > satHelper)
Produce forward user link DEV-level delay statistics from a satellite module simulation.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual ~SatStatsFwdUserDevLinkDelayHelper()
/ Destructor.
SatStatsFwdUserDevLinkDelayHelper(Ptr< const SatHelper > satHelper)
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link MAC-level delay statistics from a satellite module simulation.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual ~SatStatsFwdUserMacLinkDelayHelper()
/ Destructor.
SatStatsFwdUserMacLinkDelayHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce forward user link PHY-level delay statistics from a satellite module simulation.
SatStatsFwdUserPhyLinkDelayHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual ~SatStatsFwdUserPhyLinkDelayHelper()
/ Destructor.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
Parent abstract class of all satellite statistics helpers.
static Ptr< NetDevice > GetSatSatOrbiterNetDevice(Ptr< Node > satNode)
static NetDeviceContainer GetGwSatNetDevice(Ptr< Node > gwNode)
virtual void SaveAddressAndIdentifier(Ptr< Node > utNode)
Save the address and the proper identifier from the given UT node.
static std::string GetOutputTypeName(OutputType_t outputType)
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
std::string GetName() const
virtual std::string GetTimeHeading(std::string dataLabel) const
virtual std::string GetDistributionHeading(std::string dataLabel) const
Base class for delay statistics helpers.
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
static TypeId GetTypeId()
inherited from ObjectBase base class
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
std::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it (for return link).
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
bool ConnectProbeToCollector(Ptr< Probe > probe, uint32_t identifier)
Connect the probe to the right collector.
bool m_averagingMode
AveragingMode attribute.
void PassSampleToCollector(const Time &delay, uint32_t identifier)
Find a collector with the right identifier and pass a sample data to it.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
SatStatsLinkDelayHelper(Ptr< const SatHelper > satHelper)
void SetAveragingMode(bool averagingMode)
virtual ~SatStatsLinkDelayHelper()
/ Destructor.
void RxLinkDelayCallback(const Time &delay, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
bool GetAveragingMode() const
virtual void DoInstallProbes()=0
bool DisconnectProbeFromCollector(Ptr< Probe > probe, uint32_t identifier)
Disconnect the probe from the right collector.
Produce return feeder link DEV-level delay statistics from a satellite module simulation.
virtual ~SatStatsRtnFeederDevLinkDelayHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnFeederDevLinkDelayHelper(Ptr< const SatHelper > satHelper)
Produce return feeder link MAC-level delay statistics from a satellite module simulation.
SatStatsRtnFeederMacLinkDelayHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnFeederMacLinkDelayHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link PHY-level delay statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnFeederPhyLinkDelayHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnFeederPhyLinkDelayHelper()
/ Destructor.
Produce return user link DEV-level delay statistics from a satellite module simulation.
virtual ~SatStatsRtnUserDevLinkDelayHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserDevLinkDelayHelper(Ptr< const SatHelper > satHelper)
Produce return user link MAC-level delay statistics from a satellite module simulation.
virtual ~SatStatsRtnUserMacLinkDelayHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserMacLinkDelayHelper(Ptr< const SatHelper > satHelper)
Produce return user link PHY-level delay statistics from a satellite module simulation.
SatStatsRtnUserPhyLinkDelayHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnUserPhyLinkDelayHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.