[Ns-bugs] [Bug 277] star topologies are painful to create
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Aug 11 09:10:04 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=277
------- Comment #8 from mathieu.lacage at sophia.inria.fr 2008-08-11 12:10 -------
(In reply to comment #7)
> I saw the python construct,
>
> csma.InstallStar(...)
>
> What does that even mean? A typo?
I think gustavo was just lazy to show the full code :)
>
> It seems odd (and relatively inflexible) to me to start putting methods for
> creating high-level topologies in helpers. It seems more natural to me to have
> a Star helper that takes a number of nodes and wires them together using
> point-to-point helpers.
Part of the reason why I wanted to do that is because there are some devices
for which "star" topologies make zero sense. Wireless networks for example.
But, anyway, I don't care much either way.
So, are you suggesting this ?
template <typename T>
class StarHelper
{
public:
void SetDeviceHelper (T helper);
void Install (Ptr<Node> center>, NodeContainer periphery,
NetDeviceContainer ¢erDevices,
NetDeviceContainer &peripheryDevices);
private:
T m_helper;
};
CsmaHelper csma;
csma. ... // setup
StarHelper<CsmaHelper> starHelper;
starHelper.SetDeviceHelper (csma);
starHelper.Install (center, periphery, centerDevices, perpheryDevices);
Another option would be, of course, to make all device helpers derive from a
single base class to avoid the template.
>
> On another note:
>
> Is someone going to file a bug that says, "ring topologies are painful to
> create"? Will we respond by adding an InstallRing method to the point-to-point
> device helper?
>
> Is someone going to file a bug that says, "mesh topologies are painful to
> create"? Will we respond by adding an InstallMesh method to the point-to-point
> device helper?
>
> Is someone going to file a bug that says, "tree topologies are painful to
> create"? Will we respond by adding an InstallTree method to the csma device
> helper that installs stars on csma nodes?
why not ? I would not strike me as utterly crazy. We are really talking about
small amounts of pretty trivial code repeated in a couple of places so, I don't
feel especially bad about not reusing a single instance of that logic.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list