EXAMPLES

BuiltInTopics

1) Description

The BuiltInTopics example is used to illustrate the use of built-in topics. This application monitors the number of nodes that participate in a DDS domain.

2) Design

It consists of 3 units :

3) Scenario

When it receives the built-in sample, the subscriber displays the number of nodes running and the host name of each node .

Running of examples in Standalone Mode

Running the examples in a Posix environment

Environment Setup

Let's call OpenSplice_install_dir the OpenSplice installation directory.

The OpenSpliceDDS environment variables must be set in order for the examples to build/run correctly. To do this, open a terminal and source the "OpenSplice_install_dir/release.com" script supplied with the distribution.

C and C++ Executables

Building the examples is described on the Summary page>

One executable is generated in the standalone directory when the example is built:

For C++

For C

Java executables

Building the examples is described on the Summary page

One jar is generated in the standalone directory when the example is built:

Running the example

Ensure that the environment for OpenSpliceDDS is set up correctly as described above for each new terminal used. If running the C or C++ examples ensure that . is added to the LD_LIBRARY_PATH.

Running in single process (heap memory) configuration : the application starts OpenSpliceDDS middleware

Running in multiple process shared memory configuration

To enable deployment in this mode, an OpenSpliceDDS configuration file must be selected that has shared memory support e.g. one of the ospl_shmem xml configuration files found in the OpenSplice_install_dir/etc/config directory.

Starting the subscriber

Running C/C++/C#/Java examples on Windows

Environment Setup

Let's call OpenSplice_install_dir the OpenSplice installation directory.

The OpenSpliceDDS environment variables must be set in order for the examples to run correctly. To do this open an OpenSpliceDDS Command Prompt which will set up the environment variables for OpenSpliceDDS automatically. The OpenSpliceDDS Command Prompt can be selected from the start menu. Alternatively, open a windows Command Prompt and execute the "OpenSplice_install_dir\release.bat" batch script supplied with the distribution.

C/C++/C# Executables

Building the examples is described on the Summary page

One executable is generated in the standalone directory when the example is built:

For C

For C++

Java Executables

Building the examples is described on the Summary page

The subscriber class is generated in the standalone directory when the example is built:

Running the C/C++/C#/Java Examples

Ensure that the environment for OpenSpliceDDS is set up correctly as described above for each new command prompt used.

The following steps describe how to run the examples:

Running in single process (heap memory) configuration : the application starts OpenSpliceDDS middleware

Running in multiple process shared memory configuration

To enable deployment in this mode, an OpenSpliceDDS configuration file must be selected that has shared memory support e.g. one of the ospl_shmem xml configuration files found in the OpenSplice_install_dir\etc\config directory.

Starting the subscriber