[Ns-developers] ns-3.4 : Random Variables

Mathieu Lacage mathieu.lacage at sophia.inria.fr
Tue Feb 24 01:30:31 PST 2009


On Sat, 2009-02-21 at 21:06 +0000, Gustavo Carneiro wrote:

> 
> Keep in mind that random variable config value strings already contain
> ':' inside, for instance,
> 
> Config::SetDefault ("ns3::OnOffApplication::OnTime",
> "UniformVariable:1.0:3.0");
> 
> Therefore, parsing the environment variable with items separated by :
> is going to be difficult.  More so because of the :: of C++
> identifiers.

ah, good point.
> 
> 
> Maybe another separator would be better; for instance semicolon.

Ok, I just added support for two new env variables: NS_GLOBAL_VALUE and
NS_ATTRIBUTE_DEFAULT. For example:

NS_ATTRIBUTE_DEFAULT='ns3::Ipv4L3Protocol::CalcChecksum=true;ns3::UdpL4Protocol::CalcChecksum=true' ./build/debug/examples/csma-one-subnet
NS_GLOBAL_VALUE='SchedulerType=ns3::HeapScheduler;SimulatorImplementationType=ns3::RealtimeSimulatorImpl' ./build/debug/samples/main-simulator

This will allow us to drop the getenv code from the rng branch as soon
as raj merges it in ns-3-dev.

Mathieu



More information about the Ns-developers mailing list