![]() |
OpenSplice Java FACE API
v6.x
OpenSplice Future Airborne Capability Environment (FACE) Java API
|
The examples source code can be found in the examples folder of your Vortex OpenSplice installation. The descriptions below summarize what each example demonstrates. Towards the bottom of the page you will find instructions on how to build and run the examples.
In the following sections $OSPL_HOME
identifies the installation directory of Vortex OpenSplice. Note it is not however required that this be exported as a variable in the shell environment.
In order to build and or run applications that use face the library ddsface.jar
need to be in the classPath. This library can be found inside the $OSPL_HOME/jar
directory.
To build the examples Apache Maven is needed recommended is to use Maven version 3.x
In the following examples $OSPL_HOME
identifies the installation directory of Vortex OpenSplice. Note it is not however required that this be exported as a variable in the shell environment.
A script release.com
is provided. It exports a value of OSPL_URI
to indicate the file $OSPL_HOME/etc/config/ospl.xml
and also makes the Vortex OpenSplice libraries available on the library load path.
Change directory to the example source directory and mvn
. E.g.:
$ cd $OSPL_HOME $ ./release.com $ cd $OSPL_HOME/examples/face/HelloWorld/java $ mvn
A top-level pom file is included to build all java related examples
$ cd $OSPL_HOME $ ./release.com $ cd $OSPL_HOME/examples $ mvn
In the following examples %OSPL_HOME%
identifies the installation directory of Vortex OpenSplice. Note it is not however required that this be set as a variable in the console environment.
A script release.bat
is provided. It exports a value of OSPL_URI
to indicate the file %OSPL_HOME%\etc\config\ospl.xml
and also makes the Vortex OpenSplice executables and dynamic-link libraries available on the PATH
.
A shortcut within the Vortex OpenSplice HDE folder on the Start Menu: Vortex OpenSplice command prompt creates a cmd.exe
console session with this environment ready set.
Change directory to the example source directory and mvn
. E.g.:
open the Vortex OpenSplice command prompt "<<< OpenSplice HDE Release V6.9.1 For x86_64.win64, Date 2018-02-28 >>>" cd examples\face\HelloWorld\java mvn
A top-level pom file is included to build all java related examples
open the Vortex OpenSplice command prompt "<<< OpenSplice HDE Release V6.9.1 For x86_64.win64, Date 2018-02-28 >>>" cd examples mvn
The environment property OSPL_URI
can set to indicate the location of a local domain configuration file. If this variable is not set, or is set to point to a file that specifies a shared memory domain configuration, the command ospl start
must be used to start the domain before an example can be run.
The default configuration file installed by the distribution uses single process (i.e. heap memory) mode so this is not required.
To run an example in single process mode:
$ cd $OSPL_HOME $ ./release.com $ cd examples/face/HelloWorld/java $ java -jar sub/face_HelloWorld_sub.jar & $ java -jar pub/face_HelloWorld_pub.jar
To run an exmaple in shared memory mode you might do:
$ cd $OSPL_HOME $ ./release.com $ OSPL_URI=file://$OSPL_HOME/etc/config/ospl_shmem_ddsi.xml $ export OSPL_URI $ cd examples/face/HelloWorld/java $ ospl start $ java -jar sub/face_HelloWorld_sub.jar & $ java -jar pub/face_HelloWorld_pub.jar $ ospl stop
To run an example in single process mode:
open the Vortex OpenSplice command prompt "<<< OpenSplice HDE Release V6.9.1 For x86_64.win64, Date 2018-02-28 >>>" cd examples\HelloWorld\java5 start /b java -jar sub/face_HelloWorld_sub.jar java -jar pub/face_HelloWorld_pub.jar
To run an example in shared memory mode you might do:
open the Vortex OpenSplice command prompt "<<< OpenSplice HDE Release V6.9.1 For x86_64.win64, Date 2018-02-28 >>>" set OSPL_URI=file://%OSPL_HOME%\etc\config\ospl_shmem_ddsi.xml cd examples\face\HelloWorld\java ospl start start /b java -jar sub/face_HelloWorld_sub.jar java -jar pub/face_HelloWorld_pub.jar ospl stop