A08 Native Extensions
Native extension are application and libraries natively compiled for your platform. This article explains how to manage, configure and build those extensions.
There are ports and serializer that require native extensions.
A native extension is required if a port, a serializer or any other impulse extension need:
- external applications to be called from a serializer or port,
- external libraries in binary format to be linked to,
- external libraries in source format (c/c++) to be integrated.
The external applications/libraries/sources may be part of an impulse deployment (plug-in) or a requirement that need to be downloaded from external sites and installed.
Native extension usually support the following platforms:
- Linux x-86 32bit
- Linux x-86 64bit
- Windows x-86 32bit
- Windows x-86 64bit
- OsX x-86 32bit
- OsX x-86 64bit
Additional platforms may be supported if users re-configure and re-compile a given native extension.
External applications for serializers can be configured using the serializers preference page.
In case of ports you will find a specific native extension preference page (impulse->Native Extensions).
To embed the functionality of the external libraries, impulse uses extension applications only, JNI/JNA DLLs/shared libraries are not used intentionally.
Reason for this is that shared libraries may influence the runtime engine and therefor the whole eclipse IDE.
These extension applications are simple console application, interfacing with the java domain via stdin/stdout or a tcp port.
Configuration and re-compilation of native extensions
There are the following reasons that may force you to recompile a native extension:
- A pre-compiled extension does not work in the given environment (e.g. different linux environment).
- No pre-compiled extension is deployed because of missing libraries (to be installed by the user).
- A user wants to update required libraries.
- A user wants to extend the extension.
Re-compilation is easy by using the native extension preference pages.
If the extension required external libraries/source, the preference page starts with entry fields for binaries and sources/headers.
In the below fields you can configure the make process by setting the make command, the make target and additional flags and libs.
In the the button row below you find command buttons to compile and clean. Additionally you can open and modify the converter sources (all extension applications are open-source) as well the Makefile.
Flux based converter
All native extension with signal streaming are using flux as interface between the extension application and impulse.
- Signal and Scope definition
- Signal data transfer (packed/compressed)
- Bi-directional control interface
More about flux
Requirements for compiling native extensions
impulse uses the GNU tool-chain (make, gcc, g++) for compilation on all platform.
- Please install default gcc and g++ compilers (typically already done with the standard installation).
- Please install "MinGw" from http://www.mingw.org/
- Extend the PATH variable with the MinGw bin folder.
- Please install the "Command Line Tools for Xcode" from your App Store.