utils/print-introspected-doxygen.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Tue, 11 Mar 2008 13:30:12 -0700
changeset 2592 3ebf97150166
parent 2577 5b41cb5c3fcf
child 2600 6c389d0c717d
permissions -rw-r--r--
get rid of CreateObjectWith

#include "ns3/internet-node.h"
#include "ns3/ptr.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/drop-tail-queue.h"
#include "ns3/mobility-model-notifier.h"
#include "ns3/string.h"

using namespace ns3;



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

  Ptr<PointToPointNetDevice> p2p = CreateObject<PointToPointNetDevice> ("Node", node, 
									    "Address", Mac48Address::Allocate ());
  node->AddDevice (p2p);
  p2p->AddQueue (CreateObject<DropTailQueue> ());
  Ptr<CsmaNetDevice> csma = CreateObject<CsmaNetDevice> ("Node", node, 
							     "Address", Mac48Address::Allocate (),
							     "EncapsulationMode", String ("Llc"));
  node->AddDevice (csma);
  csma->AddQueue (CreateObject<DropTailQueue> ());


  return 0;
}