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"
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"
60NS_LOG_COMPONENT_DEFINE(
"SatStatsLinkDelayHelper");
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" <<
" invalid sender address");
431 else if (Mac48Address::ConvertFrom(from).IsBroadcast())
441 std::map<const Address, uint32_t>::const_iterator it =
m_identifierMap.find(from);
449 NS_LOG_WARN(
this <<
" discarding a packet delay of " << delay.GetSeconds()
450 <<
" from statistics collection because of"
451 <<
" unknown sender address " << from);
459 NS_LOG_FUNCTION(
this << probe << probe->GetName() << identifier);
469 &ScalarCollector::TraceSinkDouble);
477 &UnitConversionCollector::TraceSinkDouble);
491 &ScalarCollector::TraceSinkDouble);
498 &DistributionCollector::TraceSinkDouble);
504 <<
" is not a valid output type for this statistics.");
510 NS_LOG_INFO(
this <<
" created probe " << probe->GetName() <<
", connected to collector "
515 NS_LOG_WARN(
this <<
" unable to connect probe " << probe->GetName() <<
" to collector "
525 NS_LOG_FUNCTION(
this << probe << probe->GetName() << identifier);
535 &ScalarCollector::TraceSinkDouble);
543 &UnitConversionCollector::TraceSinkDouble);
557 &ScalarCollector::TraceSinkDouble);
564 &DistributionCollector::TraceSinkDouble);
570 <<
" is not a valid output type for this statistics.");
576 NS_LOG_INFO(
this <<
" probe " << probe->GetName() <<
", disconnected from collector "
581 NS_LOG_WARN(
this <<
" unable to disconnect probe " << probe->GetName() <<
" from collector "
594 NS_ASSERT_MSG(collector !=
nullptr,
"Unable to find collector with identifier " << identifier);
600 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
601 NS_ASSERT(c !=
nullptr);
602 c->TraceSinkDouble(0.0, delay.GetSeconds());
608 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
609 NS_ASSERT(c !=
nullptr);
610 c->TraceSinkDouble(0.0, delay.GetSeconds());
622 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
623 NS_ASSERT(c !=
nullptr);
624 c->TraceSinkDouble(0.0, delay.GetSeconds());
628 Ptr<DistributionCollector> c = collector->GetObject<DistributionCollector>();
629 NS_ASSERT(c !=
nullptr);
630 c->TraceSinkDouble(0.0, delay.GetSeconds());
636 <<
" is not a valid output type for this statistics.");
648 Ptr<const SatHelper> satHelper)
651 NS_LOG_FUNCTION(
this << satHelper);
656 NS_LOG_FUNCTION(
this);
670 NS_LOG_FUNCTION(
this);
672 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
673 Callback<void, const Time&, const Address&> callback =
676 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
680 NS_ASSERT(satOrbiterDev !=
nullptr);
681 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
684 if (satOrbiterDev->TraceConnectWithoutContext(
"RxFeederLinkDelay", callback))
686 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
687 <<
" device #" << satOrbiterDev->GetIfIndex());
691 NS_FATAL_ERROR(
"Error connecting to RxFeederLinkDelay trace source of SatNetDevice"
692 <<
" at node ID " << (*it)->GetId() <<
" device #"
693 << satOrbiterDev->GetIfIndex());
697 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
699 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
705 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
706 NS_ASSERT(satDev !=
nullptr);
708 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
713 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
714 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
718 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
720 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
721 NS_ASSERT(satDev !=
nullptr);
723 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
736 NS_LOG_FUNCTION(
this << satHelper);
741 NS_LOG_FUNCTION(
this);
755 NS_LOG_FUNCTION(
this);
757 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
759 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
763 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
766 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
768 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
770 const int32_t utId =
GetUtId(*it);
771 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
775 std::ostringstream probeName;
777 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
778 probe->SetName(probeName.str());
781 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
782 NS_ASSERT(satDev !=
nullptr);
785 if (probe->ConnectByObject(
"RxLinkDelay", satDev) &&
789 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
792 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
796 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatMac"
797 <<
" at node ID " << (*it)->GetId() <<
" device #2");
803 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
804 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
808 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
810 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
811 NS_ASSERT(satDev !=
nullptr);
813 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
822 NS_LOG_FUNCTION(
this);
824 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
828 Ptr<Probe> probe = it->first;
829 Ptr<Node> node = it->second.first;
830 uint32_t identifier = it->second.second;
834 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
841 NS_FATAL_ERROR(
"Error connecting trace file on handover");
844 it->second.second = identifier;
853 Ptr<const SatHelper> satHelper)
856 NS_LOG_FUNCTION(
this << satHelper);
861 NS_LOG_FUNCTION(
this);
875 NS_LOG_FUNCTION(
this);
877 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
878 Callback<void, const Time&, const Address&> callback =
881 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
885 NS_ASSERT(satOrbiterDev !=
nullptr);
886 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
887 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
889 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
890 it2 != satOrbiterFeederMacs.end();
893 satMac = it2->second;
894 NS_ASSERT(satMac !=
nullptr);
895 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
898 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
900 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
901 <<
" device #" << satOrbiterDev->GetIfIndex());
904 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
908 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
909 <<
" at node ID " << (*it)->GetId() <<
" device #"
910 << satOrbiterDev->GetIfIndex());
913 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
914 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
915 it2 != satOrbiterUserMacs.end();
918 satMac = it2->second;
919 NS_ASSERT(satMac !=
nullptr);
920 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
924 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
926 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
932 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
933 NS_ASSERT(satDev !=
nullptr);
934 Ptr<SatMac> satMac = satDev->GetMac();
935 NS_ASSERT(satMac !=
nullptr);
937 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
938 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
943 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
944 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
948 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
950 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
951 NS_ASSERT(satDev !=
nullptr);
952 Ptr<SatMac> satMac = satDev->GetMac();
953 NS_ASSERT(satMac !=
nullptr);
955 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
956 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
969 NS_LOG_FUNCTION(
this << satHelper);
974 NS_LOG_FUNCTION(
this);
988 NS_LOG_FUNCTION(
this);
990 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
992 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
996 NS_ASSERT(satOrbiterDev !=
nullptr);
997 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
998 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1000 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1001 it2 != satOrbiterFeederMacs.end();
1004 satMac = it2->second;
1005 NS_ASSERT(satMac !=
nullptr);
1006 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1008 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1009 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1010 it2 != satOrbiterUserMacs.end();
1013 satMac = it2->second;
1014 NS_ASSERT(satMac !=
nullptr);
1015 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1019 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1021 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1023 const int32_t utId =
GetUtId(*it);
1024 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1028 std::ostringstream probeName;
1030 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1031 probe->SetName(probeName.str());
1034 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1035 NS_ASSERT(satDev !=
nullptr);
1036 Ptr<SatMac> satMac = satDev->GetMac();
1037 NS_ASSERT(satMac !=
nullptr);
1040 if (probe->ConnectByObject(
"RxLinkDelay", satMac) &&
1044 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1047 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1048 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1052 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatMac"
1053 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1059 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1060 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1064 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1066 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1067 NS_ASSERT(satDev !=
nullptr);
1068 Ptr<SatMac> satMac = satDev->GetMac();
1069 NS_ASSERT(satMac !=
nullptr);
1071 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1072 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1081 NS_LOG_FUNCTION(
this);
1083 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1087 Ptr<Probe> probe = it->first;
1088 Ptr<Node> node = it->second.first;
1089 uint32_t identifier = it->second.second;
1093 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1100 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1103 it->second.second = identifier;
1112 Ptr<const SatHelper> satHelper)
1115 NS_LOG_FUNCTION(
this << satHelper);
1120 NS_LOG_FUNCTION(
this);
1134 NS_LOG_FUNCTION(
this);
1136 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1137 Callback<void, const Time&, const Address&> callback =
1140 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1144 NS_ASSERT(satOrbiterDev !=
nullptr);
1145 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1146 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1148 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1149 it2 != satOrbiterFeederPhys.end();
1152 satPhy = it2->second;
1153 NS_ASSERT(satPhy !=
nullptr);
1154 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1157 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1159 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1160 <<
" device #" << satOrbiterDev->GetIfIndex());
1163 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1167 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1168 <<
" at node ID " << (*it)->GetId() <<
" device #"
1169 << satOrbiterDev->GetIfIndex());
1172 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1173 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1174 it2 != satOrbiterUserPhys.end();
1177 satPhy = it2->second;
1178 NS_ASSERT(satPhy !=
nullptr);
1179 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1183 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1185 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1191 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1192 NS_ASSERT(satDev !=
nullptr);
1193 Ptr<SatPhy> satPhy = satDev->GetPhy();
1194 NS_ASSERT(satPhy !=
nullptr);
1196 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1197 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1202 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1203 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1207 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1209 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1210 NS_ASSERT(satDev !=
nullptr);
1211 Ptr<SatPhy> satPhy = satDev->GetPhy();
1212 NS_ASSERT(satPhy !=
nullptr);
1214 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1215 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1228 NS_LOG_FUNCTION(
this << satHelper);
1233 NS_LOG_FUNCTION(
this);
1247 NS_LOG_FUNCTION(
this);
1249 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1251 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1255 NS_ASSERT(satOrbiterDev !=
nullptr);
1256 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1257 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1259 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1260 it2 != satOrbiterFeederPhys.end();
1263 satPhy = it2->second;
1264 NS_ASSERT(satPhy !=
nullptr);
1265 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1267 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1268 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1269 it2 != satOrbiterUserPhys.end();
1272 satPhy = it2->second;
1273 NS_ASSERT(satPhy !=
nullptr);
1274 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1278 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1280 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1282 const int32_t utId =
GetUtId(*it);
1283 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1287 std::ostringstream probeName;
1289 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1290 probe->SetName(probeName.str());
1293 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1294 NS_ASSERT(satDev !=
nullptr);
1295 Ptr<SatPhy> satPhy = satDev->GetPhy();
1296 NS_ASSERT(satPhy !=
nullptr);
1299 if (probe->ConnectByObject(
"RxLinkDelay", satPhy) &&
1303 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1306 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1307 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1311 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatPhy"
1312 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1318 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1319 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1323 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1325 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1326 NS_ASSERT(satDev !=
nullptr);
1327 Ptr<SatPhy> satPhy = satDev->GetPhy();
1328 NS_ASSERT(satPhy !=
nullptr);
1330 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1331 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1340 NS_LOG_FUNCTION(
this);
1342 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1346 Ptr<Probe> probe = it->first;
1347 Ptr<Node> node = it->second.first;
1348 uint32_t identifier = it->second.second;
1352 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1359 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1362 it->second.second = identifier;
1371 Ptr<const SatHelper> satHelper)
1374 NS_LOG_FUNCTION(
this << satHelper);
1379 NS_LOG_FUNCTION(
this);
1393 NS_LOG_FUNCTION(
this);
1395 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1397 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1402 NS_ASSERT(satOrbiterDev !=
nullptr);
1403 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1406 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1407 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1414 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1415 NS_ASSERT(satDev !=
nullptr);
1416 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1421 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1422 Callback<void, const Time&, const Address&> callback =
1425 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1429 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1431 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1432 NS_ASSERT(satDev !=
nullptr);
1435 if (satDev->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1437 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1438 <<
" device #" << satDev->GetIfIndex());
1441 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1445 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1446 <<
" at node ID " << (*it)->GetId() <<
" device #"
1447 << satDev->GetIfIndex());
1463 NS_LOG_FUNCTION(
this << satHelper);
1468 NS_LOG_FUNCTION(
this);
1482 NS_LOG_FUNCTION(
this);
1484 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1485 Callback<void, const Time&, const Address&> callback =
1488 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1492 NS_ASSERT(satOrbiterDev !=
nullptr);
1493 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1496 if (satOrbiterDev->TraceConnectWithoutContext(
"RxUserLinkDelay", callback))
1498 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1499 <<
" device #" << satOrbiterDev->GetIfIndex());
1503 NS_FATAL_ERROR(
"Error connecting to RxUserLinkDelay trace source of SatNetDevice"
1504 <<
" at node ID " << (*it)->GetId() <<
" device #"
1505 << satOrbiterDev->GetIfIndex());
1509 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1510 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1517 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1518 NS_ASSERT(satDev !=
nullptr);
1519 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1524 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1526 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1530 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1532 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1533 NS_ASSERT(satDev !=
nullptr);
1535 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1547 Ptr<const SatHelper> satHelper)
1550 NS_LOG_FUNCTION(
this << satHelper);
1555 NS_LOG_FUNCTION(
this);
1569 NS_LOG_FUNCTION(
this);
1571 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1573 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1578 NS_ASSERT(satOrbiterDev !=
nullptr);
1579 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1580 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1581 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1582 it2 != satOrbiterFeederMacs.end();
1585 satMac = it2->second;
1586 NS_ASSERT(satMac !=
nullptr);
1587 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1589 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1590 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1591 it2 != satOrbiterUserMacs.end();
1594 satMac = it2->second;
1595 NS_ASSERT(satMac !=
nullptr);
1596 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1600 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1601 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1608 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1609 NS_ASSERT(satDev !=
nullptr);
1610 Ptr<SatMac> satMac = satDev->GetMac();
1611 NS_ASSERT(satMac !=
nullptr);
1612 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1613 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1618 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1619 Callback<void, const Time&, const Address&> callback =
1622 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1626 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1628 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1629 NS_ASSERT(satDev !=
nullptr);
1630 Ptr<SatMac> satMac = satDev->GetMac();
1631 NS_ASSERT(satMac !=
nullptr);
1634 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1636 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1637 <<
" device #" << satDev->GetIfIndex());
1640 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1641 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1645 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1646 <<
" at node ID " << (*it)->GetId() <<
" device #"
1647 << satDev->GetIfIndex());
1663 NS_LOG_FUNCTION(
this << satHelper);
1668 NS_LOG_FUNCTION(
this);
1682 NS_LOG_FUNCTION(
this);
1684 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1685 Callback<void, const Time&, const Address&> callback =
1688 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1692 NS_ASSERT(satOrbiterDev !=
nullptr);
1693 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1694 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1696 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1697 it2 != satOrbiterFeederMacs.end();
1700 satMac = it2->second;
1701 NS_ASSERT(satMac !=
nullptr);
1702 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1704 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1705 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1706 it2 != satOrbiterUserMacs.end();
1709 satMac = it2->second;
1710 NS_ASSERT(satMac !=
nullptr);
1711 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1714 if (satMac->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1716 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1717 <<
" device #" << satOrbiterDev->GetIfIndex());
1721 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1722 <<
" at node ID " << (*it)->GetId() <<
" device #"
1723 << satOrbiterDev->GetIfIndex());
1728 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1729 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1736 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1737 NS_ASSERT(satDev !=
nullptr);
1738 Ptr<SatMac> satMac = satDev->GetMac();
1739 NS_ASSERT(satMac !=
nullptr);
1740 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1741 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1746 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1748 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1752 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1754 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1755 NS_ASSERT(satDev !=
nullptr);
1756 Ptr<SatMac> satMac = satDev->GetMac();
1757 NS_ASSERT(satMac !=
nullptr);
1759 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1760 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1772 Ptr<const SatHelper> satHelper)
1775 NS_LOG_FUNCTION(
this << satHelper);
1780 NS_LOG_FUNCTION(
this);
1794 NS_LOG_FUNCTION(
this);
1796 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1798 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1803 NS_ASSERT(satOrbiterDev !=
nullptr);
1804 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1805 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1806 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1807 it2 != satOrbiterFeederPhys.end();
1810 satPhy = it2->second;
1811 NS_ASSERT(satPhy !=
nullptr);
1812 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1814 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1815 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1816 it2 != satOrbiterUserPhys.end();
1819 satPhy = it2->second;
1820 NS_ASSERT(satPhy !=
nullptr);
1821 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1825 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1826 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1833 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1834 NS_ASSERT(satDev !=
nullptr);
1835 Ptr<SatPhy> satPhy = satDev->GetPhy();
1836 NS_ASSERT(satPhy !=
nullptr);
1837 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1838 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1843 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1844 Callback<void, const Time&, const Address&> callback =
1847 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1851 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1853 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1854 NS_ASSERT(satDev !=
nullptr);
1855 Ptr<SatPhy> satPhy = satDev->GetPhy();
1856 NS_ASSERT(satPhy !=
nullptr);
1859 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1861 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1862 <<
" device #" << satDev->GetIfIndex());
1865 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1866 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1870 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1871 <<
" at node ID " << (*it)->GetId() <<
" device #"
1872 << satDev->GetIfIndex());
1888 NS_LOG_FUNCTION(
this << satHelper);
1893 NS_LOG_FUNCTION(
this);
1907 NS_LOG_FUNCTION(
this);
1909 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1910 Callback<void, const Time&, const Address&> callback =
1913 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1917 NS_ASSERT(satOrbiterDev !=
nullptr);
1918 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1919 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1921 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1922 it2 != satOrbiterFeederPhys.end();
1925 satPhy = it2->second;
1926 NS_ASSERT(satPhy !=
nullptr);
1927 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1929 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1930 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1931 it2 != satOrbiterUserPhys.end();
1934 satPhy = it2->second;
1935 NS_ASSERT(satPhy !=
nullptr);
1936 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1939 if (satPhy->TraceConnectWithoutContext(
"RxLinkDelay", callback))
1941 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1942 <<
" device #" << satOrbiterDev->GetIfIndex());
1946 NS_FATAL_ERROR(
"Error connecting to RxLinkDelay trace source of SatNetDevice"
1947 <<
" at node ID " << (*it)->GetId() <<
" device #"
1948 << satOrbiterDev->GetIfIndex());
1953 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1954 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1961 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1962 NS_ASSERT(satDev !=
nullptr);
1963 Ptr<SatPhy> satPhy = satDev->GetPhy();
1964 NS_ASSERT(satPhy !=
nullptr);
1965 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1966 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1971 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1973 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1977 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1979 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1980 NS_ASSERT(satDev !=
nullptr);
1981 Ptr<SatPhy> satPhy = satDev->GetPhy();
1982 NS_ASSERT(satPhy !=
nullptr);
1984 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1985 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.
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)
SatStatsHelper(Ptr< const SatHelper > satHelper)
Creates a new helper instance.
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.