eclipse-agail / agile-core

Source code repository for agile core components
Eclipse Public License 2.0
7 stars 16 forks source link

Agile core components

This repository contains the alpha version of the following AGILE components:

Prerequisites

For the compilation, the following packages needs to be installed:

A java 8 compatible JDK and maven (mvn) must be already available in the system.

JAVA_HOME must be set for compilation to work.

Agile Protocol Manager

Exposes the org.eclipse.agail.ProtocolManager interface

Example

The package org.eclipse.agail.protocolmanager.example contains an example file (i.e BLEDeviceDiscovery.java) to demonstrate the use of AGILE Protocol Manager to discover BLE devices through DBus interface.

AGILE Device Manager

Exposes the org.eclipse.agail.DeviceManager interface

Example

Register BLE Device The package org.eclipse.agail.devicemanager.example contains an example file (i.e RegisterDevice.java) to demonstrate the usage of Agile Device Manager for device registration and creation of DBus interface for the registered device

Additional interfaces

AGILE Device Factory

Exposes the org.eclipse.agail.DeviceFactory interface

The DeviceFactory can also load device implementation from a plugin folder. This plugin folder should be part of the classpath and also specified as the first parameter to the DeviceFactory. Class files with device implementation must implement the org.eclipse.egail.Device interface, and should be placed directly in the org.eclipse.agail.device.instance package. Class files must be placed in the plugin folder structured in a folder hierarchy corresponding to the package, i.e. the usual Java way: /org/eclipse/agail/device/instance/MyNewAgileDevice.class.

HTTP API

The DBus API can be used from the HTTP endpoint exposed by default on port 8080.

See the HTTP API reference for details on the exposed endpoints.

To query the endpoint, we suggest using Postman by importing the swagger based API definition

Launching the API

Under the scripts directory you can find different scripts to setup and start / stop the modules.