57 #include <ns3/satellite-helper.h>
58 #include <ns3/satellite-topology.h>
59 #include <ns3/satellite-ut-mac.h>
60 #include <ns3/singleton.h>
61 #include <ns3/string.h>
66 NS_LOG_COMPONENT_DEFINE(
"SatStatsHelperContainer");
71 NS_OBJECT_ENSURE_REGISTERED(SatStatsHelperContainer);
74 : m_satHelper(satHelper)
76 NS_LOG_FUNCTION(
this);
78 NodeContainer uts = Singleton<SatTopology>::Get()->GetUtNodes();
79 for (NodeContainer::Iterator it = uts.Begin(); it != uts.End(); it++)
82 for (uint32_t i = 0; i < ut->GetNDevices(); i++)
84 Ptr<SatNetDevice> netDevice = DynamicCast<SatNetDevice>(ut->GetDevice(i));
87 Ptr<SatUtMac> utMac = DynamicCast<SatUtMac>(netDevice->GetMac());
90 utMac->SetUpdateAddressAndIdentifierCallback(
101 NS_LOG_FUNCTION(
this);
158 #define ADD_SAT_STATS_BASIC_OUTPUT_CHECKER \
160 SatStatsHelper::OUTPUT_NONE, "NONE", \
161 SatStatsHelper::OUTPUT_SCALAR_FILE, "SCALAR_FILE", \
162 SatStatsHelper::OUTPUT_SCATTER_FILE, "SCATTER_FILE", \
163 SatStatsHelper::OUTPUT_SCATTER_PLOT, "SCATTER_PLOT"))
165 #define ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
167 SatStatsHelper::OUTPUT_NONE, "NONE", \
168 SatStatsHelper::OUTPUT_SCALAR_FILE, "SCALAR_FILE", \
169 SatStatsHelper::OUTPUT_SCATTER_FILE, "SCATTER_FILE", \
170 SatStatsHelper::OUTPUT_HISTOGRAM_FILE, "HISTOGRAM_FILE", \
171 SatStatsHelper::OUTPUT_PDF_FILE, "PDF_FILE", \
172 SatStatsHelper::OUTPUT_CDF_FILE, "CDF_FILE", \
173 SatStatsHelper::OUTPUT_SCATTER_PLOT, "SCATTER_PLOT", \
174 SatStatsHelper::OUTPUT_HISTOGRAM_PLOT, "HISTOGRAM_PLOT", \
175 SatStatsHelper::OUTPUT_PDF_PLOT, "PDF_PLOT", \
176 SatStatsHelper::OUTPUT_CDF_PLOT, "CDF_PLOT"))
178 #define ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER \
180 SatStatsHelper::OUTPUT_NONE, "NONE", \
181 SatStatsHelper::OUTPUT_HISTOGRAM_FILE, "HISTOGRAM_FILE", \
182 SatStatsHelper::OUTPUT_PDF_FILE, "PDF_FILE", \
183 SatStatsHelper::OUTPUT_CDF_FILE, "CDF_FILE", \
184 SatStatsHelper::OUTPUT_HISTOGRAM_PLOT, "HISTOGRAM_PLOT", \
185 SatStatsHelper::OUTPUT_PDF_PLOT, "PDF_PLOT", \
186 SatStatsHelper::OUTPUT_CDF_PLOT, "CDF_PLOT"))
188 #define ADD_SAT_STATS_ATTRIBUTE_HEAD(id, desc) \
189 .AddAttribute (# id, \
190 std::string ("Enable the output of ") + desc, \
191 EnumValue (SatStatsHelper::OUTPUT_NONE), \
192 MakeEnumAccessor<SatStatsHelper::OutputType_t> (&SatStatsHelperContainer::Add ## id),
194 #define ADD_SAT_STATS_ATTRIBUTES_BASIC_SET(id, desc) \
195 ADD_SAT_STATS_ATTRIBUTE_HEAD(Global##id, std::string("global ") + desc) \
196 ADD_SAT_STATS_BASIC_OUTPUT_CHECKER \
197 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerGw##id, std::string("per GW ") + desc) \
198 ADD_SAT_STATS_BASIC_OUTPUT_CHECKER \
199 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerSat##id, std::string("per SAT ") + desc) \
200 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
201 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerBeam##id, std::string("per beam ") + desc) \
202 ADD_SAT_STATS_BASIC_OUTPUT_CHECKER \
203 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerGroup##id, std::string("per group ") + desc) \
204 ADD_SAT_STATS_BASIC_OUTPUT_CHECKER \
205 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerUt##id, std::string("per UT ") + desc) \
206 ADD_SAT_STATS_BASIC_OUTPUT_CHECKER
208 #define ADD_SAT_STATS_ATTRIBUTES_DISTRIBUTION_SET(id, desc) \
209 ADD_SAT_STATS_ATTRIBUTE_HEAD(Global##id, std::string("global ") + desc) \
210 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
211 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerGw##id, std::string("per GW ") + desc) \
212 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
213 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerSat##id, std::string("per SAT ") + desc) \
214 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
215 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerBeam##id, std::string("per beam ") + desc) \
216 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
217 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerGroup##id, std::string("per group ") + desc) \
218 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER \
219 ADD_SAT_STATS_ATTRIBUTE_HEAD(PerUt##id, std::string("per UT ") + desc) \
220 ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER
222 #define ADD_SAT_STATS_ATTRIBUTES_AVERAGED_DISTRIBUTION_SET(id, desc) \
223 ADD_SAT_STATS_ATTRIBUTE_HEAD(AverageBeam##id, std::string("average beam ") + desc) \
224 ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER \
225 ADD_SAT_STATS_ATTRIBUTE_HEAD(AverageGroup##id, std::string("average group ") + desc) \
226 ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER \
227 ADD_SAT_STATS_ATTRIBUTE_HEAD(AverageUt##id, std::string("average UT ") + desc) \
228 ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER \
229 ADD_SAT_STATS_ATTRIBUTE_HEAD(AverageSat##id, std::string("average SAT ") + desc) \
230 ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER
235 static TypeId tid = TypeId (
"ns3::SatStatsHelperContainer")
236 .SetParent<Object> ()
237 .AddAttribute (
"Name",
238 "String to be prepended on every output file name",
239 StringValue (
"stat"),
242 MakeStringChecker ())
246 "forward link application-level delay statistics")
248 "per UT user forward link application-level delay statistics")
251 "forward link application-level delay statistics")
253 "average UT user forward link application-level delay statistics")
258 "forward link device-level delay statistics")
260 "forward link device-level delay statistics")
264 "forward link MAC-level delay statistics")
266 "forward link MAC-level delay statistics")
270 "forward link PHY-level delay statistics")
272 "forward link PHY-level delay statistics")
276 "forward feeder link DEV-level link delay statistics")
278 "forward feeder link DEV-level link delay statistics")
282 "forward user link DEV-level link delay statistics")
284 "forward user link DEV-level link delay statistics")
288 "forward feeder link MAC-level link delay statistics")
290 "forward feeder link MAC-level link delay statistics")
294 "forward user link MAC-level link delay statistics")
296 "forward user link MAC-level link delay statistics")
300 "forward feeder link PHY-level link delay statistics")
302 "forward feeder link PHY-level link delay statistics")
306 "forward user link PHY-level link delay statistics")
308 "forward user link PHY-level link delay statistics")
312 "forward link application-level jitter statistics")
314 "per UT user forward link application-level jitter statistics")
317 "forward link application-level jitter statistics")
319 "average UT user forward link application-level jitter statistics")
324 "forward link device-level jitter statistics")
326 "forward link device-level jitter statistics")
330 "forward link MAC-level jitter statistics")
332 "forward link MAC-level jitter statistics")
336 "forward link PHY-level jitter statistics")
338 "forward link PHY-level jitter statistics")
342 "forward feeder link DEV-level link jitter statistics")
344 "forward feeder link DEV-level link jitter statistics")
348 "forward user link DEV-level link jitter statistics")
350 "forward user link DEV-level link jitter statistics")
354 "forward feeder link MAC-level link jitter statistics")
356 "forward feeder link MAC-level link jitter statistics")
360 "forward user link MAC-level link jitter statistics")
362 "forward user link MAC-level link jitter statistics")
366 "forward feeder link PHY-level link jitter statistics")
368 "forward feeder link PHY-level link jitter statistics")
372 "forward user link PHY-level link jitter statistics")
374 "forward user link PHY-level link jitter statistics")
378 "forward feeder link SINR statistics")
380 "forward feeder link SINR statistics")
384 "forward user link SINR statistics")
386 "forward user link SINR statistics")
390 "return feeder link SINR statistics")
392 "return feeder link SINR statistics")
396 "return user link SINR statistics")
398 "return user link SINR statistics")
402 "forward feeder link RX power statistics")
404 "forward feeder link RX power statistics")
408 "forward user link RX power statistics")
410 "forward user link RX power statistics")
414 "return feeder link RX power statistics")
416 "return feeder link RX power statistics")
420 "return user link RX power statistics")
422 "return user link RX power statistics")
426 "forward feeder link MODCOD statistics")
428 "forward feeder link MODCOD statistics")
432 "forward user link MODCOD statistics")
434 "forward user link MODCOD statistics")
438 "return feeder link MODCOD statistics")
440 "return feeder link MODCOD statistics")
444 "return user link MODCOD statistics")
446 "return user link MODCOD statistics")
450 "forward link application-level PLT statistics")
452 "per UT user forward link application-level PLT statistics")
455 "forward link application-level PLT statistics")
457 "average UT user forward link application-level PLT statistics")
462 "forward link queue size (in bytes) statistics")
466 "forward link queue size (in number of packets) statistics")
470 "forward link signalling load statistics")
474 "forward link composite SINR statistics")
478 "forward link application-level throughput statistics")
480 "per UT user forward link application-level throughput statistics")
483 "forward link application-level throughput statistics")
485 "average UT user forward link application-level throughput statistics")
490 "forward feeder link device-level throughput statistics")
492 "forward feeder link device-level throughput statistics")
496 "forward user link device-level throughput statistics")
498 "forward user link device-level throughput statistics")
502 "forward feeder link MAC-level throughput statistics")
504 "forward feeder link MAC-level throughput statistics")
508 "forward user link MAC-level throughput statistics")
510 "forward user link MAC-level throughput statistics")
514 "forward feeder link PHY-level throughput statistics")
516 "forward feeder link PHY-level throughput statistics")
520 "forward user link PHY-level throughput statistics")
522 "forward user link PHY-level throughput statistics")
526 "return link application-level delay statistics")
528 "per UT user return link application-level delay statistics")
531 "return link application-level delay statistics")
533 "average UT user return link application-level delay statistics")
538 "return link device-level delay statistics")
540 "return link device-level delay statistics")
544 "return link MAC-level delay statistics")
546 "return link MAC-level delay statistics")
550 "return link PHY-level delay statistics")
552 "return link PHY-level delay statistics")
556 "return feeder link DEV-level link delay statistics")
558 "return feeder link DEV-level link delay statistics")
562 "return user link DEV-level link delay statistics")
564 "return user link DEV-level link delay statistics")
568 "return feeder link MAC-level link delay statistics")
570 "return feeder link MAC-level link delay statistics")
574 "return user link MAC-level link delay statistics")
576 "return user link MAC-level link delay statistics")
580 "return feeder link PHY-level link delay statistics")
582 "return feeder link PHY-level link delay statistics")
586 "return user link PHY-level link delay statistics")
588 "return user link PHY-level link delay statistics")
592 "forward feeder link DEV-level link jitter statistics")
594 "forward feeder link DEV-level link jitter statistics")
598 "forward user link DEV-level link jitter statistics")
600 "forward user link DEV-level link jitter statistics")
604 "forward feeder link MAC-level link jitter statistics")
606 "forward feeder link MAC-level link jitter statistics")
610 "forward user link MAC-level link jitter statistics")
612 "forward user link MAC-level link jitter statistics")
616 "forward feeder link PHY-level link jitter statistics")
618 "forward feeder link PHY-level link jitter statistics")
622 "forward user link PHY-level link jitter statistics")
624 "forward user link PHY-level link jitter statistics")
628 "return link application-level jitter statistics")
630 "per UT user return link application-level jitter statistics")
633 "return link application-level jitter statistics")
635 "average UT user return link application-level jitter statistics")
640 "return link device-level jitter statistics")
642 "return link device-level jitter statistics")
646 "return link MAC-level jitter statistics")
648 "return link MAC-level jitter statistics")
652 "return link PHY-level jitter statistics")
654 "return link PHY-level jitter statistics")
658 "return link application-level PLT statistics")
660 "per UT user return link application-level PLT statistics")
663 "return link application-level PLT statistics")
665 "average UT user return link application-level PLT statistics")
670 "return link queue size (in bytes) statistics")
674 "return link queue size (in number of packets) statistics")
678 "return feeder link queue size (in bytes) statistics")
680 "return feeder link queue size (in bytes) statistics")
684 "return feeder link queue size (in number of packets) statistics")
686 "return feeder link queue size (in number of packets) statistics")
690 "forward user link queue size (in bytes) statistics")
692 "forward user link queue size (in bytes) statistics")
696 "forward user link queue size (in number of packets) statistics")
698 "forward user link queue size (in number of packets) statistics")
702 "return link signalling load statistics")
706 "return link composite SINR statistics")
710 "return link application-level throughput statistics")
712 "per UT user return link application-level throughput statistics")
715 "return link application-level throughput statistics")
717 "average UT user return link application-level throughput statistics")
722 "return feeder link device-level throughput statistics")
724 "return feeder link device-level throughput statistics")
728 "return user link device-level throughput statistics")
730 "return user link device-level throughput statistics")
734 "return feeder link MAC-level throughput statistics")
736 "return feeder link MAC-level throughput statistics")
740 "return user link MAC-level throughput statistics")
742 "return user link MAC-level throughput statistics")
746 "return feeder link PHY-level throughput statistics")
748 "return feeder link PHY-level throughput statistics")
752 "return user link PHY-level throughput statistics")
754 "return user link PHY-level throughput statistics")
758 "Forward feeder link Dedicated Access packet error rate statistics")
760 "Forward user link Dedicated Access packet error rate statistics")
764 "Return feeder link Dedicated Access packet error rate statistics")
766 "Return user link Dedicated Access packet error rate statistics")
770 "Feeder link Random Access Slotted ALOHA packet error rate statistics")
772 "User link Random Access Slotted ALOHA packet error rate statistics")
776 "Random Access Feeder Slotted ALOHA packet collision rate statistics")
778 "Random Access User Slotted ALOHA packet collision rate statistics")
782 "Feeder link Random Access CRDSA packet error rate statistics")
784 "User link Random Access CRDSA packet error rate statistics")
788 "Random Access Feeder CRDSA packet collision rate statistics")
790 "Random Access User CRDSA packet collision rate statistics")
794 "Feeder link Random Access E-SSA packet error rate statistics")
796 "User link Random Access E-SSA packet error rate statistics")
800 "Random Access Feeder E-SSA packet collision rate statistics")
802 "Random Access User E-SSA packet collision rate statistics")
806 "global capacity request statistics")
810 "per GW capacity request statistics")
814 "per beam capacity request statistics")
818 "per group capacity request statistics")
822 "per UT capacity request statistics")
828 "resources granted statistics")
832 "global backlogged request statistics")
836 "per GW backlogged request statistics")
840 "per beam backlogged request statistics")
846 "global frame load (in ratio of allocated symbols) statistics")
850 "per GW frame load (in ratio of allocated symbols) statistics")
854 "per beam frame load (in ratio of allocated symbols) statistics")
858 "global frame load (in number of scheduled users) statistics")
862 "per GW frame load (in number of scheduled users) statistics")
866 "per UT frame load (in number of scheduled users) statistics")
872 "global waveform usage statistics")
876 "per GW waveform usage statistics")
880 "per beam waveform usage statistics")
886 "global return feeder window load statistics")
889 "per gw return feeder window load statistics")
892 "per beam return feeder window load statistics")
897 "global frame type usage statistics")
901 "per GW frame type usage statistics")
905 "per beam frame type usage statistics")
911 "per beam service time statistics")
921 NS_LOG_FUNCTION(
this << name);
924 for (
size_t pos = name.find_first_of(
" /"); pos != std::string::npos;
925 pos = name.find_first_of(
" /", pos + 1, 1))
994 #define SAT_STATS_GLOBAL_METHOD_DEFINITION(id, name) \
995 void SatStatsHelperContainer::AddGlobal##id(SatStatsHelper::OutputType_t type) \
997 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
998 std::string statName = m_name + "-global-" + name + GetOutputTypeSuffix(type); \
999 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1001 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1002 stat->SetName(statName); \
1003 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_GLOBAL); \
1004 stat->SetOutputType(type); \
1006 m_stats.push_back(stat); \
1007 m_names.insert(statName); \
1011 #define SAT_STATS_PER_GW_METHOD_DEFINITION(id, name) \
1012 void SatStatsHelperContainer::AddPerGw##id(SatStatsHelper::OutputType_t type) \
1014 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1015 std::string statName = m_name + "-per-gw-" + name + GetOutputTypeSuffix(type); \
1016 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1018 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1019 stat->SetName(statName); \
1020 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_GW); \
1021 stat->SetOutputType(type); \
1023 m_stats.push_back(stat); \
1024 m_names.insert(statName); \
1028 #define SAT_STATS_PER_BEAM_METHOD_DEFINITION(id, name) \
1029 void SatStatsHelperContainer::AddPerBeam##id(SatStatsHelper::OutputType_t type) \
1031 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1032 std::string statName = m_name + "-per-beam-" + name + GetOutputTypeSuffix(type); \
1033 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1035 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1036 stat->SetName(statName); \
1037 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_BEAM); \
1038 stat->SetOutputType(type); \
1040 m_stats.push_back(stat); \
1041 m_names.insert(statName); \
1045 #define SAT_STATS_PER_GROUP_METHOD_DEFINITION(id, name) \
1046 void SatStatsHelperContainer::AddPerGroup##id(SatStatsHelper::OutputType_t type) \
1048 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1049 std::string statName = m_name + "-per-group-" + name + GetOutputTypeSuffix(type); \
1050 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1052 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1053 stat->SetName(statName); \
1054 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_GROUP); \
1055 stat->SetOutputType(type); \
1057 m_stats.push_back(stat); \
1058 m_names.insert(statName); \
1062 #define SAT_STATS_PER_UT_METHOD_DEFINITION(id, name) \
1063 void SatStatsHelperContainer::AddPerUt##id(SatStatsHelper::OutputType_t type) \
1065 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1066 std::string statName = m_name + "-per-ut-" + name + GetOutputTypeSuffix(type); \
1067 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1069 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1070 stat->SetName(statName); \
1071 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_UT); \
1072 stat->SetOutputType(type); \
1074 m_stats.push_back(stat); \
1075 m_names.insert(statName); \
1079 #define SAT_STATS_PER_UT_USER_METHOD_DEFINITION(id, name) \
1080 void SatStatsHelperContainer::AddPerUtUser##id(SatStatsHelper::OutputType_t type) \
1082 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1083 std::string statName = m_name + "-per-ut-user-" + name + GetOutputTypeSuffix(type); \
1084 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1086 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1087 stat->SetName(statName); \
1088 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_UT_USER); \
1089 stat->SetOutputType(type); \
1091 m_stats.push_back(stat); \
1092 m_names.insert(statName); \
1096 #define SAT_STATS_AVERAGE_BEAM_METHOD_DEFINITION(id, name) \
1097 void SatStatsHelperContainer::AddAverageBeam##id(SatStatsHelper::OutputType_t type) \
1099 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1100 std::string statName = m_name + "-average-beam-" + name + GetOutputTypeSuffix(type); \
1101 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1103 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1104 stat->SetName(statName); \
1105 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_BEAM); \
1106 stat->SetOutputType(type); \
1107 stat->SetAveragingMode(true); \
1109 m_stats.push_back(stat); \
1110 m_names.insert(statName); \
1114 #define SAT_STATS_AVERAGE_GROUP_METHOD_DEFINITION(id, name) \
1115 void SatStatsHelperContainer::AddAverageGroup##id(SatStatsHelper::OutputType_t type) \
1117 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1118 std::string statName = m_name + "-average-group-" + name + GetOutputTypeSuffix(type); \
1119 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1121 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1122 stat->SetName(statName); \
1123 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_GROUP); \
1124 stat->SetOutputType(type); \
1125 stat->SetAveragingMode(true); \
1127 m_stats.push_back(stat); \
1128 m_names.insert(statName); \
1132 #define SAT_STATS_AVERAGE_UT_METHOD_DEFINITION(id, name) \
1133 void SatStatsHelperContainer::AddAverageUt##id(SatStatsHelper::OutputType_t type) \
1135 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1136 std::string statName = m_name + "-average-ut-" + name + GetOutputTypeSuffix(type); \
1137 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1139 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1140 stat->SetName(statName); \
1141 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_UT); \
1142 stat->SetOutputType(type); \
1143 stat->SetAveragingMode(true); \
1145 m_stats.push_back(stat); \
1146 m_names.insert(statName); \
1150 #define SAT_STATS_AVERAGE_UT_USER_METHOD_DEFINITION(id, name) \
1151 void SatStatsHelperContainer::AddAverageUtUser##id(SatStatsHelper::OutputType_t type) \
1153 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1154 std::string statName = m_name + "-average-ut-user-" + name + GetOutputTypeSuffix(type); \
1155 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1157 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1158 stat->SetName(statName); \
1159 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_UT_USER); \
1160 stat->SetOutputType(type); \
1161 stat->SetAveragingMode(true); \
1163 m_stats.push_back(stat); \
1164 m_names.insert(statName); \
1168 #define SAT_STATS_AVERAGE_SAT_METHOD_DEFINITION(id, name) \
1169 void SatStatsHelperContainer::AddAverageSat##id(SatStatsHelper::OutputType_t type) \
1171 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1172 std::string statName = m_name + "-average-sat-" + name + GetOutputTypeSuffix(type); \
1173 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1175 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1176 stat->SetName(statName); \
1177 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_SAT); \
1178 stat->SetOutputType(type); \
1179 stat->SetAveragingMode(true); \
1181 m_stats.push_back(stat); \
1182 m_names.insert(statName); \
1186 #define SAT_STATS_PER_SLICE_METHOD_DEFINITION(id, name) \
1187 void SatStatsHelperContainer::AddPerSlice##id(SatStatsHelper::OutputType_t type) \
1189 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1190 std::string statName = m_name + "-per-slice-" + name + GetOutputTypeSuffix(type); \
1191 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1193 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1194 stat->SetName(statName); \
1195 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_SLICE); \
1196 stat->SetOutputType(type); \
1198 m_stats.push_back(stat); \
1199 m_names.insert(statName); \
1203 #define SAT_STATS_PER_SAT_METHOD_DEFINITION(id, name) \
1204 void SatStatsHelperContainer::AddPerSat##id(SatStatsHelper::OutputType_t type) \
1206 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1207 std::string statName = m_name + "-per-sat-" + name + GetOutputTypeSuffix(type); \
1208 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1210 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1211 stat->SetName(statName); \
1212 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_SAT); \
1213 stat->SetOutputType(type); \
1215 m_stats.push_back(stat); \
1216 m_names.insert(statName); \
1220 #define SAT_STATS_PER_ISL_METHOD_DEFINITION(id, name) \
1221 void SatStatsHelperContainer::AddPerIsl##id(SatStatsHelper::OutputType_t type) \
1223 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1224 std::string statName = m_name + "-per-isl-" + name + GetOutputTypeSuffix(type); \
1225 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1227 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1228 stat->SetName(statName); \
1229 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_ISL); \
1230 stat->SetOutputType(type); \
1232 m_stats.push_back(stat); \
1233 m_names.insert(statName); \
1237 #define SAT_STATS_AVERAGE_ISL_METHOD_DEFINITION(id, name) \
1238 void SatStatsHelperContainer::AddAverageIsl##id(SatStatsHelper::OutputType_t type) \
1240 NS_LOG_FUNCTION(this << SatStatsHelper::GetOutputTypeName(type)); \
1241 std::string statName = m_name + "-average-isl-" + name + GetOutputTypeSuffix(type); \
1242 if (type != SatStatsHelper::OUTPUT_NONE && m_names.count(statName) == 0) \
1244 Ptr<SatStats##id##Helper> stat = CreateObject<SatStats##id##Helper>(m_satHelper); \
1245 stat->SetName(statName); \
1246 stat->SetIdentifierType(SatStatsHelper::IDENTIFIER_ISL); \
1247 stat->SetOutputType(type); \
1248 stat->SetAveragingMode(true); \
1250 m_stats.push_back(stat); \
1251 m_names.insert(statName); \
2105 "feeder-slotted-aloha-collision")
2107 "feeder-slotted-aloha-collision")
2109 "feeder-slotted-aloha-collision")
2111 "feeder-slotted-aloha-collision")
2113 "feeder-slotted-aloha-collision")
2115 "feeder-slotted-aloha-collision")
2121 "user-slotted-aloha-collision")
2123 "user-slotted-aloha-collision")
2446 return "-histogram";
2457 NS_FATAL_ERROR(
"SatStatsHelperContainer - Invalid output type");
2461 NS_FATAL_ERROR(
"SatStatsHelperContainer - Invalid output type");
2468 NS_LOG_FUNCTION(
this << utNode->GetId());
2470 std::list<Ptr<SatStatsHelper>>::iterator it;
2473 (*it)->UpdateAddressAndIdentifier(utNode);
2474 (*it)->UpdateIdentifierOnProbes();
Container of SatStatsHelper instances.
static TypeId GetTypeId()
inherited from ObjectBase base class
SatStatsHelperContainer(Ptr< SatHelper > satHelper)
Creates a new instance of container.
virtual void DoDispose()
Inherited from Object base class.
std::string GetName() const
std::string m_name
Prefix of every SatStatsHelper instance names and every output file.
void UpdateAddressAndIdentifier(Ptr< Node > utNode)
Update the address and the proper identifier from the given UT node.
std::list< Ptr< SatStatsHelper > > m_stats
Maintains the active SatStatsHelper instances which have created.
void SetName(std::string name)
Parent abstract class of all satellite statistics helpers.
SatArqSequenceNumber is handling the sequence numbers for the ARQ process.
SAT_STATS_GLOBAL_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision, "feeder-slotted-aloha-collision") SAT_STATS_PER_GW_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision
feeder slotted aloha collision SAT_STATS_PER_BEAM_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision, "feeder-slotted-aloha-collision") SAT_STATS_PER_GROUP_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision
feeder slotted aloha collision feeder slotted aloha collision SAT_STATS_PER_UT_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision, "feeder-slotted-aloha-collision") SAT_STATS_PER_SAT_METHOD_DEFINITION(FeederSlottedAlohaPacketCollision
#define SAT_STATS_AVERAGE_GROUP_METHOD_DEFINITION(id, name)
#define SAT_STATS_PER_UT_USER_METHOD_DEFINITION(id, name)
#define SAT_STATS_AVERAGE_UT_METHOD_DEFINITION(id, name)
#define ADD_SAT_STATS_AVERAGED_DISTRIBUTION_OUTPUT_CHECKER
#define ADD_SAT_STATS_ATTRIBUTES_DISTRIBUTION_SET(id, desc)
#define ADD_SAT_STATS_ATTRIBUTE_HEAD(id, desc)
#define SAT_STATS_PER_ISL_METHOD_DEFINITION(id, name)
#define ADD_SAT_STATS_ATTRIBUTES_AVERAGED_DISTRIBUTION_SET(id, desc)
#define SAT_STATS_PER_GROUP_METHOD_DEFINITION(id, name)
#define ADD_SAT_STATS_ATTRIBUTES_BASIC_SET(id, desc)
#define SAT_STATS_PER_GW_METHOD_DEFINITION(id, name)
#define ADD_SAT_STATS_DISTRIBUTION_OUTPUT_CHECKER
#define ADD_SAT_STATS_BASIC_OUTPUT_CHECKER
#define SAT_STATS_PER_SAT_METHOD_DEFINITION(id, name)
#define SAT_STATS_AVERAGE_BEAM_METHOD_DEFINITION(id, name)
#define SAT_STATS_PER_SLICE_METHOD_DEFINITION(id, name)
#define SAT_STATS_AVERAGE_SAT_METHOD_DEFINITION(id, name)
#define SAT_STATS_AVERAGE_UT_USER_METHOD_DEFINITION(id, name)