gsim.sim.engine
Interface Controller


public interface Controller

Controls a single SVM instance.


Method Summary
 long getCurrentTime()
           
 void pause()
          Pause simulation
 void registerSimulationInstanceListener(SimulationInstanceListener l)
          Listeners for being notified about certain events
 void resume()
          Continues simulation where (and if) it has been paused
 void run(long t)
          Start simulation, specifying how long it runs at maximum
 void setSteppable(Steppable svm)
          Method to set the SVM that is scheduled by this class
 void shutdown()
          End simulation.
 

Method Detail

run

void run(long t)
         throws GSimEngineException
Start simulation, specifying how long it runs at maximum

Throws:
GSimEngineException

pause

void pause()
           throws GSimEngineException
Pause simulation

Throws:
GSimEngineException

resume

void resume()
            throws GSimEngineException
Continues simulation where (and if) it has been paused

Throws:
GSimEngineException

shutdown

void shutdown()
              throws GSimEngineException
End simulation. This will usually destroy the SVM and its state connected with it.

Throws:
GSimEngineException

setSteppable

void setSteppable(Steppable svm)
                  throws GSimEngineException
Method to set the SVM that is scheduled by this class

Parameters:
svm - ISVM
Throws:
GSimEngineException

getCurrentTime

long getCurrentTime()
                    throws GSimEngineException
Throws:
GSimEngineException

registerSimulationInstanceListener

void registerSimulationInstanceListener(SimulationInstanceListener l)
                                        throws GSimEngineException,
                                               java.lang.Exception
Listeners for being notified about certain events

Parameters:
l - SimulationInstanceListener
Throws:
GSimEngineException
java.lang.Exception