A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
radio-bearer-stats-calculator.cc
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2011 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Jaume Nin <jnin@cttc.es>
19  * Nicola Baldo <nbaldo@cttc.es>
20  */
21 
23 #include "ns3/string.h"
24 #include "ns3/nstime.h"
25 #include <ns3/log.h>
26 #include <vector>
27 #include <algorithm>
28 
29 namespace ns3
30 {
31 
32 NS_LOG_COMPONENT_DEFINE ("RadioBearerStatsCalculator")
33  ;
34 
35 NS_OBJECT_ENSURE_REGISTERED ( RadioBearerStatsCalculator)
36  ;
37 
39  : m_firstWrite (true),
40  m_pendingOutput (false),
41  m_protocolType ("RLC")
42 {
43  NS_LOG_FUNCTION (this);
44 }
45 
47  : m_firstWrite (true),
48  m_pendingOutput (false)
49 {
50  NS_LOG_FUNCTION (this);
51  m_protocolType = protocolType;
52 }
53 
55 {
56  NS_LOG_FUNCTION (this);
57 }
58 
59 TypeId
61 {
62  static TypeId tid =
63  TypeId ("ns3::RadioBearerStatsCalculator")
64  .SetParent<LteStatsCalculator> ().AddConstructor<RadioBearerStatsCalculator> ()
65  .AddAttribute ("StartTime", "Start time of the on going epoch.",
66  TimeValue (Seconds (0.)),
69  MakeTimeChecker ())
70  .AddAttribute ("EpochDuration", "Epoch duration.",
71  TimeValue (Seconds (0.25)),
72  MakeTimeAccessor (&RadioBearerStatsCalculator::GetEpoch,
74  MakeTimeChecker ())
75  .AddAttribute ("DlRlcOutputFilename",
76  "Name of the file where the downlink results will be saved.",
77  StringValue ("DlRlcStats.txt"),
78  MakeStringAccessor (&LteStatsCalculator::SetDlOutputFilename),
79  MakeStringChecker ())
80  .AddAttribute ("UlRlcOutputFilename",
81  "Name of the file where the uplink results will be saved.",
82  StringValue ("UlRlcStats.txt"),
83  MakeStringAccessor (&LteStatsCalculator::SetUlOutputFilename),
84  MakeStringChecker ())
85  .AddAttribute ("DlPdcpOutputFilename",
86  "Name of the file where the downlink results will be saved.",
87  StringValue ("DlPdcpStats.txt"),
89  MakeStringChecker ())
90  .AddAttribute ("UlPdcpOutputFilename",
91  "Name of the file where the uplink results will be saved.",
92  StringValue ("UlPdcpStats.txt"),
94  MakeStringChecker ())
95  ;
96  return tid;
97 }
98 
99 void
101 {
102  NS_LOG_FUNCTION (this);
103  if (m_pendingOutput)
104  {
105  ShowResults ();
106  }
107 }
108 
109 void
111 {
112  m_startTime = t;
114 }
115 
116 Time
118 {
119  return m_startTime;
120 }
121 
122 void
124 {
125  m_epochDuration = e;
127 }
128 
129 Time
131 {
132  return m_epochDuration;
133 }
134 
135 void
136 RadioBearerStatsCalculator::UlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
137 {
138  NS_LOG_FUNCTION (this << "UlTxPDU" << cellId << imsi << rnti << (uint32_t) lcid << packetSize);
139  ImsiLcidPair_t p (imsi, lcid);
140  if (Simulator::Now () >= m_startTime)
141  {
142  m_ulCellId[p] = cellId;
143  m_flowId[p] = LteFlowId_t (rnti, lcid);
144  m_ulTxPackets[p]++;
145  m_ulTxData[p] += packetSize;
146  }
147  m_pendingOutput = true;
148 }
149 
150 void
151 RadioBearerStatsCalculator::DlTxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
152 {
153  NS_LOG_FUNCTION (this << "DlTxPDU" << cellId << imsi << rnti << (uint32_t) lcid << packetSize);
154  ImsiLcidPair_t p (imsi, lcid);
155  if (Simulator::Now () >= m_startTime)
156  {
157  m_dlCellId[p] = cellId;
158  m_flowId[p] = LteFlowId_t (rnti, lcid);
159  m_dlTxPackets[p]++;
160  m_dlTxData[p] += packetSize;
161  }
162  m_pendingOutput = true;
163 }
164 
165 void
166 RadioBearerStatsCalculator::UlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize,
167  uint64_t delay)
168 {
169  NS_LOG_FUNCTION (this << "UlRxPDU" << cellId << imsi << rnti << (uint32_t) lcid << packetSize << delay);
170  ImsiLcidPair_t p (imsi, lcid);
171  if (Simulator::Now () >= m_startTime)
172  {
173  m_ulCellId[p] = cellId;
174  m_ulRxPackets[p]++;
175  m_ulRxData[p] += packetSize;
176 
177  Uint64StatsMap::iterator it = m_ulDelay.find (p);
178  if (it == m_ulDelay.end ())
179  {
180  NS_LOG_DEBUG (this << " Creating UL stats calculators for IMSI " << p.m_imsi << " and LCID " << (uint32_t) p.m_lcId);
181  m_ulDelay[p] = CreateObject<MinMaxAvgTotalCalculator<uint64_t> > ();
182  m_ulPduSize[p] = CreateObject<MinMaxAvgTotalCalculator<uint32_t> > ();
183  }
184  m_ulDelay[p]->Update (delay);
185  m_ulPduSize[p]->Update (packetSize);
186  }
187  m_pendingOutput = true;
188 }
189 
190 void
191 RadioBearerStatsCalculator::DlRxPdu (uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
192 {
193  NS_LOG_FUNCTION (this << "DlRxPDU" << cellId << imsi << rnti << (uint32_t) lcid << packetSize << delay);
194  ImsiLcidPair_t p (imsi, lcid);
195  if (Simulator::Now () >= m_startTime)
196  {
197  m_dlCellId[p] = cellId;
198  m_dlRxPackets[p]++;
199  m_dlRxData[p] += packetSize;
200 
201  Uint64StatsMap::iterator it = m_dlDelay.find (p);
202  if (it == m_dlDelay.end ())
203  {
204  NS_LOG_DEBUG (this << " Creating DL stats calculators for IMSI " << p.m_imsi << " and LCID " << (uint32_t) p.m_lcId);
205  m_dlDelay[p] = CreateObject<MinMaxAvgTotalCalculator<uint64_t> > ();
206  m_dlPduSize[p] = CreateObject<MinMaxAvgTotalCalculator<uint32_t> > ();
207  }
208  m_dlDelay[p]->Update (delay);
209  m_dlPduSize[p]->Update (packetSize);
210  }
211  m_pendingOutput = true;
212 }
213 
214 void
216 {
217 
218  NS_LOG_FUNCTION (this << GetUlOutputFilename ().c_str () << GetDlOutputFilename ().c_str ());
219  NS_LOG_INFO ("Write Rlc Stats in " << GetUlOutputFilename ().c_str () << " and in " << GetDlOutputFilename ().c_str ());
220 
221  std::ofstream ulOutFile;
222  std::ofstream dlOutFile;
223 
224  if (m_firstWrite == true)
225  {
226  ulOutFile.open (GetUlOutputFilename ().c_str ());
227  if (!ulOutFile.is_open ())
228  {
229  NS_LOG_ERROR ("Can't open file " << GetUlOutputFilename ().c_str ());
230  return;
231  }
232 
233  dlOutFile.open (GetDlOutputFilename ().c_str ());
234  if (!dlOutFile.is_open ())
235  {
236  NS_LOG_ERROR ("Can't open file " << GetDlOutputFilename ().c_str ());
237  return;
238  }
239  m_firstWrite = false;
240  ulOutFile << "% start\tend\tCellId\tIMSI\tRNTI\tLCID\tnTxPDUs\tTxBytes\tnRxPDUs\tRxBytes\t";
241  ulOutFile << "delay\tstdDev\tmin\tmax\t";
242  ulOutFile << "PduSize\tstdDev\tmin\tmax";
243  ulOutFile << std::endl;
244  dlOutFile << "% start\tend\tCellId\tIMSI\tRNTI\tLCID\tnTxPDUs\tTxBytes\tnRxPDUs\tRxBytes\t";
245  dlOutFile << "delay\tstdDev\tmin\tmax\t";
246  dlOutFile << "PduSize\tstdDev\tmin\tmax";
247  dlOutFile << std::endl;
248  }
249  else
250  {
251  ulOutFile.open (GetUlOutputFilename ().c_str (), std::ios_base::app);
252  if (!ulOutFile.is_open ())
253  {
254  NS_LOG_ERROR ("Can't open file " << GetUlOutputFilename ().c_str ());
255  return;
256  }
257 
258  dlOutFile.open (GetDlOutputFilename ().c_str (), std::ios_base::app);
259  if (!dlOutFile.is_open ())
260  {
261  NS_LOG_ERROR ("Can't open file " << GetDlOutputFilename ().c_str ());
262  return;
263  }
264  }
265 
266  WriteUlResults (ulOutFile);
267  WriteDlResults (dlOutFile);
268  m_pendingOutput = false;
269 
270 }
271 
272 void
274 {
275  NS_LOG_FUNCTION (this);
276 
277  // Get the unique IMSI / LCID list
278 
279  std::vector < ImsiLcidPair_t > pairVector;
280  for (Uint32Map::iterator it = m_ulTxPackets.begin (); it != m_ulTxPackets.end (); ++it)
281  {
282  if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVector.end ())
283  {
284  pairVector.push_back ((*it).first);
285  }
286  }
287 
288  Time endTime = m_startTime + m_epochDuration;
289  for (std::vector<ImsiLcidPair_t>::iterator it = pairVector.begin (); it != pairVector.end (); ++it)
290  {
291  ImsiLcidPair_t p = *it;
292  outFile << m_startTime.GetNanoSeconds () / 1.0e9 << "\t";
293  outFile << endTime.GetNanoSeconds () / 1.0e9 << "\t";
294  outFile << GetUlCellId (p.m_imsi, p.m_lcId) << "\t";
295  outFile << p.m_imsi << "\t";
296  outFile << m_flowId[p].m_rnti << "\t";
297  outFile << (uint32_t) m_flowId[p].m_lcId << "\t";
298  outFile << GetUlTxPackets (p.m_imsi, p.m_lcId) << "\t";
299  outFile << GetUlTxData (p.m_imsi, p.m_lcId) << "\t";
300  outFile << GetUlRxPackets (p.m_imsi, p.m_lcId) << "\t";
301  outFile << GetUlRxData (p.m_imsi, p.m_lcId) << "\t";
302  std::vector<double> stats = GetUlDelayStats (p.m_imsi, p.m_lcId);
303  for (std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it)
304  {
305  outFile << (*it) * 1e-9 << "\t";
306  }
307  stats = GetUlPduSizeStats (p.m_imsi, p.m_lcId);
308  for (std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it)
309  {
310  outFile << (*it) << "\t";
311  }
312  outFile << std::endl;
313  }
314 
315  outFile.close ();
316 }
317 
318 void
320 {
321  NS_LOG_FUNCTION (this);
322 
323  // Get the unique IMSI list
324  std::vector < ImsiLcidPair_t > pairVector;
325  for (Uint32Map::iterator it = m_dlTxPackets.begin (); it != m_dlTxPackets.end (); ++it)
326  {
327  if (find (pairVector.begin (), pairVector.end (), (*it).first) == pairVector.end ())
328  {
329  pairVector.push_back ((*it).first);
330  }
331  }
332 
333  Time endTime = m_startTime + m_epochDuration;
334  for (std::vector<ImsiLcidPair_t>::iterator pair = pairVector.begin (); pair != pairVector.end (); ++pair)
335  {
336  ImsiLcidPair_t p = *pair;
337  outFile << m_startTime.GetNanoSeconds () / 1.0e9 << "\t";
338  outFile << endTime.GetNanoSeconds () / 1.0e9 << "\t";
339  outFile << GetDlCellId (p.m_imsi, p.m_lcId) << "\t";
340  outFile << p.m_imsi << "\t";
341  outFile << m_flowId[p].m_rnti << "\t";
342  outFile << (uint32_t) m_flowId[p].m_lcId << "\t";
343  outFile << GetDlTxPackets (p.m_imsi, p.m_lcId) << "\t";
344  outFile << GetDlTxData (p.m_imsi, p.m_lcId) << "\t";
345  outFile << GetDlRxPackets (p.m_imsi, p.m_lcId) << "\t";
346  outFile << GetDlRxData (p.m_imsi, p.m_lcId) << "\t";
347  std::vector<double> stats = GetDlDelayStats (p.m_imsi, p.m_lcId);
348  for (std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it)
349  {
350  outFile << (*it) * 1e-9 << "\t";
351  }
352  stats = GetDlPduSizeStats (p.m_imsi, p.m_lcId);
353  for (std::vector<double>::iterator it = stats.begin (); it != stats.end (); ++it)
354  {
355  outFile << (*it) << "\t";
356  }
357  outFile << std::endl;
358  }
359 
360  outFile.close ();
361 }
362 
363 void
365 {
366  NS_LOG_FUNCTION (this);
367 
368  m_ulTxPackets.erase (m_ulTxPackets.begin (), m_ulTxPackets.end ());
369  m_ulRxPackets.erase (m_ulRxPackets.begin (), m_ulRxPackets.end ());
370  m_ulRxData.erase (m_ulRxData.begin (), m_ulRxData.end ());
371  m_ulTxData.erase (m_ulTxData.begin (), m_ulTxData.end ());
372  m_ulDelay.erase (m_ulDelay.begin (), m_ulDelay.end ());
373  m_ulPduSize.erase (m_ulPduSize.begin (), m_ulPduSize.end ());
374 
375  m_dlTxPackets.erase (m_dlTxPackets.begin (), m_dlTxPackets.end ());
376  m_dlRxPackets.erase (m_dlRxPackets.begin (), m_dlRxPackets.end ());
377  m_dlRxData.erase (m_dlRxData.begin (), m_dlRxData.end ());
378  m_dlTxData.erase (m_dlTxData.begin (), m_dlTxData.end ());
379  m_dlDelay.erase (m_dlDelay.begin (), m_dlDelay.end ());
380  m_dlPduSize.erase (m_dlPduSize.begin (), m_dlPduSize.end ());
381 }
382 
383 void
385 {
386  NS_LOG_FUNCTION (this);
388  NS_ASSERT (Simulator::Now ().GetMilliSeconds () == 0); // below event time assumes this
390 }
391 
392 void
394 {
395  NS_LOG_FUNCTION (this);
396  ShowResults ();
397  ResetResults ();
400 }
401 
402 uint32_t
403 RadioBearerStatsCalculator::GetUlTxPackets (uint64_t imsi, uint8_t lcid)
404 {
405  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
406  ImsiLcidPair_t p (imsi, lcid);
407  return m_ulTxPackets[p];
408 }
409 
410 uint32_t
411 RadioBearerStatsCalculator::GetUlRxPackets (uint64_t imsi, uint8_t lcid)
412 {
413  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
414  ImsiLcidPair_t p (imsi, lcid);
415  return m_ulRxPackets[p];
416 }
417 
418 uint64_t
419 RadioBearerStatsCalculator::GetUlTxData (uint64_t imsi, uint8_t lcid)
420 {
421  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
422  ImsiLcidPair_t p (imsi, lcid);
423  return m_ulTxData[p];
424 }
425 
426 uint64_t
427 RadioBearerStatsCalculator::GetUlRxData (uint64_t imsi, uint8_t lcid)
428 {
429  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
430  ImsiLcidPair_t p (imsi, lcid);
431  return m_ulRxData[p];
432 }
433 
434 double
435 RadioBearerStatsCalculator::GetUlDelay (uint64_t imsi, uint8_t lcid)
436 {
437  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
438  ImsiLcidPair_t p (imsi, lcid);
439  Uint64StatsMap::iterator it = m_ulDelay.find (p);
440  if (it == m_ulDelay.end ())
441  {
442  NS_LOG_ERROR ("UL delay for " << imsi << " - " << (uint16_t) lcid << " not found");
443  return 0;
444 
445  }
446  return m_ulDelay[p]->getMean ();
447 }
448 
449 std::vector<double>
450 RadioBearerStatsCalculator::GetUlDelayStats (uint64_t imsi, uint8_t lcid)
451 {
452  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
453  ImsiLcidPair_t p (imsi, lcid);
454  std::vector<double> stats;
455  Uint64StatsMap::iterator it = m_ulDelay.find (p);
456  if (it == m_ulDelay.end ())
457  {
458  stats.push_back (0.0);
459  stats.push_back (0.0);
460  stats.push_back (0.0);
461  stats.push_back (0.0);
462  return stats;
463 
464  }
465  stats.push_back (m_ulDelay[p]->getMean ());
466  stats.push_back (m_ulDelay[p]->getStddev ());
467  stats.push_back (m_ulDelay[p]->getMin ());
468  stats.push_back (m_ulDelay[p]->getMax ());
469  return stats;
470 }
471 
472 std::vector<double>
474 {
475  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
476  ImsiLcidPair_t p (imsi, lcid);
477  std::vector<double> stats;
478  Uint32StatsMap::iterator it = m_ulPduSize.find (p);
479  if (it == m_ulPduSize.end ())
480  {
481  stats.push_back (0.0);
482  stats.push_back (0.0);
483  stats.push_back (0.0);
484  stats.push_back (0.0);
485  return stats;
486 
487  }
488  stats.push_back (m_ulPduSize[p]->getMean ());
489  stats.push_back (m_ulPduSize[p]->getStddev ());
490  stats.push_back (m_ulPduSize[p]->getMin ());
491  stats.push_back (m_ulPduSize[p]->getMax ());
492  return stats;
493 }
494 
495 uint32_t
496 RadioBearerStatsCalculator::GetDlTxPackets (uint64_t imsi, uint8_t lcid)
497 {
498  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
499  ImsiLcidPair_t p (imsi, lcid);
500  return m_dlTxPackets[p];
501 }
502 
503 uint32_t
504 RadioBearerStatsCalculator::GetDlRxPackets (uint64_t imsi, uint8_t lcid)
505 {
506  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
507  ImsiLcidPair_t p (imsi, lcid);
508  return m_dlRxPackets[p];
509 }
510 
511 uint64_t
512 RadioBearerStatsCalculator::GetDlTxData (uint64_t imsi, uint8_t lcid)
513 {
514  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
515  ImsiLcidPair_t p (imsi, lcid);
516  return m_dlTxData[p];
517 }
518 
519 uint64_t
520 RadioBearerStatsCalculator::GetDlRxData (uint64_t imsi, uint8_t lcid)
521 {
522  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
523  ImsiLcidPair_t p (imsi, lcid);
524  return m_dlRxData[p];
525 }
526 
527 uint32_t
528 RadioBearerStatsCalculator::GetUlCellId (uint64_t imsi, uint8_t lcid)
529 {
530  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
531  ImsiLcidPair_t p (imsi, lcid);
532  return m_ulCellId[p];
533 }
534 
535 uint32_t
536 RadioBearerStatsCalculator::GetDlCellId (uint64_t imsi, uint8_t lcid)
537 {
538  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
539  ImsiLcidPair_t p (imsi, lcid);
540  return m_dlCellId[p];
541 }
542 
543 double
544 RadioBearerStatsCalculator::GetDlDelay (uint64_t imsi, uint8_t lcid)
545 {
546  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
547  ImsiLcidPair_t p (imsi, lcid);
548  Uint64StatsMap::iterator it = m_dlDelay.find (p);
549  if (it == m_dlDelay.end ())
550  {
551  NS_LOG_ERROR ("DL delay for " << imsi << " not found");
552  return 0;
553  }
554  return m_dlDelay[p]->getMean ();
555 }
556 
557 std::vector<double>
558 RadioBearerStatsCalculator::GetDlDelayStats (uint64_t imsi, uint8_t lcid)
559 {
560  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
561  ImsiLcidPair_t p (imsi, lcid);
562  std::vector<double> stats;
563  Uint64StatsMap::iterator it = m_dlDelay.find (p);
564  if (it == m_dlDelay.end ())
565  {
566  stats.push_back (0.0);
567  stats.push_back (0.0);
568  stats.push_back (0.0);
569  stats.push_back (0.0);
570  return stats;
571 
572  }
573  stats.push_back (m_dlDelay[p]->getMean ());
574  stats.push_back (m_dlDelay[p]->getStddev ());
575  stats.push_back (m_dlDelay[p]->getMin ());
576  stats.push_back (m_dlDelay[p]->getMax ());
577  return stats;
578 }
579 
580 std::vector<double>
582 {
583  NS_LOG_FUNCTION (this << imsi << (uint16_t) lcid);
584  ImsiLcidPair_t p (imsi, lcid);
585  std::vector<double> stats;
586  Uint32StatsMap::iterator it = m_dlPduSize.find (p);
587  if (it == m_dlPduSize.end ())
588  {
589  stats.push_back (0.0);
590  stats.push_back (0.0);
591  stats.push_back (0.0);
592  stats.push_back (0.0);
593  return stats;
594 
595  }
596  stats.push_back (m_dlPduSize[p]->getMean ());
597  stats.push_back (m_dlPduSize[p]->getStddev ());
598  stats.push_back (m_dlPduSize[p]->getMin ());
599  stats.push_back (m_dlPduSize[p]->getMax ());
600  return stats;
601 }
602 
603 std::string
605 {
606  if (m_protocolType == "RLC")
607  {
609  }
610  else
611  {
612  return GetUlPdcpOutputFilename ();
613  }
614 }
615 
616 std::string
618 {
619  if (m_protocolType == "RLC")
620  {
622  }
623  else
624  {
625  return GetDlPdcpOutputFilename ();
626  }
627 }
628 
629 void
631 {
632  m_ulPdcpOutputFilename = outputFilename;
633 }
634 
635 std::string
637 {
638  return m_ulPdcpOutputFilename;
639 }
640 void
642 {
643  m_dlPdcpOutputFilename = outputFilename;
644 }
645 
646 std::string
648 {
649  return m_dlPdcpOutputFilename;
650 }
651 
652 } // namespace ns3
Doxygen introspection did not find any typical Config paths.
keep track of time values and allow control of global simulation resolution
Definition: nstime.h:81
#define NS_LOG_FUNCTION(parameters)
Definition: log.h:345
NS_LOG_COMPONENT_DEFINE("GrantedTimeWindowMpiInterface")
virtual ~RadioBearerStatsCalculator()
Class destructor.
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.
hold variables of type string
Definition: string.h:19
double GetUlDelay(uint64_t imsi, uint8_t lcid)
Gets the uplink RLC to RLC delay.
std::string GetUlPdcpOutputFilename(void)
Get the name of the file where the uplink PDCP statistics will be stored.
bool m_pendingOutput
true if any output is pending
#define NS_ASSERT(condition)
Definition: assert.h:64
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
uint32_t GetDlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes.
#define NS_LOG_INFO(msg)
Definition: log.h:298
static EventId Schedule(Time const &time, MEM mem_ptr, OBJ obj)
Schedule an event to expire at the relative time "time" is reached.
Definition: simulator.h:824
uint32_t GetUlCellId(uint64_t imsi, uint8_t lcid)
Gets the attached Enb cellId.
void DoDispose()
This method is called by Object::Dispose or by the object's destructor, whichever comes first...
uint32_t GetUlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted uplink packets.
void SetUlOutputFilename(std::string outputFilename)
Set the name of the file where the uplink statistics will be stored.
std::vector< double > GetUlPduSizeStats(uint64_t imsi, uint8_t lcid)
Gets the uplink PDU size statistics: average, min, max and standard deviation.
hold objects of type ns3::Time
Definition: nstime.h:961
uint64_t GetDlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received downlink data bytes.
void SetUlPdcpOutputFilename(std::string outputFilename)
Set the name of the file where the uplink PDCP statistics will be stored.
double GetDlDelay(uint64_t imsi, uint8_t lcid)
Gets the downlink RLC to RLC delay.
void UlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Notifies the stats calculator that an uplink transmission has occurred.
std::string GetDlPdcpOutputFilename(void)
Get the name of the file where the downlink PDCP statistics will be stored.
uint32_t GetUlRxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of received uplink packets.
Time m_startTime
Start time of the on going epoch.
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
std::string GetUlOutputFilename(void)
Get the name of the file where the uplink statistics will be stored.
void SetDlOutputFilename(std::string outputFilename)
Set the name of the file where the downlink statistics will be stored.
bool m_firstWrite
true if output files have not been opened yet
static Time Now(void)
Return the "current simulation time".
Definition: simulator.cc:180
uint64_t GetDlTxData(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes.
void DlTxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize)
Notifies the stats calculator that an downlink transmission has occurred.
uint32_t GetDlCellId(uint64_t imsi, uint8_t lcid)
Gets the attached Enb cellId.
void UlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Notifies the stats calculator that an uplink reception has occurred.
int64_t GetNanoSeconds(void) const
Definition: nstime.h:299
uint64_t GetUlTxData(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted uplink data bytes.
uint64_t GetUlRxData(uint64_t imsi, uint8_t lcid)
Gets the number of received uplink data bytes.
std::vector< double > GetDlDelayStats(uint64_t imsi, uint8_t lcid)
Gets the downlink RLC to RLC statistics: average, min, max and standard deviation.
uint32_t GetDlTxPackets(uint64_t imsi, uint8_t lcid)
Gets the number of transmitted downlink data bytes.
#define NS_LOG_DEBUG(msg)
Definition: log.h:289
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::cancel method.
Definition: event-id.cc:47
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
Definition: time.cc:452
void SetDlPdcpOutputFilename(std::string outputFilename)
Set the name of the file where the downlink PDCP statistics will be stored.
#define NS_LOG_ERROR(msg)
Definition: log.h:271
std::vector< double > GetUlDelayStats(uint64_t imsi, uint8_t lcid)
Gets the uplink RLC to RLC statistics: average, min, max and standard deviation.
std::vector< double > GetDlPduSizeStats(uint64_t imsi, uint8_t lcid)
Gets the downlink PDU size statistics: average, min, max and standard deviation.
a unique identifier for an interface.
Definition: type-id.h:49
TypeId SetParent(TypeId tid)
Definition: type-id.cc:611
void DlRxPdu(uint16_t cellId, uint64_t imsi, uint16_t rnti, uint8_t lcid, uint32_t packetSize, uint64_t delay)
Notifies the stats calculator that an downlink reception has occurred.
std::string GetDlOutputFilename(void)
Get the name of the file where the downlink statistics will be stored.