[Ns-developers] Possible bug in Python bindings for propagation module

Gustavo Carneiro gjcarneiro at gmail.com
Sat Nov 26 08:45:30 PST 2011


Fixed in 7598:d12d85a4faca

2011/11/26 Gustavo Carneiro <gjcarneiro at gmail.com>

>
>
> 2011/11/26 Vedran Miletić <rivanvx at gmail.com>
>
>> Datuma 19. studenoga 2011. 15:56 Vedran Miletić <rivanvx at gmail.com> je
>> napisao/la:
>> > That  probably fixed it for you, but you have done an API rescan which
>> > is what I haven't. Latest ns-3-dev still has:
>> >
>> > $ ./waf shell
>> > $ python
>> >>>> import ns.propagation
>> >>>> loss = ns.propagation.LogDistancePropagationLossModel()
>> >>>> dir(loss)
>> > ['AggregateIterator', 'AggregateObject', 'Cleanup', 'Dispose',
>> > 'GetAggregateIterator', 'GetAttribute', 'GetAttributeFailSafe',
>> > 'GetInstanceTypeId', 'GetObject', 'GetPathLossExponent', 'GetTypeId',
>> > 'SetAttribute', 'SetAttributeFailSafe', 'SetNext',
>> > 'SetPathLossExponent', 'SetReference', 'Start', 'TraceConnect',
>> > 'TraceConnectWithoutContext', 'TraceDisconnect',
>> > 'TraceDisconnectWithoutContext', '_ConstructSelf', '_DoDispose',
>> > '_DoStart', '_GetInstanceTypeId', '_NotifyConstructionCompleted',
>> > '_NotifyNewAggregate', '__class__', '__delattr__', '__doc__',
>> > '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__',
>> > '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__',
>> > '__reduce__', '__reduce_ex__', '__repr__', '__setattr__',
>> > '__sizeof__', '__str__', '__subclasshook__']
>> >
>> > i.e., no CalcRxPower() method.
>> >
>> > Vedran
>> >
>>
>> Gustavo, can you please just confirm or deny this issue?
>>
>
> In that case, I confirm it.  Sorry, I thought the discussion was about
> some private ns-3 branch, not ns-3-dev.
>
> Looking at it, the culprit is a missing include.  This patch plus an API
> rescan should take care of it:
>
> diff -r 52904cc0aa8a src/propagation/model/propagation-loss-model.h
> --- a/src/propagation/model/propagation-loss-model.h Thu Nov 17 18:11:07
> 2011 +0000
> +++ b/src/propagation/model/propagation-loss-model.h Sat Nov 26 16:29:41
> 2011 +0000
> @@ -27,6 +27,7 @@
>
>  #include "ns3/object.h"
>  #include "ns3/random-variable.h"
> +#include "ns3/mobility-model.h"
>  #include <map>
>
>  namespace ns3 {
> @@ -36,8 +37,6 @@
>   *
>   */
>
> -class MobilityModel;
> -
>  /**
>   * \ingroup propagation
>   *
>
>
> --
> Gustavo J. A. M. Carneiro
> INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
> "The universe is always one step beyond logic." -- Frank Herbert
>



-- 
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list