default values for wifi module

171 views
Skip to first unread message

Nina

unread,
Jun 15, 2019, 9:06:11 AM6/15/19
to ns-3-users
Hello,

can someone please tell me where can I find default values for various wifi standards? And where can I find files in which different modules are defined (propagation, building)? For example, description of the buildings - how are office and residential buildings defined and what is the difference?

I have found folders for various modules in ns-3/src folder but I don't know which files to look at and which ones to change. For example, I open buildings/model folder but none of the files (building, building-list) contain any description of specific type of buildings. I have found in itur1238-propagation-loss-model a specific formula by which the loss is calculated and I think that is the only thing I could find by myself to change.

Another example - I want to see default value for guard interval in wifi ax standard. I set this variable using Yans wifi phy helper so I search src/wifi/model files yans-wifi-phy, yans-wifi-channel, , I search src/wifi/helper file yans-wifi-helper and I find nothing. In wifi-helper file I found some values for GI and channel width but they are only being compared for what I think is generating pcap file.

So, can someone please give me some general instructions:

1. on finding specific information in src files and
2.which files to look at when I need something changed?

I have read tutorial, model library (completely) and doxygen (on a need basis) and could not find any answers there. I have started reading manual as well but I don't think it helps me with using the simulator.

Regards
Nina

Nina

unread,
Jun 15, 2019, 11:52:46 AM6/15/19
to ns-3-users
Another example of how I can't use simulator based only on provided tutorial : I want to use setRemoteStationManager from the wifi helper object but using doxygen is confusing. I open WifiHelper in doxygen but there is nothing useful here about setRemoteStationManager (what are the actual attributes to set) and I have to open WifiNetDevice (it is this object's helper) instead and look for attribute description of setRemoteStationManager here - also something I discovered from google group help and was not explained anywhere in tutorial. But there I find this:
void ns3::WifiNetDevice::SetRemoteStationManager ( const Ptr< WifiRemoteStationManager manager)
Then I click on WifiRemoteStationManager but there is nothing useful there either.
Where am I suppose to look for names of attributes for setRemoteStationManage? what are their default values? From which values I can choose?

How is this possible? Why is it so hard to find information? Why was this not explained anywhere?

Adil Alsuhaim

unread,
Jun 16, 2019, 1:24:01 AM6/16/19
to ns-3-users
I am not sure about buildings. Generally speaking, ns3 classes has "GetTypeId" function in which "attributes" and "trace sources" are defined. Here's an example from WifiPhy's GetTypeId (in the file wifi-phy.cc)

    .AddAttribute ("GuardInterval",
                   
"Whether 800ns, 1600ns or 3200ns guard interval is used for HE transmissions."
                   
"This parameter is only valuable for 802.11ax STAs and APs.",
                   
TimeValue (NanoSeconds (3200)),
                   
MakeTimeAccessor (&WifiPhy::GetGuardInterval,
                                     
&WifiPhy::SetGuardInterval),

As you can see, the default value for guard interval is 3200 nanoseconds, and the attribute is called "GuardInterval" and it can be accessed in a variety of ways. You can use Config::SetDefault, to set the default value before you create any object that contains something of that type. You pass SetDefault the resource name (or path) and the value is of a type that is a subclass of ns3::AttributeValue (in this example TimeValue). You can also set the values of attributes after you create objects using Set function with the path to the resource. The path can provide some convenience for more information on how to use attributes, take a look at this https://www.nsnam.org/docs/manual/html/attributes.html

All attributes and trace sources are inherited by the subclasses, so subclasses cannot define an attribute with the same name as in the base class. You can find a list of all attributes and trace sources in ns3 documentation page. 

The attributes defined in "GetTypeId" functions are useful for object creation using ns3::ObjectFactory. If you're familiar with the "Factory" design pattern in object-oriented programming, ObjectFactory is somewhat similar. It allows you to set an object's values/attribute before actually creating it. I believe all ns3 Helpers use ObjectFactory to create objects.

The SetRemoteStationManager function in WifiHelper basically sets attributes values for the ObjectFactory before the object is constructed. A general example of using ObjectFactory

ObjectFactory fact;
fact
.SetTypeId("ns3::ConstantRateWifiManager"); //Type of object to create. You can also pass it ConstantRateWifiManager::GetTypeId(), but WifiHelper uses string value.
fact
.Set ("DataMode",StringValue("OfdmaRate12Mbps")); //"DataMode" is an attribute in ConstantRateWifiManager
Ptr<WifiRemoteStationManager> manager = fact.Create<WifiRemoteStationManager> ();


So, the WifiHelper (and Helper classes in ns3 in general uses something like that).

WifiHelper helper;
helper
.SetRemoteStationManager ("ns3::ConstantRateWifiManager", StringValue("DataMode"), StringValue("OfdmaRate12Mbps") , "ControlMode", StringValue("OfdmaRate27Mbps") , "MaxSsrc", UintegerValue(10));


Then when you call the "Install" function, it will construct the object with these attributes and call the "Create" function. 

Nina

unread,
Jun 23, 2019, 2:54:10 PM6/23/19
to ns-3-users
Thank you Adil for your extensive reply. You have helped me wifi defaults  and attributes :) I still think there should be more instructions on which files to look based on what you need changed.

Jan Lühr

unread,
Jun 25, 2019, 4:36:31 AM6/25/19
to ns-3-...@googlegroups.com
Hello,


Am 15/06/2019 um 15.06 schrieb Nina:
> Hello,
>
> can someone please tell me where can I find default values for various
> wifi standards? And where can I find files in which different modules
> are defined (propagation, building)? For example, description of the
> buildings - how are office and residential buildings defined and what is
> the difference?

That's difficult. For me it feels like ns-3 is a executable compilation
of research work glued together - it's a good one, though.

