utils/print-trace-sources.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 28 Aug 2007 12:05:35 +0200
changeset 1376 ad7e61edfb9d
parent 1375 4f45bec005b8
child 1399 5945e92014e2
permissions -rw-r--r--
merge with trunk

#include "ns3/internet-node.h"
#include "ns3/ptr.h"
#include "ns3/trace-resolver.h"
#include "ns3/node-list.h"
#include "ns3/point-to-point-net-device.h"
#include "ns3/csma-net-device.h"
#include "ns3/queue.h"
#include "ns3/mobility-model-notifier.h"

using namespace ns3;

int main (int argc, char *argv[])
{
  Ptr<Node> node = Create<InternetNode> ();
  node->AddInterface (Create<MobilityModelNotifier> ());

  Ptr<PointToPointNetDevice> p2p = Create<PointToPointNetDevice> (node);
  p2p->AddQueue (Queue::CreateDefault ());
  Ptr<CsmaNetDevice> csma = Create<CsmaNetDevice> (node);
  csma->AddQueue (Queue::CreateDefault ());

  TraceResolver::SourceCollection collection;
  NodeList::GetTraceResolver ()->CollectSources ("", TraceContext (), &collection);
  collection.Print (std::cout);

  return 0;
}