[Ns-bugs] [Bug 962] list of paths to reach objects contains bogus entries

code@nsnam.ece.gatech.edu code at nsnam.ece.gatech.edu
Tue Sep 27 21:20:04 PDT 2011


https://www.nsnam.org/bugzilla/show_bug.cgi?id=962

--- Comment #6 from Tom Henderson <tomh at tomh.org> 2011-09-28 00:20:04 EDT ---
(In reply to comment #5)
> Most of the extra paths were coming from Objects with no GetTypeId() functions.
>  All of the missing GetTypeId() functions that could be determined were added
> to remove these spurious paths (changeset e8cd72402e69).

This is a big improvement already.

> 
> I believe that the the rest of the extra paths are coming from these 2 classes
> in the spectrum module:
> 
>     aloha-noack-net-device.cca
>     non-communicating-net-device.cc
> 
> These 2 classes each have an attribute that is a pointer to an Object like
> this:
> 
>   static TypeId tid = TypeId ("ns3::AlohaNoackNetDevice")
>     .SetParent<NetDevice> ()
>                  ...
>     .AddAttribute ("Phy", "The PHY layer attached to this device.",
>                    PointerValue (),
>                    MakePointerAccessor (&AlohaNoackNetDevice::GetPhy,
>                                         &AlohaNoackNetDevice::SetPhy),
>                    MakePointerChecker<Object> ())
> 
> and
> 
>   static TypeId tid = TypeId ("ns3::NonCommunicatingNetDevice")
>     .SetParent<NetDevice> ()
>                  ...
>     .AddAttribute ("Phy", "The PHY layer attached to this device.",
>                    PointerValue (),
>                    MakePointerAccessor (&NonCommunicatingNetDevice::GetPhy,
>                                         &NonCommunicatingNetDevice::SetPhy),
>                    MakePointerChecker<Object> ())
> 
> These objects have many paths associated with them because any object can be in
> that part of the path.

This is related to the bug 1271 I just filed.  I would suggest either more
strongly enforcing type here (SpectrumPhy), or simply delete this attribute. 
Having the attribute like this, as it is, doesn't seem to provide any utility
since the type is opaque.

-- 
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