installingdds

This is an old revision of the document!


Installing Open Splice DDS

To develop ContextNet applications we need an implementation of the DDS (Data Distribution Service (DDS)) protocol. There are several vendor that implements this protocol. During development its common to use an open source implementation of DDS, in this case, OpenSplice. This tutorial aims on guiding the developer on installing OpenSplice DDS. OpenSplice DDS is available for GNU/Linux and Microsoft Windows, for both architectures, 32-bit and 64-bit. The instructions below provide a step-by-step tutorial for installing OpenSplice DDS community.

  1. First, download OpenSplice DDS Community at the following URL http://www.prismtech.com/dds-community/software-downloads. PrismTech, the company behind OpenSplice, require you to register/create an account in their web site before downloading OpenSplice. Finally, pay attention to download the correct version for your operating system.
  2. Create a directory named OpenSplice to put the downloaded library. For example, for Windows create a folder C:\OpenSplice, while in GNU/Linux create the directory /opt/OpenSplice and in Mac OS X create the directory /usr/local/opt/OpenSplice.
  3. Unzip the downloaded .zip file to a temporary folder. Copy the HDE folder from the temporary folder to the OpenSplicre directory created in the previous step. The resulting path of this operation in Windows is the C:\OpenSplice\HDE folder, while in GNU/Linux is the /opt/OpenSplice/HDE folder.
  4. In case you are using Microsoft Windows, install the Visual C++ Runtime. The installer is located at C:\OpenSplice\HDE\x86_64.win64\redist\install_vcredist.bat for 64-bit and C:\OpenSplice\HDE\x86_64.win64\redist\install_vcredist.bat
  5. Now we need to create environment variables in the operation system to point to the OpenSplice native libraries. This process is different for each operation system. Thus, follow the instructions below for your operation system.
  1. Create an empty text file named opensplice.txt inside the OpenSplice x86_64.win64 directory (C:\OpenSplice\HDE\x86_64.win64\)
  2. Paste the following content in this file:
    setx /m OSPL_HOME %~dp0
    set OSPL_HOME=%~dp0
    setx /m PATH "%OSPL_HOME%bin;%OSPL_HOME%lib;%OSPL_HOME%examples\lib;%PATH%"
    setx /m OSPL_TMPL_PATH %OSPL_HOME%etc\idlpp
    setx /m OSPL_URI file://%OSPL_HOME%etc\config\ospl.xml
  3. Change the opensplice.txt file to opensplice.bat to make it a batch executable file.
  4. Run this file opensplice.bat as administrator (Right-click on the file and choose Run as administrator)

This will set the environment variables needed for OpenSplice to be used by the ContextNet.

  1. Create an empty file named opensplice.sh.
  2. Paste the following content in this file:
    • OSPL_HOME=/opt/OpenSplice/HDE/x86_64.linux
    • PATH=$OSPL_HOME/bin:$PATH
    • LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OSPL_HOME/lib
    • CPATH=$OSPL_HOME/include:$OSPL_HOME/include/sys:${CPATH:=}
    • OSPL_URI=file://$OSPL_HOME/etc/config/ospl.xml
    • export OSPL_HOME PATH LD_LIBRARY_PATH CPATH OSPL_TMPL_PATH OSPL_URI
  3. Make the file executable using the chmod command.
  4. Move the file to the /etc/profile.d folder in the system, resulting in the following /etc/profile.d/opensplice.sh file.
  5. Finally, restart the system.
  1. Open a terminal window.
  2. Go to your user folder. In order to do this, you can type “cd” in the command line and press Enter.
  3. Edit the file .bash_profile
  4. Add the following to the end of the .bash_profile file: (OBS: In this tutorial the OpenSplice is installed at the /usr/local/opt folder)

