2. Installation

RTI nano-client is distributed in source format. The project’s Git repository contains all available components in buildable source form.

The repository may be cloned locally and built using one of the supported methods (see Building).

Alternatively, the library may be installed via the Arduino IDE or the PlatformIO platform.

2.1. Installation From Source

Clone RTI nano-client’s Git repository:

git clone https://github.com/rticommunity/nano-client.git

If you intend to use the Arduino-compatible API, an Arduino-compatible packaging of the version will first have to be generated. See Arduino Package.

When building RTI nano-client with CMake, you can take advantage of the generated install target to copy all build artifacts to your desired location.

2.2. Arduino Package

In order to support Arduino-compatible systems and better integrate with their typical development workflows, RTI nano-client can be exported and packaged into Arduino’s library format.

This extra packaging step is required to copy the library’s source files in a directory structure that is compatible with Arduino’s limited library format.

The generated package can be manually installed into Arduino’s Sketchbook directories, or it can be automatically copied by the make-based generation script.

For example, on Linux, where the Sketchbook directory defaults to ~/Arduino, the following command will install library nano-client-arduino in ~/Arduino/libraries:

make -C /path/to/nano-client/extras/nano-client-arduino INSTALL_DIR=~/Arduino/libraries

Alternatively, you can download a pre-generated archive.

Please refer to Arduino’s documentation for more information on how to install the library.

2.3. PlatformIO Installation

RTI nano-client’s Arduino API can be installed via the PlatformIO build system.

Simply include the Git repository in your build environment’s lib_deps:

[env:my_xrce_app]
lib_deps = https://github.com/rticommunity/nano-client.git

Alternatively, for example if you want to use a local clone of the repository, you can add nano-client-arduino to your build environment’s lib_deps, and include the directory containing the clone (not the clone’s directory itself) to lib_extra_dirs, e.g.:

[env:my_xrce_app]
lib_deps = nano-client-arduino
lib_extra_dirs = /path/to/nano-clients/parent/directory

Please refer to PlatformIO’s documentation for more information on how to configure library dependencies.

2.4. Documentation

RTI nano-client’s user manual is written using Sphinx, while API documentation is generated using Doxygen.

Once these tools are installed on your system (and available in your PATH environment variable), documentation can be generated using the CMake build script by enabling option BUILD_DOCS. You can also use the BUILD_LIBRARIES option to skip compilation of the source code.

mkdir build && cd build

cmake /path/to/nano-client -DBUILD_DOCS=ON \
                           -DBUILD_LIBRARIES=OFF

cmake --build . --target install

# Manual:   ./install/doc/manual/nano-client/html
# API Ref:  ./install/doc/api/nano-client/html

BUILD_DOCS_MANUAL and BUILD_DOCS_API can be used to further enable/disable the generation of the Sphinx user manual, and the Doxygen API documentation, respectively.