|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.renesys.raceway.SSF.Entity
|
+--SSF.OS.ProtocolGraph
|
+--SSF.Net.Host
|
+--gov.nist.antd.ssf.event.script.EventManager
This class implements an event manager to be able to script event from the DML file.
This class was developed at the National Institute of Standards and Technology by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code this software is not subject to copyright protection and is in the public domain. NIST assumes no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, or any other characteristic.
We would appreciate acknowledgement if the software is used.
NIST ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION AND DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
| Field Summary | |
long |
CallbackTime
The delay between to calls to the timer (in TICs) |
private java.util.Vector |
events
The vector of ScriptEvent |
private int |
sleepTime
The time for the timer to sleep |
private boolean |
started
Indicates if the simulation is started. |
private boolean |
stopSim
Inidicates if the simulation must be stopped |
static int |
STOPTIME
The time when the simulation must stop |
private Timer |
timer
The timer that controls the simulation speed |
| Fields inherited from class SSF.Net.Host |
hostConfig, ID, interfaceAddresses, interfaceNumbers, net, nhi, nhi_context |
| Fields inherited from class SSF.OS.ProtocolGraph |
description |
| Fields inherited from class com.renesys.raceway.SSF.Entity |
|
| Constructor Summary | |
EventManager(Net net,
java.lang.String nhi,
int id)
Constructor of an OXC. |
|
| Method Summary | |
void |
config(com.renesys.raceway.DML.Configuration cfg)
Configure the events from de DML file |
protected void |
configEvent(com.renesys.raceway.DML.Configuration cfg)
Configure an event by creating an instance of the class |
java.util.Vector |
getEvents()
Return a copy of the events. |
void |
init()
Initialise all the events |
void |
removeEvent(ScriptEvent event)
Delete the given event by using the cancel method of the event |
void |
resumeTimer()
Resume the simulation |
void |
setSimSpeed(int spd)
Control the speed of the simulation |
void |
stopTimer()
Stop the timer |
| Methods inherited from class SSF.Net.Host |
defined_in_network, getNet, global_nhi_to_ip, local_nhi_to_ip, toString |
| Methods inherited from class SSF.OS.ProtocolGraph |
cpu, SessionForName |
| Methods inherited from class com.renesys.raceway.SSF.Entity |
alignment, alignTo, coalignedEntities, inChannels, joinAll, makeIndependent, now, outChannels, pauseAll, playRole, processes, resumeAll, startAll, startAll, startClient, startClient, startServer, W, Z |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.util.Vector events
private boolean started
private Timer timer
private int sleepTime
private boolean stopSim
public long CallbackTime
public static final int STOPTIME
| Constructor Detail |
public EventManager(Net net,
java.lang.String nhi,
int id)
net - network within which the OXC is to be configured.nhi - NHI address of the containing network.id - integer OXC ID.| Method Detail |
public void config(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
config in interface com.renesys.raceway.DML.Configurableconfig in class Hostcfg - The DML configuration
com.renesys.raceway.DML.configException - if a configuration error occurs
protected void configEvent(com.renesys.raceway.DML.Configuration cfg)
throws com.renesys.raceway.DML.configException
cfg - The configuration of the event
com.renesys.raceway.DML.configException - if a configuration error occurspublic void init()
init in class Hostpublic java.util.Vector getEvents()
public void removeEvent(ScriptEvent event)
event - The ScriptEvent to removepublic void setSimSpeed(int spd)
spd - The speed of the timer (in %)public void stopTimer()
public void resumeTimer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||