Bug 1297 - Point-to-point layout Constructors for pre-existing nodes
Point-to-point layout Constructors for pre-existing nodes
Status: RESOLVED WONTFIX
Product: ns-3
Classification: Unclassified
Component: point-to-point
pre-release
All All
: P5 enhancement
Assigned To: natale.patriciello
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-16 15:59 UTC by John Abraham
Modified: 2017-02-03 08:29 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Abraham 2011-11-16 15:59:56 UTC
Reported by Eric Gamess

All the previous helper, that create topologies, create
the nodes for us.

So, we have to use them as followed:
   PointToPointHelper p2p;
   p2p.SetDeviceAttribute("DataRate", StringValue("5.0Mbps"));
   p2p.SetChannelAttribute("Delay", TimeValue("2.0ms"));

   // Create Star
   PointToPointStarHelper star = PointToPointStarHelper(numSpokes, p2p);

and the PointToPointStarHelper::PointToPointStarHelper
constructor creates the numSpokes+1 necessary nodes
(1 hub and numSpokes spokes). What about an
additional constructor, where I have to create the
nodes by myself before construing the topology???
Something like that:

   PointToPointHelper p2p;
   p2p.SetDeviceAttribute("DataRate", StringValue("5.0Mbps"));
   p2p.SetChannelAttribute("Delay", TimeValue("2.0ms"));

   NodeContainer spokes;
   spokes.create(numSpokes);
   Ptr<Node> hub = CreateObject<Node>();
   // Here I do all the required actions on spokes and
   // hub before creating the star.
   PointToPointStarHelper star = PointToPointStarHelper(numSpokes,
p2p, hub, spokes);


In the case of a PointToPointGridHelper, something
like that:

   NodeContainer nodes;
   nodes.create(numRows*numCols);
   // Here I do all the required actions on nodes
   // before creating the grid
   PointToPointGridHelper grid = PointToPointGridHelper(numRows,
numCols, p2p, nodes);

Eric.
Comment 1 natale.patriciello 2017-02-03 08:29:39 UTC
After 5 years I'd like to sign this as wont fix. Probably it is better to implement a getter for the star hub. Easy patch and trivial.