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(
"SatStatsLinkJitterHelper");
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" <<
" 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 jitter of " << jitter.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, jitter.GetSeconds());
608 Ptr<UnitConversionCollector> c = collector->GetObject<UnitConversionCollector>();
609 NS_ASSERT(c !=
nullptr);
610 c->TraceSinkDouble(0.0, jitter.GetSeconds());
622 Ptr<ScalarCollector> c = collector->GetObject<ScalarCollector>();
623 NS_ASSERT(c !=
nullptr);
624 c->TraceSinkDouble(0.0, jitter.GetSeconds());
628 Ptr<DistributionCollector> c = collector->GetObject<DistributionCollector>();
629 NS_ASSERT(c !=
nullptr);
630 c->TraceSinkDouble(0.0, jitter.GetSeconds());
636 <<
" is not a valid output type for this statistics.");
654 Ptr<const SatHelper> satHelper)
657 NS_LOG_FUNCTION(
this << satHelper);
662 NS_LOG_FUNCTION(
this);
676 NS_LOG_FUNCTION(
this);
678 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
679 Callback<void, const Time&, const Address&> callback =
682 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
686 NS_ASSERT(satOrbiterDev !=
nullptr);
687 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
688 if (satOrbiterDev->TraceConnectWithoutContext(
"RxFeederLinkJitter", callback))
690 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
691 <<
" device #" << satOrbiterDev->GetIfIndex());
695 NS_FATAL_ERROR(
"Error connecting to RxFeederLinkJitter trace source of SatNetDevice"
696 <<
" at node ID " << (*it)->GetId() <<
" device #"
697 << satOrbiterDev->GetIfIndex());
701 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
703 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
709 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
710 NS_ASSERT(satDev !=
nullptr);
712 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
717 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
718 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
722 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
724 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
725 NS_ASSERT(satDev !=
nullptr);
727 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
738 Ptr<const SatHelper> satHelper)
741 NS_LOG_FUNCTION(
this << satHelper);
746 NS_LOG_FUNCTION(
this);
760 NS_LOG_FUNCTION(
this);
762 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
764 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
768 NS_ASSERT(satOrbiterDev !=
nullptr);
769 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
772 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
774 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
776 const int32_t utId =
GetUtId(*it);
777 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
781 std::ostringstream probeName;
783 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
784 probe->SetName(probeName.str());
787 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
788 NS_ASSERT(satDev !=
nullptr);
791 if (probe->ConnectByObject(
"RxLinkJitter", satDev) &&
795 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
798 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
802 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatMac"
803 <<
" at node ID " << (*it)->GetId() <<
" device #2");
809 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
810 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
814 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
816 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
817 NS_ASSERT(satDev !=
nullptr);
819 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
828 NS_LOG_FUNCTION(
this);
830 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
834 Ptr<Probe> probe = it->first;
835 Ptr<Node> node = it->second.first;
836 uint32_t identifier = it->second.second;
840 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
847 NS_FATAL_ERROR(
"Error connecting trace file on handover");
850 it->second.second = identifier;
859 Ptr<const SatHelper> satHelper)
862 NS_LOG_FUNCTION(
this << satHelper);
867 NS_LOG_FUNCTION(
this);
881 NS_LOG_FUNCTION(
this);
883 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
884 Callback<void, const Time&, const Address&> callback =
887 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
891 NS_ASSERT(satOrbiterDev !=
nullptr);
892 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
893 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
895 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
896 it2 != satOrbiterFeederMacs.end();
899 satMac = it2->second;
900 NS_ASSERT(satMac !=
nullptr);
901 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
904 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
906 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
907 <<
" device #" << satOrbiterDev->GetIfIndex());
910 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
914 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
915 <<
" at node ID " << (*it)->GetId() <<
" device #"
916 << satOrbiterDev->GetIfIndex());
919 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
920 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
921 it2 != satOrbiterUserMacs.end();
924 satMac = it2->second;
925 NS_ASSERT(satMac !=
nullptr);
926 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
930 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
932 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
938 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
939 NS_ASSERT(satDev !=
nullptr);
940 Ptr<SatMac> satMac = satDev->GetMac();
941 NS_ASSERT(satMac !=
nullptr);
943 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
944 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
949 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
950 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
954 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
956 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
957 NS_ASSERT(satDev !=
nullptr);
958 Ptr<SatMac> satMac = satDev->GetMac();
959 NS_ASSERT(satMac !=
nullptr);
961 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
962 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
973 Ptr<const SatHelper> satHelper)
976 NS_LOG_FUNCTION(
this << satHelper);
981 NS_LOG_FUNCTION(
this);
995 NS_LOG_FUNCTION(
this);
997 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
999 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1003 NS_ASSERT(satOrbiterDev !=
nullptr);
1004 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1005 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1007 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1008 it2 != satOrbiterFeederMacs.end();
1011 satMac = it2->second;
1012 NS_ASSERT(satMac !=
nullptr);
1013 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1015 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1016 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1017 it2 != satOrbiterUserMacs.end();
1020 satMac = it2->second;
1021 NS_ASSERT(satMac !=
nullptr);
1022 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1026 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1028 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1030 const int32_t utId =
GetUtId(*it);
1031 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1035 std::ostringstream probeName;
1037 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1038 probe->SetName(probeName.str());
1041 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1042 NS_ASSERT(satDev !=
nullptr);
1043 Ptr<SatMac> satMac = satDev->GetMac();
1044 NS_ASSERT(satMac !=
nullptr);
1047 if (probe->ConnectByObject(
"RxLinkJitter", satMac) &&
1051 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1054 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1055 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1059 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatMac"
1060 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1066 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1067 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1071 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1073 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1074 NS_ASSERT(satDev !=
nullptr);
1075 Ptr<SatMac> satMac = satDev->GetMac();
1076 NS_ASSERT(satMac !=
nullptr);
1078 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1079 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1088 NS_LOG_FUNCTION(
this);
1090 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1094 Ptr<Probe> probe = it->first;
1095 Ptr<Node> node = it->second.first;
1096 uint32_t identifier = it->second.second;
1100 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1107 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1110 it->second.second = identifier;
1119 Ptr<const SatHelper> satHelper)
1122 NS_LOG_FUNCTION(
this << satHelper);
1129 NS_LOG_FUNCTION(
this);
1143 NS_LOG_FUNCTION(
this);
1145 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1146 Callback<void, const Time&, const Address&> callback =
1149 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1153 NS_ASSERT(satOrbiterDev !=
nullptr);
1154 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1155 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1157 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1158 it2 != satOrbiterFeederPhys.end();
1161 satPhy = it2->second;
1162 NS_ASSERT(satPhy !=
nullptr);
1163 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1166 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1168 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1169 <<
" device #" << satOrbiterDev->GetIfIndex());
1172 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1176 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1177 <<
" at node ID " << (*it)->GetId() <<
" device #"
1178 << satOrbiterDev->GetIfIndex());
1181 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1182 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1183 it2 != satOrbiterUserPhys.end();
1186 satPhy = it2->second;
1187 NS_ASSERT(satPhy !=
nullptr);
1188 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1192 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1194 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1200 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1201 NS_ASSERT(satDev !=
nullptr);
1202 Ptr<SatPhy> satPhy = satDev->GetPhy();
1203 NS_ASSERT(satPhy !=
nullptr);
1205 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1206 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1211 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1212 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1216 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1218 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1219 NS_ASSERT(satDev !=
nullptr);
1220 Ptr<SatPhy> satPhy = satDev->GetPhy();
1221 NS_ASSERT(satPhy !=
nullptr);
1223 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1224 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1235 Ptr<const SatHelper> satHelper)
1238 NS_LOG_FUNCTION(
this << satHelper);
1245 NS_LOG_FUNCTION(
this);
1259 NS_LOG_FUNCTION(
this);
1261 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1263 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1267 NS_ASSERT(satOrbiterDev !=
nullptr);
1268 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1269 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1271 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1272 it2 != satOrbiterFeederPhys.end();
1275 satPhy = it2->second;
1276 NS_ASSERT(satPhy !=
nullptr);
1277 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1279 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1280 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1281 it2 != satOrbiterUserPhys.end();
1284 satPhy = it2->second;
1285 NS_ASSERT(satPhy !=
nullptr);
1286 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1290 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1292 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1294 const int32_t utId =
GetUtId(*it);
1295 NS_ASSERT_MSG(utId > 0,
"Node " << (*it)->GetId() <<
" is not a valid UT");
1299 std::ostringstream probeName;
1301 Ptr<ApplicationDelayProbe> probe = CreateObject<ApplicationDelayProbe>();
1302 probe->SetName(probeName.str());
1305 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1306 NS_ASSERT(satDev !=
nullptr);
1307 Ptr<SatPhy> satPhy = satDev->GetPhy();
1308 NS_ASSERT(satPhy !=
nullptr);
1311 if (probe->ConnectByObject(
"RxLinkJitter", satPhy) &&
1315 std::make_pair(probe->GetObject<Probe>(), std::make_pair(*it, identifier)));
1318 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1319 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1323 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatPhy"
1324 <<
" at node ID " << (*it)->GetId() <<
" device #2");
1330 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1331 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1335 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1337 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1338 NS_ASSERT(satDev !=
nullptr);
1339 Ptr<SatPhy> satPhy = satDev->GetPhy();
1340 NS_ASSERT(satPhy !=
nullptr);
1342 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1343 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1352 NS_LOG_FUNCTION(
this);
1354 std::map<Ptr<Probe>, std::pair<Ptr<Node>, uint32_t>>::iterator it;
1358 Ptr<Probe> probe = it->first;
1359 Ptr<Node> node = it->second.first;
1360 uint32_t identifier = it->second.second;
1364 NS_FATAL_ERROR(
"Error disconnecting trace file on handover");
1371 NS_FATAL_ERROR(
"Error connecting trace file on handover");
1374 it->second.second = identifier;
1383 Ptr<const SatHelper> satHelper)
1386 NS_LOG_FUNCTION(
this << satHelper);
1391 NS_LOG_FUNCTION(
this);
1405 NS_LOG_FUNCTION(
this);
1407 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1409 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1414 NS_ASSERT(satOrbiterDev !=
nullptr);
1415 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1418 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1419 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1426 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1427 NS_ASSERT(satDev !=
nullptr);
1428 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1433 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1434 Callback<void, const Time&, const Address&> callback =
1437 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1441 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1443 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1444 NS_ASSERT(satDev !=
nullptr);
1447 if (satDev->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1449 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1450 <<
" device #" << satDev->GetIfIndex());
1453 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1457 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1458 <<
" at node ID " << (*it)->GetId() <<
" device #"
1459 << satDev->GetIfIndex());
1473 Ptr<const SatHelper> satHelper)
1476 NS_LOG_FUNCTION(
this << satHelper);
1481 NS_LOG_FUNCTION(
this);
1495 NS_LOG_FUNCTION(
this);
1497 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1498 Callback<void, const Time&, const Address&> callback =
1501 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1505 NS_ASSERT(satOrbiterDev !=
nullptr);
1506 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1509 if (satOrbiterDev->TraceConnectWithoutContext(
"RxUserLinkJitter", callback))
1511 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1512 <<
" device #" << satOrbiterDev->GetIfIndex());
1516 NS_FATAL_ERROR(
"Error connecting to RxUserLinkJitter trace source of SatNetDevice"
1517 <<
" at node ID " << (*it)->GetId() <<
" device #"
1518 << satOrbiterDev->GetIfIndex());
1522 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1523 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1530 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1531 NS_ASSERT(satDev !=
nullptr);
1532 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1537 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1539 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1543 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1545 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1546 NS_ASSERT(satDev !=
nullptr);
1548 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1560 Ptr<const SatHelper> satHelper)
1563 NS_LOG_FUNCTION(
this << satHelper);
1568 NS_LOG_FUNCTION(
this);
1582 NS_LOG_FUNCTION(
this);
1584 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1586 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1591 NS_ASSERT(satOrbiterDev !=
nullptr);
1592 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1593 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1594 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1595 it2 != satOrbiterFeederMacs.end();
1598 satMac = it2->second;
1599 NS_ASSERT(satMac !=
nullptr);
1600 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1602 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1603 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1604 it2 != satOrbiterUserMacs.end();
1607 satMac = it2->second;
1608 NS_ASSERT(satMac !=
nullptr);
1609 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1613 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1614 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1621 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1622 NS_ASSERT(satDev !=
nullptr);
1623 Ptr<SatMac> satMac = satDev->GetMac();
1624 NS_ASSERT(satMac !=
nullptr);
1625 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1626 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1631 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1632 Callback<void, const Time&, const Address&> callback =
1635 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1639 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1641 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1642 NS_ASSERT(satDev !=
nullptr);
1643 Ptr<SatMac> satMac = satDev->GetMac();
1644 NS_ASSERT(satMac !=
nullptr);
1647 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1649 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1650 <<
" device #" << satDev->GetIfIndex());
1653 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1654 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1658 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1659 <<
" at node ID " << (*it)->GetId() <<
" device #"
1660 << satDev->GetIfIndex());
1674 Ptr<const SatHelper> satHelper)
1677 NS_LOG_FUNCTION(
this << satHelper);
1682 NS_LOG_FUNCTION(
this);
1696 NS_LOG_FUNCTION(
this);
1698 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1699 Callback<void, const Time&, const Address&> callback =
1702 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1706 NS_ASSERT(satOrbiterDev !=
nullptr);
1707 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1708 std::map<uint32_t, Ptr<SatMac>> satOrbiterFeederMacs = satOrbiterDev->GetFeederMac();
1710 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterFeederMacs.begin();
1711 it2 != satOrbiterFeederMacs.end();
1714 satMac = it2->second;
1715 NS_ASSERT(satMac !=
nullptr);
1716 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1718 std::map<uint32_t, Ptr<SatMac>> satOrbiterUserMacs = satOrbiterDev->GetUserMac();
1719 for (std::map<uint32_t, Ptr<SatMac>>::iterator it2 = satOrbiterUserMacs.begin();
1720 it2 != satOrbiterUserMacs.end();
1723 satMac = it2->second;
1724 NS_ASSERT(satMac !=
nullptr);
1725 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1728 if (satMac->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1730 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1731 <<
" device #" << satOrbiterDev->GetIfIndex());
1735 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1736 <<
" at node ID " << (*it)->GetId() <<
" device #"
1737 << satOrbiterDev->GetIfIndex());
1742 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1743 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1750 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1751 NS_ASSERT(satDev !=
nullptr);
1752 Ptr<SatMac> satMac = satDev->GetMac();
1753 NS_ASSERT(satMac !=
nullptr);
1754 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1755 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1760 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1762 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1766 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1768 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1769 NS_ASSERT(satDev !=
nullptr);
1770 Ptr<SatMac> satMac = satDev->GetMac();
1771 NS_ASSERT(satMac !=
nullptr);
1773 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1774 satMac->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1786 Ptr<const SatHelper> satHelper)
1789 NS_LOG_FUNCTION(
this << satHelper);
1796 NS_LOG_FUNCTION(
this);
1810 NS_LOG_FUNCTION(
this);
1812 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1814 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1819 NS_ASSERT(satOrbiterDev !=
nullptr);
1820 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1821 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1822 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1823 it2 != satOrbiterFeederPhys.end();
1826 satPhy = it2->second;
1827 NS_ASSERT(satPhy !=
nullptr);
1828 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1830 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1831 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1832 it2 != satOrbiterUserPhys.end();
1835 satPhy = it2->second;
1836 NS_ASSERT(satPhy !=
nullptr);
1837 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1841 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1842 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1849 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1850 NS_ASSERT(satDev !=
nullptr);
1851 Ptr<SatPhy> satPhy = satDev->GetPhy();
1852 NS_ASSERT(satPhy !=
nullptr);
1853 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1854 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1859 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1860 Callback<void, const Time&, const Address&> callback =
1863 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1867 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1869 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1870 NS_ASSERT(satDev !=
nullptr);
1871 Ptr<SatPhy> satPhy = satDev->GetPhy();
1872 NS_ASSERT(satPhy !=
nullptr);
1875 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1877 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1878 <<
" device #" << satDev->GetIfIndex());
1881 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1882 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1886 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1887 <<
" at node ID " << (*it)->GetId() <<
" device #"
1888 << satDev->GetIfIndex());
1902 Ptr<const SatHelper> satHelper)
1905 NS_LOG_FUNCTION(
this << satHelper);
1912 NS_LOG_FUNCTION(
this);
1926 NS_LOG_FUNCTION(
this);
1928 NodeContainer sats = Singleton<SatTopology>::Get()->GetOrbiterNodes();
1929 Callback<void, const Time&, const Address&> callback =
1932 for (NodeContainer::Iterator it = sats.Begin(); it != sats.End(); ++it)
1936 NS_ASSERT(satOrbiterDev !=
nullptr);
1937 satOrbiterDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1938 std::map<uint32_t, Ptr<SatPhy>> satOrbiterFeederPhys = satOrbiterDev->GetFeederPhy();
1940 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterFeederPhys.begin();
1941 it2 != satOrbiterFeederPhys.end();
1944 satPhy = it2->second;
1945 NS_ASSERT(satPhy !=
nullptr);
1946 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1948 std::map<uint32_t, Ptr<SatPhy>> satOrbiterUserPhys = satOrbiterDev->GetUserPhy();
1949 for (std::map<uint32_t, Ptr<SatPhy>>::iterator it2 = satOrbiterUserPhys.begin();
1950 it2 != satOrbiterUserPhys.end();
1953 satPhy = it2->second;
1954 NS_ASSERT(satPhy !=
nullptr);
1955 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1958 if (satPhy->TraceConnectWithoutContext(
"RxLinkJitter", callback))
1960 NS_LOG_INFO(
this <<
" successfully connected with node ID " << (*it)->GetId()
1961 <<
" device #" << satOrbiterDev->GetIfIndex());
1965 NS_FATAL_ERROR(
"Error connecting to RxLinkJitter trace source of SatNetDevice"
1966 <<
" at node ID " << (*it)->GetId() <<
" device #"
1967 << satOrbiterDev->GetIfIndex());
1972 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
1973 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); ++it)
1980 Ptr<SatNetDevice> satDev = dev->GetObject<
SatNetDevice>();
1981 NS_ASSERT(satDev !=
nullptr);
1982 Ptr<SatPhy> satPhy = satDev->GetPhy();
1983 NS_ASSERT(satPhy !=
nullptr);
1984 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1985 satPhy->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
1990 NodeContainer gws = Singleton<SatTopology>::Get()->GetGwNodes();
1992 for (NodeContainer::Iterator it = gws.Begin(); it != gws.End(); ++it)
1996 for (NetDeviceContainer::Iterator itDev = devs.Begin(); itDev != devs.End(); ++itDev)
1998 Ptr<SatNetDevice> satDev = (*itDev)->GetObject<
SatNetDevice>();
1999 NS_ASSERT(satDev !=
nullptr);
2000 Ptr<SatPhy> satPhy = satDev->GetPhy();
2001 NS_ASSERT(satPhy !=
nullptr);
2003 satDev->SetAttribute(
"EnableStatisticsTags", BooleanValue(
true));
2004 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.
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::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.