[Ns-developers] Proposed changes to factor ns-3 simulator module

Gustavo Carneiro gjcarneiro at gmail.com
Sat Jul 19 03:17:39 PDT 2008


2008/7/19 <craigdo at ee.washington.edu>:

> Hi all,
>
> As many of you know, I've been working on a realtime and emulation
> extension
> to the ns-3 simulator module.  After some initial discussions it was
> decided
> to factor the simulator into an interface and a replaceable implementation;
> and to check this code into ns-3-dev before the ns-3.2 release.  We're
> doing
> this to enable more easily sliding in the realtime, emulation and
> parallelization work.


One thing I was hoping to do some day would be to provide some feedback on
the console about how the simulated time and real time have evolved.  For
instance, every real time second, print simulated time and real time.  This
is a very useful feedback to allow the user to get a feel for how fast
things are simulating and how much time simulation is likely to take.

So this feedback would need real time scheduling, and I was kind of hoping
to be able to use your work for that.  But now I see that real time
scheduling happens on a completely separate simulator, which I think
precludes me from doing that.

Do you have any comment on this?  Do you think it will ever be possible to
have both schedulers running at the same time?

Thanks.


>
> I've completed the initial factoring and put the code into a private
> repository at http://code.nsnam.org/craigdo/ns-3-compsim for your viewing
> pleasure.
>
> The only changes are in src/simulator.  You will find the old SimulatorPriv
> class removed from simulator.cc; the class declaration renamed to
> SimulatorImpl and turned into a pure virtual interface in simulator-impl.h;
> and a default implementation of SimulatorImpl called (perhaps not too
> surprisingly) DefaultSimulatorImpl in default-simlator-impl.{cc,h} which is
> just the old SimulatorPriv methods renamed.
>
> There is a GlobalValue named "SimulatorImplementationType" that defaults to
> "ns3::DefaultSimulatorImpl" to control the substitution of the simulator
> implementation.  When the emulation work is done, you can just set the
> default value to the name of the realtime simulator (something like
> "ns3::RealtimeSimulatorImpl") and magically have a realtime ns-3.  Well,
> that's the theory anyway ...
>
> Any comments are welcome.  This version of the simulator passes all waf
> check and regression tests.  If I don't hear any comments, I plan on
> checking these changes in late Monday afternoon (US pacific time).
>
> Regards,
>
> -- Craig
>
>
>


-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list