The ownership example is used to illustrate the concept of Shared Ownership, controlled through QoS, in DDS.
It consists of 2 units :
Two StockQuote Publishers of different ownership strengths publish topics with the same keyfields. The subscriber will receive the topics from the publisher with higher strength. In this example :
Let's call OpenSplice_install_dir the OpenSplice installation directory.
The OpenSplice 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 are generated in the bin directory when the example is built:
For C
Building the examples is described on the Summary page
Two jars are generated in the java5 directory when the example is built:
For Java5
Building the examples is described on the Summary page
Two executables are generated in the isocpp2 directory when the example is built:
Ensure that the environment for OpenSplice is set up correctly as described above for each new terminal used.
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 OpenSplice middleware
Running in multiple process shared memory configuration
To enable deployment in this mode, an OpenSplice 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 and publisher
Publisher usage, e.g.: c_Ownership_pub [publisher_name] [ownership_strength] [nb_iterations] [stop_subscriber_flag] publisher_name ownership_strength nb_iterations : number of sending message iterations stop_subscriber_flag : indicates if the publisher has to send a message to tell the subscriber to stop
Let's call OpenSplice_install_dir the OpenSplice installation directory.
The OpenSplice environment variables must be set in order for the examples to run correctly. To do this open an OpenSplice Command Prompt which will set up the environment variables for OpenSplice automatically. The OpenSplice Command Prompt can be selected from the launcher. 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 bin 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 java5 directory when the example is built:
For Java5
Building the examples is described on the Summary page
Two executables are generated in the isocpp2 directory when the example is built:
Ensure that the environment for OpenSplice 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 OpenSplice middleware
Running in multiple process shared memory configuration
To enable deployment in this mode, an OpenSplice 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 and publisher
Publisher usage, e.g.: c_Ownership_pub [publisher_name] [ownership_strength] [nb_iterations] [stop_subscriber_flag] publisher_name ownership_strength nb_iterations : number of sending message iterations stop_subscriber_flag : indicates if the publisher has to sent a message to tell the subscriber to stop