[Ns-bugs] [Bug 1271] stronger type checking in SpectrumPhy
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Thu Sep 29 05:13:51 PDT 2011
https://www.nsnam.org/bugzilla/show_bug.cgi?id=1271
--- Comment #7 from Nicola Baldo <nbaldo at cttc.es> 2011-09-29 08:13:51 EDT ---
(In reply to comment #6)
> Hmm, I thought that I had raised the question before as to why there was
> per-device pointers to mobility models in spectrum, and that the answer was
> that there may be some MIMO use cases in which this granularity might be
> useful.
I agree in theory, I just have some doubts about whether this is practical to
do. Simulating all the multiple paths of a MIMO system implies having a
symbol-level PHY model, of the kind of PhySim for wifi. These model have a huge
computational complexity, hence their practical usability is limited. I think
that a link-layer model of MIMO performance working on top of a single-path
propagation model is more appropriate for a network simulator.
> in either case, the presence of the per-device mobility pointer allows
> Spectrum to support either per-device or per-node mobility models; it is
> just a matter of how to set the pointer.
Yes I agree it's good for the developer to have the possibility of choosing
either modeling strategy, considering that it is already supported by the
current code.
> So, it seems at this point that there are two main options forward:
>
> 1) disregard my previous suggestion to make GetMobility return explicitly a
> MobilityModel, but fix the Doxygen along the lines above (also fix
> SetMobility()).
>
> 2) adopt your patch
I prefer 2). I still value more your previous argument, i.e., that if those
pointers won't ever be something different than MobilityModel and NetDevice,
then it's more transparent to make their type explicit.
> But adopting your patch 2) would preclude passing in e.g. a Node pointer to
> SetMobility() so that would be the main API breakage for users doing that sort
> of thing.
I think this API change would be for good, in the sense that the API becomes
more transparent. These "phy->AddMobility (node)" look a bit like black magic.
BTW, the patch already documents the API change in CHANGES.html
--
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list