Hank Compilation and Execution
-For
Windows system (2000, XP)
Currently, Hank driving simulation system is running on a local network
of PCs. It has five functional parts (see
system overview). Each part runs as a separate program. These
programs communicate through TCP connections in real time. There are six
CVS modules: five for the real time system and one for remote execution.
Source codes of these modules are available through WinCVS checkout
operations. There is also a checkout example
for the main module -Hank simulator. Below list the names of the
modules.
-
Hank - Hank simulator
-
OSGVisual - 3D graphics server
-
BikeIOServer - Bike IO server
-
SoundServer - Sound server
-
HankGUI - 2D GUI experimenter
-
HankRPC - RPC application for remote execution.
Except
that HankGUI code is written in Java, all the other codes are written in
C/C++. Since the compilation of Hank
simulator is the most complicated, a how-to introduction is given.
After
the compilation, there will be one or two executable files generated
from each module. Copy them to corresponding PCs and add their paths to
the value of system variable
PATH, so they
can be executed as Windows commands.

Before execution, check that
all necessary files are accessible on each machine. It is suggested that
put Hank simulator and 2D GUI experimenter on the same machine for the
ease of use.
|
Machine |
Executable Files |
From CVS modules |
|
Hank simulator &
2D GUI
experimenter |
new_hank.exe,
HI.jar, RPCcall.exe, RPCListen.exe |
Hank, HankGUI,
HankRPC |
|
3D Graphics
servers |
fltviewer.exe,
RPClisten.exe |
OSGVisual,
HankRPC |
|
Sound server |
soundserver.exe,
RPCListen.exe |
SoundServer,
HankRPC |
|
Bike IO server |
bikeioserver.exe, RPCListen.exe |
BikeIOServer,
HankRPC |
For all machines with
RPCListen.exe, set
RPCListen as a
Startup command.

Below is a list of data
types used in Hank system.
-
Environment definition files - .edf files
-
Scenario definition files - .sdl files
-
Task scheduler files - .tsk files
HankData.zip contains a group of the first three types of files. Unzip it to your local directory and you will see them as below.

-
3D graphics data files - hierarchical flight files (.flt) which define 3D models rendered by graphics servers.
-
Copy these 3D models to all graphics servers. The models are available by request.
-
-
Hank configuration file - A file used by any execution which specifies the names of environment file, scenario files, task scheduler file, 3D graphics file (optional), and machines names (optional) for graphics server(s), sound server, and bike IO server. This file is loaded at the beginning of the execution of Hank simulator. An example of the configuration file is shown below.

Set two
environment variables:
HANK_CONFIG
- specifies a
default configuration file to be used unless a configuration file is
given as a command argument when executing Hank simulator.
CLASSPATH
- specifies the path of ANTLR files. (e.g.
C:\antlr-2.7.1)
Hank simulator serves as a MASTER of the whole system. It can automatically start all the other programs through remote procedure calls (RPC). To start the whole system, just run Hank simulator (new_hank.exe). You can specify a configuration file in the command line as the following.
C: /newhank [configuration file]


