utils/print-introspected-doxygen.cc
author Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
Mon, 10 Mar 2008 00:27:53 +0100
changeset 2577 5b41cb5c3fcf
parent 2542 a9b88fdc09d6
child 2592 3ebf97150166
permissions -rw-r--r--
kill DefaultValue
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     1
#include "ns3/internet-node.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     2
#include "ns3/ptr.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     3
#include "ns3/node-list.h"
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     4
#include "ns3/point-to-point-net-device.h"
1376
ad7e61edfb9d merge with trunk
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1375
diff changeset
     5
#include "ns3/csma-net-device.h"
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
     6
#include "ns3/queue.h"
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
     7
#include "ns3/drop-tail-queue.h"
1375
4f45bec005b8 document also mobility model notifier
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1371
diff changeset
     8
#include "ns3/mobility-model-notifier.h"
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
     9
#include "ns3/string.h"
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    10
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    11
using namespace ns3;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    12
1399
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    13
5945e92014e2 move printing to client code
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1376
diff changeset
    14
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    15
int main (int argc, char *argv[])
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    16
{
2230
9f13ac3291e0 add CreateObject<> to instanciate subclasses of the Object base class. Replaces Create<>.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1855
diff changeset
    17
  Ptr<Node> node = CreateObject<InternetNode> ();
2258
666099a753e0 AddInterface -> AggregateObject
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2253
diff changeset
    18
  node->AggregateObject (CreateObject<MobilityModelNotifier> ());
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    19
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
    20
  Ptr<PointToPointNetDevice> p2p = CreateObjectWith<PointToPointNetDevice> ("Node", node, 
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
    21
									    "Address", Mac48Address::Allocate ());
2470
254581fb9e9c make NetDevice fully virtual.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2258
diff changeset
    22
  node->AddDevice (p2p);
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
    23
  p2p->AddQueue (CreateObject<DropTailQueue> ());
2500
1fb9430f642d convert CsmaNetDevice to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2470
diff changeset
    24
  Ptr<CsmaNetDevice> csma = CreateObjectWith<CsmaNetDevice> ("Node", node, 
1fb9430f642d convert CsmaNetDevice to Attributes.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2470
diff changeset
    25
							     "Address", Mac48Address::Allocate (),
2502
50d0da37f02f introduce the ns3::String class, get rid of the string -> Attribute implicit conversion, and get rid of MakeDataRate, port PointToPointNetDevice to Attributes
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2500
diff changeset
    26
							     "EncapsulationMode", String ("Llc"));
2470
254581fb9e9c make NetDevice fully virtual.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2258
diff changeset
    27
  node->AddDevice (csma);
2533
80cdc3eec057 do not use Queue::CreateDefault
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 2502
diff changeset
    28
  csma->AddQueue (CreateObject<DropTailQueue> ());
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    29
1853
e2d7985a5938 print default value list in trace source list doxygen output.
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents: 1538
diff changeset
    30
1368
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    31
  return 0;
e75dc1a2a5fb add TraceResolver::PrintAvailable method
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
diff changeset
    32
}