A Discrete-Event Network Simulator
API
traced-callback-typedef-test-suite.cc
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Lawrence Livermore National Laboratory
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: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
19  */
20 
21 #include "ns3/test.h"
22 #include "ns3/core-module.h"
23 
24 #include "ns3/dsr-module.h" // DsrOPtionSRHeader
25 #include "ns3/internet-module.h" // Ipv4, Ipv4L3Protocol, Ipv4PacketProbe
26  // Ipv6L3Protocol, Ipv6PacketProbe
27 #include "ns3/lr-wpan-mac.h" // LrWpanMac
28 #include "ns3/lte-module.h" // PhyReceptionStatParameters,
29  // PhyTransmissionStatParameters,
30  // LteUePowerControl
31 #include "ns3/mesh-module.h" // PeerManagementProtocol
32 #include "ns3/mobility-module.h" // MobilityModel
33 #include "ns3/network-module.h" // Packet, PacketBurst
34 #include "ns3/olsr-module.h" // olsr::RoutingProtocol
35 #include "ns3/sixlowpan-module.h" // SixLowPanNetDevice
36 #include "ns3/spectrum-module.h" // SpectrumValue
37 #include "ns3/stats-module.h" // TimeSeriesAdapter
38 #include "ns3/uan-module.h" // UanPhy
39 #include "ns3/wifi-module.h" // WifiMacHeader, WifiPhyStateHelper
40 
41 
42 #include <iostream>
43 #include <sstream>
44 #include <set>
45 #include <string>
46 
47 using namespace ns3;
48 
50 {
51 public:
54 
63  static int m_nArgs;
64 
65 private:
66 
68  template <typename T1, typename T2, typename T3, typename T4, typename T5>
69  class CheckerBase;
70 
72  template <typename T1, typename T2, typename T3, typename T4, typename T5>
73  class Checker;
74 
75  template <typename T1, typename T2, typename T3, typename T4>
76  class Checker<T1, T2, T3, T4, empty>;
77 
78  template <typename T1, typename T2, typename T3>
79  class Checker<T1, T2, T3, empty, empty>;
80 
81 
82  template <typename T1, typename T2>
83  class Checker<T1, T2, empty, empty, empty>;
84 
85  template <typename T1>
86  class Checker<T1, empty, empty, empty, empty>;
87 
88  virtual void DoRun (void);
89 
90 }; // TracedCallbackTypedefTestCase
91 
92 /*
93  --------------------------------------------------------------------
94  Support functions and classes
95  --------------------------------------------------------------------
96 */
97 
98 namespace {
99 
101 std::set<std::string>
103 {
104  std::set<std::string> dupes;
105 
106  dupes.insert ("LteRlc::NotifyTxTracedCallback");
107  dupes.insert ("LteRlc::ReceiveTracedCallback");
108  dupes.insert ("LteUeRrc::ImsiCidRntiTracedCallback");
109  dupes.insert ("LteUeRrc::MibSibHandoverTracedCallback");
110  dupes.insert ("WifiPhyStateHelper::RxEndErrorTracedCallback");
111 
112  return dupes;
113 }
114 
118 std::set<std::string> g_dupes = Duplicates ();
119 
120 
128 template <typename T> inline
129 std::string TypeName (int N) { return "unknown"; }
130 
131 #define TYPENAME(T) \
132  template <> inline std::string \
133  TypeName < T > (int N) \
134  { \
135  std::stringstream ss; \
136  ss << # T << "(" << N << ")"; \
137  return ss.str (); \
138  }
139 
155 // TYPENAME (LteEnbMac::DlSchedulingTracedCallback);
201 #undef TYPENAME
202 
203 
212 void SinkIt (unsigned int N)
213 {
214  std::cout << "with " << N << " args." << std::endl;
216 }
217 
222 template <typename T1, typename T2, typename T3, typename T4, typename T5>
224 {
225 public:
226  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { SinkIt (5); }
227 };
228 
229 template <typename T1, typename T2, typename T3, typename T4>
230 class TracedCbSink<T1, T2, T3, T4, empty>
231 {
232 public:
233  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4) { SinkIt (4); }
234 };
235 
236 template <typename T1, typename T2, typename T3>
237 class TracedCbSink<T1, T2, T3, empty, empty>
238 {
239 public:
240  static void Sink (T1 a1, T2 a2, T3 a3) { SinkIt (3); }
241 };
242 
243 template <typename T1, typename T2>
244 class TracedCbSink<T1, T2, empty, empty, empty>
245 {
246 public:
247  static void Sink (T1 a1, T2 a2) { SinkIt (2); }
248 };
249 
250 template <typename T1>
252 {
253 public:
254  static void Sink (T1 a1) { SinkIt (1); }
255 };
259 } // anonymous namespace
260 
261 
262 /*
263  --------------------------------------------------------------------
264  Class TracedCallbackTypedefTestCase implementation
265 
266  We put the template implementations here to break a dependency cycle
267  from the Checkers() to TracedCbSink<> to SinkIt()
268  --------------------------------------------------------------------
269 */
270 
272 
273 template <typename T1, typename T2, typename T3, typename T4, typename T5>
275 {
276 public:
282 
283  void Cleanup (int N)
284  {
285  if (m_nArgs == 0) std::cout << std::endl;
286  NS_ASSERT_MSG (m_nArgs && m_nArgs == N, "failed.");
287  m_nArgs = 0;
288  }
289 }; // TracedCallbackTypedefTestCase::CheckerBase
290 
291 template <typename T1, typename T2, typename T3, typename T4, typename T5>
292 class TracedCallbackTypedefTestCase::Checker : public CheckerBase<T1, T2, T3, T4, T5>
293 {
295 
296 public:
297  template <typename U>
298  void Invoke (void)
299  {
300  const int N = 5;
301  U sink = TracedCbSink<T1, T2, T3, T4, T5>::Sink;
303 
304  std::cout << TypeName<U> (N) << " invoked ";
305  m_cb.ConnectWithoutContext (cb);
306  m_cb (this->m1, this->m2, this->m3, this->m4, this->m5);
307  this->Cleanup (N);
308  }
309 }; // Checker<5>
310 
311 template <typename T1, typename T2, typename T3, typename T4>
313  : public CheckerBase<T1, T2, T3, T4, empty>
314 {
316 
317 public:
318  template <typename U>
319  void Invoke (void)
320  {
321  const int N = 4;
322  U sink = TracedCbSink<T1, T2, T3, T4, empty>::Sink;
324 
325  std::cout << TypeName<U> (N) << " invoked ";
326  m_cb.ConnectWithoutContext (cb);
327  m_cb (this->m1, this->m2, this->m3, this->m4);
328  this->Cleanup (N);
329  }
330 }; // Checker <4>
331 
332 template <typename T1, typename T2, typename T3>
334  : public CheckerBase<T1, T2, T3, empty, empty>
335 {
337 
338 public:
339  template <typename U>
340  void Invoke (void)
341  {
342  const int N = 3;
343  U sink = TracedCbSink<T1, T2, T3, empty, empty>::Sink;
345 
346  std::cout << TypeName<U> (N) << " invoked ";
347  m_cb.ConnectWithoutContext (cb);
348  m_cb (this->m1, this->m2, this->m3);
349  this->Cleanup (N);
350  }
351 }; // Checker<3>
352 
353 template <typename T1, typename T2>
355  : public CheckerBase<T1, T2, empty, empty, empty>
356 {
358 
359 public:
360  template <typename U>
361  void Invoke (void)
362  {
363  const int N = 2;
364  U sink = TracedCbSink<T1, T2, empty, empty, empty>::Sink;
366 
367  std::cout << TypeName<U> (N) << " invoked ";
368  m_cb.ConnectWithoutContext (cb);
369  m_cb (this->m1, this->m2);
370  this->Cleanup (N);
371  }
372 }; // Checker<2>
373 
374 template <typename T1>
376  : public CheckerBase<T1, empty, empty, empty, empty>
377 {
379 
380 public:
381  template <typename U>
382  void Invoke (void)
383  {
384  const int N = 1;
385  U sink = TracedCbSink<T1, empty, empty, empty, empty>::Sink;
386  Callback<void, T1> cb = MakeCallback (sink);
387 
388  std::cout << TypeName<U> (N) << " invoked ";
389  m_cb.ConnectWithoutContext (cb);
390  m_cb (this->m1);
391  this->Cleanup (N);
392  }
393 }; // Checker<1>
394 
396  : TestCase ("Check basic TracedCallback operation")
397 {
398 }
399 
400 void
402 {
403 
404 #define DUPE(U, T1) \
405  if (g_dupes.find ( # U ) == g_dupes.end ()) \
406  NS_TEST_ASSERT_MSG_NE (0, 1, \
407  "expected to find " << # U << " in dupes."); \
408  if (TypeName<U> (0) == TypeName<T1> (0)) \
409  std::cout << # U << " matches " << # T1 << std::endl; \
410  else \
411  NS_TEST_ASSERT_MSG_EQ \
412  (TypeName<U> (0), TypeName<T1> (0), \
413  "the typedef " << # U << \
414  " used to match the typedef " << # T1 << \
415  " but no longer does. Please add a new CHECK call.")
416 
417 #define CHECK(U, T1, T2, T3, T4, T5) \
418  CreateObject< Checker<T1, T2, T3, T4, T5> > () -> Invoke<U> ()
419 
420  CHECK (dsr::DsrOptionSRHeader::TracedCallback,
421  const dsr::DsrOptionSRHeader &,
422  empty, empty, empty, empty);
423 
424  CHECK (EpcUeNas::StateTracedCallback,
426  empty, empty, empty);
427 
428  CHECK (Ipv4L3Protocol::DropTracedCallback,
429  const Ipv4Header &, Ptr<const Packet>,
431 
432  CHECK (Ipv4L3Protocol::SentTracedCallback,
433  const Ipv4Header &, Ptr<const Packet>, uint32_t,
434  empty, empty);
435 
436  CHECK (Ipv4L3Protocol::TxRxTracedCallback,
437  Ptr<const Packet>, Ptr<Ipv4>, uint32_t,
438  empty, empty);
439 
440  CHECK (Ipv6L3Protocol::DropTracedCallback,
441  const Ipv6Header &, Ptr<const Packet>,
443  );
444 
445  CHECK (Ipv6L3Protocol::SentTracedCallback,
446  const Ipv6Header &, Ptr<const Packet>, uint32_t,
447  empty, empty);
448 
449  CHECK (Ipv6L3Protocol::TxRxTracedCallback,
450  Ptr<const Packet>, Ptr<Ipv6>, uint32_t,
451  empty, empty);
452 
453  CHECK (LrWpanMac::SentTracedCallback,
454  Ptr<const Packet>, uint8_t, uint8_t,
455  empty, empty);
456 
457  CHECK (LrWpanMac::StateTracedCallback,
459  empty, empty, empty);
460 
461  CHECK (LrWpanPhy::StateTracedCallback,
463  empty, empty);
464 
465 
466  /* Too many args :(
467  CHECK (LteEnbMac::DlSchedulingTracedCallback,
468  uint32_t, uint32_t, uint16_t,
469  uint8_t, uint16_t, uint8_t, uint16_t);
470  */
471 
472  CHECK (LteEnbMac::UlSchedulingTracedCallback,
473  uint32_t, uint32_t, uint16_t, uint8_t, uint16_t);
474 
475  CHECK (LteEnbPhy::ReportUeSinrTracedCallback,
476  uint16_t, uint16_t, double,
477  empty, empty);
478 
479  CHECK (LteEnbPhy::ReportInterferenceTracedCallback,
480  uint16_t, Ptr<SpectrumValue>,
481  empty, empty, empty);
482 
483  CHECK (LteEnbRrc::ConnectionHandoverTracedCallback,
484  uint64_t, uint16_t, uint16_t,
485  empty, empty);
486 
487  CHECK (LteEnbRrc::HandoverStartTracedCallback,
488  uint64_t, uint16_t, uint16_t, uint16_t,
489  empty);
490 
491  CHECK (LteEnbRrc::NewUeContextTracedCallback,
492  uint16_t, uint16_t,
493  empty, empty, empty);
494 
495  CHECK (LteEnbRrc::ReceiveReportTracedCallback,
496  uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport,
497  empty);
498 
499  CHECK (LtePdcp::PduRxTracedCallback,
500  uint16_t, uint8_t, uint32_t, uint64_t,
501  empty);
502 
503  CHECK (LtePdcp::PduTxTracedCallback,
504  uint16_t, uint8_t, uint32_t,
505  empty, empty);
506 
507  DUPE (LteRlc::NotifyTxTracedCallback, LtePdcp::PduTxTracedCallback);
508 
509  DUPE (LteRlc::ReceiveTracedCallback, LtePdcp::PduRxTracedCallback);
510 
511  CHECK (LteUePhy::RsrpSinrTracedCallback,
512  uint16_t, uint16_t, double, double,
513  empty);
514 
515  CHECK (LteUePhy::RsrpRsrqTracedCallback,
516  uint16_t, uint16_t, double, double, bool);
517 
518  CHECK (LteUePhy::StateTracedCallback,
519  uint16_t, uint16_t, LteUePhy::State, LteUePhy::State,
520  empty);
521 
522  DUPE (LteUePowerControl::TxPowerTracedCallback, LteEnbPhy::ReportUeSinrTracedCallback);
523 
524  CHECK (LteUeRrc::CellSelectionTracedCallback,
525  uint64_t, uint16_t,
526  empty, empty, empty);
527 
528  DUPE (LteUeRrc::ImsiCidRntiTracedCallback, LteEnbRrc::ConnectionHandoverTracedCallback);
529 
530  DUPE (LteUeRrc::MibSibHandoverTracedCallback, LteEnbRrc::HandoverStartTracedCallback);
531 
532  CHECK (LteUeRrc::StateTracedCallback,
533  uint64_t, uint16_t, uint16_t, LteUeRrc::State, LteUeRrc::State);
534 
535  CHECK (Mac48Address::TracedCallback,
536  Mac48Address,
537  empty, empty, empty, empty);
538 
539  CHECK (MobilityModel::TracedCallback,
541  empty, empty, empty, empty);
542 
543  CHECK (olsr::RoutingProtocol::PacketTxRxTracedCallback,
544  const olsr::PacketHeader &, const olsr::MessageList &,
545  empty, empty, empty);
546 
547  CHECK (olsr::RoutingProtocol::TableChangeTracedCallback,
548  uint32_t,
549  empty, empty, empty, empty);
550 
551  CHECK (Packet::AddressTracedCallback,
552  Ptr<const Packet>, const Address &,
553  empty, empty, empty);
554 
555  CHECK (Packet::Mac48AddressTracedCallback,
557  empty, empty, empty);
558 
559  CHECK (Packet::SinrTracedCallback,
560  Ptr<const Packet>, double,
561  empty, empty, empty);
562 
563  CHECK (Packet::SizeTracedCallback,
564  uint32_t, uint32_t,
565  empty, empty, empty);
566 
567  CHECK (Packet::TracedCallback,
569  empty, empty, empty, empty);
570 
571  CHECK (PacketBurst::TracedCallback,
573  empty, empty, empty, empty);
574 
575  CHECK (dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback,
577  empty, empty, empty);
578 
579  CHECK (PhyReceptionStatParameters::TracedCallback,
581  empty, empty, empty, empty);
582 
583  CHECK (PhyTransmissionStatParameters::TracedCallback,
585  empty, empty, empty, empty);
586 
587  CHECK (SixLowPanNetDevice::DropTracedCallback,
589  Ptr<SixLowPanNetDevice>, uint32_t,
590  empty);
591 
592  CHECK (SixLowPanNetDevice::RxTxTracedCallback,
594  empty, empty);
595 
596  CHECK (SpectrumChannel::LossTracedCallback,
598  empty, empty);
599 
600  CHECK (SpectrumValue::TracedCallback,
602  empty, empty, empty, empty);
603 
604  CHECK (TimeSeriesAdaptor::OutputTracedCallback,
605  double, double,
606  empty, empty, empty);
607 
608  CHECK (UanMac::PacketModeTracedCallback,
610  empty, empty, empty);
611 
612  CHECK (UanMacCw::QueueTracedCallback,
613  Ptr<const Packet>, uint16_t,
614  empty, empty, empty);
615 
616  CHECK (UanMacRc::QueueTracedCallback,
617  Ptr<const Packet>, uint32_t,
618  empty, empty, empty);
619 
620  CHECK (UanNetDevice::RxTxTracedCallback,
622  empty, empty, empty);
623 
624  CHECK (UanPhy::TracedCallback,
625  Ptr<const Packet>, double, UanTxMode,
626  empty, empty);
627 
628  CHECK (UeManager::StateTracedCallback,
629  uint64_t, uint16_t, uint16_t, UeManager::State, UeManager::State);
630 
631  CHECK (WifiMacHeader::TracedCallback,
632  const WifiMacHeader &,
633  empty, empty, empty, empty);
634 
635  CHECK (WifiPhyStateHelper::RxEndErrorTracedCallback,
636  Ptr<const Packet>, double,
637  empty, empty, empty);
638 
639  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
641  empty);
642 
643  CHECK (WifiPhyStateHelper::StateTracedCallback,
645  empty, empty);
646 
647  CHECK (WifiPhyStateHelper::TxTracedCallback,
649  empty);
650 
651  CHECK (WifiRemoteStationManager::PowerChangeTracedCallback,
652  uint8_t, Mac48Address,
653  empty, empty, empty);
654 
655  CHECK (WifiRemoteStationManager::RateChangeTracedCallback,
656  uint32_t, Mac48Address,
657  empty, empty, empty);
658 }
659 
661 {
662 public:
664 };
665 
667  : TestSuite ("traced-callback-typedef", SYSTEM)
668 {
669  AddTestCase (new TracedCallbackTypedefTestCase, TestCase::QUICK);
670 }
671 
Ptr< PacketSink > sink
Definition: wifi-tcp.cc:47
void(* Mac48AddressTracedCallback)(Ptr< const Packet > packet, Mac48Address mac)
TracedCallback signature for packet and Mac48Address.
Definition: packet.h:682
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Packet header for IPv6.
Definition: ipv6-header.h:34
void(* TracedCallback)(const WifiMacHeader &header)
TracedCallback signature for WifiMacHeader.
Callback template class.
Definition: callback.h:1176
void(* StateTracedCallback)(Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
TracedCallback signature for Trx state change events.
Definition: lr-wpan-phy.h:490
A suite of tests to run.
Definition: test.h:1333
void(* QueueTracedCallback)(Ptr< const Packet > packet, uint32_t proto)
TracedCallback signature for dequeue of a packet.
Definition: uan-mac-rc.h:202
void(* StateTracedCallback)(Time start, Time duration, WifiPhy::State state)
TracedCallback signature for state changes.
void(* QueueTracedCallback)(Ptr< const Packet > packet, uint16_t proto)
TracedCallback signature for enqueue/dequeue of a packet.
Definition: uan-mac-cw.h:110
void(* StateTracedCallback)(const State oldState, const State newState)
TracedCallback signature for state change events.
Definition: epc-ue-nas.h:178
void(* SizeTracedCallback)(uint32_t oldSize, uint32_t newSize)
TracedCallback signature for changes in packet size.
Definition: packet.h:691
void(* TracedCallback)(Ptr< const Packet > packet)
TracedCallback signature for Ptr
Definition: packet.h:664
void(* RateChangeTracedCallback)(uint32_t rate, Mac48Address remoteAddress)
TracedCallback signature for rate change events.
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:123
void(* TableChangeTracedCallback)(uint32_t size)
TracedCallback signature for routing table computation.
void(* ReportUeSinrTracedCallback)(uint16_t cellId, uint16_t rnti, double sinrLinear)
TracedCallback signature for the linear average of SRS SINRs.
Definition: lte-enb-phy.h:294
encapsulates test code
Definition: test.h:1147
DropReason
Enumeration of the dropping reasons in SixLoWPAN.
void(* ReportInterferenceTracedCallback)(uint16_t cellId, Ptr< SpectrumValue > spectrumValue)
TracedCallback signature for the linear average of SRS SINRs.
Definition: lte-enb-phy.h:305
#define DUPE(U, T1)
State
The states of the UE PHY entity.
Definition: lte-ue-phy.h:61
Source Route (SR) Message Format.
represent a single transmission modeA WifiMode is implemented by a single integer which is used to lo...
Definition: wifi-mode.h:99
std::string TypeName(int N)
Stringify the known TracedCallback type names.
void(* StateTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
Definition: lte-enb-rrc.h:317
a polymophic address class
Definition: address.h:90
DropReason
Reason why a packet has been dropped.
void(* PacketModeTracedCallback)(Ptr< const Packet > packet, UanTxMode mode)
TracedCallback signature for packet reception/enqueue/dequeue events.
Definition: uan-mac.h:126
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
Definition: wifi-preamble.h:30
Packet header for IPv4.
Definition: ipv4-header.h:33
void(* StateTracedCallback)(uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
Definition: lte-ue-phy.h:247
make Callback use a separate empty type
Definition: empty.h:33
void(* AddressTracedCallback)(Ptr< const Packet > packet, const Address &address)
TracedCallback signature for packet and Address.
Definition: packet.h:673
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
Definition: test.cc:298
void(* DropTracedCallback)(const Ipv6Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv6 > ipv6, uint32_t interface)
TracedCallback signature for packet drop events.
void(* RxOkTracedCallback)(Ptr< const Packet > packet, double snr, WifiMode mode, WifiPreamble preamble)
TracedCallback signature for receive end ok event.
A class used for addressing UAN MAC's.
Definition: uan-address.h:40
void(* TxRxTracedCallback)(Ptr< const Packet > packet, Ptr< Ipv6 > ipv6, uint32_t interface)
TracedCallback signature for packet transmission or reception events.
static int m_nArgs
Number of arguments passed to callback.
Abstraction of packet modulation information.
Definition: uan-tx-mode.h:41
void(* PduRxTracedCallback)(const uint16_t rnti, const uint8_t lcid, const uint32_t size, const uint64_t delay)
TracedCallback signature for PDU receive event.
Definition: lte-pdcp.h:135
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Definition: callback.h:1489
void(* TxTracedCallback)(Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t power)
TracedCallback signature for transmit event.
void(* SinrTracedCallback)(Ptr< const Packet > packet, double sinr)
TracedCallback signature for packet and SINR.
Definition: packet.h:700
void(* LossTracedCallback)(Ptr< SpectrumPhy > txPhy, Ptr< SpectrumPhy > rxPhy, double lossDb)
TracedCallback signature for path loss calculation events.
void(* TracedCallback)(Ptr< SpectrumValue > value)
TracedCallback signature for SpectrumValue.
void SinkIt(unsigned int N)
Log that a callback was invoked.
virtual void DoRun(void)
Implementation to actually run this TestCase.
void(* TracedCallback)(const PhyReceptionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:162
void(* TracedCallback)(Mac48Address value)
TracedCallback signature for Mac48Address.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:73
void(* LinkOpenCloseTracedCallback)(Mac48Address src, const Mac48Address dst)
TracedCallback signature for link open/close events.
std::set< std::string > g_dupes
Container for duplicate types.
void(* ReceiveReportTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, LteRrcSap::MeasurementReport report)
TracedCallback signature for receive measurement report events.
Definition: lte-enb-rrc.h:864
void(* NewUeContextTracedCallback)(uint16_t cellId, uint16_t rnti)
TracedCallback signature for new Ue Context events.
Definition: lte-enb-rrc.h:830
void(* TracedCallback)(const DsrOptionSRHeader &header)
TracedCallback signature for DsrOptionSrHeader.
void(* RxTxTracedCallback)(Ptr< const Packet > packet, UanAddress address)
TracedCallback signature for MAC send/receive events.
an EUI-48 address
Definition: mac48-address.h:43
void(* UlSchedulingTracedCallback)(uint32_t frame, uint32_t subframe, uint16_t rnti, uint8_t mcs, uint16_t tbsSize)
TracedCallback signature for UL scheduling events.
Definition: lte-enb-mac.h:149
std::vector< MessageHeader > MessageList
Definition: olsr-header.h:695
static TracedCallbackTypedefTestSuite tracedCallbackTypedefTestSuite
void(* DropTracedCallback)(DropReason reason, Ptr< const Packet > packet, Ptr< SixLowPanNetDevice > sixNetDevice, uint32_t ifindex)
TracedCallback signature for.
void(* OutputTracedCallback)(const double now, const double data)
TracedCallback signature for output trace.
void(* SentTracedCallback)(const Ipv6Header &header, Ptr< const Packet > packet, uint32_t interface)
TracedCallback signature for packet sent, forwarded or local-delivered events.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Definition: assert.h:90
void(* SentTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, uint32_t interface)
TracedCallback signature for packet send, forward, or local deliver events.
State
The states of the UE RRC entity.
Definition: lte-ue-rrc.h:86
void(* TracedCallback)(Ptr< const Packet > pkt, double sinr, UanTxMode mode)
TracedCallback signature for UanPhy packet send/receive events.
Definition: uan-phy.h:214
void(* PacketTxRxTracedCallback)(const PacketHeader &header, const MessageList &messages)
TracedCallback signature for Packet transmit and receive events.
void(* TracedCallback)(Ptr< const PacketBurst > burst)
TracedCallback signature for Ptr
Definition: packet-burst.h:83
void(* TracedCallback)(Ptr< const MobilityModel > model)
TracedCallback signature.
void ConnectWithoutContext(const CallbackBase &callback)
Append a Callback to the chain (without a context).
State
Definition of NAS states as per "LTE - From theory to practice", Section 3.2.3.2 "Connection Establis...
Definition: epc-ue-nas.h:156
void(* RsrpRsrqTracedCallback)(uint16_t rnti, uint16_t cellId, double rsrp, double rsrq, bool isServingCell)
TracedCallback signature for cell RSRP and RSRQ.
Definition: lte-ue-phy.h:270
void(* RxTxTracedCallback)(Ptr< const Packet > packet, Ptr< SixLowPanNetDevice > sixNetDevice, uint32_t ifindex)
TracedCallback signature for packet send/receive events.
void(* StateTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
Definition: lte-ue-rrc.h:291
Inspect a type to deduce its features.
Definition: type-traits.h:37
void(* TracedCallback)(const PhyTransmissionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:137
const double m2
Second component modulus, 232 - 22853.
Definition: rng-stream.cc:58
void(* HandoverStartTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, uint16_t targetCid)
TracedCallback signature for handover start events.
Definition: lte-enb-rrc.h:851
void(* PowerChangeTracedCallback)(uint8_t power, Mac48Address remoteAddress)
TracedCallback signature for power change events.
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:67
DropReason
Reason why a packet has been dropped.
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:556
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:105
A base class which provides memory management and object aggregation.
Definition: object.h:87
void(* TxRxTracedCallback)(Ptr< const Packet > packet, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet transmission or reception events.
void(* RsrpSinrTracedCallback)(uint16_t cellId, uint16_t rnti, double rsrp, double sinr)
TracedCallback signature for cell RSRP and SINR report.
Definition: lte-ue-phy.h:258
State
The state of the PHY layer.
Definition: wifi-phy.h:168
const double m1
First component modulus, 232 - 209.
Definition: rng-stream.cc:54
std::set< std::string > Duplicates(void)
Record typedefs which are identical to previously declared.
void(* CellSelectionTracedCallback)(uint64_t imsi, uint16_t cellId)
TracedCallback signature for imsi, cellId and rnti events.
Definition: lte-ue-rrc.h:257
#define CHECK(U, T1, T2, T3, T4, T5)
void(* SentTracedCallback)(Ptr< const Packet > packet, uint8_t retries, uint8_t backoffs)
TracedCallback signature for sent packets.
Definition: lr-wpan-mac.h:544
Implements the IEEE 802.11 MAC header.
void(* ConnectionHandoverTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti)
TracedCallback signature for connection and handover end events.
Definition: lte-enb-rrc.h:840
void(* DropTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet drop events.