public class DynamicsExecutionThread2 extends Thread
DynamicsExecutionThread2 builds a command-line invocation string to initiate a Execution (and in-turn Dynamics) process, then launches an entire Java Virtual Machine (JVM) to run it. Communication back to the workbench is via direct socket for commands like playback/pause/kill/goal/status etc. DIS multicast for visualization is also sent out via active Dynamics object. AVCL messages for vehicle-to-vehicle communication/coordination are sent via multicast by the active Execution object. Upon mission completion, option available to send a compressed archive containing the just-completed mission-results file which logs time-stamped telemetry state vectors, control orders, sensor responses, etc.
This interface should be converted to using some sort of listener callback instead of the JTextArea. That would eliminate the Swing import requirement for this class, and be a somewhat cleaner interface. DMcG: Does this really need to be a subclass of Thread? Filename : DynamicsExecutionThread2.java Description : Invoke a separate process dynamics (located in ..\dynamics\dynamics) Created Date : 20 May 2002 Revised Date : 15 August 2003 Course : Thesis Work Program : AUV Workbench 1.0 Compiler : JDK 1.4.2 onwards Platform : Windows 2000/Windows XPModifier and Type | Class and Description |
---|---|
static interface |
DynamicsExecutionThread2.EndListener
This is a call-back interface to provide a mechanism for somebody else (i.e., the GUI) to
know when a mission has ended.
|
Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
DynamicsExecutionThread2(String[] command,
File dir,
JTextArea txtarea)
constructor
|
DynamicsExecutionThread2(String[] commandArray,
File workingDirectory,
JTextArea textArea,
DynamicsExecutionThread2.EndListener endListener)
constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
isKilled() |
void |
kill()
indicate intention to stop the thread by setting internal flag.
|
void |
run()
Main run thread, which only waits for process termination to indicate
that the run is over.
|
void |
sendWorkbenchMessageToExecution(String text)
Messages originating from button presses on AUVW user interface
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public DynamicsExecutionThread2(String[] command, File dir, JTextArea txtarea)
command
- list of commandsdir
- working directorytxtarea
- to write informationpublic DynamicsExecutionThread2(String[] commandArray, File workingDirectory, JTextArea textArea, DynamicsExecutionThread2.EndListener endListener)
commandArray
- list of commandsworkingDirectory
- working directorytextArea
- to write informationendListener
- optional listener to inform when mission is done.public void sendWorkbenchMessageToExecution(String text)
text
- message for Execution levelpublic void kill()
public boolean isKilled()