Vortex OpenSplice Examples

# EXAMPLES

- Summary
- PingPong
- Tutorial
- HelloWorld
- WaitSet
- Listener
- ContentFilteredTopic
- QueryCondition
- Lifecycle
- Durability
- Ownership
- BuiltInTopics
- NetworkPartitions
- RoundTrip
- Throughput

## SUMMARY

- PingPong

  The PingPong example consists of two executables that will exchange data using 2 partitions. Running both executables allows you to measure roundtrip duration when sending and receiving back a single message.

- Tutorial

  The Tutorial consists of three executables that together make up a primitive chatbox.

- HelloWorld

  The HelloWorld example is used to illustrate the necessary steps to set up DCPS entities

- WaitSet

  The Waitset example is used to illustrate the use of waitset and conditions :

  - ReadCondition
  - StatusCondition
  - QueryCondition
  - GuardCondition
- Listener

  The Listener example is used to illustrate use of listeners

- ContentFilteredTopic

  The ContentFilteredTopic example is used to illustrate message filtering based upon Content-Based subscription.

- QueryCondition

  The QueryCondition example is used to illustrate message filtering through use of Queries.

- Lifecycle

  The Lifecycle example is used to illustrate the different lifecycle states of the sample and the instance.

- Durability

  The Durability example illustrates the ability of late joining readers to obtain data that has already been published before these readers were created.

- Ownership

  The Ownership example is used to illustrate the concept of Shared Ownership, controlled through QoS, in DDS.

- BuiltInTopics

  The BuiltInTopics example is used to illustrate the use of built-in topics to obtain and print all nodes running in the domain.

- NetworkPartitions

  The NetworkPartitions example is used to illustrate the concept of network traffic partitioning based on the configuration of Vortex OpenSplice.

- RoundTrip

  The RoundTrip example consists of two executables that will exchange data using 2 partitions. Running both executables allows you to measure roundtrip duration when sending and receiving back a single message.

- Throughput

  The Throughput example allows the measurement of data throughput when receiving samples from a publisher.

Each example can be built individually. It is also possible to build a number of examples at the same time.

## Building all examples in a posix environment

The examples can be built together using the various makefiles found in the examples directory of the installed version of Vortex OpenSplice when building in a posix environment, using the following commands:

- make -f Makefile will build all C and C++ standalone examples as well as ISO C++ examples
- makefile -f Makefile.DCPS_ISO_CPlusPlus will build all ISO C++ examples
- makefile -f Makefile.StandaloneJava will build all Java standalone examples
- mvn will build all Java5 examples
- makefile -f Makefile.CORBACPlusPlus will build all CORBA C++ examples
- makefile -f Makefile.CORBAJava will build all CORBA Java examples

Before running any of the above commands it is necessary to set your environment using the release.com file found in the the Vortex OpenSplice installation. When building the CORBA examples using the above makefiles the ACE_ROOT and ODBCHOME environment variables must be set when building the CORBA C++ examples and the ACE_ROOT/lib directory must be added to the LD_LIBRARY_PATH. When building the CORBA Java examples the JACORB_HOME environment variable must be set.

## Building examples in Visual Studio

The examples can be built in Visual Studio using solutions files provided.

After installing Vortex OpenSplice on Windows, from the Vortex Launcher, go to the Examples pane and select an example solution file to open. There are 6 options:

- CORBA C++ Examples will build all CORBA C++ Examples in CORBA_CPlusPlus.sln
- C-Sharp Examples will build all C# versions of the examples in CSharp.sln
- Standalone C and C++ Examples will build all C and C++ versions of the examples in All_Standalone_C_and_CPlusPlus.sln
- Standalone C Exampleswill build all C versions of the examples in Standalone_C.sln
- Standalone C++ Examples will build all C++ versions of the examples in Standalone_CPlusPlus.sln
- DCPS ISO C++ Examples will build all ISO C++ examples in DCPS_ISO_CPlusPlus.sln

When building the CORBA examples using the CORBA C++ Examples option the ACE_ROOT and ODBCHOME environment variables must be set.

## Building Java examples on Windows

Batch files are provided to build the Java examples in a windows environment For Java5 maven is used to build the examples. These files can be found in the examples directory of the installed Vortex OpenSplice. Start a Vortex OpenSplice command prompt and simply run

- BUILD_StandaloneJava.bat to build the Java standalone examples
- BUILD_CORBAJava.bat to build the CORBA Java examples
- mvn to build the Java5 examples

If building the CORBA Java examples the JACORB_HOME environment variable must be set.