4. Platform Support¶
RTI nano-client supports the major desktop operating systems (Linux, Darwin, Windows), and the Arduino SDK.
The library includes a minimal portability layer which facilitate porting RTI nano-client to any platform with a 32-bit CPU/MCU.
The library is written using standard C99, single-threaded, and it does not perform any dynamic memory allocation.
The porability layer includes abstractions for basic primitive types, memory manipulation and clock timestamps, which are often readily available in most standard C library implementations, and supported by most C compilers,
Additionally, RTI nano-client relies on a set of portable communications interfaces to abstract the library from the underlying technological stack.
These abstractions are used to facilitate the porting of transport plugins to different platforms.
4.1. Platform Portability Layer¶
The following tables summarize the portable interfaces used by RTI nano-client and the currenlty supported implementations.
The library will try to detect available features during compilation and select the most appropriate implementation for the target if one is available.
This automatic detection can be disabled at any time by defining the preprocessor symbol associated with a specific interface to the desired implementation header, which can be useful to develop custom ports of the library without modifying the library’s header files.
Portable Interface |
Interface Description |
Preprocessor Symbol |
Implementation Header |
Implementation Description |
---|---|---|---|---|
Compiler Definitions |
Defines primitive floating-point
number types (and integral ones, in
case |
|
|
Definitons for standard C compilers (e.g. gcc, clang), and Microsoft’s MSVC. |
Platform Services |
Abstraction for system-level services, such as clock, memory, and string manipulation |
|
|
Implementation for POSIX(-ish) platforms, such as Linux, and Darwin. |
|
Implementation for Windows platforms. |
|||
|
Implementation for platforms which support the Arduino SDK. |
|||
IP Network Stack |
Abstractions for IP networking and UDP sockets. |
|
|
Implementation for platforms with support for standard BSD sockets (including LwIP with socket support). |
|
Implementation using LwIP’s Raw UDP API. |
|||
|
Implementation for WinSocket2. |
|||
Serial Communication |
Abstractions for communicating over a serial port. |
|
|
Implementation for platforms with
support for the standard POSIX
|
|
Implementation on top of Arduino’s
|