The PingPong example allows the measurement of roundtrip duration when sending and receiving back a single message.
It consists of 2 units :
A message is sent by the ping executable on the "PING" partition, which the pong executable is waiting for. The pong executable sends the same message back on the "PONG" partition, which the ping executable is waiting for. This sequence is repeated a configurable number of times.
The ping executable measures:
Configurable:
topic_id allows selection of topic used for the test, among those defined by pragma keylist in pinpong.idl, and may be one of :
PING and PONG partition: this enables to use several PING-PONG pairs simultaneous with them interfering with each other. It also enables creating larger loops, by chaining several PONG tests to one PING test.
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.
Building the examples is described on the Summary page
Two executables and a library are generated in the standalone directory when the example is built:
For C++
For C
Building the examples is described on the Summary page
Two jars are generated in the standalone directory when the example is built:
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.
It is recommended that you run the subscriber and publisher in separate terminals to avoid mixing the output
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 ping and pong
pong usage: pong [write partition] [read partition]
ping usage: ping [blocks][number of cycles] [topic_id] [write partition] [read partition] topic_id is from 'm', 'q', 's', 'f', 'a' or 't' where 't' is to quit
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.
Building the examples is described on the Summary page
Two executables are generated in the standalone directory when the example is built:
For C, C++ and C#
Building the examples is described on the Summary page
The ping and pong classes are generated in the standalone directory when the example is built:
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.
ping usage: ping [blocks][number of cycles] [topic_id] [write partition] [read partition] topic_id is from 'm', 'q', 's', 'f', 'a' or 't' where 't' is to quit
Doing the substitution and additional set up described below, everything previously said for Standalone Mode can be applied to CORBA Cohabitation Mode.
Besides OpenSplice environment variables, we need to set