[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ns] Units that should be used for "packetSize_" and "rate_" in EXPOO or CBR Traffic



Hello,

>From the code in EXPOO and CBR traffic, I see that in computing the
"interval_" for sending packets, the following equation is used:

interval_ = double(size_ << 3)/(double)rate_;

So does it assume that unit of "rate_" is always "kbps" (kilo-bits/sec)?
And the unit of "size_" is always "bits"?

According to the NS manual, the default unit of "packetSize_" is Byte.  So
does it mean that NS would automatically convert "Byte" to "bit" if the
following script is used (example from NS manual):

set e [new Application/Traffic/Exponential]
...
$e set packetSize_ 210
$e set rate_ 100k

Last question, would it do the conversion correctly for rate_ if i use "$e
set rate_ 1mb" (1Mbps)?  Can someone please clarify this?  Thank you very
much.

Wendy