new packet tag issue

105 views
Skip to first unread message

Rosa Linda

unread,
May 6, 2014, 7:44:16 AM5/6/14
to ns-3-...@googlegroups.com
Hi everyone,

I created my own packet tag for the signal parameters and I placed it in the wifi model. Then I modified yans-wifi-phy.cc to include the part of the code that calculates snr, rss, ... My question is there any suggestion of whether I can place my own tag file in my module model and send my parameter from the phy that I have defined it without changing the original yans-wifi-phy.cc.

Thank you in advance.

Rosalinda

Konstantinos

unread,
May 6, 2014, 1:51:22 PM5/6/14
to ns-3-...@googlegroups.com
What is your module? Where does it work? Is it a routing, MAC, application? Something different?
Does the packet pass through it?

The RSS/SNR values exist only in the wifi-phy class, and you pass them to other classes/modules by attaching the SNR tag on the packet. So, you only need to change the original yans-wifi-phy in order to attach those values, and then at any other layer, you can read them, do further calculations, remove that tag if needed and add a different one.

Rosa Linda

unread,
May 6, 2014, 7:56:57 PM5/6/14
to ns-3-...@googlegroups.com
Hi Konstantinos,

It is a routing module. I did the changes on yans-wifi-phy and I have compile and run and every thing is fine but the problem is I have to place the file that contains the tag in wifi model so it can be accessed. I am wondering if I can keep this file in my module instead of placing it in the wifi module.

Thanks again for your response.

Rosalinda

Konstantinos

unread,
May 7, 2014, 3:43:00 AM5/7/14
to ns-3-...@googlegroups.com
If you update the wifi module wscript file, and include the header file of your tag there (as the SNR tag already exist there), you should be able to access that file/class from any other module, if you add the wifi module as a dependency on that. 

Rosa Linda

unread,
May 7, 2014, 4:18:39 PM5/7/14
to ns-3-...@googlegroups.com
Thank you very much for your help sir.
Reply all
Reply to author
Forward
0 new messages