4. Build¶
The RTI Connext TSS libraries are shipped as source and must be built before use by a FACE application.
4.1. Prerequisites¶
Set a
JREHOME
environment variable to the location of the JRE included with Connext DDS Professional or Micro.Connext DDS Professional and/or Micro must be installed and built for the target architecture and FACE profile.
4.2. Configure build environment¶
In preparation for a build:
Download and install CMake.
RTI Connext TSS provides and uses CMake scripts to generate the environment to build its libraries and example applications.
Set an RTITSSHOME environment variable to point to your Connext TSS installation directory.
For example, if Connext TSS is installed in
/home/user/rti/rti_connext_tss-3.1.1/
, then set RTITSSHOME (in bash) with this command:
export RTITSSHOME=/home/user/rti/rti_connext_tss-3.1.1
If building for Connext DDS Professional, set an NDDSHOME environment variable to point to your Connext DDS installation.
For example, if Connext DDS is installed in
/opt/local/rti/rti_connext_dds-6.1.1
, then set NDDSHOME (in bash) with this command:
export NDDSHOME=/opt/local/rti/rti_connext_dds-6.1.1
If building for Connext DDS Micro, set an RTIMEHOME environment variable to point to your Connext DDS Micro installation.
For example, if Connext DDS Micro is installed in
/opt/local/rti/rti_connext_micro.2.4.13.1
, then set RTIMEHOME (in bash) with this command:
export RTIMEHOME=/opt/local/rti/rti_connext_micro.2.4.13.4
Note
The Connext DDS Professional and Connext DDS Micro libraries must be conformant to the FACE profile of the Connext TSS libraries being built. See RTI Connext Documentation for help with configuring and building Connext for FACE.
4.3. Set architecture¶
The architecture identifies the platform on which to run RTI Connext TSS.
CMake architecture files are provided for the following:
armv8Vx7SR0660llvm10.0.1.cortex-a53.cmake
armv8Vx7SR0660llvm10.0.1.cortex-a53_rtp.cmake
i86Linux2.6gcc4.4.5.cmake
i86Linux3gcc4.8.2.cmake
pentium64Vx7.0gcc4.8.1_rtp.cmake
ppce6500Deos653-10.3.1gcc7.3.0.cmake
ppce6500Deos653-10.3.1gcc7.3.0FACE_SB.cmake
ppce6500Vx653-3.0.1.1gcc4.3.3.cmake
ppce6500Vx653-3.0.1.1gcc4.3.3FACE_SB.cmake
x64Linux3gcc4.8.2.cmake
x64Linux3gcc5.4.0.cmake
x64Linux4gcc7.3.0.cmake
x64Linux4gcc7.3.0FACE_GP.cmake
x64Linux4gcc7.3.0FACE_SB.cmake
x64Linux4gcc8.5.0.cmake
x64Linux4gcc8.5.0FACE_GP.cmake
For other architectures, follow the Porting guide (Section 5) to add a new architecture.
Once an architecture is chosen, set an environment variable RTITSSARCH to the architecture name:
export RTITSSARCH=x64Linux3gcc4.8.2
If compiling for the SafetyBase FACE Profile, you will need to append a FACE_SB suffix to the architecture name:
export RTITSSARCH=x64Linux3gcc4.8.2FACE_SB
4.4. Build libraries¶
This section describes how to do an out-of-source build of RTI Connext TSS using CMake.
Create a build directory
cd ${RTITSSHOME} mkdir build
Run CMake, with the necessary definitions as described below
cd build cmake -DRTI_CONNEXT_TYPE=<your_connext_type> -DRTI_TSS_ENABLE_FACE_COMPLIANCE=<your_face_profile> -DCMAKE_BUILD_TYPE=<your_build_type> ../
- RTI_CONNEXT_TYPE sets the Connext DDS product being used:
“micro” (default)
“pro”
RTI_TSS_ENABLE_FACE_COMPLIANCE sets the FACE profile with which RTI Connext TSS is being built to conform:
“None” (default)
“GeneralPurpose”
“SafetyExtended”
“SafetyBase”
“Security”
Note
While RTI_TSS_ENABLE_FACE_COMPLIANCE can be set to any FACE OSS profile, this release of RTI Connext TSS supports up to the SafetyBase profile with Connext DDS Micro 2.4.13.4, and no profile with Connext DDS Pro 6.1.1.
Note
To enable long double types, the
RTI_TSS_ENABLE_LONG_DOUBLE
CMake variable must be set to True. This will define RTI_CDR_SIZEOF_LONG_DOUBLE or OSAPI_ENABLE_LONG_DOUBLE, needed by Connext DDS Pro or Connext DDS Micro respectively.-DRTI_TSS_ENABLE_LONG_DOUBLE=TRUE
CMAKE_BUILD_TYPE sets the type of library or executable built:
“Release” (default)
“Debug”
Alternatively, the CMake GUI (cmake-gui) can be used instead of the command line.
Build the RTI Connext TSS libraries
cmake --build .
4.5. Verify build¶
A successful build will result in one (statically linked) library: rti_tsscpp.
The library for RTI Connext DDS Pro will be built as
${RTITSSHOME}/lib/${RTITSSARCH}/pro/librti_tsscppz.a
.
The library for RTI Connext DDS Micro will be built as
${RTITSSHOME}/lib/${RTITSSARCH}/micro/librti_tsscppz.a
.
The debug library name will have a ‘d’ suffix
(e.g. librti_tsscppzd.a
).
4.6. Using Third-Party Strings and Sequences¶
To use other implementations of FACE Sequence and String classes than RTI’s implementation,
create two new folders: include/third_party
and src/third_party
.
Then, place inside include/third_party
your String.hpp
and Sequence.hpp
header files along with any header files needed by them. At src/third_party
,
place all the C and C++ source files needed.
Note
include/third_party
contains example String.hpp
and Sequence.hpp
files. These files are required to build the libraries. If you wish to use your own or third party versions of these files, replace these files with the appropriate .hpp
files.
Finally, compile with the RTI_USE_EXTERNAL_STR_SEQ
CMake variable set to True
(-DRTI_USE_EXTERNAL_STR_SEQ=TRUE
).