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-- |
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@1376 | 6 |
#include "ns3/csma-net-device.h" |
mathieu@1368 | 7 |
#include "ns3/queue.h" |
mathieu@1375 | 8 |
#include "ns3/mobility-model-notifier.h" |
mathieu@1368 | 9 |
|
mathieu@1368 | 10 |
using namespace ns3; |
mathieu@1368 | 11 |
|
mathieu@1368 | 12 |
int main (int argc, char *argv[]) |
mathieu@1368 | 13 |
{ |
mathieu@1368 | 14 |
Ptr<Node> node = Create<InternetNode> (); |
mathieu@1375 | 15 |
node->AddInterface (Create<MobilityModelNotifier> ()); |
mathieu@1368 | 16 |
|
mathieu@1368 | 17 |
Ptr<PointToPointNetDevice> p2p = Create<PointToPointNetDevice> (node); |
mathieu@1368 | 18 |
p2p->AddQueue (Queue::CreateDefault ()); |
mathieu@1376 | 19 |
Ptr<CsmaNetDevice> csma = Create<CsmaNetDevice> (node); |
mathieu@1368 | 20 |
csma->AddQueue (Queue::CreateDefault ()); |
mathieu@1368 | 21 |
|
mathieu@1371 | 22 |
TraceResolver::SourceCollection collection; |
mathieu@1371 | 23 |
NodeList::GetTraceResolver ()->CollectSources ("", TraceContext (), &collection); |
mathieu@1371 | 24 |
collection.Print (std::cout); |
mathieu@1368 | 25 |
|
mathieu@1368 | 26 |
return 0; |
mathieu@1368 | 27 |
} |