NexusDataLink can run on Raspberry Pi (Raspbian).
It requires some steps to be done, which shall be described in this chapter: it shows how to run the NDL example agent (including the agentLib) on the Raspberry Pi.
Please note that there are numerous ways how to build and automate an NDL AgentLib distribution for Raspberry Pi in a more elegant and sophisticated way– this article just demonstrates the technical steps that have to be performed to get a proof-of-concept.
Follow this tutorial to cross-compile Qt 5.x for your Raspberry Pi:
For NDL it is sufficient to compile only the Qt core modules omitting GUI-related modules.
Apply the Qt Creator configuration described in the mentioned tutorial to project qt_agentlib and the NDL example agent in qt_agent.
Compile Google Protobuf on your Raspberry Pi and copy the file libprotobuf-lite.a to a directory of your choice on your development runtime platform (e.g. your PC). You will find more detailed information about compiling Google Protobuf in the NDL developer manual.
When compiling the NDL AgentLib (qt_agentLib) the .pro file must point to the directory where the Protobuf library is located. As we will cross-compile NDL agent, the default Protobuf library of your system (which you will get if you setup your NDL development platform as documented in the NDL manual) would be incompatible.
So the file agentLib.pro has to be changed so that the corresponding -L option points to the directory where you copied your remote-compilted Protobuf library
You should now be able to perform a successful cross-compilation using Qt Creator – first on project qt_agentlib, then on qt_agent.
Copy the resulting artifacts agent, libagentlib.so* and the directory agentLibFiles to your Raspberry Pi, so that the following directory structure exists:
home/pi/ndl_agent |---bin | | | |---agent | |---libagentlib.so* | |---agentLibFiles
Execute the NDL example agent on the Raspberry Pi:
cd /home/pi/ndl_agent/bin export LD_LIBRARY=. # to find shared library libagentlib.so ./agent
You should now see the output log of the NDL example agent – it runs on your Raspberry Pi!