|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcz.zcu.fav.kiv.jsim.JSimSimulation
cz.zcu.fav.kiv.jsim.hla.JSimHLASimulation
JSimHLASimulation represents theoretical simulation models, containing processes (local or remote), queues (local or remote) and other elements. The simulation will enable High Level Architecture (HLA) support.
| Field Summary | |
static int |
HLA_END_OF_SIMULATION_IGNORE
The simulation will ignore EndOfSimulation event. |
static int |
HLA_END_OF_SIMULATION_RESPECT
The HLA simulation will be terminated as soon as EndOfSimulation event will be received (regardless of scheduled local processes). |
private int |
numberOfFederates
Total number of federates who are involved in federation. |
private java.util.ArrayList |
remoteProcesses
All remote processes of the simulation. |
private java.util.ArrayList |
remoteQueues
All remote queues of the simulation. |
| Fields inherited from class cz.zcu.fav.kiv.jsim.JSimSimulation |
calendar, jSimHLAConnection, MODE_GUI_BATCH, MODE_GUI_INTERACTIVE, MODE_TXT, NEW_PROCESS_FORBIDDEN, NEW_QUEUE_FORBIDDEN, NEW_SEMAPHORE_FORBIDDEN, PRN_ERROR, PRN_MESSAGE, SIMULATION_IN_PROGRESS, SIMULATION_NOT_STARTED, SIMULATION_TERMINATED, SIMULATION_WAITING_HLA, simulationHLA, time |
| Constructor Summary | |
JSimHLASimulation(java.lang.String name,
java.util.Properties configurationRTI)
Creates a new simulation with HLA support, with no processes, no queues and no graphic window. |
|
JSimHLASimulation(java.lang.String name,
java.util.Properties configurationRTI,
int numberOfFederates)
Creates a new simulation with HLA support, with no processes, no queues and no graphic window. |
|
| Method Summary | |
protected void |
addProcess(JSimHLARemoteProcess process)
Adds a new HLA remote process to the simulation. |
protected void |
addQueue(JSimHLARemoteHead queue)
Adds a new HLA remote queue to the simulation. |
void |
beginFederationExecution()
Begins JSim federation execution. |
void |
beginFederationExecution(int modeEndOfSimulation)
Begins JSim federation execution. |
void |
endFederationExecution()
Ends JSim federation execution. |
void |
endFederationExecution(boolean destroy)
Ends JSim federation execution. |
JSimHLAConnection |
getJSimHLAConnection()
Returns JSimHLAConnection object. |
protected JSimHead |
getLocalHeadByName(java.lang.String name)
Returns local head with specified name (if local head exists). |
protected JSimProcess |
getLocalProcessByName(java.lang.String name)
Returns local process with specified name (if local process exists). |
protected void |
receiveEndOfSimulation()
Receives message end of simulation. |
protected void |
receiveResumeSimulationInProgress()
Receives message resume simulation in progress. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private int numberOfFederates
private java.util.ArrayList remoteProcesses
private java.util.ArrayList remoteQueues
public static final int HLA_END_OF_SIMULATION_RESPECT
public static final int HLA_END_OF_SIMULATION_IGNORE
| Constructor Detail |
public JSimHLASimulation(java.lang.String name,
java.util.Properties configurationRTI)
throws JSimInvalidParametersException
name - Name of the simulation.configurationRTI - Configuration properties for Runtime Infrastructure (RTI).
You can use 'new Properties()' for default values.
JSimInvalidParametersException
public JSimHLASimulation(java.lang.String name,
java.util.Properties configurationRTI,
int numberOfFederates)
throws JSimInvalidParametersException
name - Name of the simulation.configurationRTI - Configuration properties for Runtime Infrastructure (RTI).
You can use 'new Properties()' for default values.numberOfFederates - Total number of federates who are involved in HLA federation.
Note that only only the federate who creates federation execution
is allowed to set this value.
Any other attempt to set this value has no effect.
JSimInvalidParametersException - This exception is thrown if configuration properties
instance for RTI is null, or number of federates is less than two.| Method Detail |
protected final void addProcess(JSimHLARemoteProcess process)
throws JSimInvalidParametersException
process - The process that has to be added to the simulation.
JSimInvalidParametersException - This exception is thrown out
if the specified process is null.
protected final void addQueue(JSimHLARemoteHead queue)
throws JSimInvalidParametersException
queue - The queue that has to be added to the simulation.
JSimInvalidParametersException - This exception is thrown out
if the specified queue is null.public JSimHLAConnection getJSimHLAConnection()
protected JSimProcess getLocalProcessByName(java.lang.String name)
protected JSimHead getLocalHeadByName(java.lang.String name)
protected void receiveEndOfSimulation()
protected void receiveResumeSimulationInProgress()
public void beginFederationExecution()
throws JSimInvalidParametersException
JSimInvalidParametersException
public void beginFederationExecution(int modeEndOfSimulation)
throws JSimInvalidParametersException
modeEndOfSimulation - The mode how to terminate the HLA simulation.
Possible values are HLA_END_OF_SIMULATION_RESPECT and HLA_END_OF_SIMULATION_IGNORE.
JSimInvalidParametersExceptionpublic void endFederationExecution()
public void endFederationExecution(boolean destroy)
destroy - determines if to destroy federation execution or not.
Federation execution of JSim federation should be always destroyed.
Please use false only if you know what are you doing.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||