Installation

= = = **Installation** =

***IMPORTANT NOTE***
ACE is required for using the real network layer (as opposed to an emulated one for simulation purposes). For VC++ Express, this is done automatically by the post-build scripts, make sure the appropriate libraries in "\Dependencies\lib" are copied to the "\bin" directory if you're using other compilers.

Note that there are some important global flags in /common/Config.h you might need to set for your particular needs:

code // if only simulation is desired
 * 1) define SIMULATION_ONLY

// whether ACE is enabled, must not be defined if real network is used code
 * 1) define ACE_DISABLED

**Supported Platform**
Right now the supported platforms which VAST has been tested and built are:
 * Linux
 * VC++ Express 2010 (downloadable at: @http://www.microsoft.com/express/ as of 2011/03/19).

=**__Win32 Instructions__**= To build VAST in Win32, simply click on "VAST.sln" for VC++ 2008 then choose the appropriate projects. All compiled binaries are put into the "bin" directory.

It's recommended to build the project "VASTsim_gui" first to get a visualization of how VAST works when many users (nodes) join into a single system and move continuously. Modify the parameters in VASTsim.ini post-build to play with it.
 * [Simulation Demo]**

Afterward, you may build "demo_chatva" to see how VAST can be used in a simple chat application over real network. For a simple example: Type the following to start a first gateway node code demo_chatva
 * [Chat Demo]**

code Then, type the following to start other nodes that you can control (use the arrow keys for movement, and type directly to chat) code demo_chatva 1037 127.0.0.1

code You should see something similar to the following (click to enlarge) If you'd like to try out other possibilities, use the following adjustable parameters:

code demo_chatva [gateway port] [gateway IP] [simulated node_no] [coord_x] [coord_y]__

code [gateway port] is the listening port of the gateway node, default is 1037 [gateway IP] is the IP address of the gateway node. To start a gateway, this and all subsequent parameters should be empty [simulated node_no] is which simulated node to start (that will run automatically for a number of steps specified in VASTsim.ini [coord_x] starting x coordinate of the node [coord_y] starting y coordinate of the node

For example, after the gateway has started (using the default port), the following will start a manually controllable 2nd node at (150,130)

code demo_chatva 1037 127.0.0.1 0 150 130

code and this will start an automatically moving node using path #7 at (450, 500) code demo_chatva 1037 127.0.0.1 7 450 500

code

=**__Linux Instructions__**=

1. Unzip the source files into a work directory code unzip -a vast-c++-x.x.x.zip

code

2. Build the static library of VAST code cd vast-x.x.x   make        (this should create various *.a files under the /lib directory) or make noace (if you have turn on the ACE_DISABLED flag in /include/config.h) code

3. Build related library

ACE and zlib are required for VAST to build properly, please see the instructions above for how to obtain and build ACE. zlib may have already been installed on your Linux system, if not, you can obtain a copy and build instructions at @http://www.zlib.net/

**Important Note:** the ACE included under /Dependencies of the VAST library consists only of headers and Win32 pre-built binaries, and cannot be used for building ACE under Linux.

By default, the VAST library assumes the ACE library exists at the same level as its root directory, for example, if the user would like to build VAST under a home directory such as /home/usermyself, then the two directories should be: code /home/usermyself/ACEWrappers /home/usermyself/VAST code

4. Build demo programs

depend on which one you'd like to build, just go into the directory under /Demo and type "make", the compiled binary will be placed under "/bin"
 * NOTE**: currently, only "Demo/demo_console" works under Linux

5. Execute the demo code /bin/demo_console   run the demo under /bin code

6. clean up the library code make TARGET=clean code