Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

Server Class Reference

#include <netelem.h>

Inheritance diagram for Server:

NetElement List of all members.

Public Member Functions

 Server (char *name, double rBin, int qsize=-1, timeunits delay=0, queuediscipline discipline=fifo, unsigned int mtu=0, double pebit=0)
virtual ~Server (void)
void Send (timeunits now, Packet *p)
void Recv (timeunits now, Packet *p)
void Reset (bool dump=false)

Detailed Description

Models a generic server or multiplexer connected to a transmission link.


Constructor & Destructor Documentation

Server::Server char *  name,
double  rBin,
int  qsize = -1,
timeunits  delay = 0,
queuediscipline  discipline = fifo,
unsigned int  mtu = 0,
double  pebit = 0
 

Constructor.

Parameters:
name identifies the server in the statistics dump.
rBin server capacity in bits/timeunit
qsize queue size in bits, 0 means no queue and -1 (default) means infinite.
delay additional propagation delay
discipline queueing discipline of the server
mtu maximum transfer unit. If the packet size is bigger, fragmentation will occur.
pebit transmission bit error probability

Server::~Server void   )  [virtual]
 

Dumps statistics on service time, time-averaged queue length, observed queue length, server occupancy, and packet loss ratio.


Member Function Documentation

void Server::Recv timeunits  now,
Packet p
[virtual]
 

Receives a packet from the upstream NetElement and either puts it in the server queue or starts transmiting it.

Parameters:
now current time
p pointer to the packet to be received

Implements NetElement.

void Server::Reset bool  dump = false  )  [virtual]
 

Resets server's statiscs.

Implements NetElement.

void Server::Send timeunits  now,
Packet p
[virtual]
 

Passes the packet to the next NetElement or NetElement.

Parameters:
now current time
p pointer to the packet to be received

Reimplemented from NetElement.


The documentation for this class was generated from the following files:
Generated on Fri Jan 19 15:35:17 2007 by  doxygen 1.4.2