DataRate values

112 views
Skip to first unread message

Con con

unread,
May 15, 2019, 12:12:32 PM5/15/19
to ns-3-users
Hello I have created a module of multiple wifi nodes and access points. Everything works well however when a change the data rate changes the Throughput per node(station)
onoff.SetConstantRate(DataRate("54Mb/s"), packetSize);
What is the datarate used for ? How this affect the results ?

Con con

unread,
May 17, 2019, 3:04:18 AM5/17/19
to ns-3-users
It seems that nobody knows the answer or ns3 is not supported anymore by group

Noel Farrugia

unread,
May 18, 2019, 4:36:03 AM5/18/19
to ns-3-users
The Data Rate is the Data Rate the On Off application is transmitting at.

Con con

unread,
May 20, 2019, 4:32:31 PM5/20/19
to ns-3-users
How this effect the throughput and what is the optimal value ?

liangcheng yu

unread,
May 23, 2019, 12:07:21 PM5/23/19
to ns-3-users
Hi, 

DataRate attribute for OnOff Application refers to the DataRate during the OnTime of the application. You will find the details at the OnOffApplication class (src/applications/model/onoff-application.cc) attribute:
.AddAttribute ("DataRate", "The data rate in on state.",
DataRateValue (DataRate ("500kb/s")),
MakeDataRateAccessor (&OnOffApplication::m_cbrRate),
MakeDataRateChecker ())
As well as we the calculation of the next scheduling event time in the same class in the following method:
void OnOffApplication::ScheduleNextTx ()

The throughput of the node refers to the number of bytes per unit of time transmitted by the node in your case.
In this case, it will be equal to the DataRate you set for the Application at the same plus the packet header cost (TCP/UDP header, IP header) due to the encapsulation, if you assume that only one application is running at a time.

The optimal value depends on your definition of optimality. To set the value, you might need to consider the objective of your simulation, as an example, if you want to simulate a congested link w.r.t. certain network utilization, you could calculate the target DataRate to be set based on your simulation target.

Hope it helps!

在 2019年5月21日星期二 UTC+8上午4:32:31,Con con写道:

Con con

unread,
May 23, 2019, 2:11:00 PM5/23/19
to ns-3-users
Hello yu,
Thanks for your answer. Very helpful. From what I understand the datarate depends on which type of traffic I would like to simulate for example http browsing, voip call, video streaming etc.. 
According to what you have written " if you assume that only one application is running at a time." I would like to ask if onoff-application is possible for all applications to trasmit/receive at the same time to find out how interference effects the throughput, that is my scope, to detect how interference affect the throughput in specific simulation.
thanks again. 
Reply all
Reply to author
Forward
0 new messages