libIEC61850
Open-source IEC 61850 MMS server and client library
|
This is the reference manual of libIEC61850. libIEC61850 is an open-source (GPLv3) implementation of an IEC 61850 client and server library. It is implemented in C to provide maximum portability. It can be used to implement IEC 61850 compatible client and server applications on embedded systems and PCs running Linux and Windows. Included is a set of simple example applications that can be used as a starting point to implement your own IEC 61850 compatible devices or to communicate with IEC 61850 devices. There is also an open-source implementation of IEC 61850 in Java (see http://openmuc.org).
The library implements parts of IEC 61850 on top of the MMS mapping. It provides the MMS protocol stack on top of TCP/IP.
The goal of this project is to provide an implementation that can run on memory constrained microcontrollers. But currently the library only runs on embedded linux systems as well as Desktop PCs running Linux or Windows.
The API of libIEC61850 can be divided into a client and a server part. Both parts also share common elements.
The client API is not yet IEC 61850 specific but is a generic MMS client API that provides only the features required by the IEC 61850 MMS Mapping. In the future a higher level API will be created that will be more specific to IEC 61850.
Server support for IEC 61850 includes the generation of the MMS device model out of the static IEC 61850 data model and the generation of reports. The server API is designed to add very low overhead and can be used to create very small IEC 61850 compliant MMS server applications.
libIEC61850 provides a hardware/OS abstraction layer (HAL) to hide the dependencies to the underlying platform. Currently this layer consists of thread, socket and time abstractions. If you want to port the library to a new platform you need to implement the functions defined by this API. At the moment implementations for POSIX(Linux, Mac OS X ...) and Win32 exists. This API consists of the three files hal/hal.h
, hal/socket/socket.h
and hal/thread/thread.h
.
To build the library you can simply execute make
in the main folder of the source distribution. It is assumed that a GCC toolchain and the Make tool is installed. To cross-compile for another platform you can specify the TARGET variable when executing make. To cross-compile for Windows you can call make TARGET=WIN32
. To cross-compile for ARM Linux you can call make TARGET=LINUX-ARM
. It is assumed that a proper GCC cross-compiler toolchain (like MinGW or arm-linux-gcc) is installed. Probably you need to adjust the toolchain prefix variables at the beginning of the Makefile.
To build the examples change to the main directory of the source distribution. On the command line type
make examples
This will build the examples for the host environment (currently Linux and Windows with MinGW are supported). You can also cross-compile if the target system is different from the host system. To test the server examples you can use the mms_client_example
binary. You can also use third-party tools like Omicron IEDScout or the openIEC61850 client example to test the examples.
libIEC61850 itself is released under the GPLv3. The asn1 code parts contain code of asn1c that is under a BSD style license (see http://lionet.info/asn1c/blog/).