class <ErrorModel> ErrorModel : public Connector

Basic object for error models

Inheritance:


Public Methods

virtual int corrupt(Packet*)
ErrorModel()
inline double rate()
virtual void recv(Packet*, Handler*)
virtual void reset()
inline ErrorUnit unit()

Protected Fields

double bandwidth_
bandwidth of the link
int enable_
true if this error module is turned on
int firstTime_
to not corrupt first packet in byte model
Event intr_
set callback to queue
int markecn_
mark ecn instead of dropping on corruption?
RandomVariable* ranvar_
the underlying random variate generator
double rate_
uniform error rate in pkt or byte
ErrorUnit unit_
error unit in pkts, bytes, or time

Protected Methods

virtual int command(int argc, const char*const* argv)
int CorruptByte(Packet*)
int CorruptPkt(Packet*)
int CorruptTime(Packet*)
double PktLength(Packet*)

Inherited from Connector:

Public Methods

virtual void drop(Packet* p)
inline NsObject* target()

Protected Fields

NsObject* drop_
NsObject* target_

Protected Methods

virtual void drop(Packet* p, const char *s)
inline void send(Packet* p, Handler* h)

Inherited from NsObject:

Public Methods

virtual void debug(const char *fmt, ...)
virtual int delay_bind_dispatch(const char *varName, const char *localName, TclObject *tracer)
virtual void delay_bind_init_all()
int isdebug()

Protected Fields

int debug_
int off_cmn_
int off_flags_

Protected Methods

void handle(Event*)

Inherited from Handler:


Documentation

Basic object for error models. This can be used unchanged by error models that are characterized by a single parameter, the rate of errors (or equivalently, the mean duration/spacing between errors). Currently, this includes the uniform and exponentially-distributed models.
ErrorModel()

virtual void recv(Packet*, Handler*)

virtual void reset()

virtual int corrupt(Packet*)

inline double rate()

inline ErrorUnit unit()

virtual int command(int argc, const char*const* argv)

int CorruptPkt(Packet*)

int CorruptTime(Packet*)

int CorruptByte(Packet*)

double PktLength(Packet*)

int enable_
true if this error module is turned on

int markecn_
mark ecn instead of dropping on corruption?

int firstTime_
to not corrupt first packet in byte model

ErrorUnit unit_
error unit in pkts, bytes, or time

double rate_
uniform error rate in pkt or byte

double bandwidth_
bandwidth of the link

RandomVariable* ranvar_
the underlying random variate generator

Event intr_
set callback to queue


Direct child classes:
ErrorModel/Uniform
TwoStateErrorModel
TraceErrorModel
SelectErrorModel
PeriodicErrorModel
MultiStateErrorModel
ListErrorModel

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

Adapted for the NS documentation page

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de