diff --git a/CHANGELOG b/CHANGELOG index 11edb14b..b1cbb443 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,10 @@ 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) +- 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 diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 31552c2f..fafc146b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -21,10 +21,7 @@ add_subdirectory(iec61850_client_example5) add_subdirectory(iec61850_client_example_reporting) add_subdirectory(iec61850_client_example_log) add_subdirectory(iec61850_client_example_array) - -if(NOT WIN32) - add_subdirectory(iec61850_client_example_files) -endif() +add_subdirectory(iec61850_client_example_files) if(WIN32) if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/../third_party/winpcap/Lib/wpcap.lib") diff --git a/examples/iec61850_client_example_files/file-tool.c b/examples/iec61850_client_example_files/file-tool.c index 53f23086..396e8bf9 100644 --- a/examples/iec61850_client_example_files/file-tool.c +++ b/examples/iec61850_client_example_files/file-tool.c @@ -8,15 +8,73 @@ * * Note: intended to be used with server_example3 or server_example_files * - * Note: DOES NOT WORK WITH VISUAL STUDIO because of libgen.h - * */ #include "iec61850_client.h" #include #include +#ifdef _WIN32 +#include +#else #include +#endif + +#ifdef _WIN32 +static char _dirname[1000]; + +static char* +dirname(char* path) +{ + char* lastSep = NULL; + + int len = strlen(path); + int i = 0; + + while (i < len) { + if (path[i] == '/' || path[i] == ':' || path[i] == '\\') + lastSep = path + i; + + i++; + } + + if (lastSep) { + strcpy(_dirname, path); + _dirname[lastSep - path] = 0; + } + else + strcpy("", path); + + return _dirname; +} + + +static char _basename[1000]; + +static char* +basename(char* path) +{ + char* lastSep = NULL; + + int len = strlen(path); + int i = 0; + + while (i < len) { + if (path[i] == '/' || path[i] == ':' || path[i] == '\\') + lastSep = path + i; + + i++; + } + + if (lastSep) + strcpy(_basename, lastSep + 1); + else + strcpy(_basename, path); + + return _basename; +} + +#endif static char* hostname = "localhost"; static int tcpPort = 102;