@@ -158,33 +158,33 @@ void BaseStationStatsCollector::handleMessage(cMessage *msg)
158158void BaseStationStatsCollector::resetDiscardCounterPerUe ()
159159{
160160 EV << collectorType_ << " ::resetDiscardCounterPerUe " << endl;
161- for (auto const & ue : ueCollectors_) {
162- packetFlowManager_->resetDiscardCounterPerUe (ue. first );
161+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
162+ packetFlowManager_->resetDiscardCounterPerUe (ueId );
163163 }
164164}
165165
166166void BaseStationStatsCollector::resetDelayCounterPerUe ()
167167{
168168 EV << collectorType_ << " ::resetDelayCounterPerUe " << endl;
169- for (auto const & ue : ueCollectors_) {
170- packetFlowManager_->resetDelayCounterPerUe (ue. first );
171- ue. second ->resetDelayCounter ();
169+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
170+ packetFlowManager_->resetDelayCounterPerUe (ueId );
171+ ueCollector ->resetDelayCounter ();
172172 }
173173}
174174
175175void BaseStationStatsCollector::resetThroughputCountersPerUe ()
176176{
177177 EV << collectorType_ << " ::resetThroughputCountersPerUe " << endl;
178- for (auto const & ue : ueCollectors_) {
179- packetFlowManager_->resetThroughputCounterPerUe (ue. first );
178+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
179+ packetFlowManager_->resetThroughputCounterPerUe (ueId );
180180 }
181181}
182182
183183void BaseStationStatsCollector::resetBytesCountersPerUe ()
184184{
185185 EV << collectorType_ << " ::resetBytesCountersPerUe " << endl;
186- for (auto const & ue : ueCollectors_) {
187- packetFlowManager_->resetDataVolume (ue. first );
186+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
187+ packetFlowManager_->resetDataVolume (ueId );
188188 }
189189}
190190
@@ -273,8 +273,8 @@ void BaseStationStatsCollector::add_ul_nongbr_pdr_cell()
273273 DiscardedPkts pair = { 0 , 0 };
274274 DiscardedPkts temp = { 0 , 0 };
275275
276- for (auto const & ue : ueCollectors_) {
277- temp = ue. second ->getULDiscardedPkt ();
276+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
277+ temp = ueCollector ->getULDiscardedPkt ();
278278 pair.discarded += temp.discarded ;
279279 pair.total += temp.total ;
280280 }
@@ -294,37 +294,37 @@ void BaseStationStatsCollector::add_dl_nongbr_pdr_cell_perUser()
294294{
295295 EV << collectorType_ << " ::add_dl_nongbr_pdr_cell_perUser()" << endl;
296296 double discard;
297- for (auto const & ue : ueCollectors_) {
298- discard = packetFlowManager_->getDiscardedPktPerUe (ue. first );
299- ue. second ->add_dl_nongbr_pdr_ue ((int )discard);
297+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
298+ discard = packetFlowManager_->getDiscardedPktPerUe (ueId );
299+ ueCollector ->add_dl_nongbr_pdr_ue ((int )discard);
300300 }
301301}
302302
303303void BaseStationStatsCollector::add_ul_nongbr_pdr_cell_perUser ()
304304{
305305 EV << collectorType_ << " ::add_ul_nongbr_pdr_cell_perUser()" << endl;
306- for (auto const & ue : ueCollectors_) {
307- ue. second ->add_ul_nongbr_pdr_ue ();
306+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
307+ ueCollector ->add_ul_nongbr_pdr_ue ();
308308 }
309309}
310310
311311void BaseStationStatsCollector::add_ul_nongbr_delay_perUser ()
312312{
313313 EV << collectorType_ << " ::add_ul_nongbr_delay_perUser()" << endl;
314- for (auto const & ue : ueCollectors_) {
315- ue. second ->add_ul_nongbr_delay_ue ();
314+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
315+ ueCollector ->add_ul_nongbr_delay_ue ();
316316 }
317317}
318318
319319void BaseStationStatsCollector::add_dl_nongbr_delay_perUser ()
320320{
321321 EV << collectorType_ << " ::add_dl_nongbr_delay_perUser()" << endl;
322322 double delay;
323- for (auto const & ue : ueCollectors_) {
324- delay = packetFlowManager_->getDelayStatsPerUe (ue. first );
325- EV << collectorType_ << " ::add_dl_nongbr_delay_perUser - delay: " << delay << " for node id: " << ue. first << endl;
323+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
324+ delay = packetFlowManager_->getDelayStatsPerUe (ueId );
325+ EV << collectorType_ << " ::add_dl_nongbr_delay_perUser - delay: " << delay << " for node id: " << ueId << endl;
326326 if (delay != 0 ) {
327- ue. second ->add_dl_nongbr_delay_ue ((int )delay);
327+ ueCollector ->add_dl_nongbr_delay_ue ((int )delay);
328328 }
329329 }
330330}
@@ -333,47 +333,47 @@ void BaseStationStatsCollector::add_ul_nongbr_data_volume_ue_perUser()
333333{
334334 EV << collectorType_ << " ::add_ul_nongbr_data_volume_ue_perUser" << endl;
335335 unsigned int bytes;
336- for (auto const & ue : ueCollectors_) {
337- bytes = packetFlowManager_->getDataVolume (ue. first , UL);
338- EV << collectorType_ << " ::add_ul_nongbr_data_volume_ue_perUser - received: " << bytes << " B in UL from node id: " << ue. first << endl;
339- ue. second ->add_ul_nongbr_data_volume_ue (bytes);
336+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
337+ bytes = packetFlowManager_->getDataVolume (ueId , UL);
338+ EV << collectorType_ << " ::add_ul_nongbr_data_volume_ue_perUser - received: " << bytes << " B in UL from node id: " << ueId << endl;
339+ ueCollector ->add_ul_nongbr_data_volume_ue (bytes);
340340 }
341341}
342342
343343void BaseStationStatsCollector::add_dl_nongbr_data_volume_ue_perUser ()
344344{
345345 EV << collectorType_ << " ::add_dl_nongbr_data_volume_ue_perUser" << endl;
346346 unsigned int bytes;
347- for (auto const & ue : ueCollectors_) {
348- bytes = packetFlowManager_->getDataVolume (ue. first , DL);
349- EV << collectorType_ << " ::add_dl_nongbr_data_volume_ue_perUser - sent: " << bytes << " B in DL to node id: " << ue. first << endl;
350- ue. second ->add_dl_nongbr_data_volume_ue (bytes);
347+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
348+ bytes = packetFlowManager_->getDataVolume (ueId , DL);
349+ EV << collectorType_ << " ::add_dl_nongbr_data_volume_ue_perUser - sent: " << bytes << " B in DL to node id: " << ueId << endl;
350+ ueCollector ->add_dl_nongbr_data_volume_ue (bytes);
351351 }
352352}
353353
354354void BaseStationStatsCollector::add_dl_nongbr_throughput_ue_perUser ()
355355{
356356 EV << collectorType_ << " ::add_dl_nongbr_throughput_ue_perUser" << endl;
357357 double throughput;
358- for (auto const & ue : ueCollectors_) {
359- throughput = packetFlowManager_->getThroughputStatsPerUe (ue. first );
360- EV << collectorType_ << " ::add_dl_nongbr_throughput_ue_perUser - throughput: " << throughput << " for node " << ue. first << endl;
361- packetFlowManager_->resetThroughputCounterPerUe (ue. first );
358+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
359+ throughput = packetFlowManager_->getThroughputStatsPerUe (ueId );
360+ EV << collectorType_ << " ::add_dl_nongbr_throughput_ue_perUser - throughput: " << throughput << " for node " << ueId << endl;
361+ packetFlowManager_->resetThroughputCounterPerUe (ueId );
362362 if (throughput > 0.0 )
363- ue. second ->add_dl_nongbr_throughput_ue ((int )throughput);
363+ ueCollector ->add_dl_nongbr_throughput_ue ((int )throughput);
364364 }
365365}
366366
367367void BaseStationStatsCollector::add_ul_nongbr_throughput_ue_perUser ()
368368{
369369 EV << collectorType_ << " ::add_ul_nongbr_throughput_ue_perUser" << endl;
370370 double throughput;
371- for (auto const & ue : ueCollectors_) {
372- throughput = rlc_->getUeThroughput (ue. first );
373- EV << collectorType_ << " ::add_ul_nongbr_throughput_ue_perUser - throughput: " << throughput << " for node " << ue. first << endl;
374- rlc_->resetThroughputStats (ue. first );
371+ for (auto const & [ueId, ueCollector] : ueCollectors_) {
372+ throughput = rlc_->getUeThroughput (ueId );
373+ EV << collectorType_ << " ::add_ul_nongbr_throughput_ue_perUser - throughput: " << throughput << " for node " << ueId << endl;
374+ rlc_->resetThroughputStats (ueId );
375375 if (throughput > 0.0 )
376- ue. second ->add_ul_nongbr_throughput_ue ((int )throughput);
376+ ueCollector ->add_ul_nongbr_throughput_ue ((int )throughput);
377377 }
378378}
379379
0 commit comments