[Ns-developers] finalizing the ns-3 object model (configuration)
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Mon Jan 14 23:34:23 PST 2008
> > Parameters params;
> > params.Set ("PointToPoint::ChannelDataRate", "5000000");
> > params.Set ("PointToPoint::ChannelDelay", "2");
> >
> > Ptr<PointToPointChannel> channel0 =
> > PointToPointTopology::AddPointToPointLink ( n0, n2, params);
> I see this as one solution that has a few features that the
> conventional
> way of doing this (read in a flat configuration file, store global
> variables) doesn't.
> - it provides a way to plumb in, and scope the applicability of
> configuration parameters, when the object being configured
> may be a few
> layers down in the API.
> - it also would localize the declaration of these values to the class
> (TypeId) using them, easing the automated documentation of them
>
> I think though that your comment was directed more at the
> usability than
> functionality of the proposal, so do you have some other
> ideas about how
> one might achieve the same scoping goals?
>
> >
> > I was thinking about this last Friday and it occurred to me that the
> > namespace in our tracing system gets us almost there. I
> have methods like
> > the following scribbled on my whiteboard:
> >
> > Set ("/nodes/*/tcp/reno/ssthresh", "16000");
> > Set ("/nodes/1/tcp/rajno/cwnd". "4000");
>
> This is an interesting idea and looks like Linux proc too.
> It might be
> nice to reuse the tracing namespace if possible rather than
> define a new
> configuration one.
>
> It doesn't seem to me to address one of the other issues that
> Parameter
> deals with, which was the ability to locally override these settings.
I thought my suggestion directly dealt with ability to locally override the
global settings. For example, one example locally set the "cwnd" parameter
only in the object referred to by "/nodes/1/tcp/rajno". I also thought it
directly dealt with "a way to plumb in, and scope the applicability of
configuration parameters, when the object being configured may be a few
layers down in the API," since that's what that same example code did.
What it didn't do was provide generic parameters to object constructors in
topology code, but I was going to defer that discussion `till tomorrow.
But, yes, my comments are directed more at the usability than the
functionality of the proposal.
-- Craig
More information about the Ns-developers
mailing list