CAVE-CAVERN Networking library Interface

by Mohammed Dastagir Ali

mali@evl.uic.edu

Electronic Visualization Laboratory
University of Illinois at Chicago

 

Description

This library would allow existing CAVE Networking applications to be ported to CAVERNsoft without having to recode the application. This will then allow you to gain the additional capabilities of CAVERNsoft. In this library I have written CAVERNsoft equivalent code for all CAVE Networking  functions and shared variables.  This library also can be used for development of CAVERNSoft applications. Please see below for instructions  on using  this library.
 
This is a Beta version and is  still under development. Please get back to me with feedback and possible bugs..

To install, download the program (updated 14/5/98) and read the README file.

For further details send email to: cavern@evl.uic.edu


Instructions for using CAVE2CAVERN Networking Library

Step 1

The following CAVECalls , Macros ,Global Variables have to be prefixed with the word CAVERN_
 
CAVECalls && Macros ,GlobalVariables, Data types
CAVENETSENSOR
CAVE_USER_ST 
CAVENetFindUser
CAVENetGetOrientation
CAVENetGetPosition
CAVENetGetVector
CAVENetHeadTransform
CAVENetWandTransform
CAVEAddCallback
CAVENetReceive
CAVENetSend
CAVENETID 
CAVENetAddAddUserCallback()
CAVENetAddDeleteUserCallback()
CAVENetAddAppDataCallback()
CAVESensorTransform
CAVENumUsers
CAVENetGetEyePosition
CAVEUser
CAVECALLBACK
CAVEAddCallback
CAVESensorTransform
 

 
Step 2
 
 Add the functions P_CAVERNShm() P_CAVERNInit(), P_CAVERNUpdate(),P_CAVERNExit() in the main program of your applications as shown below.

P_CAVERNShm()
                               This routine is used to allocates shared memory  for the library. It is part of the
Initialization phase of the library.
 
P_CAVERNInit( int *argc, char **argv,  char **ip_address)
                                 This routine initailizes CAVERN does actual CAVERInit and returns a pointer to
the IRB so that users can  use this IRB to build on the exisiting application. It should be called after  CAVEConfigure. The ip_address is  a seperate parameter that can be used to pass the ip-address of the
server process. This additional parameter allows  other application specific parameters to be passed to
as command line parameters.
 
P_CAVERNUpdate()
                                     This routine updates a remote CAVE users position and orientation in the CAVE(sends and receives tracker data). It is upto  user  discretion  to use CAVERNUpdate .
If  the application takes care of handling tracker data. This call may be avoided for extra overhead.

P_CAVERNExit()
                                   CAVERN Exit shuts down connections .                                  
  


Example of a Basic CAVE-CAVERN Program

Note: To Use CAVE2CAVERN make sure to turn off regular CAVE networking by adding the following line to your (.caverc).

network n
 
 
 

main()
{
  char      **ip_address;

                  ip_address = &argv[1]; 

                  P_CAVERNShm( );
                  myIRB = P_CAVERNInit(&argc, argv,ip_address );
        CAVEInitApplication(init_gl,0);
        CAVEDisplay(draw_world,0);
        while (!CAVEgetbutton(CAVE_ESCKEY))
                {
                       // Updates CAVERN Kernel in main loop.

                         P_CAVERNUpdate();
                        navigate();
                        sginap(1);
                }
        P_CAVERNExit();
        CAVEExit();
} 



 

Step 3: Header file

                Add the following header file in  the files containing the CAVE-CAVERN calls.
 
1.  P_CAVERNInc.h++.
 


Step 4: Compiling .

 Link the  following library  to create your executable.

  libcavetocavern_32.a

  for n_32 use
 
  libcavetocavern_n32.a
 



 

Step 5:
         Executing
 
        1. run the program on machine1
        2.connect to it from another machine2 by  typing "executable machinename1" and so on..
 

1. See Example program enclosed with this software
    network1.c

 
2.  Please see the Makefile for compiling CAVE-CAVERN Programs