Tracing channel busy time in a 802.11p vehicular scenario

275 views
Skip to first unread message

Alejandro Jimenez

unread,
Jun 25, 2015, 5:41:26 AM6/25/15
to ns-3-...@googlegroups.com
Hi,

I have built a simple example of a vehicular scenario (attached). I want to trace changes in the state and the reception of packets at the PHY layer. For that I have followed the following discussions and tried to implement some of those ideas:


Specifically, I am testing two tracesoruces in the following manner, and I assuming it would trace all the nodes:

Config::ConnectWithoutContext ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/RxOk"
 
, MakeCallback (&PacketRxOk));
Config::ConnectWithoutContext ("/NodeList/*/DeviceList/*/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/State"
 
, MakeCallback (&PhyStateTracer));

My simple methods are only printing a message that signals if the trace was fired. Unfortunately the traces are not being fired apparently.I have also tried by configuring ConnectWithoutContext to specific nodes.

Thank you in advance for any idea on this.

BR,

Alejandro.






80211p_simple_v1.cc

Konstantinos

unread,
Jun 25, 2015, 6:54:42 AM6/25/15
to ns-3-...@googlegroups.com, luna.al...@gmail.com, Junling Bu
Hi Alejandro,

Two points related to your trace paths

1) You are using WAVE net devices, thus your trace source on the Phy should be 
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WaveNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy"
2) The trace sources you are using are not valid. There is no trace source RxOk or State in the Phy, they are on the WifiPhyStateHelper whose trace path is 
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WaveNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy/State"
and after that you add the RxOk or (again) the State trace sources. 

I run your code modifying the two points (correcting for multiple PhyEntities and the StateHelper - see attached) but I noticed that there is an issue with WAVE not firing those trace sources. If simple WIFI is used I can see them (commented Wifi configuration and Config::Connect). 

I have CC'd Junling to comment on this issue. 

Regards,
K.
ns3user.cc

Alejandro Jimenez

unread,
Jun 25, 2015, 7:46:31 AM6/25/15
to ns-3-...@googlegroups.com, luna.al...@gmail.com, linlin...@gmail.com
Thanks for the tips Konstantinos. I will be aware of the comments from Junling.

Junling Bu

unread,
Jun 28, 2015, 12:50:03 AM6/28/15
to Alejandro Jimenez, ns-3-...@googlegroups.com
Hi Alejandro and Konstantinos,

In my models, I want to provide two types of Device.

The first may be called "802.11p device', which will only use 802.11p standard. And this device is actually the object of ns3::WifiNetDevice, but we will set the MAC pointer to OcbWifiMac which is defined in 802.11p standard.
So if you want to trace the events, you shall use code like commented by ns3user.cc
  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy/State"

The second may be called "wave device",which will implement 802.11p, 1609.4 currently, and 1609.3 in the future. The device is the object of ns3::WaveNetDevice. So if you want to trace these events, you shall use code like uncommented by ns3user.cc

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WaveNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy/State"

If you find any issue, you can remind me :)

Thanks.

Junling


Junling Bu

Junling Bu

unread,
Jun 28, 2015, 12:51:51 AM6/28/15
to Alejandro Jimenez, ns-3-...@googlegroups.com
Sorry to point that : Since in ns3user.cc you create a "802.11p" device, you shall use

  • "/NodeList/[i]/DeviceList/[i]/$ns3::WifiNetDevice/PhyEntities/[i]/$ns3::YansWifiPhy/State"


Junling Bu

Alejandro Jimenez

unread,
Jun 29, 2015, 5:49:19 AM6/29/15
to ns-3-...@googlegroups.com, luna.al...@gmail.com
Dear Junling Bu and Kostantinos,

I would like to thank both for the clarifications. To sum up I would like to comment:

- Looking at my original code I realized that my mistake was to configure the trace source incompletely (and corrected by Konstantinos):

Original (wrong)
Config::ConnectWithoutContext ("/NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/RxOk", MakeCallback (&PacketRxOk));

Correct
Config::ConnectWithoutContext ("/NodeList/0/DeviceList/0/$ns3::WifiNetDevice/Phy/$ns3::YansWifiPhy/State/RxOk", MakeCallback (&PacketRxOk));

- The discussion was also useful to identify two current approaches for wireless vehicular scenarios. As Junling Bu mentioned, there are two kind of devices to configure in NS3 which we can identify from the related literature as the U.S. and European approaches. Please correct me if I am wrong but the "801.11p" devices (in this example) correspond to the European approach while the "WAVE" devices correspond to the U.S. version.

Regards,

Alejandro.

Konstantinos

unread,
Jun 29, 2015, 6:05:50 AM6/29/15
to ns-3-...@googlegroups.com, luna.al...@gmail.com
Hi Alejandro,

The 802.11p devices are just for 'single-channel' networks but if you want to simulate multi-channel operations (based on the WAVE) you have to use the WAVE device.
It's not that  the 802.11p is the EU and WAVE the US, since both EU and US standards propose multi-channel operations. The 11p is just a sub-set of WAVE, the bare minimum lower MAC/PHY and it is used both in EU and US standards.


Regards,
K.

Alejandro Jimenez

unread,
Jun 29, 2015, 6:33:36 AM6/29/15
to ns-3-...@googlegroups.com, luna.al...@gmail.com
Thanks again for the comments.

weiy...@gmail.com

unread,
Mar 12, 2017, 11:12:02 AM3/12/17
to ns-3-users

Hey Alejandro,

Have you already implemented calculating the channel busy time in NS3 ? I am also doing a project that needs calculating the channel busy ratio.  I am a newbie to NS3. Could you please share with me your code or give me some inspiration ? Thank you very much. 

Best regards,
Yongyi
在 2015年6月29日星期一 UTC+2下午12:33:36,Alejandro Jimenez写道:
Reply all
Reply to author
Forward
0 new messages