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  {
55  }
56 
65  static int m_nArgs;
66 
67 private:
69  template <typename T1, typename T2, typename T3, typename T4, typename T5>
70  class CheckerBase;
71 
73  template <typename T1, typename T2, typename T3, typename T4, typename T5>
74  class Checker;
75 
76  template <typename T1, typename T2, typename T3, typename T4>
77  class Checker<T1, T2, T3, T4, empty>;
78 
79  template <typename T1, typename T2, typename T3>
80  class Checker<T1, T2, T3, empty, empty>;
81 
82 
83  template <typename T1, typename T2>
84  class Checker<T1, T2, empty, empty, empty>;
85 
86  template <typename T1>
87  class Checker<T1, empty, empty, empty, empty>;
88 
89  virtual void DoRun (void);
90 
91 }; // TracedCallbackTypedefTestCase
92 
93 /*
94  --------------------------------------------------------------------
95  Support functions and classes
96  --------------------------------------------------------------------
97 */
98 
99 namespace {
100 
102 std::set<std::string>
104 {
105  std::set<std::string> dupes;
106 
107  dupes.insert ("LteRlc::NotifyTxTracedCallback");
108  dupes.insert ("LteRlc::ReceiveTracedCallback");
109  dupes.insert ("LteUeRrc::ImsiCidRntiTracedCallback");
110  dupes.insert ("LteUeRrc::MibSibHandoverTracedCallback");
111  dupes.insert ("WifiPhyStateHelper::RxEndErrorTracedCallback");
112 
113  return dupes;
114 }
115 
119 std::set<std::string> g_dupes = Duplicates ();
120 
121 
129 template <typename T>
130 inline
131 std::string TypeName (int N)
132 {
133  return "unknown";
134 }
135 
136 #define TYPENAME(T) \
137  template <> \
138  inline std::string \
139  TypeName < T > (int N) \
140  { \
141  std::stringstream ss; \
142  ss << # T << "(" << N << ")"; \
143  return ss.str (); \
144  }
145 
161 // TYPENAME (LteEnbMac::DlSchedulingTracedCallback);
206 #undef TYPENAME
207 
208 
217 void SinkIt (unsigned int N)
218 {
219  std::cout << "with " << N << " args." << std::endl;
221 }
222 
227 template <typename T1, typename T2, typename T3, typename T4, typename T5>
229 {
230 public:
231  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
232  {
233  SinkIt (5);
234  }
235 };
236 
237 template <typename T1, typename T2, typename T3, typename T4>
238 class TracedCbSink<T1, T2, T3, T4, empty>
239 {
240 public:
241  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4)
242  {
243  SinkIt (4);
244  }
245 };
246 
247 template <typename T1, typename T2, typename T3>
248 class TracedCbSink<T1, T2, T3, empty, empty>
249 {
250 public:
251  static void Sink (T1 a1, T2 a2, T3 a3)
252  {
253  SinkIt (3);
254  }
255 };
256 
257 template <typename T1, typename T2>
258 class TracedCbSink<T1, T2, empty, empty, empty>
259 {
260 public:
261  static void Sink (T1 a1, T2 a2)
262  {
263  SinkIt (2);
264  }
265 };
266 
267 template <typename T1>
269 {
270 public:
271  static void Sink (T1 a1)
272  {
273  SinkIt (1);
274  }
275 };
279 } // unnamed namespace
280 
281 
282 /*
283  --------------------------------------------------------------------
284  Class TracedCallbackTypedefTestCase implementation
285 
286  We put the template implementations here to break a dependency cycle
287  from the Checkers() to TracedCbSink<> to SinkIt()
288  --------------------------------------------------------------------
289 */
290 
292 
293 template <typename T1, typename T2, typename T3, typename T4, typename T5>
295 {
296 public:
302 
303  void Cleanup (int N)
304  {
305  if (m_nArgs == 0)
306  {
307  std::cout << std::endl;
308  }
309  NS_ASSERT_MSG (m_nArgs && m_nArgs == N, "failed.");
310  m_nArgs = 0;
311  }
312 }; // TracedCallbackTypedefTestCase::CheckerBase
313 
314 template <typename T1, typename T2, typename T3, typename T4, typename T5>
315 class TracedCallbackTypedefTestCase::Checker : public CheckerBase<T1, T2, T3, T4, T5>
316 {
318 
319 public:
320  template <typename U>
321  void Invoke (void)
322  {
323  const int N = 5;
324  U sink = TracedCbSink<T1, T2, T3, T4, T5>::Sink;
326 
327  std::cout << TypeName<U> (N) << " invoked ";
328  m_cb.ConnectWithoutContext (cb);
329  m_cb (this->m1, this->m2, this->m3, this->m4, this->m5);
330  this->Cleanup (N);
331  }
332 }; // Checker<5>
333 
334 template <typename T1, typename T2, typename T3, typename T4>
336  : public CheckerBase<T1, T2, T3, T4, empty>
337 {
339 
340 public:
341  template <typename U>
342  void Invoke (void)
343  {
344  const int N = 4;
345  U sink = TracedCbSink<T1, T2, T3, T4, empty>::Sink;
347 
348  std::cout << TypeName<U> (N) << " invoked ";
349  m_cb.ConnectWithoutContext (cb);
350  m_cb (this->m1, this->m2, this->m3, this->m4);
351  this->Cleanup (N);
352  }
353 }; // Checker <4>
354 
355 template <typename T1, typename T2, typename T3>
357  : public CheckerBase<T1, T2, T3, empty, empty>
358 {
360 
361 public:
362  template <typename U>
363  void Invoke (void)
364  {
365  const int N = 3;
366  U sink = TracedCbSink<T1, T2, T3, empty, empty>::Sink;
368 
369  std::cout << TypeName<U> (N) << " invoked ";
370  m_cb.ConnectWithoutContext (cb);
371  m_cb (this->m1, this->m2, this->m3);
372  this->Cleanup (N);
373  }
374 }; // Checker<3>
375 
376 template <typename T1, typename T2>
378  : public CheckerBase<T1, T2, empty, empty, empty>
379 {
381 
382 public:
383  template <typename U>
384  void Invoke (void)
385  {
386  const int N = 2;
387  U sink = TracedCbSink<T1, T2, empty, empty, empty>::Sink;
389 
390  std::cout << TypeName<U> (N) << " invoked ";
391  m_cb.ConnectWithoutContext (cb);
392  m_cb (this->m1, this->m2);
393  this->Cleanup (N);
394  }
395 }; // Checker<2>
396 
397 template <typename T1>
399  : public CheckerBase<T1, empty, empty, empty, empty>
400 {
402 
403 public:
404  template <typename U>
405  void Invoke (void)
406  {
407  const int N = 1;
408  U sink = TracedCbSink<T1, empty, empty, empty, empty>::Sink;
409  Callback<void, T1> cb = MakeCallback (sink);
410 
411  std::cout << TypeName<U> (N) << " invoked ";
412  m_cb.ConnectWithoutContext (cb);
413  m_cb (this->m1);
414  this->Cleanup (N);
415  }
416 }; // Checker<1>
417 
419  : TestCase ("Check basic TracedCallback operation")
420 {
421 }
422 
423 void
425 {
426 
427 #define DUPE(U, T1) \
428  if (g_dupes.find ( # U ) == g_dupes.end ()) { \
429  NS_TEST_ASSERT_MSG_NE (0, 1, \
430  "expected to find " << # U << " in dupes."); } \
431  if (TypeName<U> (0) == TypeName<T1> (0)) { \
432  std::cout << # U << " matches " << # T1 << std::endl; } \
433  else \
434  NS_TEST_ASSERT_MSG_EQ \
435  (TypeName<U> (0), TypeName<T1> (0), \
436  "the typedef " << # U << \
437  " used to match the typedef " << # T1 << \
438  " but no longer does. Please add a new CHECK call.")
439 
440 #define CHECK(U, T1, T2, T3, T4, T5) \
441  CreateObject< Checker<T1, T2, T3, T4, T5> > ()->Invoke<U> ()
442 
443  CHECK (dsr::DsrOptionSRHeader::TracedCallback,
444  const dsr::DsrOptionSRHeader &,
445  empty, empty, empty, empty);
446 
447  CHECK (EpcUeNas::StateTracedCallback,
449  empty, empty, empty);
450 
451  CHECK (Ipv4L3Protocol::DropTracedCallback,
452  const Ipv4Header &, Ptr<const Packet>,
454 
455  CHECK (Ipv4L3Protocol::SentTracedCallback,
456  const Ipv4Header &, Ptr<const Packet>, uint32_t,
457  empty, empty);
458 
459  CHECK (Ipv4L3Protocol::TxRxTracedCallback,
460  Ptr<const Packet>, Ptr<Ipv4>, uint32_t,
461  empty, empty);
462 
463  CHECK (Ipv6L3Protocol::DropTracedCallback,
464  const Ipv6Header &, Ptr<const Packet>,
466  );
467 
468  CHECK (Ipv6L3Protocol::SentTracedCallback,
469  const Ipv6Header &, Ptr<const Packet>, uint32_t,
470  empty, empty);
471 
472  CHECK (Ipv6L3Protocol::TxRxTracedCallback,
473  Ptr<const Packet>, Ptr<Ipv6>, uint32_t,
474  empty, empty);
475 
476  CHECK (LrWpanMac::SentTracedCallback,
477  Ptr<const Packet>, uint8_t, uint8_t,
478  empty, empty);
479 
480  CHECK (LrWpanMac::StateTracedCallback,
482  empty, empty, empty);
483 
484  CHECK (LrWpanPhy::StateTracedCallback,
486  empty, empty);
487 
488 
489  /* Too many args :(
490  CHECK (LteEnbMac::DlSchedulingTracedCallback,
491  uint32_t, uint32_t, uint16_t,
492  uint8_t, uint16_t, uint8_t, uint16_t);
493  */
494 
495  CHECK (LteEnbMac::UlSchedulingTracedCallback,
496  uint32_t, uint32_t, uint16_t, uint8_t, uint16_t);
497 
498  CHECK (LteEnbPhy::ReportUeSinrTracedCallback,
499  uint16_t, uint16_t, double, uint8_t,
500  empty);
501 
502  CHECK (LteEnbPhy::ReportInterferenceTracedCallback,
503  uint16_t, Ptr<SpectrumValue>,
504  empty, empty, empty);
505 
506  CHECK (LteEnbRrc::ConnectionHandoverTracedCallback,
507  uint64_t, uint16_t, uint16_t,
508  empty, empty);
509 
510  CHECK (LteEnbRrc::HandoverStartTracedCallback,
511  uint64_t, uint16_t, uint16_t, uint16_t,
512  empty);
513 
514  CHECK (LteEnbRrc::NewUeContextTracedCallback,
515  uint16_t, uint16_t,
516  empty, empty, empty);
517 
518  CHECK (LteEnbRrc::ReceiveReportTracedCallback,
519  uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport,
520  empty);
521 
522  CHECK (LtePdcp::PduRxTracedCallback,
523  uint16_t, uint8_t, uint32_t, uint64_t,
524  empty);
525 
526  CHECK (LtePdcp::PduTxTracedCallback,
527  uint16_t, uint8_t, uint32_t,
528  empty, empty);
529 
530  DUPE (LteRlc::NotifyTxTracedCallback, LtePdcp::PduTxTracedCallback);
531 
532  DUPE (LteRlc::ReceiveTracedCallback, LtePdcp::PduRxTracedCallback);
533 
534  CHECK (LteUePhy::RsrpSinrTracedCallback,
535  uint16_t, uint16_t, double, double, uint8_t);
536 
537  CHECK (LteUePhy::StateTracedCallback,
538  uint16_t, uint16_t, LteUePhy::State, LteUePhy::State,
539  empty);
540 
541  CHECK (LteUeRrc::CellSelectionTracedCallback,
542  uint64_t, uint16_t,
543  empty, empty, empty);
544 
545  DUPE (LteUeRrc::ImsiCidRntiTracedCallback, LteEnbRrc::ConnectionHandoverTracedCallback);
546 
547  DUPE (LteUeRrc::MibSibHandoverTracedCallback, LteEnbRrc::HandoverStartTracedCallback);
548 
549  CHECK (LteUeRrc::StateTracedCallback,
550  uint64_t, uint16_t, uint16_t, LteUeRrc::State, LteUeRrc::State);
551 
552  CHECK (Mac48Address::TracedCallback,
553  Mac48Address,
554  empty, empty, empty, empty);
555 
556  CHECK (MobilityModel::TracedCallback,
558  empty, empty, empty, empty);
559 
560  CHECK (olsr::RoutingProtocol::PacketTxRxTracedCallback,
561  const olsr::PacketHeader &, const olsr::MessageList &,
562  empty, empty, empty);
563 
564  CHECK (olsr::RoutingProtocol::TableChangeTracedCallback,
565  uint32_t,
566  empty, empty, empty, empty);
567 
568  CHECK (Packet::AddressTracedCallback,
569  Ptr<const Packet>, const Address &,
570  empty, empty, empty);
571 
572  CHECK (Packet::Mac48AddressTracedCallback,
574  empty, empty, empty);
575 
576  CHECK (Packet::SinrTracedCallback,
577  Ptr<const Packet>, double,
578  empty, empty, empty);
579 
580  CHECK (Packet::SizeTracedCallback,
581  uint32_t, uint32_t,
582  empty, empty, empty);
583 
584  CHECK (Packet::TracedCallback,
586  empty, empty, empty, empty);
587 
588  CHECK (PacketBurst::TracedCallback,
590  empty, empty, empty, empty);
591 
592  CHECK (dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback,
594  empty, empty, empty);
595 
596  CHECK (PhyReceptionStatParameters::TracedCallback,
598  empty, empty, empty, empty);
599 
600  CHECK (PhyTransmissionStatParameters::TracedCallback,
602  empty, empty, empty, empty);
603 
604  CHECK (SixLowPanNetDevice::DropTracedCallback,
606  Ptr<SixLowPanNetDevice>, uint32_t,
607  empty);
608 
609  CHECK (SixLowPanNetDevice::RxTxTracedCallback,
611  empty, empty);
612 
613  CHECK (SpectrumChannel::LossTracedCallback,
615  empty, empty);
616 
617  CHECK (SpectrumValue::TracedCallback,
619  empty, empty, empty, empty);
620 
621  CHECK (TimeSeriesAdaptor::OutputTracedCallback,
622  double, double,
623  empty, empty, empty);
624 
625  CHECK (UanMac::PacketModeTracedCallback,
627  empty, empty, empty);
628 
629  CHECK (UanMacCw::QueueTracedCallback,
630  Ptr<const Packet>, uint16_t,
631  empty, empty, empty);
632 
633  CHECK (UanMacRc::QueueTracedCallback,
634  Ptr<const Packet>, uint32_t,
635  empty, empty, empty);
636 
637  CHECK (UanNetDevice::RxTxTracedCallback,
639  empty, empty, empty);
640 
641  CHECK (UanPhy::TracedCallback,
642  Ptr<const Packet>, double, UanTxMode,
643  empty, empty);
644 
645  CHECK (UeManager::StateTracedCallback,
646  uint64_t, uint16_t, uint16_t, UeManager::State, UeManager::State);
647 
648  CHECK (WifiMacHeader::TracedCallback,
649  const WifiMacHeader &,
650  empty, empty, empty, empty);
651 
652  CHECK (WifiPhyStateHelper::RxEndErrorTracedCallback,
653  Ptr<const Packet>, double,
654  empty, empty, empty);
655 
656  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
658  empty);
659 
660  CHECK (WifiPhyStateHelper::StateTracedCallback,
662  empty, empty);
663 
664  CHECK (WifiPhyStateHelper::TxTracedCallback,
666  empty);
667 
668  CHECK (WifiRemoteStationManager::PowerChangeTracedCallback,
669  double, double, Mac48Address,
670  empty, empty);
671 
672  CHECK (WifiRemoteStationManager::RateChangeTracedCallback,
674  empty, empty);
675 }
676 
678 {
679 public:
681 };
682 
684  : TestSuite ("traced-callback-typedef", SYSTEM)
685 {
686  AddTestCase (new TracedCallbackTypedefTestCase, TestCase::QUICK);
687 }
688 
Ptr< PacketSink > sink
Definition: wifi-tcp.cc:45
void(* Mac48AddressTracedCallback)(Ptr< const Packet > packet, Mac48Address mac)
TracedCallback signature for packet and Mac48Address.
Definition: packet.h:686
void(* UlSchedulingTracedCallback)(const uint32_t frame, const uint32_t subframe, const uint16_t rnti, const uint8_t mcs, const uint16_t tbsSize)
TracedCallback signature for UL scheduling events.
Definition: lte-enb-mac.h:183
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
Packet header for IPv6.
Definition: ipv6-header.h:34
MeasurementReport structure.
Definition: lte-rrc-sap.h:894
void(* TracedCallback)(const WifiMacHeader &header)
TracedCallback signature for WifiMacHeader.
Callback template class.
Definition: callback.h:1176
void(* ReportUeSinrTracedCallback)(uint16_t cellId, uint16_t rnti, double sinrLinear, uint8_t componentCarrierId)
TracedCallback signature for the linear average of SRS SINRs.
Definition: lte-enb-phy.h:309
void(* PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress)
TracedCallback signature for power change events.
void(* StateTracedCallback)(Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
TracedCallback signature for Trx state change events.
Definition: lr-wpan-phy.h:490
void(* NewUeContextTracedCallback)(const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for new Ue Context events.
Definition: lte-enb-rrc.h:996
void(* ConnectionHandoverTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for connection and handover end events.
Definition: lte-enb-rrc.h:1006
A suite of tests to run.
Definition: test.h:1342
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(* TracedCallback)(const DsrOptionSRHeader &header)
TracedCallback signature for DsrOptionSrHeader.
void(* StateTracedCallback)(const State oldState, const State newState)
TracedCallback signature for state change events.
Definition: epc-ue-nas.h:183
void(* SizeTracedCallback)(uint32_t oldSize, uint32_t newSize)
TracedCallback signature for changes in packet size.
Definition: packet.h:695
void(* TracedCallback)(Ptr< const Packet > packet)
TracedCallback signature for Ptr
Definition: packet.h:668
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:129
void(* TableChangeTracedCallback)(uint32_t size)
TracedCallback signature for routing table computation.
const double m1
First component modulus, 232 - 209.
Definition: rng-stream.cc:57
encapsulates test code
Definition: test.h:1155
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:320
#define DUPE(U, T1)
State
The states of the UE PHY entity.
Definition: lte-ue-phy.h:63
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:97
std::string TypeName(int N)
Stringify the known TracedCallback type names.
a polymophic address class
Definition: address.h:90
Class for representing data rates.
Definition: data-rate.h:88
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:277
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:677
void(* DropTracedCallback)(const Ipv6Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv6 > ipv6, uint32_t interface)
TracedCallback signature for packet drop events.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:299
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.
void(* HandoverStartTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const uint16_t targetCid)
TracedCallback signature for handover start events.
Definition: lte-enb-rrc.h:1017
static int m_nArgs
Number of arguments passed to callback.
Abstraction of packet modulation information.
Definition: uan-tx-mode.h:41
void(* ReceiveReportTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const LteRrcSap::MeasurementReport report)
TracedCallback signature for receive measurement report events.
Definition: lte-enb-rrc.h:1031
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:141
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:704
void(* StateTracedCallback)(const uint64_t imsi, const uint16_t cellId, const uint16_t rnti, const State oldState, const State newState)
TracedCallback signature for state transition events.
Definition: lte-enb-rrc.h:368
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:233
void(* TracedCallback)(Mac48Address value)
TracedCallback signature for Mac48Address.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
PhyReceptionStatParameters structure.
Definition: lte-common.h:212
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:84
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(* RxTxTracedCallback)(Ptr< const Packet > packet, UanAddress address)
TracedCallback signature for MAC send/receive events.
an EUI-48 address
Definition: mac48-address.h:43
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:103
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.
Inspect a type to deduce its features.
Definition: type-traits.h:39
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:161
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:352
void(* TracedCallback)(const PhyTransmissionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:206
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:67
DropReason
Reason why a packet has been dropped.
const double m2
Second component modulus, 232 - 22853.
Definition: rng-stream.cc:60
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.
PhyTransmissionStatParameters structure.
Definition: lte-common.h:186
State
The state of the PHY layer.
Definition: wifi-phy.h:171
std::set< std::string > Duplicates(void)
Record typedefs which are identical to previously declared.
void(* RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress)
TracedCallback signature for rate change events.
void(* CellSelectionTracedCallback)(uint64_t imsi, uint16_t cellId)
TracedCallback signature for imsi, cellId and rnti events.
Definition: lte-ue-rrc.h:318
#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(* RsrpSinrTracedCallback)(uint16_t cellId, uint16_t rnti, double rsrp, double sinr, uint8_t componentCarrierId)
TracedCallback signature for cell RSRP and SINR report.
Definition: lte-ue-phy.h:289
void(* DropTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet drop events.