67 #include "ns3/object.h" 
   68 #include "ns3/random-variable-stream.h" 
  162   virtual void DoReset (
void) = 0;
 
  393   std::list<uint32_t> 
GetList (
void) 
const;
 
  399   void SetList (
const std::list<uint32_t> &packetlist);
 
  440   std::list<uint32_t> 
GetList (
void) 
const;
 
  446   void SetList (
const std::list<uint32_t> &packetlist);
 
bool m_enable
True if the error model is enabled. 
virtual void DoReset(void)
Re-initialize any state. 
void SetRandomBurstSize(Ptr< RandomVariableStream > burstSz)
virtual bool DoCorrupt(Ptr< Packet > p)=0
Corrupt a packet according to the specified model. 
std::list< uint32_t > GetList(void) const 
PacketList m_packetList
container of sequence number of packets to corrupt 
std::list< uint32_t > GetList(void) const 
static TypeId GetTypeId(void)
Get the type ID. 
PacketList m_packetList
container of Uid of packets to corrupt 
General error model that can be used to corrupt packets. 
virtual void DoReset(void)
Re-initialize any state. 
virtual void DoReset(void)=0
Re-initialize any state. 
static TypeId GetTypeId(void)
Get the type ID. 
virtual ~ReceiveListErrorModel()
virtual ~RateErrorModel()
std::list< uint32_t >::const_iterator PacketListCI
Typedef: packet sequence number list const iterator. 
bool IsEnabled(void) const 
virtual bool DoCorruptBit(Ptr< Packet > p)
Corrupt a packet (bit unit). 
Ptr< RandomVariableStream > m_burstStart
the error decision variable 
std::list< uint32_t > PacketList
Typedef: packet Uid list. 
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
void SetRate(double rate)
Ptr< RandomVariableStream > m_burstSize
the number of packets being flagged as errored 
Provide a list of Packet uids to corrupt. 
virtual bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model. 
enum ErrorUnit m_unit
Error rate unit. 
virtual void DoReset(void)
Re-initialize any state. 
virtual bool DoCorruptByte(Ptr< Packet > p)
Corrupt a packet (Byte unit). 
Ptr< RandomVariableStream > m_ranvar
rng stream 
uint32_t m_counter
keep track of the number of packets being errored until it reaches m_burstSize 
void Disable(void)
Disable the error model. 
virtual bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model. 
virtual ~BurstErrorModel()
uint32_t m_timesInvoked
number of times the error model has been invoked 
virtual ~ListErrorModel()
double GetRate(void) const 
static TypeId GetTypeId(void)
Get the type ID. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
virtual bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model. 
void SetRandomVariable(Ptr< RandomVariableStream > ranVar)
void SetList(const std::list< uint32_t > &packetlist)
void Reset(void)
Reset any state associated with the error model. 
virtual void DoReset(void)
Re-initialize any state. 
void SetUnit(enum ErrorUnit error_unit)
static TypeId GetTypeId(void)
Get the type ID. 
double GetBurstRate(void) const 
virtual bool DoCorrupt(Ptr< Packet > p)
Corrupt a packet according to the specified model. 
virtual bool DoCorruptPkt(Ptr< Packet > p)
Corrupt a packet (packet unit). 
Determine which bursts of packets are errored corresponding to an underlying distribution, burst rate, and burst size. 
uint32_t m_currentBurstSz
the current burst size 
Provide a list of Packets to corrupt. 
std::list< uint32_t > PacketList
Typedef: packet sequence number list. 
bool IsCorrupt(Ptr< Packet > pkt)
Note: Depending on the error model, this function may or may not alter the contents of the packet upo...
void SetList(const std::list< uint32_t > &packetlist)
void SetRandomVariable(Ptr< RandomVariableStream >)
std::list< uint32_t >::const_iterator PacketListCI
Typedef: packet Uid list const iterator. 
double m_burstRate
the burst error event 
static TypeId GetTypeId(void)
Get the type ID. 
int64_t AssignStreams(int64_t stream)
Assign a fixed random variable stream number to the random variables used by this model...
A base class which provides memory management and object aggregation. 
Determine which packets are errored corresponding to an underlying distribution, rate, and unit. 
RateErrorModel::ErrorUnit GetUnit(void) const 
a unique identifier for an interface. 
void SetBurstRate(double rate)
void Enable(void)
Enable the error model.