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

PacketSource Class Reference

#include <netelem.h>

Inheritance diagram for PacketSource:

NetElement BiStateSource VoiceTraceFileSource List of all members.

Public Member Functions

 PacketSource (Distrib *interarrival, Distrib *service)
virtual void Start (timeunits now)
void Reset (bool dump=false)
void AccumDelay (timeunits t)
PacketSource * AddHop (NetElement *ne)
NetElement * GetNextHop (unsigned int index) const

Protected Attributes

unsigned long int numPackets_

Detailed Description

Packet source generates packets according to a given distribution with sizes following a (second) given distribution


Constructor & Destructor Documentation

PacketSource::PacketSource (  Distrib *  interarrival,
Distrib *  service
) 
 

Creates a PacketSource.

Parameters:
interarrival pointer to a distribution that describes the interarrival process between packets (in timeunits)
service pointer to a distribution that describes the packet sizes (in bits)


Member Function Documentation

void PacketSource::AccumDelay (  timeunits  t  ) 
 

Access to the packet delay statistical collector. This function is called by the cooresponding SrcSink NetElement, if any.

Parameters:
t value to account for.

PacketSource * PacketSource::AddHop (  NetElement *  ne  ) 
 

Succesive calls allow to build-up routes from the source NetElement to the destination NetElement.

Parameters:
ne pointer to the NetElement to append to the end of the current route.
Returns:
this.

NetElement* PacketSource::GetNextHop (  unsigned int  index  )  const [inline]
 

Allows to get the a given NetElement in the route.

Parameters:
index ordinal of the NetElement to retrieve.
Returns:
pointer to the next NetElement, or 0 if at the end of the route.

void PacketSource::Reset (  bool  dump = false  )  [virtual]
 

Resets interarrival and packet delay statistics.

Implements NetElement.

void PacketSource::Start (  timeunits  now  )  [virtual]
 

Starts the source

Parameters:
now time to start generating packets.

Reimplemented in BiStateSource, and VoiceTraceFileSource.


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