fledge-power / fledge-south-iec104

A south plugin to gather data using the IEC 104 protocol.
Apache License 2.0
1 stars 3 forks source link

=============================================================================== IEC104 C/C++ South plugin

A simple asynchronous IEC104 plugin that pulls data from a server and sends it to Fledge.

To build this plugin, you will need the lib60870 library installed on your environment as described below.

You also need to have Fledge installed from the source code, not from the package repository.

Building lib60870

To build IEC104 C/C++ South plugin, you need to download lib60870 at: https://github.com/mz-automation/lib60870

.. code-block:: console

$ git clone https://github.com/mz-automation/lib60870.git $ cd lib60870 $ export LIB_104=pwd

As shown above, you need a $LIB_104 env var set to the source tree of the library.

Then, you can build lib60870 with:

.. code-block:: console

$ cd lib60870-C $ mkdir build $ cd build $ cmake .. $ make

Build

To build the iec104 plugin, once you are in the plugin source tree you need to run:

To build a release:

.. code-block:: console

$ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Release .. $ make

To build with unit tests and code coverage:

.. code-block:: console

$ mkdir build $ cd build $ cmake -DCMAKE_BUILD_TYPE=Coverage .. $ make

You may also pass one or more of the following options to cmake to override this default behaviour:

NOTE:

Examples:

Using the plugin

As described in the Fledge documentation, you can use the plugin by adding a service from a terminal, or from the web API.

1 - Add the service from a terminal:

.. code-block:: console

$ curl -sX POST http://localhost:8081/fledge/service -d '{"name":"iec104_name","type":"south","plugin":"iec104","enabled":true}'

Or

2) Add the service from the web API: