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(
"SatStatsLinkJitterHelper");
65 NS_OBJECT_ENSURE_REGISTERED(SatStatsLinkJitterHelper);
69 m_averagingMode(false)
71 NS_LOG_FUNCTION(
this << satHelper);
76 NS_LOG_FUNCTION(
this);
83 TypeId(
"ns3::SatStatsLinkJitterHelper")
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 jitter (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 jitter (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 jitter (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(
"SatStatsLinkJitterHelper - Invalid output type");
426 if (from.IsInvalid())
428 NS_LOG_WARN(
this <<
" discarding a packet jitter of " << jitter.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 jitter of " << jitter.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, jitter.GetSeconds());
609 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
610 NS_ASSERT(c !=
nullptr);
611 c->TraceSinkDouble(0.0, jitter.GetSeconds());
623 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
624 NS_ASSERT(c !=
nullptr);
625 c->TraceSinkDouble(0.0, jitter.GetSeconds());
629 Ptr<DistributionCollector> c = collector->GetObject<DistributionCollector>();
630 NS_ASSERT(c !=
nullptr);
631 c->TraceSinkDouble(0.0, jitter.GetSeconds());
637 <<
" is not a valid output type for this statistics.");
655 Ptr<const SatHelper> satHelper)
658 NS_LOG_FUNCTION(
this << satHelper);
663 NS_LOG_FUNCTION(
this);
677 NS_LOG_FUNCTION(
this);
679 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
680 Callback<void, const Time&, const Address&> callback =
683 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
687 NS_ASSERT(satOrbiterDev !=
nullptr);
688 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
689 if (satOrbiterDev->TraceConnectWithoutContext(
"RxFeederLinkJitter", callback))
691 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
692 <<
" device #" << satOrbiterDev->GetIfIndex());
696 NS_FATAL_ERROR(
"Error connecting to RxFeederLinkJitter trace source of SatNetDevice"
697 <<
" at node ID " << (*it)->GetId() <<
" device #"
698 << satOrbiterDev->GetIfIndex());
702 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
704 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
710 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
711 NS_ASSERT(satDev !=
nullptr);
713 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
718 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
719 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
723 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
725 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
726 NS_ASSERT(satDev !=
nullptr);
728 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
739 Ptr<const SatHelper> satHelper)
742 NS_LOG_FUNCTION(
this << satHelper);
747 NS_LOG_FUNCTION(
this);
761 NS_LOG_FUNCTION(
this);
763 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
765 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
769 NS_ASSERT(satOrbiterDev !=
nullptr);
770 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
773 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
775 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
777 const int32_t utId =
GetUtId(*it);
778 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
782 std::ostringstream probeName;
784 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
785 probe->SetName(probeName.str());
788 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
789 NS_ASSERT(satDev !=
nullptr);
792 if (probe->ConnectByObject(
"RxLinkJitter", satDev) &&
796 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
799 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
803 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatMac"
804 <<
" at node ID " << (*it)->GetId() <<
" device #2");
810 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
811 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
815 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
817 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
818 NS_ASSERT(satDev !=
nullptr);
820 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
829 NS_LOG_FUNCTION(
this);
831 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
835 Ptr<Probe> probe = it->first;
836 Ptr<Node> node = it->second.first;
837 uint32_t identifier = it->second.second;
841 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
848 NS_FATAL_ERROR(
"Error connecting trace file on handover");
851 it->second.second = identifier;
860 Ptr<const SatHelper> satHelper)
863 NS_LOG_FUNCTION(
this << satHelper);
868 NS_LOG_FUNCTION(
this);
882 NS_LOG_FUNCTION(
this);
884 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
885 Callback<void, const Time&, const Address&> callback =
888 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
892 NS_ASSERT(satOrbiterDev !=
nullptr);
893 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
894 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
896 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
897 it2 != satOrbiterFeederMacs.end();
900 satMac = it2->second;
901 NS_ASSERT(satMac !=
nullptr);
902 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
905 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
907 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
908 <<
" device #" << satOrbiterDev->GetIfIndex());
911 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
915 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
916 <<
" at node ID " << (*it)->GetId() <<
" device #"
917 << satOrbiterDev->GetIfIndex());
920 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
921 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
922 it2 != satOrbiterUserMacs.end();
925 satMac = it2->second;
926 NS_ASSERT(satMac !=
nullptr);
927 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
931 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
933 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
939 Ptr<SatNetDevice> satDev = dev->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));
950 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
951 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
955 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
957 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
958 NS_ASSERT(satDev !=
nullptr);
959 Ptr<SatMac> satMac = satDev->GetMac();
960 NS_ASSERT(satMac !=
nullptr);
962 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
963 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
974 Ptr<const SatHelper> satHelper)
977 NS_LOG_FUNCTION(
this << satHelper);
982 NS_LOG_FUNCTION(
this);
996 NS_LOG_FUNCTION(
this);
998 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1000 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1004 NS_ASSERT(satOrbiterDev !=
nullptr);
1005 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1006 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1008 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1009 it2 != satOrbiterFeederMacs.end();
1012 satMac = it2->second;
1013 NS_ASSERT(satMac !=
nullptr);
1014 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1016 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1017 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1018 it2 != satOrbiterUserMacs.end();
1021 satMac = it2->second;
1022 NS_ASSERT(satMac !=
nullptr);
1023 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1027 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1029 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1031 const int32_t utId =
GetUtId(*it);
1032 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1036 std::ostringstream probeName;
1038 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1039 probe->SetName(probeName.str());
1042 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1043 NS_ASSERT(satDev !=
nullptr);
1044 Ptr<SatMac> satMac = satDev->GetMac();
1045 NS_ASSERT(satMac !=
nullptr);
1048 if (probe->ConnectByObject(
"RxLinkJitter", satMac) &&
1052 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1055 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1056 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1060 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatMac"
1061 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1067 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1068 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1072 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1074 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1075 NS_ASSERT(satDev !=
nullptr);
1076 Ptr<SatMac> satMac = satDev->GetMac();
1077 NS_ASSERT(satMac !=
nullptr);
1079 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1080 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1089 NS_LOG_FUNCTION(
this);
1091 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1095 Ptr<Probe> probe = it->first;
1096 Ptr<Node> node = it->second.first;
1097 uint32_t identifier = it->second.second;
1101 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1108 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1111 it->second.second = identifier;
1120 Ptr<const SatHelper> satHelper)
1123 NS_LOG_FUNCTION(
this << satHelper);
1130 NS_LOG_FUNCTION(
this);
1144 NS_LOG_FUNCTION(
this);
1146 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1147 Callback<void, const Time&, const Address&> callback =
1150 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1154 NS_ASSERT(satOrbiterDev !=
nullptr);
1155 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1156 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1158 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1159 it2 != satOrbiterFeederPhys.end();
1162 satPhy = it2->second;
1163 NS_ASSERT(satPhy !=
nullptr);
1164 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1167 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1169 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1170 <<
" device #" << satOrbiterDev->GetIfIndex());
1173 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1177 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1178 <<
" at node ID " << (*it)->GetId() <<
" device #"
1179 << satOrbiterDev->GetIfIndex());
1182 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1183 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1184 it2 != satOrbiterUserPhys.end();
1187 satPhy = it2->second;
1188 NS_ASSERT(satPhy !=
nullptr);
1189 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1193 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1195 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1201 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1202 NS_ASSERT(satDev !=
nullptr);
1203 Ptr<SatPhy> satPhy = satDev->GetPhy();
1204 NS_ASSERT(satPhy !=
nullptr);
1206 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1207 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1212 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1213 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1217 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1219 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1220 NS_ASSERT(satDev !=
nullptr);
1221 Ptr<SatPhy> satPhy = satDev->GetPhy();
1222 NS_ASSERT(satPhy !=
nullptr);
1224 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1225 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1236 Ptr<const SatHelper> satHelper)
1239 NS_LOG_FUNCTION(
this << satHelper);
1246 NS_LOG_FUNCTION(
this);
1260 NS_LOG_FUNCTION(
this);
1262 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1264 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1268 NS_ASSERT(satOrbiterDev !=
nullptr);
1269 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1270 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1272 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1273 it2 != satOrbiterFeederPhys.end();
1276 satPhy = it2->second;
1277 NS_ASSERT(satPhy !=
nullptr);
1278 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1280 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1281 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1282 it2 != satOrbiterUserPhys.end();
1285 satPhy = it2->second;
1286 NS_ASSERT(satPhy !=
nullptr);
1287 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1291 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1293 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1295 const int32_t utId =
GetUtId(*it);
1296 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1300 std::ostringstream probeName;
1302 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1303 probe->SetName(probeName.str());
1306 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1307 NS_ASSERT(satDev !=
nullptr);
1308 Ptr<SatPhy> satPhy = satDev->GetPhy();
1309 NS_ASSERT(satPhy !=
nullptr);
1312 if (probe->ConnectByObject(
"RxLinkJitter", satPhy) &&
1316 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1319 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1320 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1324 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatPhy"
1325 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1331 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1332 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1336 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1338 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1339 NS_ASSERT(satDev !=
nullptr);
1340 Ptr<SatPhy> satPhy = satDev->GetPhy();
1341 NS_ASSERT(satPhy !=
nullptr);
1343 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1344 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1353 NS_LOG_FUNCTION(
this);
1355 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1359 Ptr<Probe> probe = it->first;
1360 Ptr<Node> node = it->second.first;
1361 uint32_t identifier = it->second.second;
1365 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1372 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1375 it->second.second = identifier;
1384 Ptr<const SatHelper> satHelper)
1387 NS_LOG_FUNCTION(
this << satHelper);
1392 NS_LOG_FUNCTION(
this);
1406 NS_LOG_FUNCTION(
this);
1408 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1410 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1415 NS_ASSERT(satOrbiterDev !=
nullptr);
1416 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1419 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1420 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1427 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1428 NS_ASSERT(satDev !=
nullptr);
1429 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1434 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1435 Callback<void, const Time&, const Address&> callback =
1438 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1442 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1444 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1445 NS_ASSERT(satDev !=
nullptr);
1448 if (satDev->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1450 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1451 <<
" device #" << satDev->GetIfIndex());
1454 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1458 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1459 <<
" at node ID " << (*it)->GetId() <<
" device #"
1460 << satDev->GetIfIndex());
1474 Ptr<const SatHelper> satHelper)
1477 NS_LOG_FUNCTION(
this << satHelper);
1482 NS_LOG_FUNCTION(
this);
1496 NS_LOG_FUNCTION(
this);
1498 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1499 Callback<void, const Time&, const Address&> callback =
1502 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1506 NS_ASSERT(satOrbiterDev !=
nullptr);
1507 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1510 if (satOrbiterDev->TraceConnectWithoutContext(
"RxUserLinkJitter", callback))
1512 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1513 <<
" device #" << satOrbiterDev->GetIfIndex());
1517 NS_FATAL_ERROR(
"Error connecting to RxUserLinkJitter trace source of SatNetDevice"
1518 <<
" at node ID " << (*it)->GetId() <<
" device #"
1519 << satOrbiterDev->GetIfIndex());
1523 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1524 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1531 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1532 NS_ASSERT(satDev !=
nullptr);
1533 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1538 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1540 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1544 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1546 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1547 NS_ASSERT(satDev !=
nullptr);
1549 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1561 Ptr<const SatHelper> satHelper)
1564 NS_LOG_FUNCTION(
this << satHelper);
1569 NS_LOG_FUNCTION(
this);
1583 NS_LOG_FUNCTION(
this);
1585 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1587 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1592 NS_ASSERT(satOrbiterDev !=
nullptr);
1593 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1594 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1595 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1596 it2 != satOrbiterFeederMacs.end();
1599 satMac = it2->second;
1600 NS_ASSERT(satMac !=
nullptr);
1601 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1603 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1604 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1605 it2 != satOrbiterUserMacs.end();
1608 satMac = it2->second;
1609 NS_ASSERT(satMac !=
nullptr);
1610 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1614 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1615 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1622 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1623 NS_ASSERT(satDev !=
nullptr);
1624 Ptr<SatMac> satMac = satDev->GetMac();
1625 NS_ASSERT(satMac !=
nullptr);
1626 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1627 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1632 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1633 Callback<void, const Time&, const Address&> callback =
1636 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1640 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1642 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1643 NS_ASSERT(satDev !=
nullptr);
1644 Ptr<SatMac> satMac = satDev->GetMac();
1645 NS_ASSERT(satMac !=
nullptr);
1648 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1650 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1651 <<
" device #" << satDev->GetIfIndex());
1654 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1655 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1659 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1660 <<
" at node ID " << (*it)->GetId() <<
" device #"
1661 << satDev->GetIfIndex());
1675 Ptr<const SatHelper> satHelper)
1678 NS_LOG_FUNCTION(
this << satHelper);
1683 NS_LOG_FUNCTION(
this);
1697 NS_LOG_FUNCTION(
this);
1699 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1700 Callback<void, const Time&, const Address&> callback =
1703 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1707 NS_ASSERT(satOrbiterDev !=
nullptr);
1708 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1709 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1711 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1712 it2 != satOrbiterFeederMacs.end();
1715 satMac = it2->second;
1716 NS_ASSERT(satMac !=
nullptr);
1717 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1719 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1720 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1721 it2 != satOrbiterUserMacs.end();
1724 satMac = it2->second;
1725 NS_ASSERT(satMac !=
nullptr);
1726 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1729 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1731 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1732 <<
" device #" << satOrbiterDev->GetIfIndex());
1736 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1737 <<
" at node ID " << (*it)->GetId() <<
" device #"
1738 << satOrbiterDev->GetIfIndex());
1743 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1744 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1751 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1752 NS_ASSERT(satDev !=
nullptr);
1753 Ptr<SatMac> satMac = satDev->GetMac();
1754 NS_ASSERT(satMac !=
nullptr);
1755 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1756 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1761 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1763 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1767 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1769 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1770 NS_ASSERT(satDev !=
nullptr);
1771 Ptr<SatMac> satMac = satDev->GetMac();
1772 NS_ASSERT(satMac !=
nullptr);
1774 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1775 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1787 Ptr<const SatHelper> satHelper)
1790 NS_LOG_FUNCTION(
this << satHelper);
1797 NS_LOG_FUNCTION(
this);
1811 NS_LOG_FUNCTION(
this);
1813 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1815 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1820 NS_ASSERT(satOrbiterDev !=
nullptr);
1821 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1822 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1823 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1824 it2 != satOrbiterFeederPhys.end();
1827 satPhy = it2->second;
1828 NS_ASSERT(satPhy !=
nullptr);
1829 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1831 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1832 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1833 it2 != satOrbiterUserPhys.end();
1836 satPhy = it2->second;
1837 NS_ASSERT(satPhy !=
nullptr);
1838 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1842 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1843 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1850 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1851 NS_ASSERT(satDev !=
nullptr);
1852 Ptr<SatPhy> satPhy = satDev->GetPhy();
1853 NS_ASSERT(satPhy !=
nullptr);
1854 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1855 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1860 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1861 Callback<void, const Time&, const Address&> callback =
1864 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1868 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1870 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1871 NS_ASSERT(satDev !=
nullptr);
1872 Ptr<SatPhy> satPhy = satDev->GetPhy();
1873 NS_ASSERT(satPhy !=
nullptr);
1876 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1878 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1879 <<
" device #" << satDev->GetIfIndex());
1882 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1883 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1887 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1888 <<
" at node ID " << (*it)->GetId() <<
" device #"
1889 << satDev->GetIfIndex());
1903 Ptr<const SatHelper> satHelper)
1906 NS_LOG_FUNCTION(
this << satHelper);
1913 NS_LOG_FUNCTION(
this);
1927 NS_LOG_FUNCTION(
this);
1929 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1930 Callback<void, const Time&, const Address&> callback =
1933 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1937 NS_ASSERT(satOrbiterDev !=
nullptr);
1938 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1939 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1941 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1942 it2 != satOrbiterFeederPhys.end();
1945 satPhy = it2->second;
1946 NS_ASSERT(satPhy !=
nullptr);
1947 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1949 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1950 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1951 it2 != satOrbiterUserPhys.end();
1954 satPhy = it2->second;
1955 NS_ASSERT(satPhy !=
nullptr);
1956 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1959 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1961 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1962 <<
" device #" << satOrbiterDev->GetIfIndex());
1966 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1967 <<
" at node ID " << (*it)->GetId() <<
" device #"
1968 << satOrbiterDev->GetIfIndex());
1973 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1974 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1981 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1982 NS_ASSERT(satDev !=
nullptr);
1983 Ptr<SatPhy> satPhy = satDev->GetPhy();
1984 NS_ASSERT(satPhy !=
nullptr);
1985 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1986 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1991 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1993 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1997 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1999 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
2000 NS_ASSERT(satDev !=
nullptr);
2001 Ptr<SatPhy> satPhy = satDev->GetPhy();
2002 NS_ASSERT(satPhy !=
nullptr);
2004 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
2005 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
ChannelType_t
Types of channel.
SatNetDevice to be utilized in the UT and GW nodes.
SatOrbiterNetDevice to be utilized in geostationary satellite.
Produce forward feeder link DEV-level jitter statistics from a satellite module simulation.
SatStatsFwdFeederDevLinkJitterHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsFwdFeederDevLinkJitterHelper()
/ Destructor.
Produce forward feeder link MAC-level jitter statistics from a satellite module simulation.
SatStatsFwdFeederMacLinkJitterHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsFwdFeederMacLinkJitterHelper()
/ Destructor.
Produce forward feeder link PHY-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdFeederPhyLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdFeederPhyLinkJitterHelper()
/ Destructor.
Produce forward user link DEV-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsFwdUserDevLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsFwdUserDevLinkJitterHelper()
/ Destructor.
std::map< Ptr< Probe >, std::pair< Ptr< Node >, uint32_t > > m_probes
Maintains a list of probes created by this helper.
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
Produce forward user link MAC-level jitter 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 ~SatStatsFwdUserMacLinkJitterHelper()
/ Destructor.
SatStatsFwdUserMacLinkJitterHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual void UpdateIdentifierOnProbes()
Change identifier used on probes, when handovers occur.
Produce forward user link PHY-level jitter 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 ~SatStatsFwdUserPhyLinkJitterHelper()
/ Destructor.
SatStatsFwdUserPhyLinkJitterHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
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)
uint32_t GetIdentifierForUtUser(Ptr< Node > utUserNode) const
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::map< const Address, uint32_t > m_identifierMap
Map of address and the identifier associated with it.
std::string GetName() const
virtual std::string GetTimeHeading(std::string dataLabel) const
virtual std::string GetDistributionHeading(std::string dataLabel) const
Base class for jitter statistics helpers.
void SetAveragingMode(bool averagingMode)
virtual ~SatStatsLinkJitterHelper()
/ Destructor.
Ptr< DistributionCollector > m_averagingCollector
The final collector utilized in averaged output (histogram, PDF, and CDF).
CollectorMap m_terminalCollectors
Maintains a list of collectors created by this helper.
void PassSampleToCollector(const Time &jitter, uint32_t identifier)
Find a collector with the right identifier and pass a sample data to it.
bool m_averagingMode
AveragingMode attribute.
SatStatsLinkJitterHelper(Ptr< const SatHelper > satHelper)
void DoInstall()
Install the probes, collectors, and aggregators necessary to produce the statistics output.
static TypeId GetTypeId()
inherited from ObjectBase base class
Ptr< DataCollectionObject > m_aggregator
The aggregator created by this helper.
virtual void DoInstallProbes()=0
bool DisconnectProbeFromCollector(Ptr< Probe > probe, uint32_t identifier)
Disconnect the probe from the right collector.
void SetChannelLink(SatEnums::ChannelType_t channelLink)
Set the channel used by this probe.
SatEnums::ChannelType_t m_channelLink
void RxLinkJitterCallback(const Time &jitter, const Address &from)
Receive inputs from trace sources and determine the right collector to forward the inputs to.
void InstallProbes()
Set up several probes or other means of listeners and connect them to the collectors.
bool GetAveragingMode() const
bool ConnectProbeToCollector(Ptr< Probe > probe, uint32_t identifier)
Connect the probe to the right collector.
Produce return feeder link DEV-level jitter statistics from a satellite module simulation.
SatStatsRtnFeederDevLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnFeederDevLinkJitterHelper()
/ Destructor.
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return feeder link MAC-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
virtual ~SatStatsRtnFeederMacLinkJitterHelper()
/ Destructor.
SatStatsRtnFeederMacLinkJitterHelper(Ptr< const SatHelper > satHelper)
Produce return feeder link PHY-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnFeederPhyLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnFeederPhyLinkJitterHelper()
/ Destructor.
Produce return user link DEV-level jitter statistics from a satellite module simulation.
virtual ~SatStatsRtnUserDevLinkJitterHelper()
/ Destructor.
SatStatsRtnUserDevLinkJitterHelper(Ptr< const SatHelper > satHelper)
static TypeId GetTypeId()
inherited from ObjectBase base class
Produce return user link MAC-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserMacLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnUserMacLinkJitterHelper()
/ Destructor.
Produce return user link PHY-level jitter statistics from a satellite module simulation.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsRtnUserPhyLinkJitterHelper(Ptr< const SatHelper > satHelper)
virtual ~SatStatsRtnUserPhyLinkJitterHelper()
/ Destructor.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.