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 
49 namespace {
50 
58 template <typename T> inline
59 std::string TypeName (int N) { return "unknown"; }
60 
61 #define TYPENAME(T) \
62  template <> inline std::string \
63  TypeName < T > (int N) \
64  { \
65  std::stringstream ss; \
66  ss << # T << "(" << N << ")"; \
67  return ss.str (); \
68  }
69 
85 // TYPENAME (LteEnbMac::DlSchedulingTracedCallback);
131 #undef TYPENAME
132 
133 
135 std::set<std::string>
137 {
138  std::set<std::string> dupes;
139 
140 #define dupename(T) dupes.insert (# T)
141 
147 
148 #undef dupename
149 
150  return dupes;
151 }
152 
156 std::set<std::string> g_dupes = Duplicates ();
157 
158 
168 int g_NArgs = 0;
169 
170 
179 void SinkIt (unsigned int N)
180 {
181  std::cout << "with " << N << " args." << std::endl;
182  g_NArgs = N;
183 }
184 
189 template <typename T1, typename T2, typename T3, typename T4, typename T5>
191 {
192 public:
193  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5) { SinkIt (5); }
194 };
195 
196 template <typename T1, typename T2, typename T3, typename T4>
197 class TracedCbSink<T1, T2, T3, T4, empty>
198 {
199 public:
200  static void Sink (T1 a1, T2 a2, T3 a3, T4 a4) { SinkIt (4); }
201 };
202 
203 template <typename T1, typename T2, typename T3>
204 class TracedCbSink<T1, T2, T3, empty, empty>
205 {
206 public:
207  static void Sink (T1 a1, T2 a2, T3 a3) { SinkIt (3); }
208 };
209 
210 template <typename T1, typename T2>
211 class TracedCbSink<T1, T2, empty, empty, empty>
212 {
213 public:
214  static void Sink (T1 a1, T2 a2) { SinkIt (2); }
215 };
216 
217 template <typename T1>
219 {
220 public:
221  static void Sink (T1 a1) { SinkIt (1); }
222 };
226 template <typename T>
228 {
230 };
231 
232 } // anonymous namespace
233 
234 
236 {
237 public:
240 
241 private:
242 
244  template <typename T1, typename T2, typename T3, typename T4, typename T5>
245  class CheckerBase : public Object
246  {
247  public:
253 
254  void Cleanup (int N)
255  {
256  if (g_NArgs == 0) std::cout << std::endl;
257  NS_ASSERT_MSG (g_NArgs && g_NArgs == N, "failed.");
258  g_NArgs = 0;
259  }
260  }; // CheckerBase
261 
263  template <typename T1, typename T2, typename T3, typename T4, typename T5>
264  class Checker : public CheckerBase<T1, T2, T3, T4, T5>
265  {
267 
268  public:
269  template <typename U>
270  void Invoke (void)
271  {
272  const int N = 5;
273  U sink = TracedCbSink<T1, T2, T3, T4, T5>::Sink;
275 
276  std::cout << TypeName<U> (N) << " invoked ";
277  m_cb.ConnectWithoutContext (cb);
278  m_cb (this->m1, this->m2, this->m3, this->m4, this->m5);
279  this->Cleanup (N);
280  }
281  }; // Checker<5>
282 
283  template <typename T1, typename T2, typename T3, typename T4>
284  class Checker<T1, T2, T3, T4, empty>
285  : public CheckerBase<T1, T2, T3, T4, empty>
286  {
288 
289  public:
290  template <typename U>
291  void Invoke (void)
292  {
293  const int N = 4;
294  U sink = TracedCbSink<T1, T2, T3, T4, empty>::Sink;
296 
297  std::cout << TypeName<U> (N) << " invoked ";
298  m_cb.ConnectWithoutContext (cb);
299  m_cb (this->m1, this->m2, this->m3, this->m4);
300  this->Cleanup (N);
301  }
302  }; // Checker <4>
303 
304 
305  template <typename T1, typename T2, typename T3>
306  class Checker<T1, T2, T3, empty, empty>
307  : public CheckerBase<T1, T2, T3, empty, empty>
308  {
310 
311  public:
312  template <typename U>
313  void Invoke (void)
314  {
315  const int N = 3;
316  U sink = TracedCbSink<T1, T2, T3, empty, empty>::Sink;
318 
319  std::cout << TypeName<U> (N) << " invoked ";
320  m_cb.ConnectWithoutContext (cb);
321  m_cb (this->m1, this->m2, this->m3);
322  this->Cleanup (N);
323  }
324  }; // Checker<3>
325 
326  template <typename T1, typename T2>
327  class Checker<T1, T2, empty, empty, empty>
328  : public CheckerBase<T1, T2, empty, empty, empty>
329  {
331 
332  public:
333  template <typename U>
334  void Invoke (void)
335  {
336  const int N = 2;
337  U sink = TracedCbSink<T1, T2, empty, empty, empty>::Sink;
339 
340  std::cout << TypeName<U> (N) << " invoked ";
341  m_cb.ConnectWithoutContext (cb);
342  m_cb (this->m1, this->m2);
343  this->Cleanup (N);
344  }
345  }; // Checker<2>
346 
347  template <typename T1>
348  class Checker<T1, empty, empty, empty, empty>
349  : public CheckerBase<T1, empty, empty, empty, empty>
350  {
352 
353  public:
354  template <typename U>
355  void Invoke (void)
356  {
357  const int N = 1;
358  U sink = TracedCbSink<T1, empty, empty, empty, empty>::Sink;
359  Callback<void, T1> cb = MakeCallback (sink);
360 
361  std::cout << TypeName<U> (N) << " invoked ";
362  m_cb.ConnectWithoutContext (cb);
363  m_cb (this->m1);
364  this->Cleanup (N);
365  }
366  }; // Checker<1>
367 
368  virtual void DoRun (void);
369 
370 }; // TracedCallbackTypedefTestCase
371 
373  : TestCase ("Check basic TracedCallback operation")
374 {
375 }
376 
377 void
379 {
380 
381 #define DUPE(U, T1) \
382  if (g_dupes.find ( # U ) == g_dupes.end ()) \
383  NS_TEST_ASSERT_MSG_NE (0, 1, \
384  "expected to find " << # U << " in dupes."); \
385  if (TypeName<U> (0) == TypeName<T1> (0)) \
386  std::cout << # U << " matches " << # T1 << std::endl; \
387  else \
388  NS_TEST_ASSERT_MSG_EQ \
389  (TypeName<U> (0), TypeName<T1> (0), \
390  "the typedef " << # U << \
391  " used to match the typedef " << # T1 << \
392  " but no longer does. Please add a new CHECK call.")
393 
394 #define CHECK(U, T1, T2, T3, T4, T5) \
395  CreateObject< Checker<T1, T2, T3, T4, T5> > () -> Invoke<U> ()
396 
397  CHECK (dsr::DsrOptionSRHeader::TracedCallback,
398  const dsr::DsrOptionSRHeader &,
399  empty, empty, empty, empty);
400 
401  CHECK (EpcUeNas::StateTracedCallback,
403  empty, empty, empty);
404 
405  CHECK (Ipv4L3Protocol::DropTracedCallback,
406  const Ipv4Header &, Ptr<const Packet>,
408 
409  CHECK (Ipv4L3Protocol::SentTracedCallback,
410  const Ipv4Header &, Ptr<const Packet>, uint32_t,
411  empty, empty);
412 
413  CHECK (Ipv4L3Protocol::TxRxTracedCallback,
414  Ptr<const Packet>, Ptr<Ipv4>, uint32_t,
415  empty, empty);
416 
417  CHECK (Ipv6L3Protocol::DropTracedCallback,
418  const Ipv6Header &, Ptr<const Packet>,
420  );
421 
422  CHECK (Ipv6L3Protocol::SentTracedCallback,
423  const Ipv6Header &, Ptr<const Packet>, uint32_t,
424  empty, empty);
425 
426  CHECK (Ipv6L3Protocol::TxRxTracedCallback,
427  Ptr<const Packet>, Ptr<Ipv6>, uint32_t,
428  empty, empty);
429 
430  CHECK (LrWpanMac::SentTracedCallback,
431  Ptr<const Packet>, uint8_t, uint8_t,
432  empty, empty);
433 
434  CHECK (LrWpanMac::StateTracedCallback,
436  empty, empty, empty);
437 
438  CHECK (LrWpanPhy::StateTracedCallback,
440  empty, empty);
441 
442 
443  /* Too many args :(
444  CHECK (LteEnbMac::DlSchedulingTracedCallback,
445  uint32_t, uint32_t, uint16_t,
446  uint8_t, uint16_t, uint8_t, uint16_t);
447  */
448 
449  CHECK (LteEnbMac::UlSchedulingTracedCallback,
450  uint32_t, uint32_t, uint16_t, uint8_t, uint16_t);
451 
452  CHECK (LteEnbPhy::ReportUeSinrTracedCallback,
453  uint16_t, uint16_t, double,
454  empty, empty);
455 
456  CHECK (LteEnbPhy::ReportInterferenceTracedCallback,
457  uint16_t, Ptr<SpectrumValue>,
458  empty, empty, empty);
459 
460  CHECK (LteEnbRrc::ConnectionHandoverTracedCallback,
461  uint64_t, uint16_t, uint16_t,
462  empty, empty);
463 
464  CHECK (LteEnbRrc::HandoverStartTracedCallback,
465  uint64_t, uint16_t, uint16_t, uint16_t,
466  empty);
467 
468  CHECK (LteEnbRrc::NewUeContextTracedCallback,
469  uint16_t, uint16_t,
470  empty, empty, empty);
471 
472  CHECK (LteEnbRrc::ReceiveReportTracedCallback,
473  uint64_t, uint16_t, uint16_t, LteRrcSap::MeasurementReport,
474  empty);
475 
476  CHECK (LtePdcp::PduRxTracedCallback,
477  uint16_t, uint8_t, uint32_t, uint64_t,
478  empty);
479 
480  CHECK (LtePdcp::PduTxTracedCallback,
481  uint16_t, uint8_t, uint32_t,
482  empty, empty);
483 
484  DUPE (LteRlc::NotifyTxTracedCallback, LtePdcp::PduTxTracedCallback);
485 
486  DUPE (LteRlc::ReceiveTracedCallback, LtePdcp::PduRxTracedCallback);
487 
488  CHECK (LteUePhy::RsrpSinrTracedCallback,
489  uint16_t, uint16_t, double, double,
490  empty);
491 
492  CHECK (LteUePhy::RsrpRsrqTracedCallback,
493  uint16_t, uint16_t, double, double, bool);
494 
495  CHECK (LteUePhy::StateTracedCallback,
496  uint16_t, uint16_t, LteUePhy::State, LteUePhy::State,
497  empty);
498 
499  DUPE (LteUePowerControl::TxPowerTracedCallback, LteEnbPhy::ReportUeSinrTracedCallback);
500 
501  CHECK (LteUeRrc::CellSelectionTracedCallback,
502  uint64_t, uint16_t,
503  empty, empty, empty);
504 
505  DUPE (LteUeRrc::ImsiCidRntiTracedCallback, LteEnbRrc::ConnectionHandoverTracedCallback);
506 
507  DUPE (LteUeRrc::MibSibHandoverTracedCallback, LteEnbRrc::HandoverStartTracedCallback);
508 
509  CHECK (LteUeRrc::StateTracedCallback,
510  uint64_t, uint16_t, uint16_t, LteUeRrc::State, LteUeRrc::State);
511 
512  CHECK (Mac48Address::TracedCallback,
513  Mac48Address,
514  empty, empty, empty, empty);
515 
516  CHECK (MobilityModel::TracedCallback,
518  empty, empty, empty, empty);
519 
520  CHECK (olsr::RoutingProtocol::PacketTxRxTracedCallback,
521  const olsr::PacketHeader &, const olsr::MessageList &,
522  empty, empty, empty);
523 
524  CHECK (olsr::RoutingProtocol::TableChangeTracedCallback,
525  uint32_t,
526  empty, empty, empty, empty);
527 
528  CHECK (Packet::AddressTracedCallback,
529  Ptr<const Packet>, const Address &,
530  empty, empty, empty);
531 
532  CHECK (Packet::Mac48AddressTracedCallback,
534  empty, empty, empty);
535 
536  CHECK (Packet::SinrTracedCallback,
537  Ptr<const Packet>, double,
538  empty, empty, empty);
539 
540  CHECK (Packet::SizeTracedCallback,
541  uint32_t, uint32_t,
542  empty, empty, empty);
543 
544  CHECK (Packet::TracedCallback,
546  empty, empty, empty, empty);
547 
548  CHECK (PacketBurst::TracedCallback,
550  empty, empty, empty, empty);
551 
552  CHECK (dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback,
554  empty, empty, empty);
555 
556  CHECK (PhyReceptionStatParameters::TracedCallback,
558  empty, empty, empty, empty);
559 
560  CHECK (PhyTransmissionStatParameters::TracedCallback,
562  empty, empty, empty, empty);
563 
564  CHECK (SixLowPanNetDevice::DropTracedCallback,
566  Ptr<SixLowPanNetDevice>, uint32_t,
567  empty);
568 
569  CHECK (SixLowPanNetDevice::RxTxTracedCallback,
571  empty, empty);
572 
573  CHECK (SpectrumChannel::LossTracedCallback,
575  empty, empty);
576 
577  CHECK (SpectrumValue::TracedCallback,
579  empty, empty, empty, empty);
580 
581  CHECK (TimeSeriesAdaptor::OutputTracedCallback,
582  double, double,
583  empty, empty, empty);
584 
585  CHECK (UanMac::PacketModeTracedCallback,
587  empty, empty, empty);
588 
589  CHECK (UanMacCw::QueueTracedCallback,
590  Ptr<const Packet>, uint16_t,
591  empty, empty, empty);
592 
593  CHECK (UanMacRc::QueueTracedCallback,
594  Ptr<const Packet>, uint32_t,
595  empty, empty, empty);
596 
597  CHECK (UanNetDevice::RxTxTracedCallback,
599  empty, empty, empty);
600 
601  CHECK (UanPhy::TracedCallback,
602  Ptr<const Packet>, double, UanTxMode,
603  empty, empty);
604 
605  CHECK (UeManager::StateTracedCallback,
606  uint64_t, uint16_t, uint16_t, UeManager::State, UeManager::State);
607 
608  CHECK (WifiMacHeader::TracedCallback,
609  const WifiMacHeader &,
610  empty, empty, empty, empty);
611 
612  DUPE (WifiPhyStateHelper::RxEndErrorTracedCallback, Packet::SinrTracedCallback);
613 
614  CHECK (WifiPhyStateHelper::RxOkTracedCallback,
616  empty);
617 
618  CHECK (WifiPhyStateHelper::StateTracedCallback,
620  empty, empty);
621 
622  CHECK (WifiPhyStateHelper::TxTracedCallback,
624  empty);
625 
626  CHECK (WifiRemoteStationManager::PowerChangeTracedCallback,
627  uint8_t, Mac48Address,
628  empty, empty, empty);
629 
630  CHECK (WifiRemoteStationManager::RateChangeTracedCallback,
631  uint32_t, Mac48Address,
632  empty, empty, empty);
633 }
634 
636 {
637 public:
639 };
640 
642  : TestSuite ("traced-callback-typedef", SYSTEM)
643 {
644  AddTestCase (new TracedCallbackTypedefTestCase, TestCase::QUICK);
645 }
646 
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
Introspection did not find any typical Config paths.
Definition: ipv6-header.h:33
void(* TracedCallback)(const WifiMacHeader &header)
TracedCallback signature for WifiMacHeader.
Callback template class.
Definition: callback.h:1164
void(* StateTracedCallback)(Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
TracedCallback signature for Trx state change events.
Definition: lr-wpan-phy.h:490
void(* MibSibHandoverTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti, uint16_t otherCid)
TracedCallback signature for MIBRecieved, Sib1Received and HandoverStart events.
Definition: lte-ue-rrc.h:279
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:97
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(* ImsiCidRntiTracedCallback)(uint64_t imsi, uint16_t cellId, uint16_t rnti)
TracedCallback signature for imsi, cellId and rnti events.
Definition: lte-ue-rrc.h:267
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:31
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:297
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.
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:1480
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
#define dupename(T)
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:450
static TracedCallbackTypedefTestSuite tracedCallbackTypedefTestSuite
TypeTraits< typename TypeTraits< T >::ReferencedType >::NonConstType Type
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:213
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.
void(* NotifyTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes)
TracedCallback signature for NotifyTxOpportunity events.
Definition: lte-rlc.h:112
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:67
void(* RxEndErrorTracedCallback)(Ptr< const Packet > packet, double snr)
TracedCallback signature for receive end error event.
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:144
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
DropReason
Reason why a packet has been dropped.
void(* ReceiveTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t bytes, uint64_t delay)
TracedCallback signature for.
Definition: lte-rlc.h:124
void(* DropTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet drop events.