Skip to content

Commit

Permalink
- Merge with Libiec61850 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier BLANC committed Sep 9, 2018
2 parents d3c6330 + 6ba363b commit 1a80427
Show file tree
Hide file tree
Showing 216 changed files with 15,015 additions and 5,015 deletions.
77 changes: 77 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,10 +1,87 @@
Changes to version 1.3.0
------------------------
- IEC 61850 server: more features configurable at runtime
- IEC 61850 server: control objects - fixed bug in select response for SBO control model
- IEC 61850 client: add support for single array element access (with component specification)
- MMS server: add support for array element (index) access with nested component
- IEC 61850 server: made IEC 61850 edition configurable at runtime
- IEC 61850 server: added ReadAccessHandler to control read access
- HAL: unified platform abstraction layer (to simplify using the library together with lib60870)
- IEC 61850 server: fixed bug when calling write access handler (wrong pointer for ClientConnection object)
- updated IEC 61850-9-2 LE example to be more realistic
- added server side example for the substitution service
- MMS server: fixed wrong preprocessor defines that can cause problems in some configurations (unlimited number of client connections/ multi-threaded server)
- IEC 61850 client: added new function ControlObjectClient_getCtlValType to simplify control handling
- IEC 61850 server: reporting - don't delete pending events when buffered report is enabled and dataset didn't change
- fixed bug in MmsValue_update
- MMS server: fixed bug in delete variable list service - scope of delete was not considered optional
- some more small bug fixes and optimizations


Changes to version 1.2.2
------------------------

- IEC 61850 server: added support to configure report buffer size at runtime
- IEC 61850 server: new IedServerConfig type and new IedServer constructor
- .NET API: added support for IedServerConfig
- IEC 61850 server: prevent sending reports when data model is locked (updated)
- TLS client: fixed problem with high CPU load
- ISO connection: fixed race condition that can cause corrupted messages
- .NET API: added project files for .NET core 2.0
- .NET API: added server side support for TLS

Changes to version 1.2.1
------------------------

- IEC 61850 server: fixed bug in report module when RCB was enabled multiple times (was new in 1.2.0)
- .NET API: Added destructor and Dispose method to ReportControlBlock (fixed memory leak)
- .NET API: Changed ReportControlBlock access to IedConnection to improve stability when connection closes unexpectedly

Changes to version 1.2.0
------------------------

- IEC 61850/MMS client/server: Added TLS support (TLS API and implementation for mbedtls)
- IEC 61850/MMS server: removed deprecated AttributeChangedHandler
- Added pkg-config file
- The Sampled Values APIs have been renamed. The old version of the API is deprecated but still supported and will be removed in the next major version of the library.
- SV Publisher/Subscriber: a lot of small fixed and improvements
- .NET API: Added support for sampled values (SV) subscriber
- .NET API: Added support for GOOSE subscriber
- SV subscriber: added function SVReceiver_enableDestAddrCheck
- IEC 61850 server: fixed bug in buffered report module - report can be lost under some circumstances when BRCB is enabled
- SV subscriber: replaced code that caused unaligned memory access
- IEC 61850 server: added memory alignement for buffered reporting

Changes to version 1.1.2
------------------------

- MMS client: fixed parsing initiate response message
- SV publisher: conditional encoding for SmpRate
- MmsValue_update function now allows adjusting octet-string size of target object
- .NET API: Added DeleteFile
- CDC helper functions: added helper functions for VSS and VSG CDC
- added additional locks in client and server

Changes to version 1.1.1
------------------------

