WAVE - VANET simulation - WBSMHelper/BSMApplication Attributes

75 views
Skip to first unread message

Mohammad Abu Shattal

unread,
May 11, 2016, 1:40:50 PM5/11/16
to ns-3-users
Hello All,
I'm trying to simulate Wave/IEEE802.11p using ns-3. I'm using python for development.  I was able to transmit IP Packets over the network. However, when I tried to Install WBSMHelper on the nodes I receive the following message:

Traceback (most recent call last):
  File "/home/mas/vanet-rev3.py", line 199, in <module>
    VanetSetup(50) 
  File "/home/mas/vanet-rev3.py", line 179, in VanetSetup
    wBSMHelper.Install(vInterfaces, ns.core.Seconds(stopTime), 200,ns.core.Seconds(0.1), 40, txRange, 1, ns.core.MilliSeconds(10) )
TypeError: ['function takes at most 1 argument (8 given)', 'function takes at most 1 argument (8 given)', 'parameter must be None, a Std__vector__lt___double___gt__ instance, or a list of double']

Then I tried to use WBSMHelper constructor and fill the attributes using SetAttribute() function but I see the following error when I tried to use attributes as shown the documentation. I followed the documentation:https://www.nsnam.org/doxygen/classns3_1_1_bsm_application.html 
but couldn't find explicit list of accessible attributes so I tried t fill it using SetAttribute in the 

wBSMHelper.SetAttribute("m_WavePacketSize", ns.core.IntegerValue(200))

but received the follwoing error:


msg="Invalid attribute set (m_WavePacketSize) on ns3::BsmApplication", file=../src/core/model/object-factory.cc, line=69
terminate called without an active exception
Fatal Python error: Aborted


I tried then to install BSMApplication on the nodes without WBSMHelper Class. This time it complains about Setup() Function of BSMApplication Class:

Traceback (most recent call last):
  File "/home/mas/vanet-rev3.py", line 200, in <module>
    VanetSetup(50) # CCH_Time Must be integer in ms [5, 95]
  File "/home/mas/vanet-rev3.py", line 190, in VanetSetup
    bsmApp.Setup(vInterfaces, i, ns.core.Seconds(stopTime), 200,ns.core.Seconds(0.1), 40, txRange,wBSMStat,0, 1, ns.core.MilliSeconds(10) )
AttributeError: 'wave.BsmApplication' object has no attribute 'Setup'

In the documentation I can see that the API support these functions. However, in my desktop I don't have access to these API: ( the constructor in WBSMHelper and the SETUP function in BSMApplication). 

I suspected that the ns-3 version is the problem (3.22) then I installed ns-3.25 the most recent version but have the same issues.
I want specifically to have access to attributes of the BSMApplication either using WBSMHelper or BSMApplication.Setup(). Is there a documentation that shows a list of attributes for WBSMHelper/BSMApplication.  
Anybody can see source/solution to this problem? 
I appreciate your help ... 
Mohammad.



Tommaso Pecorella

unread,
May 11, 2016, 7:04:50 PM5/11/16
to ns-3-users
Hi,

I'm not a Python expert, so I can't help you much. However I can confirm that Install does have 8 arguments, and that to change the packet size you *must* use that function.

Cheers,

T.

Mohammad Abu Shattal

unread,
May 13, 2016, 3:08:51 PM5/13/16
to ns-3-users
Thank you Tommaso for your reply. 
Reply all
Reply to author
Forward
0 new messages