J-Sim v1.2.1-p7 API

drcl.sim.event
Class SESimulatorOld

java.lang.Object
  extended bydrcl.DrclObj
      extended bydrcl.comp.ForkManager
          extended bydrcl.comp.ACARuntime
              extended bydrcl.sim.event.SESimulatorOld
All Implemented Interfaces:
java.lang.Cloneable, ObjectDuplicable, java.io.Serializable

public class SESimulatorOld
extends ACARuntime

This is the previous version of the sequential event simulation engine. Refer to SESimulator for the complete implementation.

See Also:
Serialized Form

Field Summary
protected  long ltime
           
protected  FIFOQueue qReady
          Used to store tasks.
protected  TreeMapQueue qWaiting
           
protected  long startTime
           
protected  double time
           
 
Fields inherited from class drcl.comp.ACARuntime
debug, DEFAULT_RUNTIME, logenabled, name, resetting, state, State_INACTIVE, State_RUNNING, State_SUSPENDED, tf, timeScale, timeScaleReciprocal, tr, vStateListener
 
Fields inherited from class drcl.comp.ForkManager
parent, runtime
 
Constructor Summary
SESimulatorOld()
           
SESimulatorOld(java.lang.String name_)
           
 
Method Summary
 void ___PROFILE___()
           
protected  double _getEventRate(long numArrivals_)
           
protected  double _getTime()
          Asynchronized version of getTime(), for diagnosis.
protected  void _stop(boolean block_)
           
 java.lang.String a_info(boolean listWaitingTasks_)
          Asynchronous version of ACARuntime.diag().
 void forceReset()
          Forces to reset this runtime.
 java.lang.Object getEventQueue()
           
 double getEventRate()
          Returns the event processing rate of this runtime.
 SEThreadOld getMainThread()
           
 long getNumberOfArrivalEvents()
          Returns the number of arrival events.
protected  WorkerThread getThread()
          Returns the current thread context.
 long getWallTimeElapsed()
          Returns the actual time (in ms) for which this runtime has participated.
 java.lang.String info()
          Returns general information of this runtime.
protected  void newTask(Task task_, WorkerThread currentThread_)
          The only way to trigger new tasks to be executed.
protected  void off(ACATimer handle_)
          Cancels a fork event.
 void println(java.lang.String msg_)
           
 void reset()
          The workerpool enters a transitional period when reset() is issued.
 void resume()
          Resumes the system.
 java.lang.String s_info()
           
protected  void setState(java.lang.String new_)
           
 java.lang.String ss_info()
          Synchronized version of s_info().
 java.lang.String t_info()
           
protected  java.lang.String t_info(java.lang.String prefix_)
           
 java.lang.String tasks()
          Returns information of the task queue.
 
Methods inherited from class drcl.comp.ACARuntime
_openlog, a_info, addDebugLevel, addRunnable, addRunnable, addRunnableAt, addRunnableAt, addStateListener, childManager, containsDebugLevel, debug_info, diag, diag, finalized, getAllDebugLevels, getAllStateListeners, getName, getParent, getState, getTime, getTimeScale, isDebugEnabled, isDebugEnabledAt, isIdle, isRunning, isStopped, isSuspended, notifyStateListeners, process, reboot, receive, receiveAt, removeDebugLevel, removeStateListener, resumeFor, resumeTo, send, sendAt, setDebugEnabled, setDebugEnabledAt, setDebugLevels, setMaxWorkforce, setName, setParent, setRuntime, setTimeScale, stop, stop, stopAt, takeover, takeover, toString, tr_info
 
Methods inherited from class drcl.comp.ForkManager
a_list, getRuntime, info, list, takeover
 
Methods inherited from class drcl.DrclObj
clone, duplicate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

startTime

protected long startTime

ltime

protected long ltime

time

protected double time

qReady

protected FIFOQueue qReady
Used to store tasks.


qWaiting

protected TreeMapQueue qWaiting
Constructor Detail

SESimulatorOld

public SESimulatorOld()

SESimulatorOld

public SESimulatorOld(java.lang.String name_)
Method Detail

newTask

protected void newTask(Task task_,
                       WorkerThread currentThread_)
The only way to trigger new tasks to be executed.

Specified by:
newTask in class ACARuntime

getThread

protected WorkerThread getThread()
Returns the current thread context.

Overrides:
getThread in class ACARuntime

info

public java.lang.String info()
Description copied from class: ACARuntime
Returns general information of this runtime.

Specified by:
info in class ACARuntime

ss_info

public java.lang.String ss_info()
Synchronized version of s_info().


s_info

public java.lang.String s_info()

getMainThread

public SEThreadOld getMainThread()

a_info

public java.lang.String a_info(boolean listWaitingTasks_)
Asynchronous version of ACARuntime.diag().

Specified by:
a_info in class ACARuntime

tasks

public java.lang.String tasks()
Returns information of the task queue.


forceReset

public void forceReset()
Forces to reset this runtime.


___PROFILE___

public void ___PROFILE___()

getNumberOfArrivalEvents

public long getNumberOfArrivalEvents()
Description copied from class: ACARuntime
Returns the number of arrival events.

Specified by:
getNumberOfArrivalEvents in class ACARuntime

getEventRate

public double getEventRate()
Description copied from class: ACARuntime
Returns the event processing rate of this runtime.

Specified by:
getEventRate in class ACARuntime

_getEventRate

protected double _getEventRate(long numArrivals_)

_getTime

protected double _getTime()
Asynchronized version of getTime(), for diagnosis.

Specified by:
_getTime in class ACARuntime

_stop

protected void _stop(boolean block_)
Specified by:
_stop in class ACARuntime

resume

public void resume()
Description copied from class: ACARuntime
Resumes the system. The state must advance to RUNNING when this method returns.

Specified by:
resume in class ACARuntime

reset

public void reset()
Description copied from class: ACARuntime
The workerpool enters a transitional period when reset() is issued. It waits for all the working thread to either finishes the job or goes into sleep. After all the threads finish jobs, it releases all the threads by kill()ing them.

Specified by:
reset in class ACARuntime

getWallTimeElapsed

public long getWallTimeElapsed()
Description copied from class: ACARuntime
Returns the actual time (in ms) for which this runtime has participated.

Specified by:
getWallTimeElapsed in class ACARuntime

t_info

public java.lang.String t_info()
Overrides:
t_info in class ACARuntime

t_info

protected java.lang.String t_info(java.lang.String prefix_)
Specified by:
t_info in class ACARuntime

setState

protected void setState(java.lang.String new_)
Overrides:
setState in class ACARuntime

println

public void println(java.lang.String msg_)

off

protected void off(ACATimer handle_)
Description copied from class: ForkManager
Cancels a fork event.

Specified by:
off in class ACARuntime

getEventQueue

public java.lang.Object getEventQueue()
Specified by:
getEventQueue in class ACARuntime

J-Sim v1.2.1-p7 API

Copyright © 1998-2003 Distributed Real-time Computing Lab (DRCL). All Rights Reserved.     ~ To J-Sim Home ~