For OpenJDK:

  • # Setting OpenSplice in PATH
  • OSPL_HOME=/usr/local/opt/OpenSplice/HDE/x86_64.darwin10_clang
  • PATH=$OSPL_HOME/bin:$PATH
  • DYLD_LIBRARY_PATH=$OSPL_HOME/lib${DYLD_LIBRARY_PATH:+:}$DYLD_LIBRARY_PATH
  • CPATH=$OSPL_HOME/include:$OSPL_HOME/include/sys:${CPATH:=}
  • OSPL_URI=file://$OSPL_HOME/etc/config/ospl.xml
  • export OSPL_HOME PATH DYLD_LIBRARY_PATH CPATH OSPL_URI

For Oracle JDK:

  • # Setting OpenSplice in PATH
  • OSPL_HOME=/usr/local/opt/OpenSplice/HDE/x86_64.darwin10_clang
  • PATH=$OSPL_HOME/bin:$PATH
  • JAVA_LIBRARY_PATH=$OSPL_HOME/lib${JAVA_LIBRARY_PATH:+:}$JAVA_LIBRARY_PATH
  • CPATH=$OSPL_HOME/include:$OSPL_HOME/include/sys:${CPATH:=}
  • OSPL_URI=file://$OSPL_HOME/etc/config/ospl.xml
  • export OSPL_HOME PATH JAVA_LIBRARY_PATH CPATH OSPL_URI

5. To apply the changes, you can either restart the system, close and open the terminal or simple type on the terminal:

  • cd press Enter
  • source .bash_profile press Enter

This will reload your .bash_profile content.

For both operating systems, it is necessary to modify the file pointed by the OSPL_URI variable.

In the case of Microsoft Windows, the file location is C:\OpenSplice\HDE\x86_64.win64\etc\config\ospl.xml, while at GNU/Linux it is located at: /opt/OpenSplice/HDE/x86_64.linux/etc/config/ospl.xml.

Replace the file content by the following (you can also download the file by clicking in the tab):

ospl.xml
<OpenSplice>
   <Domain>
      <Name>ospl_sp_ddsi</Name>
      <Id>0</Id>
      <SingleProcess>true</SingleProcess>
      <Service name="ddsi2">
         <Command>ddsi2</Command>
      </Service>
      <Service name="durability">
         <Command>durability</Command>
      </Service>
      <Service enabled="false" name="cmsoap">
         <Command>cmsoap</Command>
      </Service>
      <Listeners>
            <StackSize>256000</StackSize>
       </Listeners>
   </Domain>
 
   <DDSI2Service name="ddsi2">
      <General>
         <NetworkInterfaceAddress>AUTO</NetworkInterfaceAddress>
         <AllowMulticast>true</AllowMulticast>
         <EnableMulticastLoopback>true</EnableMulticastLoopback>
         <CoexistWithNativeNetworking>false</CoexistWithNativeNetworking>
      </General>
      <Compatibility>
<!-- see the release notes and/or the OpenSplice configurator on DDSI interoperability -->
         <StandardsConformance>lax</StandardsConformance>
<!-- the following one is necessary only for TwinOaks CoreDX DDS compatibility -->
<!-- <ExplicitlyPublishQosSetToDefault>true</ExplicitlyPublishQosSetToDefault> -->
      </Compatibility>
   </DDSI2Service>
   <DurabilityService name="durability">
      <Network>
         <Alignment>
            <TimeAlignment>false</TimeAlignment>
            <RequestCombinePeriod>
               <Initial>2.5</Initial>
               <Operational>0.1</Operational>
            </RequestCombinePeriod>
         </Alignment>
         <WaitForAttachment maxWaitCount="10">
            <ServiceName>ddsi2</ServiceName>
         </WaitForAttachment>
      </Network>
      <NameSpaces>
         <NameSpace name="defaultNamespace">
            <Partition>*</Partition>
         </NameSpace>
         <Policy alignee="Initial" aligner="true" durability="Durable" nameSpace="defaultNamespace"/>
      </NameSpaces>
   </DurabilityService>
   <TunerService name="cmsoap">
      <Server>
         <PortNr>Auto</PortNr>
      </Server>
   </TunerService>
</OpenSplice>
  • installingdds.1564081874.txt.gz
  • Last modified: 2019/07/25 16:11
  • by felipe