|
|
| 27 |
#include "ns3/nstime.h" |
27 |
#include "ns3/nstime.h" |
| 28 |
#include "ns3/attribute.h" |
28 |
#include "ns3/attribute.h" |
| 29 |
#include "ns3/attribute-helper.h" |
29 |
#include "ns3/attribute-helper.h" |
|
|
30 |
#include "ns3/deprecated.h" |
| 30 |
|
31 |
|
| 31 |
namespace ns3 { |
32 |
namespace ns3 { |
| 32 |
|
33 |
|
|
|
| 42 |
* from strings, natural multiplication e.g.: |
43 |
* from strings, natural multiplication e.g.: |
| 43 |
* \code |
44 |
* \code |
| 44 |
* DataRate x("56kbps"); |
45 |
* DataRate x("56kbps"); |
| 45 |
* double nBits = x*ns3::Seconds(19.2); |
46 |
* double nBits = x*ns3::Seconds (19.2); |
| 46 |
* uint32_t nBytes = 20; |
47 |
* uint32_t nBytes = 20; |
| 47 |
* double txtime = x.CalclulateTxTime(nBytes); |
48 |
* Time txTime = x.CalclulateBytesTxTime (nBytes); |
| 48 |
* \endcode |
49 |
* \endcode |
| 49 |
* This class also supports the regular comparison operators <, >, <=, >=, ==, |
50 |
* This class also supports the regular comparison operators <, >, <=, >=, ==, |
| 50 |
* and != |
51 |
* and != |
|
|
| 148 |
* |
149 |
* |
| 149 |
* Calculates the transmission time at this data rate |
150 |
* Calculates the transmission time at this data rate |
| 150 |
* \param bytes The number of bytes (not bits) for which to calculate |
151 |
* \param bytes The number of bytes (not bits) for which to calculate |
|
|
152 |
* \return The transmission time for the number of bytes specified |
| 153 |
*/ |
| 154 |
Time CalculateBytesTxTime (uint32_t bytes) const; |
| 155 |
|
| 156 |
/** |
| 157 |
* \brief Calculate transmission time |
| 158 |
* |
| 159 |
* Calculates the transmission time at this data rate |
| 160 |
* \param bits The number of bits (not bytes) for which to calculate |
| 161 |
* \return The transmission time for the number of bits specified |
| 162 |
*/ |
| 163 |
Time CalculateBitsTxTime (uint32_t bits) const; |
| 164 |
|
| 165 |
/** |
| 166 |
* \brief Calculate transmission time |
| 167 |
* |
| 168 |
* Calculates the transmission time at this data rate |
| 169 |
* \param bytes The number of bytes (not bits) for which to calculate |
| 151 |
* \return The transmission time in seconds for the number of bytes specified |
170 |
* \return The transmission time in seconds for the number of bytes specified |
| 152 |
*/ |
171 |
*/ |
| 153 |
double CalculateTxTime (uint32_t bytes) const; |
172 |
double CalculateTxTime (uint32_t bytes) const NS_DEPRECATED; |
| 154 |
|
173 |
|
| 155 |
/** |
174 |
/** |
| 156 |
* Get the underlying bitrate |
175 |
* Get the underlying bitrate |