A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
API
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
traced-callback-typedef-test-suite.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Lawrence Livermore National Laboratory
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation;
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16  *
17  * Author: Peter D. Barnes, Jr. <pdbarnes@llnl.gov>
18  */
19 
20 #include "ns3/core-module.h"
21 #include "ns3/dsr-module.h" // DsrOPtionSRHeader
22 #include "ns3/internet-module.h" // Ipv4, Ipv4L3Protocol, Ipv4PacketProbe
23 #include "ns3/test.h"
24 
25 #include <iostream>
26 #include <set>
27 #include <sstream>
28 #include <string>
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-mac-header.h"
43 #include "ns3/wifi-phy-state-helper.h"
44 
45 using namespace ns3;
46 
64 {
65  public:
67 
69  {
70  }
71 
80  static std::size_t m_nArgs;
81 
82  private:
84  template <typename... Ts>
85  class Checker;
86 
87  void DoRun() override;
88 
89 }; // TracedCallbackTypedefTestCase
90 
91 /*
92  --------------------------------------------------------------------
93  Support functions and classes
94  --------------------------------------------------------------------
95 */
96 
97 namespace
98 {
99 
106 std::set<std::string>
108 {
109  std::set<std::string> dupes;
110 
111  dupes.insert("LteRlc::NotifyTxTracedCallback");
112  dupes.insert("LteRlc::ReceiveTracedCallback");
113  dupes.insert("LteUeRrc::ImsiCidRntiTracedCallback");
114  dupes.insert("LteUeRrc::MibSibHandoverTracedCallback");
115  dupes.insert("WifiPhyStateHelper::RxEndErrorTracedCallback");
116 
117  return dupes;
118 }
119 
125 std::set<std::string> g_dupes = Duplicates();
126 
136 template <typename T>
137 inline std::string
138 TypeName(int N)
139 {
140  return "unknown";
141 }
142 
148 #define TYPENAME(T) \
149  template <> \
150  inline std::string TypeName<T>(int N) \
151  { \
152  std::stringstream ss; \
153  ss << #T << "(" << N << ")"; \
154  return ss.str(); \
155  }
156 
222 #undef TYPENAME
223 
234 void
235 SinkIt(std::size_t N)
236 {
237  std::cout << "with " << N << " args." << std::endl;
239 }
240 
246 template <typename... Ts>
248 {
249  public:
254  static void Sink(Ts...)
255  {
256  const std::size_t n = sizeof...(Ts);
257  SinkIt(n);
258  }
259 };
260 
261 } // unnamed namespace
262 
263 /*
264  --------------------------------------------------------------------
265  Class TracedCallbackTypedefTestCase implementation
266 
267  We put the template implementations here to break a dependency cycle
268  from the Checkers() to TracedCbSink<> to SinkIt()
269  --------------------------------------------------------------------
270 */
271 
273 
274 template <typename... Ts>
276 {
279 
280  public:
281  Checker(){};
282  ~Checker() override{};
283 
285  std::tuple<typename TypeTraits<Ts>::BaseType...> m_items;
286 
288  const std::size_t m_nItems = sizeof...(Ts);
289 
293  template <typename U>
294  void Invoke()
295  {
296  U sink = TracedCbSink<Ts...>::Sink;
297  Callback<void, Ts...> cb = MakeCallback(sink);
298 
299  std::cout << TypeName<U>(m_nItems) << " invoked ";
300  m_cb.ConnectWithoutContext(cb);
301  std::apply(m_cb, m_items);
302  Cleanup();
303  }
304 
308  void Cleanup()
309  {
310  if (m_nArgs == 0)
311  {
312  std::cout << std::endl;
313  }
314  NS_ASSERT_MSG(m_nArgs && m_nArgs == m_nItems,
315  "failed, m_nArgs: " << m_nArgs << " N: " << m_nItems);
316  m_nArgs = 0;
317  }
318 };
319 
321  : TestCase("Check basic TracedCallback operation")
322 {
323 }
324 
331 #define DUPE(U, T1) \
332  if (g_dupes.find(#U) == g_dupes.end()) \
333  { \
334  NS_TEST_ASSERT_MSG_NE(0, 1, "expected to find " << #U << " in dupes."); \
335  } \
336  if (TypeName<U>(0) == TypeName<T1>(0)) \
337  { \
338  std::cout << #U << " matches " << #T1 << std::endl; \
339  } \
340  else \
341  { \
342  NS_TEST_ASSERT_MSG_EQ(TypeName<U>(0), \
343  TypeName<T1>(0), \
344  "the typedef " \
345  << #U << " used to match the typedef " << #T1 \
346  << " but no longer does. Please add a new CHECK call."); \
347  }
348 
354 #define CHECK(U, ...) CreateObject<Checker<__VA_ARGS__>>()->Invoke<U>()
355 
356 void
358 {
359  CHECK(dsr::DsrOptionSRHeader::TracedCallback, const dsr::DsrOptionSRHeader&);
360 
361  CHECK(EpcUeNas::StateTracedCallback, EpcUeNas::State, EpcUeNas::State);
362 
363  CHECK(Ipv4L3Protocol::DropTracedCallback,
364  const Ipv4Header&,
367  Ptr<Ipv4>,
368  uint32_t);
369 
370  CHECK(Ipv4L3Protocol::SentTracedCallback, const Ipv4Header&, Ptr<const Packet>, uint32_t);
371 
372  CHECK(Ipv4L3Protocol::TxRxTracedCallback, Ptr<const Packet>, Ptr<Ipv4>, uint32_t);
373 
374  CHECK(Ipv6L3Protocol::DropTracedCallback,
375  const Ipv6Header&,
378  Ptr<Ipv6>,
379  uint32_t);
380 
381  CHECK(Ipv6L3Protocol::SentTracedCallback, const Ipv6Header&, Ptr<const Packet>, uint32_t);
382 
383  CHECK(Ipv6L3Protocol::TxRxTracedCallback, Ptr<const Packet>, Ptr<Ipv6>, uint32_t);
384 
385  CHECK(LrWpanMac::SentTracedCallback, Ptr<const Packet>, uint8_t, uint8_t);
386 
387  CHECK(LrWpanMac::StateTracedCallback, LrWpanMacState, LrWpanMacState);
388 
389  CHECK(LrWpanPhy::StateTracedCallback, Time, LrWpanPhyEnumeration, LrWpanPhyEnumeration);
390 
391  CHECK(LteEnbMac::DlSchedulingTracedCallback,
392  uint32_t,
393  uint32_t,
394  uint16_t,
395  uint8_t,
396  uint16_t,
397  uint8_t,
398  uint16_t,
399  uint8_t);
400 
401  CHECK(LteEnbMac::UlSchedulingTracedCallback, uint32_t, uint32_t, uint16_t, uint8_t, uint16_t);
402 
403  CHECK(LteEnbPhy::ReportUeSinrTracedCallback, uint16_t, uint16_t, double, uint8_t);
404 
405  CHECK(LteEnbPhy::ReportInterferenceTracedCallback, uint16_t, Ptr<SpectrumValue>);
406 
407  CHECK(LteEnbRrc::ConnectionHandoverTracedCallback, uint64_t, uint16_t, uint16_t);
408 
409  CHECK(LteEnbRrc::HandoverStartTracedCallback, uint64_t, uint16_t, uint16_t, uint16_t);
410 
411  CHECK(LteEnbRrc::NewUeContextTracedCallback, uint16_t, uint16_t);
412 
413  CHECK(LteEnbRrc::ReceiveReportTracedCallback,
414  uint64_t,
415  uint16_t,
416  uint16_t,
418 
419  CHECK(LtePdcp::PduRxTracedCallback, uint16_t, uint8_t, uint32_t, uint64_t);
420 
421  CHECK(LtePdcp::PduTxTracedCallback, uint16_t, uint8_t, uint32_t);
422 
423  DUPE(LteRlc::NotifyTxTracedCallback, LtePdcp::PduTxTracedCallback);
424 
425  DUPE(LteRlc::ReceiveTracedCallback, LtePdcp::PduRxTracedCallback);
426 
427  CHECK(LteUePhy::RsrpSinrTracedCallback, uint16_t, uint16_t, double, double, uint8_t);
428 
429  CHECK(LteUePhy::StateTracedCallback, uint16_t, uint16_t, LteUePhy::State, LteUePhy::State);
430 
431  CHECK(LteUeRrc::CellSelectionTracedCallback, uint64_t, uint16_t);
432 
433  DUPE(LteUeRrc::ImsiCidRntiTracedCallback, LteEnbRrc::ConnectionHandoverTracedCallback);
434 
435  DUPE(LteUeRrc::MibSibHandoverTracedCallback, LteEnbRrc::HandoverStartTracedCallback);
436 
437  CHECK(LteUeRrc::StateTracedCallback,
438  uint64_t,
439  uint16_t,
440  uint16_t,
443 
444  CHECK(Mac48Address::TracedCallback, Mac48Address);
445 
446  CHECK(MobilityModel::TracedCallback, Ptr<const MobilityModel>);
447 
448  CHECK(olsr::RoutingProtocol::PacketTxRxTracedCallback,
449  const olsr::PacketHeader&,
450  const olsr::MessageList&);
451 
452  CHECK(olsr::RoutingProtocol::TableChangeTracedCallback, uint32_t);
453 
454  CHECK(Packet::AddressTracedCallback, Ptr<const Packet>, const Address&);
455 
456  CHECK(Packet::Mac48AddressTracedCallback, Ptr<const Packet>, Mac48Address);
457 
458  CHECK(Packet::SinrTracedCallback, Ptr<const Packet>, double);
459 
460  CHECK(Packet::SizeTracedCallback, uint32_t, uint32_t);
461 
462  CHECK(Packet::TracedCallback, Ptr<const Packet>);
463 
464  CHECK(PacketBurst::TracedCallback, Ptr<const PacketBurst>);
465 
466  CHECK(dot11s::PeerManagementProtocol::LinkOpenCloseTracedCallback, Mac48Address, Mac48Address);
467 
468  CHECK(PhyReceptionStatParameters::TracedCallback, PhyReceptionStatParameters);
469 
470  CHECK(PhyTransmissionStatParameters::TracedCallback, PhyTransmissionStatParameters);
471 
472  CHECK(SixLowPanNetDevice::DropTracedCallback,
476  uint32_t);
477 
478  CHECK(SixLowPanNetDevice::RxTxTracedCallback,
481  uint32_t);
482 
483  CHECK(SpectrumChannel::LossTracedCallback,
486  double);
487 
488  CHECK(SpectrumValue::TracedCallback, Ptr<SpectrumValue>);
489 
490  CHECK(TimeSeriesAdaptor::OutputTracedCallback, double, double);
491 
492  CHECK(UanMac::PacketModeTracedCallback, Ptr<const Packet>, UanTxMode);
493 
494  CHECK(UanMacCw::QueueTracedCallback, Ptr<const Packet>, uint16_t);
495 
496  CHECK(UanMacRc::QueueTracedCallback, Ptr<const Packet>, uint32_t);
497 
498  CHECK(UanNetDevice::RxTxTracedCallback, Ptr<const Packet>, Mac8Address);
499 
500  CHECK(UanPhy::TracedCallback, Ptr<const Packet>, double, UanTxMode);
501 
502  CHECK(UeManager::StateTracedCallback,
503  uint64_t,
504  uint16_t,
505  uint16_t,
508 
509  CHECK(WifiMacHeader::TracedCallback, const WifiMacHeader&);
510 
511  CHECK(WifiPhyStateHelper::RxEndErrorTracedCallback, Ptr<const Packet>, double);
512 
513  CHECK(WifiPhyStateHelper::RxOkTracedCallback,
515  double,
516  WifiMode,
517  WifiPreamble);
518 
519  CHECK(WifiPhyStateHelper::StateTracedCallback, Time, Time, WifiPhyState);
520 
521  CHECK(WifiPhyStateHelper::TxTracedCallback, Ptr<const Packet>, WifiMode, WifiPreamble, uint8_t);
522 
523  CHECK(WifiRemoteStationManager::PowerChangeTracedCallback, double, double, Mac48Address);
524 
525  CHECK(WifiRemoteStationManager::RateChangeTracedCallback, DataRate, DataRate, Mac48Address);
526 }
527 
534 {
535  public:
537 };
538 
540  : TestSuite("traced-callback-typedef", SYSTEM)
541 {
542  AddTestCase(new TracedCallbackTypedefTestCase, TestCase::QUICK);
543 }
544 
TracedCallback< Ts... > m_cb
TracedCallback to be called.
std::tuple< typename TypeTraits< Ts >::BaseType... > m_items
Arguments of the TracedCallback.
void DoRun() override
Implementation to actually run this TestCase.
static std::size_t m_nArgs
Number of arguments passed to callback.
a polymophic address class
Definition: address.h:101
Callback template class.
Definition: callback.h:438
Class for representing data rates.
Definition: data-rate.h:89
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(* StateTracedCallback)(const State oldState, const State newState)
TracedCallback signature for state change events.
Definition: epc-ue-nas.h:182
Packet header for IPv4.
Definition: ipv4-header.h:34
DropReason
Reason why a packet has been dropped.
void(* DropTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet drop events.
void(* TxRxTracedCallback)(Ptr< const Packet > packet, Ptr< Ipv4 > ipv4, uint32_t interface)
TracedCallback signature for packet transmission or reception events.
void(* SentTracedCallback)(const Ipv4Header &header, Ptr< const Packet > packet, uint32_t interface)
TracedCallback signature for packet send, forward, or local deliver events.
Packet header for IPv6.
Definition: ipv6-header.h:35
void(* SentTracedCallback)(const Ipv6Header &header, Ptr< const Packet > packet, uint32_t interface)
TracedCallback signature for packet sent, forwarded or local-delivered events.
DropReason
Reason why a packet has been dropped.
void(* DropTracedCallback)(const Ipv6Header &header, Ptr< const Packet > packet, DropReason reason, Ptr< Ipv6 > ipv6, uint32_t interface)
TracedCallback signature for packet drop events.
void(* TxRxTracedCallback)(Ptr< const Packet > packet, Ptr< Ipv6 > ipv6, uint32_t interface)
TracedCallback signature for packet transmission or reception events.
void(* StateTracedCallback)(LrWpanMacState oldState, LrWpanMacState newState)
TracedCallback signature for LrWpanMacState change events.
Definition: lr-wpan-mac.h:731
void(* SentTracedCallback)(Ptr< const Packet > packet, uint8_t retries, uint8_t backoffs)
TracedCallback signature for sent packets.
Definition: lr-wpan-mac.h:720
void(* StateTracedCallback)(Time time, LrWpanPhyEnumeration oldState, LrWpanPhyEnumeration newState)
TracedCallback signature for Trx state change events.
Definition: lr-wpan-phy.h:571
void(* DlSchedulingTracedCallback)(const uint32_t frame, const uint32_t subframe, const uint16_t rnti, const uint8_t mcs0, const uint16_t tbs0Size, const uint8_t mcs1, const uint16_t tbs1Size, const uint8_t ccId)
TracedCallback signature for DL scheduling events.
Definition: lte-enb-mac.h:166
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:184
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:304
void(* ReportInterferenceTracedCallback)(uint16_t cellId, Ptr< SpectrumValue > spectrumValue)
TracedCallback signature for the linear average of SRS SINRs.
Definition: lte-enb-phy.h:317
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:1118
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:1103
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:1091
void(* NewUeContextTracedCallback)(const uint16_t cellId, const uint16_t rnti)
TracedCallback signature for new Ue Context events.
Definition: lte-enb-rrc.h:1082
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:139
void(* PduTxTracedCallback)(uint16_t rnti, uint8_t lcid, uint32_t size)
TracedCallback for PDU transmission event.
Definition: lte-pdcp.h:128
void(* StateTracedCallback)(uint16_t cellId, uint16_t rnti, State oldState, State newState)
TracedCallback signature for state transition events.
Definition: lte-ue-phy.h:300
State
The states of the UE PHY entity.
Definition: lte-ue-phy.h:63
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:314
State
The states of the UE RRC entity.
Definition: lte-ue-rrc.h:99
void(* CellSelectionTracedCallback)(uint64_t imsi, uint16_t cellId)
TracedCallback signature for imsi, cellId and rnti events.
Definition: lte-ue-rrc.h:335
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:369
an EUI-48 address
Definition: mac48-address.h:46
void(* TracedCallback)(Mac48Address value)
TracedCallback signature for Mac48Address.
A class used for addressing MAC8 MAC's.
Definition: mac8-address.h:44
void(* TracedCallback)(Ptr< const MobilityModel > model)
TracedCallback signature.
A base class which provides memory management and object aggregation.
Definition: object.h:89
void(* TracedCallback)(Ptr< const PacketBurst > burst)
TracedCallback signature for Ptr<PacketBurst>
Definition: packet-burst.h:84
void(* SizeTracedCallback)(uint32_t oldSize, uint32_t newSize)
TracedCallback signature for changes in packet size.
Definition: packet.h:759
void(* Mac48AddressTracedCallback)(Ptr< const Packet > packet, Mac48Address mac)
TracedCallback signature for packet and Mac48Address.
Definition: packet.h:751
void(* AddressTracedCallback)(Ptr< const Packet > packet, const Address &address)
TracedCallback signature for packet and Address.
Definition: packet.h:732
void(* SinrTracedCallback)(Ptr< const Packet > packet, double sinr)
TracedCallback signature for packet and SINR.
Definition: packet.h:767
void(* TracedCallback)(Ptr< const Packet > packet)
TracedCallback signature for Ptr<Packet>
Definition: packet.h:724
void(* DropTracedCallback)(DropReason reason, Ptr< const Packet > packet, Ptr< SixLowPanNetDevice > sixNetDevice, uint32_t ifindex)
TracedCallback signature for packet drop events.
DropReason
Enumeration of the dropping reasons in SixLoWPAN.
void(* RxTxTracedCallback)(Ptr< const Packet > packet, Ptr< SixLowPanNetDevice > sixNetDevice, uint32_t ifindex)
TracedCallback signature for packet send/receive events.
void(* LossTracedCallback)(Ptr< const SpectrumPhy > txPhy, Ptr< const SpectrumPhy > rxPhy, double lossDb)
TracedCallback signature for path loss calculation events.
void(* TracedCallback)(Ptr< SpectrumValue > value)
TracedCallback signature for SpectrumValue.
encapsulates test code
Definition: test.h:1060
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Definition: test.cc:301
A suite of tests to run.
Definition: test.h:1256
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:105
void(* OutputTracedCallback)(const double now, const double data)
TracedCallback signature for output trace.
Forward calls to a chain of Callback.
void(* QueueTracedCallback)(Ptr< const Packet > packet, uint16_t proto)
TracedCallback signature for enqueue/dequeue of a packet.
Definition: uan-mac-cw.h:107
void(* PacketModeTracedCallback)(Ptr< const Packet > packet, UanTxMode mode)
TracedCallback signature for packet reception/enqueue/dequeue events.
Definition: uan-mac.h:124
void(* QueueTracedCallback)(Ptr< const Packet > packet, uint32_t proto)
TracedCallback signature for dequeue of a packet.
Definition: uan-mac-rc.h:199
void(* RxTxTracedCallback)(Ptr< const Packet > packet, Mac8Address address)
TracedCallback signature for MAC send/receive events.
void(* TracedCallback)(Ptr< const Packet > pkt, double sinr, UanTxMode mode)
TracedCallback signature for UanPhy packet send/receive events.
Definition: uan-phy.h:215
Abstraction of packet modulation information.
Definition: uan-tx-mode.h:43
State
The state of the UeManager at the eNB RRC.
Definition: lte-enb-rrc.h:78
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:416
Implements the IEEE 802.11 MAC header.
void(* TracedCallback)(const WifiMacHeader &header)
TracedCallback signature for WifiMacHeader.
represent a single transmission mode
Definition: wifi-mode.h:51
void(* TxTracedCallback)(Ptr< const Packet > packet, WifiMode mode, WifiPreamble preamble, uint8_t power)
TracedCallback signature for transmit event.
void(* StateTracedCallback)(Time start, Time duration, WifiPhyState state)
TracedCallback signature for state changes.
void(* RxOkTracedCallback)(Ptr< const Packet > packet, double snr, WifiMode mode, WifiPreamble preamble)
TracedCallback signature for receive end OK event.
void(* PowerChangeTracedCallback)(double oldPower, double newPower, Mac48Address remoteAddress)
TracedCallback signature for power change events.
void(* RateChangeTracedCallback)(DataRate oldRate, DataRate newRate, Mac48Address remoteAddress)
TracedCallback signature for rate change events.
void(* LinkOpenCloseTracedCallback)(Mac48Address src, const Mac48Address dst)
TracedCallback signature for link open/close events.
Source Route (SR) Message Format.
void(* TracedCallback)(const DsrOptionSRHeader &header)
TracedCallback signature for DsrOptionSrHeader.
void(* PacketTxRxTracedCallback)(const PacketHeader &header, const MessageList &messages)
TracedCallback signature for Packet transmit and receive events.
void(* TableChangeTracedCallback)(uint32_t size)
TracedCallback signature for routing table computation.
#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:86
LrWpanMacState
MAC states.
Definition: lr-wpan-mac.h:72
LrWpanPhyEnumeration
IEEE802.15.4-2006 PHY Emumerations Table 18 in section 6.2.3.
Definition: lr-wpan-phy.h:111
#define CHECK(U,...)
Check the TracedCallback by calling its Invoke function.
#define DUPE(U, T1)
Check the TracedCallback duplicate by checking if it matches the TracedCallback it is supposed to be ...
std::set< std::string > g_dupes
Container for duplicate types.
#define TYPENAME(T)
Returns a string representing the type of a class.
std::string TypeName(int N)
Stringify the known TracedCallback type names.
std::set< std::string > Duplicates()
Record typedefs which are identical to previously declared.
WifiPreamble
The type of preamble to be used by an IEEE 802.11 transmission.
std::vector< MessageHeader > MessageList
Definition: olsr-header.h:703
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Callback< R, Args... > MakeCallback(R(T::*memPtr)(Args...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
Definition: callback.h:704
MeasurementReport structure.
Definition: lte-rrc-sap.h:948
PhyReceptionStatParameters structure.
Definition: lte-common.h:212
void(* TracedCallback)(const PhyReceptionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:232
PhyTransmissionStatParameters structure.
Definition: lte-common.h:188
void(* TracedCallback)(const PhyTransmissionStatParameters params)
TracedCallback signature.
Definition: lte-common.h:207
static TracedCallbackTypedefTestSuite tracedCallbackTypedefTestSuite
Static variable for test initialization.
WifiPhyState
The state of the PHY layer.
Ptr< PacketSink > sink
Pointer to the packet sink application.
Definition: wifi-tcp.cc:55