hades.simulator
Class SimEvent

java.lang.Object
  extended byhades.simulator.SimEvent
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
SignalEvent, SimEvent1164, SimulatorInterruptEvent, WakeupEvent

public class SimEvent
extends java.lang.Object
implements java.io.Serializable

SimEvent - the basic Hades simulation event. If possible, use one of the createNewSimEvent() methods instead of calling the constructors directly, to allow for efficient SimEvent recycling.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object arg
           
static boolean enable_recycling
           
protected  long id
           
protected  java.lang.Object source
           
static int STACK_SIZE
           
protected  Simulatable target
           
protected  Port targetPort
           
protected  double time
           
 
Constructor Summary
SimEvent()
           
SimEvent(Simulatable target, double time, java.lang.Object arg)
           
SimEvent(Simulatable target, double time, java.lang.Object arg, java.lang.Object source)
           
 
Method Summary
static SimEvent createNewSimEvent(Simulatable target, double time, java.lang.Object arg)
           
static SimEvent createNewSimEvent(Simulatable target, double time, java.lang.Object arg, java.lang.Object source)
           
 void evaluate()
          evaluate (execute) this event
 java.lang.Object getArg()
          return the object 'arg' of this SimEvent
static boolean getDebug()
           
static long getNumberOfAvailableRecycledSimEvents()
           
static long getNumberOfRecycledSimEvents()
           
static long getNumberOfSimEvents()
           
 java.lang.Object getSource()
          return the object 'arg' of this SimEvent
 Port getTargetPort()
           
 double getTime()
          return the simulation time this event will occur
 void recycle()
           
static void setDebug(boolean d)
           
 void setTargetPort(Port p)
           
 java.lang.String toShortString()
          construct a one-line description for this Event, starting with nicely formatted event time.
 java.lang.String toString()
          toString() - the usual info method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

enable_recycling

public static boolean enable_recycling

source

protected java.lang.Object source

time

protected double time

arg

protected java.lang.Object arg

target

protected Simulatable target

targetPort

protected Port targetPort

id

protected long id

STACK_SIZE

public static int STACK_SIZE
Constructor Detail

SimEvent

public SimEvent()

SimEvent

public SimEvent(Simulatable target,
                double time,
                java.lang.Object arg)

SimEvent

public SimEvent(Simulatable target,
                double time,
                java.lang.Object arg,
                java.lang.Object source)
Method Detail

createNewSimEvent

public static SimEvent createNewSimEvent(Simulatable target,
                                         double time,
                                         java.lang.Object arg)

createNewSimEvent

public static SimEvent createNewSimEvent(Simulatable target,
                                         double time,
                                         java.lang.Object arg,
                                         java.lang.Object source)

recycle

public void recycle()

setDebug

public static void setDebug(boolean d)

getDebug

public static boolean getDebug()

getTime

public final double getTime()
return the simulation time this event will occur


getArg

public final java.lang.Object getArg()
return the object 'arg' of this SimEvent


getSource

public final java.lang.Object getSource()
return the object 'arg' of this SimEvent


setTargetPort

public void setTargetPort(Port p)

getTargetPort

public Port getTargetPort()

evaluate

public void evaluate()
evaluate (execute) this event


getNumberOfAvailableRecycledSimEvents

public static long getNumberOfAvailableRecycledSimEvents()

getNumberOfRecycledSimEvents

public static long getNumberOfRecycledSimEvents()

getNumberOfSimEvents

public static long getNumberOfSimEvents()

toShortString

public java.lang.String toShortString()
construct a one-line description for this Event, starting with nicely formatted event time.


toString

public java.lang.String toString()
toString() - the usual info method