[Ns-developers] finalizing the ns-3 object model (configuration)
tomh at tomh.org
Tue Jan 15 07:56:21 PST 2008
craigdo at ee.washington.edu wrote:
>>> 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
>> 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
>> 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".
Yes, but I was thinking that it required a bit more. The user needs to
know where in the namespace that the objects he/she just created (or is
about to create) and write the regexp, as opposed to directly passing in
the parameter. On the other hand, we need to do that for fine-grained
tracing control, so if we could find a uniform way to learn these
namespace locations, it could apply to both.
More information about the Ns-developers