How to add another .AddAttribute

28 views
Skip to first unread message

juan_de_julio

unread,
May 5, 2020, 4:20:35 AM5/5/20
to ns-3-users
Good Evening,

I'm looking to add another AddAttribute to the mobility-model.cc file that I can change on the fly when running the ./waf file.  Not entirely sure how to do it, but I have an idea where.

mobility-model.cc snippet.png


It would essentially go in the TypeId section.  The goal is to have a configurable attribute that can be using in the Mobility::GetPosition function as a modifier so that I can artificially adjust the GetPosition as needed by fuzzing the value prior to it being return to whatever protocol is using the model.


Thanks for any help in advance.

Pooja singh

unread,
May 11, 2020, 12:54:44 PM5/11/20
to ns-3-users
Yes, you can add AddAttrbute here. I also have used AddAttribute in some other file for my work.
Just keep in mind to add the variables in the header file which you will be using in the attribute you want to add.
Reply all
Reply to author
Forward
0 new messages