- IEC 61850 client: fixed bug in APC control handling
- IEC 61850 client: ClientReportControlBlock now accepts "$" and "." as seperator for RCB object reference
- MMS client: fixed bug in MmsConnection_connect (COTP payload buffer was not reset in case of an error during connect -> connection failed in case of reuse of MmsConnection object
- MMS client: delete named variable list service supports VMD specific lists
- SV subscriber/publisher: additional features and bug fixes
- SV: fixed data type for smpRate
- SV: fixed encoding of optional smpMod attribute
- SV receiver: Added semaphore to make subscriber list thread-safe
- .NET API: ControlObject implements IDisposable interface
- IED server: added new function IedServer_udpateDbposValue
- fixed problem with cmake include folders
- MMS client: file services -fixed encoding problem with long file names
- MMS server: ACSE authenticator passes application reference (ap-title and ae-qualifier)
- example directory cleanup
- MMS: fixed potential memory leak in asn1 code that can be caused by malformed MMS messages
- MMS client: MmsConnection_getVariableAccessAttributes support for VMD specific variables
- Java SCL parser: added support for "Val" elements for Octet64 types

Changes to version 1.1.0
------------------------
Expand Down
76 changes: 28 additions & 48 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ project(libiec61850)
ENABLE_TESTING()

set(LIB_VERSION_MAJOR "1")
set(LIB_VERSION_MINOR "2")
set(LIB_VERSION_MINOR "3")
set(LIB_VERSION_PATCH "0")
set(LIB_VERSION "${LIB_VERSION_MAJOR}.${LIB_VERSION_MINOR}.${LIB_VERSION_PATCH}")

Expand Down Expand Up @@ -42,7 +42,7 @@ option(CONFIG_IEC61850_REPORT_SERVICE "Build with support for IEC 61850 reportin
option(CONFIG_IEC61850_LOG_SERVICE "Build with support for IEC 61850 logging services" ON)
option(CONFIG_IEC61850_SETTING_GROUPS "Build with support for IEC 61850 setting group services" ON)

set(CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE "8000" CACHE STRING "Default buffer size for buffered reports in byte" )
set(CONFIG_REPORTING_DEFAULT_REPORT_BUFFER_SIZE "65536" CACHE STRING "Default buffer size for buffered reports in byte" )

# advanced options
option(DEBUG "Enable debugging mode (include assertions)" OFF)
Expand All @@ -60,48 +60,32 @@ option(DEBUG_SV_SUBSCRIBER "Enable Sampled Values subscriber debugging" ${DEBUG}
option(DEBUG_SV_PUBLISHER "Enable Sampled Values publisher debugging" ${DEBUG})
option(DEBUG_HAL_ETHERNET "Enable Ethernet HAL printf debugging" ${DEBUG})

#mark_as_advanced(
# DEBUG_SOCKET
# DEBUG_COTP
# DEBUG_ISO_SERVER
# DEBUG_ISO_CLIENT
# DEBUG_IED_SERVER
# DEBUG_IED_CLIENT
# DEBUG_MMS_SERVER
# DEBUG_MMS_CLIENT
# DEBUG_GOOSE_SUBSCRIBER
# DEBUG_GOOSE_PUBLISHER
# DEBUG_SV_SUBSCRIBER
# DEBUG_SV_PUBLISHER
# DEBUG_HAL_ETHERNET
#)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}/config
src/common/inc
src/goose
src/sampled_values
src/hal/inc
src/iec61850/inc
src/iec61850/inc_private
src/mms/inc
src/mms/inc_private
src/mms/iso_mms/asn1c
src/logging
src/tls
${CMAKE_CURRENT_LIST_DIR}/src/common/inc
${CMAKE_CURRENT_LIST_DIR}/src/goose
${CMAKE_CURRENT_LIST_DIR}/src/sampled_values
${CMAKE_CURRENT_LIST_DIR}/src/hal/inc
${CMAKE_CURRENT_LIST_DIR}/src/iec61850/inc
${CMAKE_CURRENT_LIST_DIR}/src/iec61850/inc_private
${CMAKE_CURRENT_LIST_DIR}/src/mms/inc
${CMAKE_CURRENT_LIST_DIR}/src/mms/inc_private
${CMAKE_CURRENT_LIST_DIR}/src/mms/iso_mms/asn1c
${CMAKE_CURRENT_LIST_DIR}/src/logging
)

set(API_HEADERS
src/hal/inc/hal_time.h
src/hal/inc/hal_thread.h
src/hal/inc/hal_filesystem.h
src/hal/inc/hal_ethernet.h
src/hal/inc/platform_endian.h
set(API_HEADERS
hal/inc/hal_time.h
hal/inc/hal_thread.h
hal/inc/hal_filesystem.h
hal/inc/hal_ethernet.h
hal/inc/tls_config.h
hal/inc/platform_endian.h
hal/inc/lib_memory.h
src/common/inc/libiec61850_common_api.h
src/common/inc/libiec61850_platform_includes.h
src/common/inc/linked_list.h
src/common/inc/byte_buffer.h
src/common/inc/lib_memory.h
src/common/inc/string_utilities.h
src/iec61850/inc/iec61850_client.h
src/iec61850/inc/iec61850_common.h
Expand All @@ -127,16 +111,13 @@ set(API_HEADERS
src/goose/goose_publisher.h
src/sampled_values/sv_subscriber.h
src/sampled_values/sv_publisher.h
src/sampled_values/sv_publisher_deprecated.h
src/sampled_values/sv_subscriber_deprecated.h
src/logging/logging_api.h
src/tls/tls_api.h
${CMAKE_CURRENT_BINARY_DIR}/config/stack_config.h
)

if(MSVC)
include_directories(
src/vs
${CMAKE_CURRENT_LIST_DIR}/src/vs
)
endif(MSVC)

Expand All @@ -145,15 +126,8 @@ set(WITH_MBEDTLS 1)
endif(EXISTS ${CMAKE_CURRENT_LIST_DIR}/third_party/mbedtls/mbedtls-2.6.0)

if(WITH_MBEDTLS)
include_directories(
src/tls/mbedtls
third_party/mbedtls/mbedtls-2.6.0/include
)

file(GLOB tls_SRCS ${CMAKE_CURRENT_LIST_DIR}/third_party/mbedtls/mbedtls-2.6.0/library/*.c)

add_definitions(-DCONFIG_MMS_SUPPORT_TLS=1)
add_definitions(-DMBEDTLS_CONFIG_FILE="mbedtls_config.h")

endif(WITH_MBEDTLS)

Expand All @@ -163,8 +137,14 @@ configure_file(
${CMAKE_CURRENT_BINARY_DIR}/config/stack_config.h
)

include_directories(
${CMAKE_CURRENT_LIST_DIR}/hal/inc
)

add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/hal")

if(BUILD_EXAMPLES)
add_subdirectory(examples)
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/examples)
endif(BUILD_EXAMPLES)

add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/src)
Expand Down
49 changes: 27 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,30 +31,35 @@ LIB_SOURCE_DIRS += src/iec61850/server/model
LIB_SOURCE_DIRS += src/iec61850/server/mms_mapping
LIB_SOURCE_DIRS += src/iec61850/server/impl
ifeq ($(HAL_IMPL), WIN32)
LIB_SOURCE_DIRS += src/hal/socket/win32
LIB_SOURCE_DIRS += src/hal/thread/win32
LIB_SOURCE_DIRS += src/hal/ethernet/win32
LIB_SOURCE_DIRS += src/hal/filesystem/win32
LIB_SOURCE_DIRS += src/hal/time/win32
LIB_SOURCE_DIRS += hal/socket/win32
LIB_SOURCE_DIRS += hal/thread/win32
LIB_SOURCE_DIRS += hal/ethernet/win32
LIB_SOURCE_DIRS += hal/filesystem/win32
LIB_SOURCE_DIRS += hal/time/win32
LIB_SOURCE_DIRS += hal/serial/win32
LIB_SOURCE_DIRS += hal/memory
else ifeq ($(HAL_IMPL), POSIX)
LIB_SOURCE_DIRS += src/hal/socket/linux
LIB_SOURCE_DIRS += src/hal/thread/linux
LIB_SOURCE_DIRS += src/hal/ethernet/linux
LIB_SOURCE_DIRS += src/hal/filesystem/linux
LIB_SOURCE_DIRS += src/hal/time/unix
LIB_SOURCE_DIRS += hal/socket/linux
LIB_SOURCE_DIRS += hal/thread/linux
LIB_SOURCE_DIRS += hal/ethernet/linux
LIB_SOURCE_DIRS += hal/filesystem/linux
LIB_SOURCE_DIRS += hal/time/unix
LIB_SOURCE_DIRS += hal/serial/linux
LIB_SOURCE_DIRS += hal/memory
else ifeq ($(HAL_IMPL), BSD)
LIB_SOURCE_DIRS += src/hal/socket/bsd
LIB_SOURCE_DIRS += src/hal/thread/bsd
LIB_SOURCE_DIRS += src/hal/ethernet/bsd
LIB_SOURCE_DIRS += src/hal/filesystem/linux
LIB_SOURCE_DIRS += src/hal/time/unix
LIB_SOURCE_DIRS += hal/socket/bsd
LIB_SOURCE_DIRS += hal/thread/bsd
LIB_SOURCE_DIRS += hal/ethernet/bsd
LIB_SOURCE_DIRS += hal/filesystem/linux
LIB_SOURCE_DIRS += hal/time/unix
LIB_SOURCE_DIRS += hal/memory
endif
LIB_INCLUDE_DIRS += config
LIB_INCLUDE_DIRS += hal/inc
LIB_INCLUDE_DIRS += src/common/inc
LIB_INCLUDE_DIRS += src/mms/iso_mms/asn1c
LIB_INCLUDE_DIRS += src/mms/inc
LIB_INCLUDE_DIRS += src/mms/inc_private
LIB_INCLUDE_DIRS += src/hal/inc
LIB_INCLUDE_DIRS += src/goose
LIB_INCLUDE_DIRS += src/sampled_values
LIB_INCLUDE_DIRS += src/iec61850/inc
Expand All @@ -67,9 +72,9 @@ endif

ifdef WITH_MBEDTLS
LIB_SOURCE_DIRS += third_party/mbedtls/mbedtls-2.6.0/library
LIB_SOURCE_DIRS += src/tls/mbedtls
LIB_SOURCE_DIRS += hal/tls/mbedtls
LIB_INCLUDE_DIRS += third_party/mbedtls/mbedtls-2.6.0/include
LIB_INCLUDE_DIRS += src/tls/mbedtls
LIB_INCLUDE_DIRS += hal/tls/mbedtls
CFLAGS += -D'MBEDTLS_CONFIG_FILE="mbedtls_config.h"'
CFLAGS += -D'CONFIG_MMS_SUPPORT_TLS=1'
endif
Expand All @@ -80,9 +85,10 @@ ifndef INSTALL_PREFIX
INSTALL_PREFIX = ./.install
endif

LIB_API_HEADER_FILES = src/hal/inc/hal_time.h
LIB_API_HEADER_FILES += src/hal/inc/hal_thread.h
LIB_API_HEADER_FILES += src/hal/inc/hal_filesystem.h
LIB_API_HEADER_FILES = hal/inc/hal_time.h
LIB_API_HEADER_FILES += hal/inc/hal_thread.h
LIB_API_HEADER_FILES += hal/inc/hal_filesystem.h
LIB_API_HEADER_FILES += hal/inc/tls_config.h
LIB_API_HEADER_FILES += src/common/inc/libiec61850_common_api.h
LIB_API_HEADER_FILES += src/common/inc/linked_list.h
LIB_API_HEADER_FILES += src/common/inc/byte_buffer.h
Expand Down Expand Up @@ -112,7 +118,6 @@ LIB_API_HEADER_FILES += src/goose/goose_publisher.h
LIB_API_HEADER_FILES += src/sampled_values/sv_subscriber.h
LIB_API_HEADER_FILES += src/sampled_values/sv_publisher.h
LIB_API_HEADER_FILES += src/logging/logging_api.h
LIB_API_HEADER_FILES += src/tls/tls_api.h

get_sources_from_directory = $(wildcard $1/*.c)
get_sources = $(foreach dir, $1, $(call get_sources_from_directory,$(dir)))
Expand Down
55 changes: 41 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,19 @@ This file is part of the documentation of **libIEC61850**. More documentation ca

Content:

* Overview
* Building and running the examples
* Installing the library and the API headers
* Building on Windows with GOOSE support
* Building with the cmake build script
* Using the log service with sqlite
* C# API
* Licensing
* Contributing
* Third-party contributions
* [Overview](#overview)
* [Features](#features)
* [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)
* [Third-party contributions](#third-party-contributions)


## Overview
Expand All @@ -25,9 +28,33 @@ libiec61850 is an open-source (GPLv3) implementation of an IEC 61850 client and

For commercial projects licenses and support is provided by MZ Automation GmbH. Please contact [email protected] 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
* GOOSE and SV control block handling
* TLS support
* C and C#/.NET API


## Building and running the examples with the provided makefiles

In the project root directoy type
In the project root directory type

```
make examples
Expand All @@ -38,8 +65,8 @@ If the build succeeds you can find a few binary files in the projects root direc
Run the sample applications in the example folders. E.g.:

```
cd examples/server_example1
sudo ./server_example1
cd examples/server_example_basic_io
sudo ./server_example_basic_io
```

on the Linux command line.
Expand All @@ -54,7 +81,7 @@ In the main libiec61850 folder run

```
make WITH_MBEDTLS=1
```
```

## Installing the library and the API headers

Expand Down
Loading

0 comments on commit 1a80427

Please sign in to comment.