Dev Device
Compiling a single device
Sometimes it is necessary to add support for a single device in an already deployed system. Especially when deployment was done using dockerized containers, it is useful to be able to add a device to the system without rebuilding the containers. To add support, follow these steps:
1, Clone agile-core, which also contains the DeviceFactory with device implementations
git clone --recursive https://github.com/Agile-IoT/agile-core
Note: use recursive cloning, or `git submodule update —init`
2, Ensure build environment is installed and JAVA_HOME is set. Compilation with fail if JAVA_HOME is unset.
3, Install build dependencies
scripts/install-agile-intefaces.sh
4, Compile the DeviceFactory
cd org.eclipse.agail.DeviceFactory mvn package
5, Develop your own device code (e.g. MyDevice.java) based on some of the examples in src/main/java/org/eclipse/agail/device/instance/
6, Compile your own device into java class
javac -extdirs target src/main/java/org/eclipse/agail/device/instance/MyDevice.java
7, Deploy this class in the plugin folder of an existing DeviceFactory