Tutorial question

116 views
Skip to first unread message

Ricardo

unread,
Jun 9, 2015, 8:51:24 PM6/9/15
to ns-3-...@googlegroups.com
Hi, 

I followed this tutorial http://personal.ee.surrey.ac.uk/Personal/K.Katsaros/ns-3-workshop-part1.html#solved5, I have a question about two lines of the code (complete code here).

These are the lines: 

  // turn off RTS/CTS for frames below 2200 bytes
  Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (rtslimit));
  // Fix non-unicast data rate to be the same as that of unicast
  Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue (phyMode));


On the first (non comment) line, about the RTS and CTS, according to what I read, and if I understood correctly, if the total value of the packet (data + headers + trailers) surpasses the value rtslimit then RTS is transmitted. (And then waits for a CTS to transmit the data packet).

But what I don't understand is:
  1. What is a WifiRemoteStationManager?
  2. Bassically the second (non comment) line of the code. I don't get what it is used for.
Thanks.






pdbarnes

unread,
Jun 9, 2015, 10:55:06 PM6/9/15
to ns-3-...@googlegroups.com
Search the API docs. They will show you what it is, what it does, and even the source code!
Peter

Ricardo

unread,
Jun 9, 2015, 11:51:12 PM6/9/15
to ns-3-...@googlegroups.com

Tom Henderson

unread,
Jun 10, 2015, 12:43:49 AM6/10/15
to ns-3-...@googlegroups.com
On 06/09/2015 05:51 PM, Ricardo wrote:
> Hi,
>
> I followed this tutorial
> http://personal.ee.surrey.ac.uk/Personal/K.Katsaros/ns-3-workshop-part1.html#solved5, I
> have a question about two lines of the code (complete code here
> <http://personal.ee.surrey.ac.uk/Personal/K.Katsaros/media/ns3lab-sol/lab-5-solved.cc>).
>
> These are the lines:
>
> // turn off RTS/CTS for frames below 2200 bytes
> Config::SetDefault ("ns3::WifiRemoteStationManager::RtsCtsThreshold", StringValue (rtslimit));
> // Fix non-unicast data rate to be the same as that of unicast
> Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue (phyMode));
>
>
>
> On the first (non comment) line, about the RTS and CTS, according to
> what I read, and if I understood correctly, if the total value of the
> packet (data + headers + trailers) surpasses the value rtslimit then RTS
> is transmitted. (And then waits for a CTS to transmit the data packet).
>
> But what I don't understand is:
>
> 1. What is a WifiRemoteStationManager?

An object that holds the per-station state (such as whether it has HT
capabilities, what modes it supports) of the remote station. It is
responsible for holding state about fragmentation and RTS thresholds.
Also, rate control algorithms such as Minstrel are implemented as child
classes of the parent WifiRemoteStationManager class.

> 2. Bassically the second (non comment) line of the code. I don't get
> what it is used for.
>

Frames can be unicast or non-unicast (e.g. group address). It may be
the case that non-unicast frames, since they need to reach multiple
stations, may need to use a more robust (i.e. lower) data rate than the
mode used to send unicast to one or more (possibly close by) stations.
This attribute allows the user to specify the mode that is used when
sending non-unicast frames.

- Tom

Ricardo

unread,
Jun 10, 2015, 5:42:23 PM6/10/15
to ns-3-...@googlegroups.com
Thanks a lot Tom. I understand now.

I have one more related question though.

In the same example code (here), it uses the 802.11b protocol along the following line of code:

Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode", StringValue (phyMode));

Using the WAVE examples included in NS-3 I changed the protocol to 802.11p. With the previous line of code the nodes send but can't receive the transmissions, but without the line everything works just fine. Does someone knows why this happens?

Thanks.

Tom Henderson

unread,
Jun 11, 2015, 12:48:49 AM6/11/15
to ns-3-...@googlegroups.com
On 06/10/2015 02:42 PM, Ricardo wrote:
> Thanks a lot Tom. I understand now.
>
> I have one more related question though.
>
> In the same example code (here
> <http://personal.ee.surrey.ac.uk/Personal/K.Katsaros/media/ns3lab-sol/lab-5-solved.cc>),
> it uses the 802.11b protocol along the following line of code:
>
> Config::SetDefault ("ns3::WifiRemoteStationManager::NonUnicastMode",
> StringValue (phyMode));
>
>
> Using the WAVE examples included in NS-3 I changed the protocol to
> 802.11p. With the previous line of code the nodes send but can't receive
> the transmissions, but without the line everything works just fine. Does
> someone knows why this happens?
>
> Thanks.

Are you using a Phy mode that is compatible with 802.11p (an OFDM mode)?

More generally, when you observe that things stop happening, you may
want to consider enabling some logging of the protocol objects involved,
to see if the log messages give you a clue:
https://www.nsnam.org/docs/release/3.23/manual/html/logging.html#

- Tom

Reply all
Reply to author
Forward
0 new messages