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 <iostream>
22 #include <sstream>
23 #include <set>
24 #include <string>
25 #include "ns3/test.h"
26 #include "ns3/core-module.h"
27 #include "ns3/dsr-module.h" // DsrOPtionSRHeader
28 #include "ns3/internet-module.h" // Ipv4, Ipv4L3Protocol, Ipv4PacketProbe
29  // Ipv6L3Protocol, Ipv6PacketProbe
30 #include "ns3/lr-wpan-mac.h" // LrWpanMac
31 #include "ns3/lte-module.h" // PhyReceptionStatParameters,
32  // PhyTransmissionStatParameters,
33  // LteUePowerControl
34 #include "ns3/mesh-module.h" // PeerManagementProtocol
35 #include "ns3/mobility-module.h" // MobilityModel
36 #include "ns3/network-module.h" // Packet, PacketBurst
37 #include "ns3/olsr-module.h" // olsr::RoutingProtocol
38 #include "ns3/sixlowpan-module.h" // SixLowPanNetDevice
39 #include "ns3/spectrum-module.h" // SpectrumValue
40 #include "ns3/stats-module.h" // TimeSeriesAdapter
41 #include "ns3/uan-module.h" // UanPhy
42 #include "ns3/wifi-phy-state-helper.h"
43 
44 using namespace ns3;
45 
47 {
48 public:
51  {
52  }
53 
62  static int m_nArgs;
63 
64 private:
66  template <typename T1, typename T2, typename T3, typename T4, typename T5>
67  class CheckerBase;
68 
70  template <typename T1, typename T2, typename T3, typename T4, typename T5>
71  class Checker;
72 
73  template <typename T1, typename T2, typename T3, typename T4>
74  class Checker<T1, T2, T3, T4, empty>;
75 
76  template <typename T1, typename T2, typename T3>
77  class Checker<T1, T2, T3, empty, empty>;
78 
79 
80  template <typename T1, typename T2>
81  class Checker<T1, T2, empty, empty, empty>;
82 
83  template <typename T1>
84  class Checker<T1, empty, empty, empty, empty>;
85 
86  virtual void DoRun (void);
87 
88 }; // TracedCallbackTypedefTestCase
89 
90 /*
91  --------------------------------------------------------------------
92  Support functions and classes
93  --------------------------------------------------------------------
94 */
95 
96 namespace {
97 
99 std::set<std::string>
101 {
102  std::set<std::string> dupes;
103 
104  dupes.insert ("LteRlc::NotifyTxTracedCallback");
105  dupes.insert ("LteRlc::ReceiveTracedCallback");
106  dupes.insert ("LteUeRrc::ImsiCidRntiTracedCallback");
107  dupes.insert ("LteUeRrc::MibSibHandoverTracedCallback");
108  dupes.insert ("WifiPhyStateHelper::RxEndErrorTracedCallback");
109 
110  return dupes;
111 }
112 
116 std::set<std::string> g_dupes = Duplicates ();
117 
118 
126 template <typename T>
127 inline
128 std::string TypeName (int N)
129 {
130  return "unknown";
131 }
132 
133 #define TYPENAME(T) \
134  template <> \
135  inline std::string \
136  TypeName < T > (int N) \
137  { \
138  std::stringstream ss; \
139  ss << # T << "(" << N << ")"; \
140  return ss.str (); \
141  }
142 
158 // TYPENAME (LteEnbMac::DlSchedulingTracedCallback);
203 #undef TYPENAME
204 
205 
214 void SinkIt (unsigned int N)
215 {
216  std::cout << "with " << N << " args." << std::endl;
218 }
219 
224 template <typename T1, typename T2, typename T3, typename T4, typename T5>
226 {
227 public:
228  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
229  {
230  SinkIt (5);
231  }
232 };
233 
234 template <typename T1, typename T2, typename T3, typename T4>
235 class TracedCbSink<T1, T2, T3, T4, empty>
236 {
237 public:
238  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4)
239  {
240  SinkIt (4);
241  }
242 };
243 
244 template <typename T1, typename T2, typename T3>
245 class TracedCbSink<T1, T2, T3, empty, empty>
246 {
247 public:
248  static void Sink (T1 a1, T2 a2, T3 a3)
249  {
250  SinkIt (3);
251  }
252 };
253 
254 template <typename T1, typename T2>
255 class TracedCbSink<T1, T2, empty, empty, empty>
256 {
257 public:
258  static void Sink (T1 a1, T2 a2)
259  {
260  SinkIt (2);
261  }
262 };
263 
264 template <typename T1>
266 {
267 public:
268  static void Sink (T1 a1)
269  {
270  SinkIt (1);
271  }
272 };
276 } // unnamed namespace
277 
278 
279 /*
280  --------------------------------------------------------------------
281  Class TracedCallbackTypedefTestCase implementation
282 
283  We put the template implementations here to break a dependency cycle
284  from the Checkers() to TracedCbSink<> to SinkIt()
285  --------------------------------------------------------------------
286 */
287 
289 
290 template <typename T1, typename T2, typename T3, typename T4, typename T5>
292 {
293 public:
299 
300  void Cleanup (int N)
301  {
302  if (m_nArgs == 0)
303  {
304  std::cout << std::endl;
305  }
306  NS_ASSERT_MSG (m_nArgs && m_nArgs == N, "failed.");
307  m_nArgs = 0;
308  }
309 }; // TracedCallbackTypedefTestCase::CheckerBase
310 
311 template <typename T1, typename T2, typename T3, typename T4, typename T5>
312 class TracedCallbackTypedefTestCase::Checker : public CheckerBase<T1, T2, T3, T4, T5>
313 {
315 
316 public:
317  template <typename U>
318  void Invoke (void)
319  {
320  const int N = 5;
321  U sink = TracedCbSink<T1, T2, T3, T4, T5>::Sink;
323 
324  std::cout << TypeName<U> (N) << " invoked ";
325  m_cb.ConnectWithoutContext (cb);
326  m_cb (this->m1, this->m2, this->m3, this->m4, this->m5);
327  this->Cleanup (N);
328  }
329 }; // Checker<5>
330 
331 template <typename T1, typename T2, typename T3, typename T4>
333  : public CheckerBase<T1, T2, T3, T4, empty>
334 {
336 
337 public:
338  template <typename U>
339  void Invoke (void)
340  {
341  const int N = 4;
342  U sink = TracedCbSink<T1, T2, T3, T4, empty>::Sink;
344 
345  std::cout << TypeName<U> (N) << " invoked ";
346  m_cb.ConnectWithoutContext (cb);
347  m_cb (this->m1, this->m2, this->m3, this->m4);
348  this->Cleanup (N);
349  }
350 }; // Checker <4>
351 
352 template <typename T1, typename T2, typename T3>
354  : public CheckerBase<T1, T2, T3, empty, empty>
355 {
357 
358 public:
359  template <typename U>
360  void Invoke (void)
361  {
362  const int N = 3;
363  U sink = TracedCbSink<T1, T2, T3, empty, empty>::Sink;
365 
366  std::cout << TypeName<U> (N) << " invoked ";
367  m_cb.ConnectWithoutContext (cb);
368  m_cb (this->m1, this->m2, this->m3);
369  this->Cleanup (N);
370  }
371 }; // Checker<3>
372 
373 template <typename T1, typename T2>
375  : public CheckerBase<T1, T2, empty, empty, empty>
376 {
378 
379 public:
380  template <typename U>
381  void Invoke (void)
382  {
383  const int N = 2;
384  U sink = TracedCbSink<T1, T2, empty, empty, empty>::Sink;
386 
387  std::cout << TypeName<U> (N) << " invoked ";
388  m_cb.ConnectWithoutContext (cb);
389  m_cb (this->m1, this->m2);
390  this->Cleanup (N);
391  }
392 }; // Checker<2>
393 
394 template <typename T1>
396  : public CheckerBase<T1, empty, empty, empty, empty>
397 {
399 
400 public:
401  template <typename U>
402  void Invoke (void)
403  {
404  const int N = 1;
405  U sink = TracedCbSink<T1, empty, empty, empty, empty>::Sink;
407 
408  std::cout << TypeName<U> (N) << " invoked ";
409  m_cb.ConnectWithoutContext (cb);
410  m_cb (this->m1);
411  this->Cleanup (N);
412  }
413 }; // Checker<1>
414 
416  : TestCase ("Check basic TracedCallback operation")
417 {
418 }
419 
420 void
422 {
423 
424 #define DUPE(U, T1) \
425  if (g_dupes.find ( # U ) == g_dupes.end ()) { \
426  NS_TEST_ASSERT_MSG_NE (0, 1, \
427  "expected to find " << # U << " in dupes."); } \
428  if (TypeName<U> (0) == TypeName<T1> (0)) { \
429  std::cout << # U << " matches " << # T1 << std::endl; } \
430  else \
431  NS_TEST_ASSERT_MSG_EQ \
432  (TypeName<U> (0), TypeName<T1> (0), \
433  "the typedef " << # U << \
434  " used to match the typedef " << # T1 << \
435  " but no longer does. Please add a new CHECK call.")
436 
437 #define CHECK(U, T1, T2, T3, T4, T5) \
438  CreateObject< Checker<T1, T2, T3, T4, T5> > ()->Invoke<U> ()
439 
440  CHECK (dsr::DsrOptionSRHeader::TracedCallback,
441  const dsr::DsrOptionSRHeader &,
442  empty, empty, empty, empty);
443 
444  CHECK (EpcUeNas::StateTracedCallback,
446  empty, empty, empty);
447 
448  CHECK (Ipv4L3Protocol::DropTracedCallback,
449  const Ipv4Header &, Ptr<const Packet>,
451 
452  CHECK (Ipv4L3Protocol::SentTracedCallback,
453  const Ipv4Header &, Ptr<const Packet>, uint32_t,
454  empty, empty);
455 
456  CHECK (Ipv4L3Protocol::TxRxTracedCallback,
457  Ptr<const Packet>, Ptr<Ipv4>, uint32_t,
458  empty, empty);
459 
460  CHECK (Ipv6L3Protocol::DropTracedCallback,
461  const Ipv6Header &, Ptr<const Packet>,
463  );
464 
465  CHECK (Ipv6L3Protocol::SentTracedCallback,
466  const Ipv6Header &, Ptr<const Packet>, uint32_t,
467  empty, empty);
468 
469  CHECK (Ipv6L3Protocol::TxRxTracedCallback,
470  Ptr<const Packet>, Ptr<Ipv6>, uint32_t,
471  empty, empty);
472 
473  CHECK (LrWpanMac::SentTracedCallback,
474  Ptr<const Packet>, uint8_t, uint8_t,
475  empty, empty);
476 
477  CHECK (LrWpanMac::StateTracedCallback,
479  empty, empty, empty);
480 
481  CHECK (LrWpanPhy::StateTracedCallback,
483  empty, empty);
484 
485 
486  /* Too many args :(
487  CHECK (LteEnbMac::DlSchedulingTracedCallback,
488  uint32_t, uint32_t, uint16_t,
489  uint8_t, uint16_t, uint8_t, uint16_t);
490  */
491 
492  CHECK (LteEnbMac::UlSchedulingTracedCallback,
493  uint32_t, uint32_t, uint16_t, uint8_t, uint16_t);
494 
495  CHECK (LteEnbPhy::ReportUeSinrTracedCallback,
496  uint16_t, uint16_t, double, uint8_t,
497  empty);
498 
499  CHECK (LteEnbPhy::ReportInterferenceTracedCallback,
500  uint16_t, Ptr<SpectrumValue>,
501  empty, empty, empty);
502 
503  CHECK (LteEnbRrc::ConnectionHandoverTracedCallback,
504  uint64_t, uint16_t, uint16_t,
505  empty, empty);
506 
507  CHECK (LteEnbRrc::HandoverStartTracedCallback,
508  uint64_t, uint16_t, uint16_t, uint16_t,
509  empty);
510 
511  CHECK (LteEnbRrc::NewUeContextTracedCallback,
512  uint16_t, uint16_t,
513  empty, empty, empty);
514 
515  CHECK (LteEnbRrc::ReceiveReportTracedCallback,
516  uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport,
517  empty);
518 
519  CHECK (LtePdcp::PduRxTracedCallback,
520  uint16_t, uint8_t, uint32_t, uint64_t,
521  empty);
522 
523  CHECK (LtePdcp::PduTxTracedCallback,
524  uint16_t, uint8_t, uint32_t,
525  empty, empty);
526 
527  DUPE (LteRlc::NotifyTxTracedCallback, LtePdcp::PduTxTracedCallback);
528 
529  DUPE (LteRlc::ReceiveTracedCallback, LtePdcp::PduRxTracedCallback);
530 
531  CHECK (LteUePhy::RsrpSinrTracedCallback,
532  uint16_t, uint16_t, double, double, uint8_t);
533 
534  CHECK (LteUePhy::StateTracedCallback,
535  uint16_t, uint16_t, LteUePhy::State, LteUePhy::State,
536  empty);
537 
538  CHECK (LteUeRrc::CellSelectionTracedCallback,
539  uint64_t, uint16_t,
540  empty, empty, empty);
541 
542  DUPE (LteUeRrc::ImsiCidRntiTracedCallback, LteEnbRrc::ConnectionHandoverTracedCallback);
543 
544  DUPE (LteUeRrc::MibSibHandoverTracedCallback, LteEnbRrc::HandoverStartTracedCallback);
545 
546  CHECK (LteUeRrc::StateTracedCallback,
547  uint64_t, uint16_t, uint16_t, LteUeRrc::State, LteUeRrc::State);
548 
549  CHECK (Mac48Address::TracedCallback,
550  Mac48Address,
551  empty, empty, empty, empty);
552 
553  CHECK (MobilityModel::TracedCallback,
555  empty, empty, empty, empty);
556 
557  CHECK (olsr::RoutingProtocol::PacketTxRxTracedCallback,
558  const olsr::PacketHeader &, const olsr::MessageList &,
559  empty, empty, empty);
560 
561  CHECK (olsr::RoutingProtocol::TableChangeTracedCallback,
562  uint32_t,
563  empty, empty, empty, empty);
564 
565  CHECK (Packet::AddressTracedCallback,
566  Ptr<const Packet>, const Address &,
567  empty, empty, empty);
568 
569  CHECK (Packet::Mac48AddressTracedCallback,
571  empty, empty, empty);
572 
573  CHECK (Packet::SinrTracedCallback,
574  Ptr<const Packet>, double,
575  empty, empty, empty);
576 
577  CHECK (Packet::SizeTracedCallback,
578  uint32_t, uint32_t,
579  empty, empty, empty);
580 
581  CHECK (Packet::TracedCallback,
583  empty, empty, empty, empty);
584 
585  CHECK (PacketBurst::TracedCallback,
587  empty, empty, empty, empty);
588 
589  CHECK (dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback,
591  empty, empty, empty);
592 
593  CHECK (PhyReceptionStatParameters::TracedCallback,
595  empty, empty, empty, empty);
596 
597  CHECK (PhyTransmissionStatParameters::TracedCallback,
599  empty, empty, empty, empty);
600 
601  CHECK (SixLowPanNetDevice::DropTracedCallback,
603  Ptr<SixLowPanNetDevice>, uint32_t,
604  empty);
605 
606  CHECK (SixLowPanNetDevice::RxTxTracedCallback,
608  empty, empty);
609 
610  CHECK (SpectrumChannel::LossTracedCallback,
612  empty, empty);
613 
614  CHECK (SpectrumValue::TracedCallback,
616  empty, empty, empty, empty);
617 
618  CHECK (TimeSeriesAdaptor::OutputTracedCallback,
619  double, double,
620  empty, empty, empty);
621 
622  CHECK (UanMac::PacketModeTracedCallback,
624  empty, empty, empty);
625 
626  CHECK (UanMacCw::QueueTracedCallback,
627  Ptr<const Packet>, uint16_t,
628  empty, empty, empty);
629 
630  CHECK (UanMacRc::QueueTracedCallback,
631  Ptr<const Packet>, uint32_t,
632  empty, empty, empty);
633 
634  CHECK (UanNetDevice::RxTxTracedCallback,
636  empty, empty, empty);
637 
638  CHECK (UanPhy::TracedCallback,
639  Ptr<const Packet>, double, UanTxMode,
640  empty, empty);
641 
642  CHECK (UeManager::StateTracedCallback,
643  uint64_t, uint16_t, uint16_t, UeManager::State, UeManager::State);
644 
645  CHECK (WifiMacHeader::TracedCallback,
646  const WifiMacHeader &,
647  empty, empty, empty, empty);
648 
649  CHECK (WifiPhyStateHelper::RxEndErrorTracedCallback,
650  Ptr<const Packet>, double,
651  empty, empty, empty);
652 
653  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
655  empty);
656 
657  CHECK (WifiPhyStateHelper::StateTracedCallback,
659  empty, empty);
660 
661  CHECK (WifiPhyStateHelper::TxTracedCallback,
663  empty);
664 
665  CHECK (WifiRemoteStationManager::PowerChangeTracedCallback,
666  double, double, Mac48Address,
667  empty, empty);
668 
669  CHECK (WifiRemoteStationManager::RateChangeTracedCallback,
671  empty, empty);
672 }
673 
675 {
676 public:
678 };
679 
681  : TestSuite ("traced-callback-typedef", SYSTEM)
682 {
683  AddTestCase (new TracedCallbackTypedefTestCase, TestCase::QUICK);
684 }
685 
Ptr< PacketSink > sink
Definition: wifi-tcp.cc:56
void(* Mac48AddressTracedCallback)(Ptr< const Packet > packet, Mac48Address mac)
TracedCallback signature for packet and Mac48Address.
Definition: packet.h:742
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
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:86
MeasurementReport structure.
Definition: lte-rrc-sap.h:901
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
NS_ASSERT_MSG(false, "Ipv4AddressGenerator::MaskToIndex(): Impossible")
void(* NewUeContextTracedCallback)(const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for new Ue Context events.
Definition: lte-enb-rrc.h:1052
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:1062
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:199
void(* QueueTracedCallback)(Ptr< const Packet > packet, uint16_t proto)
TracedCallback signature for enqueue/dequeue of a packet.
Definition: uan-mac-cw.h:107
void(* TracedCallback)(const DsrOptionSRHeader &header)
TracedCallback signature for DsrOptionSrHeader.
void(* StateTracedCallback)(Time start, Time duration, WifiPhyState state)
TracedCallback signature for state changes.
void(* StateTracedCallback)(const State oldState, const State newState)
TracedCallback signature for state change events.
Definition: epc-ue-nas.h:184
void(* SizeTracedCallback)(uint32_t oldSize, uint32_t newSize)
TracedCallback signature for changes in packet size.
Definition: packet.h:751
void(* TracedCallback)(Ptr< const Packet > packet)
TracedCallback signature for Ptr<Packet>
Definition: packet.h:714
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:129
void(* LossTracedCallback)(Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)
TracedCallback signature for path loss calculation events.
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
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)
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.
DropReason
Enumeration of the dropping reasons in SixLoWPAN.
a polymophic address class
Definition: address.h:90
State
The states of the UE PHY entity.
Definition: lte-ue-phy.h:66
DropReason
Reason why a packet has been dropped.
Class for representing data rates.
Definition: data-rate.h:88
void(* PacketModeTracedCallback)(Ptr< const Packet > packet, UanTxMode mode)
TracedCallback signature for packet reception/enqueue/dequeue events.
Definition: uan-mac.h:129
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:311
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:723
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.
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:1073
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:1087
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
A class used for addressing MAC8 MAC&#39;s.
Definition: mac8-address.h:42
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:760
void(* RxTxTracedCallback)(Ptr< const Packet > packet, Mac8Address address)
TracedCallback signature for MAC send/receive events.
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:394
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
void(* LinkOpenCloseTracedCallback)(Mac48Address src, const Mac48Address dst)
TracedCallback signature for link open/close events.
WifiPhyState
The state of the PHY layer.
std::set< std::string > g_dupes
Container for duplicate types.
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.
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:105
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<PacketBurst>
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:162
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:368
void(* TracedCallback)(const PhyTransmissionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:206
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:67
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:559
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
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:334
#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:547
Implements the IEEE 802.11 MAC header.
DropReason
Reason why a packet has been dropped.
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:323
void(* DropTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet drop events.