next up previous contents index
Next: 2.5.2 Default values and Up: 2.5 Configuration Previous: 2.5 Configuration   Contents   Index

2.5.1 Stock topology code

A number of static methods are being defined to aid in topology construction. These objects typically use base class pointers to refer to constituent objects (enabling software reuse) and are therefore a primary benefactor of the COM-like frameworks (QueryInterface, Component Manager) described above. For the moment, only a few PointToPointTopology objects are available (in src/devices/p2p/p2p-topology.cc,h) but more topologies such as WirelessGrid are planned.

For example, the following method constructs a point-to-point link (using PointToPointChannel and PointToPointNetDevice objects) between two nodes n1 and n2, with the specified dataRate and one way progagation delay. It essentially wraps a bunch of low-level API calls to create these NetDevices and Channel. The type of objects used in this topology can be overridden as long as they derive from the common base classes used in these topology objects. Users may write their own topology objects, but ns-3 will maintain a few.



Tom Henderson 2007-06-17