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

EvSim Class Reference

#include <ev.h>

List of all members.

Public Member Functions

 EvSim (void)
virtual ~EvSim (void)
timeunits CurrentTime (void) const
void Run (timeunits from=0, timeunits to=MAXTIME)
void Schedule (Event *e, bool fifo=true)
void dumpStats (void)


Detailed Description

Event simulator container.


Constructor & Destructor Documentation

EvSim::EvSim void   )  [inline]
 

Constructor. Creates an event simulator object

EvSim::~EvSim void   )  [virtual]
 

Destroys the object and dumps some simulator statistics.


Member Function Documentation

timeunits EvSim::CurrentTime void   )  const [inline]
 

Get current simulated time

Returns:
current time in timeunits (seconds, tics...)

void EvSim::dumpStats void   ) 
 

Dumps simulation-related statistics. These include number of events, time of the last event, event rate... This function is automatically called by the destructor, so you do not need to call it directly.

void EvSim::Run timeunits  from = 0,
timeunits  to = MAXTIME
 

Start the simulator scheduler and start processing events from initial time t final time.

Parameters:
from initial time, defaults to 0
to final time, defaults to MAXTIME

void EvSim::Schedule Event e,
bool  fifo = true
 

Enqueue an event to occur in the future. If more than one event has to occur at the same time, enqueue it either in FIFO order or in LIFO order.

Parameters:
e pointer to the event to enqueue
fifo enqueueing tiebreaker


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