|
ns-3
|
Determine which packets are errored corresponding to an underlying distribution, rate, and unit. More...
#include <error-model.h>


Public Types | |
| enum | ErrorUnit { ERROR_UNIT_BIT, ERROR_UNIT_BYTE, ERROR_UNIT_PACKET } |
Public Member Functions | |
| RateErrorModel::ErrorUnit | GetUnit (void) const |
| void | SetUnit (enum ErrorUnit error_unit) |
| double | GetRate (void) const |
| void | SetRate (double rate) |
| void | SetRandomVariable (const RandomVariable &ranvar) |
Public Member Functions inherited from ns3::ErrorModel | |
| bool | IsCorrupt (Ptr< Packet > pkt) |
| void | Reset (void) |
| void | Enable (void) |
| void | Disable (void) |
| bool | IsEnabled (void) const |
Public Member Functions inherited from ns3::Object | |
| virtual TypeId | GetInstanceTypeId (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (void) const |
| template<typename T > | |
| Ptr< T > | GetObject (TypeId tid) const |
| void | Dispose (void) |
| void | AggregateObject (Ptr< Object > other) |
| AggregateIterator | GetAggregateIterator (void) const |
| void | Start (void) |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
| SimpleRefCount (const SimpleRefCount &o) | |
| SimpleRefCount & | operator= (const SimpleRefCount &o) |
| void | Ref (void) const |
| void | Unref (void) const |
| uint32_t | GetReferenceCount (void) const |
Public Member Functions inherited from ns3::ObjectBase | |
| void | SetAttribute (std::string name, const AttributeValue &value) |
| bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
| void | GetAttribute (std::string name, AttributeValue &value) const |
| bool | GetAttributeFailSafe (std::string name, AttributeValue &attribute) const |
| bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
| bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
| bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Static Public Member Functions | |
| static TypeId | GetTypeId (void) |
| This method returns the TypeId associated to ns3::RateErrorModel. | |
Determine which packets are errored corresponding to an underlying distribution, rate, and unit.
This object is used to flag packets as being lost/errored or not. The two parameters that govern the behavior are the rate (or equivalently, the mean duration/spacing between errors), and the unit (which may be per-bit, per-byte, and per-packet). Users can optionally provide a RandomVariable object; the default is to use a Uniform(0,1) distribution.
Reset() on this model will do nothing
IsCorrupt() will not modify the packet data buffer
| double ns3::RateErrorModel::GetRate | ( | void | ) | const |
References NS_LOG_FUNCTION_NOARGS.
|
static |
This method returns the TypeId associated to ns3::RateErrorModel.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::ErrorModel:
No TraceSources defined for this type.
Reimplemented from ns3::ErrorModel.
References ns3::TypeId::SetParent().
| RateErrorModel::ErrorUnit ns3::RateErrorModel::GetUnit | ( | void | ) | const |
References NS_LOG_FUNCTION_NOARGS.
| void ns3::RateErrorModel::SetRandomVariable | ( | const RandomVariable & | ranvar | ) |
| ranvar | A random variable distribution to generate random variates |
References NS_LOG_FUNCTION_NOARGS.
| void ns3::RateErrorModel::SetRate | ( | double | rate | ) |
| rate | the error rate to be used by the model |
References NS_LOG_FUNCTION_NOARGS.
| void ns3::RateErrorModel::SetUnit | ( | enum ErrorUnit | error_unit | ) |
| error_unit | the ErrorUnit to be used by the underlying model |
References NS_LOG_FUNCTION_NOARGS.