# README libIEC61850
[![Build Status](https://travis-ci.org/mz-automation/libiec61850.svg?branch=master)](https://travis-ci.org/mz-automation/libiec61850)
This file is part of the documentation of **libIEC61850**. More documentation can be found online at http://libiec61850.com.
The API documentation can be found here:
* C API: https://support.mz-automation.de/doc/libiec61850/c/latest/
* .NET API: https://support.mz-automation.de/doc/libiec61850/net/latest/
Also consider to review the examples to understand how to use the library.
Content:
* [Overview](#overview)
* [Features](#features)
* [Examples](#examples)
* [Building and running the examples](#building-and-running-the-examples-with-the-provided-makefiles)
* [Building the library with TLS support](#building-the-library-with-tls-support)
* [Installing the library and the API headers](#installing-the-library-and-the-api-headers)
* [Building on Windows with GOOSE support](#building-on-windows-with-goose-support)
* [Building with the cmake build script](#building-with-the-cmake-build-script)
* [Using the log service with sqlite](#using-the-log-service-with-sqlite)
* [C# API](#c-api)
* [Experimental Python bindings](#experimental-python-bindings)
* [Licensing](#commercial-licenses-and-support)
* [Contributing](#contributing)
## Overview
libiec61850 is an open-source (GPLv3) implementation of an IEC 61850 client and server library implementing the protocols MMS, GOOSE and SV. It is implemented in C (according to the C99 standard) to provide maximum portability. It can be used to implement IEC 61850 compliant client and server applications on embedded systems and PCs running Linux, Windows, and MacOS. Included is a set of simple example applications that can be used as a starting point to implement own IEC 61850 compliant devices or to communicate with IEC 61850 devices. The library has been successfully used in many commercial software products and devices.
For commercial projects licenses and support is provided by MZ Automation GmbH. Please contact info@mz-automation.de for more details on licensing options.
## Features
The library support the following IEC 61850 protocol features:
* MMS client/server, GOOSE (IEC 61850-8-1)
* Sampled Values (SV - IEC 61850-9-2)
* Support for buffered and unbuffered reports
* Online report control block configuration
* Data access service (get data, set data)
* online data model discovery and browsing
* all data set services (get values, set values, browse)
* dynamic data set services (create and delete)
* log service
** flexible API to connect custom data bases
** comes with sqlite implementation
* MMS file services (browse, get file, set file, delete/rename file)
** required to download COMTRADE files
* Setting group handling
* Support for service tracking
* GOOSE and SV control block handling
* TLS support
* C and C#/.NET API
## Examples
The examples are built automatically when CMake is used to build the library.
NOTE: Most examples are intended to show a specific function of the library. They are designed to show this function as simple as possible and may miss error handling that has to be present in real applications!
## Building and running the examples with the provided makefiles
In the project root directory type
```
make examples
```
If the build succeeds you can find a few binary files in the projects root directory. You can also find a binary version of the library ("libiec61850.a") in the "build" directory.
Run the sample applications in the example folders. E.g.:
```
cd examples/server_example_basic_io
sudo ./server_example_basic_io
```
on the Linux command line.
You can test the server examples by using a generic client or the provided client example applications.
## Building the library with TLS support
Download, unpack, and copy mbedtls-2.16 into the third_party/mbedtls folder.
NOTE: The current version support mbedtls version 2.16. When you download the source archive from https://tls.mbed.org/ you have to rename the extracted folder to "mbedtls-2.16".
In the main libiec61850 folder run
```
make WITH_MBEDTLS=1
```
When using CMake the library is built automatically with TLS support when the folder third_party/mbedtls/mbedtls-2.16 is present.
## Installing the library and the API headers
The make and cmake build scripts provide an install target. This target copies the API header files and the static library to a single directory for the headers (INSTALL_PREFIX/include) and the static library (INSTALL_PREFIX/lib). With this feature it is more easy to integrate libiec61850 in an external application since you only have to add a simple include directory to the build tool of your choice.
This can be invoked with
`make install`
The default install directory for the make build script is ".install".
You can modify this by setting the INSTALL_PREFIX environment variable (e.g.):
`make INSTALL_PREFIX=/usr/local install`
For the cmake build script you have to provide the CMAKE_INSTALL_PREFIX variable
## Building on windows with GOOSE support
To build the library and run libiec61850 applications with GOOSE support on Windows (7/8/10) the use of a third-party library (winpcap) is required. This is necessary because current versions of Windows have no working support for raw sockets. You can download winpcap here (http://www.winpcap.org).
1. Download and install winpcap. Make sure that the winpcap driver is loaded at boot time (you can choose this option at the last screen of the winpcap installer).
2. Reboot the system (you can do this also later, but you need to reboot or load the winpcap driver before running any llibiec61850 applications that use GOOSE).
3. Download the winpcap developers pack from here (http://www.winpcap.org/install/bin/WpdPack_4_1_2.zip)
4. Unpack the zip file. Copy the folders Lib and Include from the WpdPack directory in the third_party/winpcap directory of libiec61850
## Building with the cmake build script
With the help of the cmake build script it is possible to create platform independent project descriptions and let cmake create specific project or build files for other tools like Make or Visual Studio.
If you have cmake installed fire up a command line (cmd.exe) and create a new subdirectory in the libiec61850 folder. Change to this subdirectory. Then you can invoke cmake. As an command line argument you have to supply a "generator" that is used by cmake to create the project file for the actual build tool (in our case Visual Studio 2015).
`cmake -G "Visual Studio 14 2015" ..`
will instruct cmake to create a "solution" for Visual Studio 2015. The resulting project files will be 32 bit.
To build 64 bit libraries the "Win64" generator option has to be added.
`cmake -G "Visual Studio 14 2015 Win64" ..`
Note: The ".." at the end of the command line tells cmake where to find the main build script file (called CMakeLists.txt). This should point to the folder libiec61850 which is in our case the parent directory (..).
Depending on the system you don't have to provide a generator to the cmake command.
To select some configuration options you can use ccmake or cmake-gui.
For newer version of Visual Studio you can use one of the following commands (for 64 bit builds):
For Visual Studio 2017:
cmake -G "Visual Studio 15 2017 Win64" ..
For Visual Studio 2019 (new way to specify the x64 platform):
cmake -G "Visual Studio 16 2019" .. -A x64
## Using the log service with sqlite
The library provides support for the IEC 61850 log service. It provides an abstract interface for a logging database. Included is a driver for using sqlite for logging. This driver can be seen as an example on how to use the abstract logging interface.
You can use the driver by including the src/logging/drivers/sqlite/log_storage_sqlite.c file into your application build.
On Ubuntu Linux (and simpilar Linux distributions) it is enough to install the sqlite dev packages from the standard repository. For
rpybx
- 粉丝: 14
- 资源: 9
最新资源
- 鲸鱼优化算法WOA与GRU神经网络的多特征输入单变量预测建模(Matlab 2020版),鲸鱼优化算法WOA结合GRU做多特征输入单个因变量输出的拟合预测建模 程序内注释详细,直接替数据就可以用
- 海鸥算法SOA优化GRU超参数,建立多特征单因变量预测模型-matlab程序,详细注释,数据替换指南,运行效果展示,海鸥算法SOA优化GRU,对GRU的学习率,正则化系数,隐含层个数三个超参数做寻优
- 高速开关磁阻电机maxwell下的设计与模拟:突破转速极限至17000rpm,rmxprt文件与maxwell2D探究,高速开关磁阻电机maxwell 17000rpm 6 4 rmxprt文件和m
- PFC桩体离散性建模处理与Clump Cluster构建:刚性簇与柔性簇数值模拟仿真全套命令流解析,pfc 桩体离散性建模处理 刚性簇柔性簇 clump cluster构建 生成数值模拟仿真 数值分析
- 基于FPGA的TCP乱序重排算法实现与性能验证:高效快速恢复技术解决方案,基于fpga的tcp乱序重排算法实现,通过verilog实现适用于fpga的tcp乱序重排算法,并通过实际数据测试验证 代码
- MATLAB仿真下的电导增量法最大功率跟踪仿真模型:光伏并网、变压器控制及电网数据采集,MATLAB仿真 电导增量法搭建最大功率跟踪的仿真模型 1.实现光伏并网 2.最大功率追踪控制升压变压器 3电网
- 制药车间洁净环境精准控制的BMS系统界面与应用案例(基于西门子技术的控制画面程序详解),制药车间BMS控制系统程序画面案例, BMS系统简称楼宇自控系统,其控制对象通常包括空调系统冷热源、空调机组、新
- VB程序注册功能实现及注册机示例代码详解:注册验证、机器码与注册码生成,VB程序注册及注册机示例程序代码 自己可以给软件加一个注册功能 源码包含两个部分:主程序部分和注册机部分 1.功能介绍:打开程序
- 电力市场下抽水蓄能调度模式分析与优化:自调度、半调度和全调度的实践与比较,1关键词:电力市场;抽水蓄能;调度模式;优化模型;Matlab优化程序 2参考文献:美国电力市场环境下抽水蓄能调度模
- 基于STC89C52单片机的智能衣架数据采集方案:捕捉顾客行为,实时传输服装挑选与试穿数据,基于STC89C52单片机的智能衣架电路方案设计 基于51单片机的智能衣架,用于服装店采集顾客在挑选和试穿服
- 三相PWM整流器闭环仿真:电压电流双环控制策略与MATLAB Simulink模型实现,三相PWM整流器闭环仿真,电压电流双闭环控制,输出电压做外环 模型中包含主电路,LCL滤波,坐标变,锁相环,双环
- "双馈风力发电系统仿真研究:基于矢量控制的背靠背双PWM变换器控制系统,实现最大功率追踪与低电压穿越功能",双馈风力发电系统仿真,DFIG, 背靠背双pwm变器控制系统,具备最大功率追踪功能 低电压
- 西门子S7-1200 PLC脉冲控制伺服与步进电机程序案例:结构化编程,含梯形图与SCL语言,跨品牌适用,含电路图纸及丰富文档 ,西门子S7-1200PLC脉冲控制伺服程序案例 此程序是关于西门子12
- 西门子PID控制程序:PLC与变频器通讯,触摸屏操作,手动自动功能齐全,详细注释与电气设计图,SIEMENS 西门子西门子PID 整套程序 西门子Plc1200和多台G120西门子变频器Modbud
- 基于达芬奇FPGA开发板的车牌识别项目经验:涉及XC7A35T板载开发、Vivado工程设计与ModelSim仿真模拟,附配套思维导图 ,fpga车牌识别项目 扩充简历 我用的是达芬奇fpga的xc7
- Comsol仿真下的声子晶体带隙分析:一维、二维及三维禁带特征与色散曲线研究,Comsol 代做 一维二维三维声子晶体带隙仿真,传输损耗,声传递损失,禁带,色散曲线 ,Comsol代做;声子晶体带隙
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0