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.
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
.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.C:\OpenSplice\HDE\x86_64.win64\redist\install_vcredist.bat
for 64-bit and C:\OpenSplice\HDE\x86_64.win64\redist\install_vcredist.bat
opensplice.txt
inside the OpenSplice x86_64.win64
directory (C:\OpenSplice\HDE\x86_64.win64\
)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
opensplice.txt
file to opensplice.bat
to make it a batch executable 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.
opensplice.sh
.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
chmod
command (sudo chmod +x opensplice.sh
)./etc/profile.d
folder in the system, resulting in the following /etc/profile.d/opensplice.sh
file..bash_profile
.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 Entersource .bash_profile
press EnterThis 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):
<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>