utils/print-trace-sources.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 27 Aug 2007 20:25:15 +0200
changeset 1368 e75dc1a2a5fb
child 1371 bebf690257c9
permissions -rw-r--r--
add TraceResolver::PrintAvailable method
mathieu@1368
     1
#include "ns3/internet-node.h"
mathieu@1368
     2
#include "ns3/ptr.h"
mathieu@1368
     3
#include "ns3/trace-resolver.h"
mathieu@1368
     4
#include "ns3/node-list.h"
mathieu@1368
     5
#include "ns3/point-to-point-net-device.h"
mathieu@1368
     6
#include "ns3/csma-cd-net-device.h"
mathieu@1368
     7
#include "ns3/queue.h"
mathieu@1368
     8
mathieu@1368
     9
using namespace ns3;
mathieu@1368
    10
mathieu@1368
    11
int main (int argc, char *argv[])
mathieu@1368
    12
{
mathieu@1368
    13
  Ptr<Node> node = Create<InternetNode> ();
mathieu@1368
    14
mathieu@1368
    15
  Ptr<PointToPointNetDevice> p2p = Create<PointToPointNetDevice> (node);
mathieu@1368
    16
  p2p->AddQueue (Queue::CreateDefault ());
mathieu@1368
    17
  Ptr<CsmaCdNetDevice> csma = Create<CsmaCdNetDevice> (node);
mathieu@1368
    18
  csma->AddQueue (Queue::CreateDefault ());
mathieu@1368
    19
mathieu@1368
    20
  NodeList::GetTraceResolver ()->PrintAvailable ("", TraceContext (), std::cout);
mathieu@1368
    21
mathieu@1368
    22
  return 0;
mathieu@1368
    23
}