Main Page | Class Hierarchy | Class List | Directories | Class Members

MntRTPDropper Class Reference

This component receives MntData objects, and randomly drops the objects. More...

#include <mnt_rtp_dropper.h>

Inheritance diagram for MntRTPDropper:

MntComponent List of all members.

Public Member Functions

 MntRTPDropper (float p, float q, int seed)
 Construct a new MntRTPDropper object in good state.
virtual void recv (MntData *data)
 Receive some data, and push the data to subsequent components iff this component is in a good state.

Private Attributes

int curr_state_
float good_to_bad_prob_
float bad_to_good_prob_

Static Private Attributes

static int GOOD_STATE = 1
static int BAD_STATE = 0

Detailed Description

This component receives MntData objects, and randomly drops the objects.

Objects that are not dropped are pushed to subsequent components.

The dropping is done according to a two-state Gilbert model. When the current state is GOOD_STATE, the received object is not dropped. If the current state is BAD_STATE, the received object is dropped. The state switches randomly everytime a packet is received according to two probability values (good-to-bad probability and bad-to-good probability).


Constructor & Destructor Documentation

MntRTPDropper::MntRTPDropper float  p,
float  q,
int  seed
 

Construct a new MntRTPDropper object in good state.

Parameters:
p The good-to-bad probability.
q The bad-to-good probability.
seed The seed to be used for random number generator.


Member Function Documentation

void MntRTPDropper::recv MntData data  )  [virtual]
 

Receive some data, and push the data to subsequent components iff this component is in a good state.

This object then checks if it should switch state according to the given probability.

Reimplemented from MntComponent.


Member Data Documentation

float MntRTPDropper::bad_to_good_prob_ [private]
 

The probability that the next state is good, given that the current state is bad

int MntRTPDropper::curr_state_ [private]
 

The current state this component is in

float MntRTPDropper::good_to_bad_prob_ [private]
 

The probability that the next state is bad, given that the current state is good


The documentation for this class was generated from the following files:
Generated on Wed Sep 14 12:37:13 2005 for mnt by  doxygen 1.4.4