How to call the classes ns3::Txop and ns3::QosTxop on a simulation file?

73 views
Skip to first unread message

Shey Janota

unread,
Mar 16, 2022, 3:13:36 PM3/16/22
to ns-3-...@googlegroups.com
Hello everyone,
Hope everyone is doing fine.

In Class  ns3::Txop (https://www.nsnam.org/doxygen/txop_8cc_source.html) there are some important functions such as GetCw, GetMinCw, GetMaxCw, and I would like to call those functions in my simulation file.
My question is, how do I reference the ns3::Txop class on a simulation file to get the following functions [GetCw, GetMinCw, GetMaxCw], later I would like to print this information on the terminal.

Can someone help me, please!

 
Best regards

Sheila Janota

Tom Henderson

unread,
Mar 16, 2022, 4:02:41 PM3/16/22
to ns-3-...@googlegroups.com
These objects are not really designed to be handled directly by user
programs; instead, there are trace sources available to allow user
programs to be notified of the changes to these values.

Specifically, the CW and Backoff values are exported as traces. MinCw
and MaxCw are attributes, usually a constant in a simulation, and
default values can just be read from the txop.cc source file (they
default to 15 and 1023, respectively).

https://www.nsnam.org/docs/doxygen/classns3_1_1_txop.html#details

For an example program of how they are used, see
src/wifi/examples/wifi-bianchi.cc

Shey Janota

unread,
Mar 16, 2022, 4:58:05 PM3/16/22
to ns-3-...@googlegroups.com
Hi Tom,

Thanks very much. I will take a look at the links you sent. 

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/959f8502-9f6d-b499-9d8f-0c42e00fae7a%40tomh.org.

Soulimane Mammar

unread,
Mar 17, 2022, 1:38:33 AM3/17/22
to ns-3-users
Txop and QoSTxop are used by the different wifi mac implementations, the channel access manager and the maclow (in case you are using a version of ns3 prior to 3-34) and are not meant to be used in a simulation script.
However you have access through the config system to some attributes MinCw, MaxCW, Aifsn, TxopLimit if you want to change their default values
Regards


Reply all
Reply to author
Forward
0 new messages