source: tmcsimulator/trunk/src/tmcsim/interfaces/SimulationManagerInterface.java @ 2

Revision 2, 3.5 KB checked in by jdalbey, 10 years ago (diff)

Initial Import of project files

Line 
1package tmcsim.interfaces;
2
3import java.rmi.Remote;
4import java.rmi.RemoteException;
5
6import tmcsim.client.cadclientgui.data.Incident;
7import tmcsim.client.cadclientgui.data.IncidentEvent;
8import tmcsim.common.CADEnums.PARAMICS_STATUS;
9import tmcsim.common.CADEnums.SCRIPT_STATUS;
10
11
12/**
13 * RMI Interface providing methods for the SimulationManager to be updated
14 * with current simulation data.  The Simulation Manager is notified
15 * when the simulation time changes, new Incidents and IncidentEvents
16 * occur, new Incidents are added to the simulation, and when the Script
17 * and Paramics connection statuses change.
18 *
19 * @author Matthew Cechini
20 * @version $Revision: 1.3 $ $Date: 2006/06/06 20:46:41 $
21 */
22public interface SimulationManagerInterface extends Remote {
23
24    /**
25     * Notifies the SimulationManager when current simulation time changes.
26     *
27     * @param theTime The value (in seconds) of the current simulation time.
28     * @throws RemoteException if there is an error in the RMI communication.
29     */
30    public void tick(long theTime) throws RemoteException;
31   
32    /**
33     * Notifies the SimulationManager that a new IncidentEvent has occured for
34     * a current Incident. 
35     *
36     * @param logNumber The current log number being updated.
37     * @param theEvent The most recently occured incident event.
38     * @throws RemoteException if there is an error in the RMI communication
39     */
40    public void eventOccured(Integer logNumber, IncidentEvent theEvent) throws RemoteException;
41
42    /**
43     * Notifies the SimulationManager that an Incident has been added to the
44     * simulation.
45     *
46     * @param newIncident Incident that has been added.
47     * @throws RemoteException if there is an error in the RMI communication
48     */
49    public void incidentAdded(Incident newIncident) throws RemoteException;
50
51    /**
52     * Notifies the SimulationManager that an incident has begun.  This will
53     * occur if the user triggers an incident, or the incident occurs according
54     * to its assigned simulation time. 
55     *
56     * @param logNumber The log number of the Incident that has started.
57     * @throws RemoteException if there is an error in the RMI communication
58     */
59    public void incidentStarted(Integer logNumber) throws RemoteException;
60   
61    /**
62     * Notifies the SimulationManager that an incident has been removed
63     * from the simulation.
64     *
65     * @param logNumber The log number of the Incident that has been removed.
66     * @throws RemoteException if there is an error in the RMI communication
67     */ 
68    public void incidentRemoved(Integer logNumber) throws RemoteException;
69
70    /**
71     * Notifies the SimulationManager that the current status of the Script
72     * has changed.  Possible status values are determined in the SCRIPT_STATUS
73     * enumeration. 
74     *
75     * @see SCRIPT_STATUS
76     * @param newStatus Updated SCRIPT_STATUS.
77     * @throws RemoteException if there is an error in the RMI communication
78     */
79    public void setScriptStatus(SCRIPT_STATUS newStatus) throws RemoteException;
80
81    /**
82     * Notifies the SimulationManager that the current status of the Paramics
83     * connection has changed.  Possible status values are determined in the
84     * PARAMICS_STATUS enumeration. 
85     *
86     * @see PARAMICS_STATUS
87     * @param newStatus Updated PARAMICS_STATUS.
88     * @throws RemoteException if there is an error in the RMI communication
89     */
90    public void setParamicsStatus(PARAMICS_STATUS newStatus) throws RemoteException;
91
92}
Note: See TracBrowser for help on using the repository browser.