Papers are sometimes linked in the documentation (doxygen); additional
models available in ns-3's app store.

I guess, that digging to these papers is the way to go when you want to
have more details on the models.

> I have found folders for various modules in ns-3/src folder but I don't
> know which files to look at and which ones to change. For example, I
> open buildings/model folder but none of the files (building,
> building-list) contain any description of specific type of buildings. I
> have found in itur1238-propagation-loss-model a specific formula by
> which the loss is calculated and I think that is the only thing I could
> find by myself to change.

That's challenging. ns-3 is not a spectrum simulator - although there's
some work on buildings blocking / shadowing certain areas.

Ns-3 is a packet simulator, signal propagation models commonly boil down
to a mathematical formula, modeling the probability of receiving a
packet successfully.

IMHO there is some work going on on more specific models (including
raytracing) and / or using matlab models (co-simulation), but usually
these models take more time and effort to compute making them not-suited
for mainstream.

> Another example - I want to see default value for guard interval in wifi
> ax standard. I set this variable using Yans wifi phy helper so I search
> src/wifi/model files yans-wifi-phy, yans-wifi-channel, , I search
> src/wifi/helper file yans-wifi-helper and I find nothing. In wifi-helper
> file I found some values for GI and channel width but they are only
> being compared for what I think is generating pcap file.
>
> So, can someone please give me some general instructions:
>
> 1. on finding specific information in src files and
> 2.which files to look at when I need something changed?

That's impossible to answer.

It has an easier part:
Usually, my way to go is either enabling logging
(https://www.nsnam.org/docs/manual/html/logging.html) for many - if not
all - components and looking for strings using grep - or - Digging
through the object model in runtime (e.g. using eclipse in debug mode).

Logging is best, if you want to understand what files / components are
related to something, while I like debugging to understand the
implementation details.

And a harder part:
Some values are used implicitly by the underlying models. E.g. 802.11n's
doppler model assumes an effective velocity up to 40 km/h - but this is
not modeled in ns-3 and it's easy to have a station moving faster.

IMO this boils down to:
IMHO the way to go is getting familiar with the wifi standard (i.e.
802.11) to understand what ns-3 is actually doing and what assumptions.


> I have read tutorial, model library (completely) and doxygen (on a need
> basis) and could not find any answers there. I have started reading
> manual as well but I don't think it helps me with using the simulator.

Use the source, Luke ... ehh Nina ;-).

Greetz, Jan

Tom Henderson

unread,
Jun 25, 2019, 9:48:03 AM6/25/19
to ns-3-...@googlegroups.com
On 6/15/19 6:06 AM, Nina wrote:
Hello,

can someone please tell me where can I find default values for various wifi standards? And where can I find files in which different modules are defined (propagation, building)? For example, description of the buildings - how are office and residential buildings defined and what is the difference?


Hello Nina, you make a good point that there isn't a straightforward way to dump all of these values in our example programs.

I suggest that you have a look at the config-store module.  There is an example at src/config-store/examples/config-store-save.cc.

Specifically, if you include the config-store-module.h header, and add these lines to your program just before Simulator::Run(), as in the example:

  // Output config store to txt format
  Config::SetDefault ("ns3::ConfigStore::Filename", StringValue ("output-attributes.txt"));
  Config::SetDefault ("ns3::ConfigStore::FileFormat", StringValue ("RawText"));
  Config::SetDefault ("ns3::ConfigStore::Mode", StringValue ("Save"));
  ConfigStore outputConfig2;
  outputConfig2.ConfigureDefaults ();
  outputConfig2.ConfigureAttributes ();

your program will then dump all of the default values and all of the per-object attribute values in effect, and you can read this 'output-attributes.txt' file.

In the long run, I will add this kind of capability to our 'project ideas' list.


I have found folders for various modules in ns-3/src folder but I don't know which files to look at and which ones to change. For example, I open buildings/model folder but none of the files (building, building-list) contain any description of specific type of buildings. I have found in itur1238-propagation-loss-model a specific formula by which the loss is calculated and I think that is the only thing I could find by myself to change.

Another example - I want to see default value for guard interval in wifi ax standard. I set this variable using Yans wifi phy helper so I search src/wifi/model files yans-wifi-phy, yans-wifi-channel, , I search src/wifi/helper file yans-wifi-helper and I find nothing. In wifi-helper file I found some values for GI and channel width but they are only being compared for what I think is generating pcap file.

So, can someone please give me some general instructions:

1. on finding specific information in src files and
2.which files to look at when I need something changed?

You need to search for strings in either the online Doxygen documentation (which has a powerful search capability, cross-referenced with the source code), or, when using the Bash shell, using a string search on the source code, such as:

$ find . -name "*.h" | xargs grep 'ItuR1238'

- Tom


I have read tutorial, model library (completely) and doxygen (on a need basis) and could not find any answers there. I have started reading manual as well but I don't think it helps me with using the simulator.

Regards
Nina
--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at https://groups.google.com/group/ns-3-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/2086ef42-cc0c-4b91-877e-0d23f3617ba4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Nina

unread,
Jul 7, 2019, 6:53:47 PM7/7/19
to ns-3-users
I think ns-3 should have more extensive tutorial, especially regarding it's syntax. I had no trouble learning c++ from it's manual but I have so much trouble with ns-3 that I am mostly using just examples and kind of putting pieces of them together to create a functioning simulation. But maybe it is just me.
Thank you for replying Jan, I will use the source :)

Nina

unread,
Jul 7, 2019, 6:59:01 PM7/7/19
to ns-3-users
Thank you for replying Tom. Now that you have mentioned doxygen search - I have just searched for ObssPdAlgorithm and is it possible it has not been added? I have posted a new topic regarding this.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages