Everyware Software Framework Developer's Hub

Everyware Software Framework (ESF) is an enterprise-ready IoT Edge Framework distributed and supported by Eurotech. Based on Eclipse Kura, the open source Java/OSGi middleware for IoT gateways, ESF adds provisioning, advanced security, remote access, diagnostics monitoring. It supports ready-to-use field protocols (including Modbus, OPC-UA, S7, FANUC, J1939, J1979, BACnet, IEC 60870-5-101, IEC 60870-5-104, DNP3, M-bus), MQTT connectivity, and a web-based visual data flow programming to acquire data from the field, process it at the edge, and publish it to IoT Cloud Platforms. ESF features full remote device management through its integration with Everyware Cloud, Eurotech’s IoT Integration Platform.

Get Started

GPIO Driver

The ESF GPIO Driver manages the General Purpose IOs on a gateway using the Driver model. Based on the ESF GPIO Service, the driver can be used in to the Wires framework, the Asset model or directly using the Driver itself.

Features

The GPIO Driver includes the following features:

  • support for digital input and output
  • support for unsolicited inputs
  • the trigger event can be configured directly through the Driver

Installation

As the others Drivers supported by ESF, it is distributed as a deployment package on Eclipse Marketplace. It can be installed following the instructions provided here.

Instance creation

A new GPIO Driver instance can be created either by clicking the New Driver button in the dedicated Drivers and Assets Web UI section or by clicking on the + button under Services. In both cases, the org.eclipse.kura.driver.gpio factory must be selected and a unique name must be provided for the new instance.
Once instantiated, the GPIO Driver is ready to use and no configuration is needed.

Channel configuration

The GPIO Driver channel can be configured with the following parameters:

  • enabled: it allows to enable/disable the channel. If it isn't selected the channel will be ignored.

  • name: the channel name.

  • type: the channel type, (READ, WRITE, or READ_WRITE).

  • value.type: the Java type of the channel value. The value read by the Driver will be converted to the value.type. Conversely, in write operations the Driver will accept value of this kind.

  • listen: when selected, a listener will be attached to this channel. Any event on the channel will be reported using a callback and the value will be emitted.

  • resource.name: the name of the GPIO resource as reported by the GPIO Service. The #select resource selection has no effect on the channel.

  • resource.direction: the direction of the GPIO. Possible values are INPUTand OUTPUT. The #select direction selection has no effect on the channel.

  • resource.trigger: the type of event that triggers the listener, if selected. Possible values are:

    • NONE: no event will trigger the listener.
    • RISING_EDGE, FALLING_EDGE, BOTH_EDGES: the listeners will be triggered respectively by a low-high transition, a high-low transition or both.
    • HIGH_LEVEL,LOW_LEVEL, BOTH_LEVELS: the listeners will be triggered respectively by the detection of a high, low or both levels. Please note that these options aren't supported by all the devices.

Drive a LED using the GPIO Driver

In this section a simple example on the ESF GPIO Driver will be presented. The examples use a ReliaGATE 10-11 or 10-12.

From the Drivers and Assets tab, create a new ESF GPIO Driver, call it GPIODriver and add an Asset as shown in the following picture.

The asset is configured to manage the LED1 gpio as an output and drives it writing a boolean value. In the Data tab, fill the Value form with true and press Apply: the USER1 green led will switch on.

Updated 11 months ago

GPIO Driver


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.