From b1d5e10203532a1d505ad656854edf9b25b589a2 Mon Sep 17 00:00:00 2001 From: Michael Zillgith Date: Thu, 4 Feb 2016 18:22:29 +0100 Subject: [PATCH] - prepare for release 0.9.0.1 - cmake build on windows excludes examples for GOOSE and SV when winpcap is not available --- CHANGELOG | 4 ++++ examples/CMakeLists.txt | 15 ++++++++++++++- .../goose_publisher/goose_publisher_example.c | 8 +++++++- 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 39782724..458befbb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +Changes to version 0.9.0.1 +-------------------------- +- fixed problem with windows build with GOOSE and SV support + Changes to version 0.9 ---------------------- - Sampled values subscriber code diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 99b09e0f..ad831255 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -3,7 +3,6 @@ add_subdirectory(server_example2) add_subdirectory(server_example3) add_subdirectory(server_example4) add_subdirectory(server_example5) -add_subdirectory(server_example_goose) add_subdirectory(server_example_control) add_subdirectory(server_example_dynamic) add_subdirectory(server_example_config_file) @@ -22,8 +21,22 @@ add_subdirectory(mms_client_example1) add_subdirectory(mms_client_example2) add_subdirectory(mms_client_example3) add_subdirectory(mms_client_example4) + +IF(WIN32) +if(EXISTS "../third_party/winpcap/Lib/wpcap.lib") +message("Found winpcap -> compile examples for GOOSE and SV") +add_subdirectory(server_example_goose) +add_subdirectory(goose_subscriber) +add_subdirectory(sv_subscriber) +add_subdirectory(iec61850_9_2_LE_example) +add_subdirectory(iec61850_sv_client_example) +add_subdirectory(sv_publisher) +endif() +else() +add_subdirectory(server_example_goose) add_subdirectory(goose_subscriber) add_subdirectory(sv_subscriber) add_subdirectory(iec61850_9_2_LE_example) add_subdirectory(iec61850_sv_client_example) add_subdirectory(sv_publisher) +endif() \ No newline at end of file diff --git a/examples/goose_publisher/goose_publisher_example.c b/examples/goose_publisher/goose_publisher_example.c index 1b6c0107..c989b1de 100644 --- a/examples/goose_publisher/goose_publisher_example.c +++ b/examples/goose_publisher/goose_publisher_example.c @@ -36,7 +36,13 @@ main(int argc, char** argv) gooseCommParameters.vlanId = 0; gooseCommParameters.vlanPriority = 4; - GoosePublisher publisher = GoosePublisher_create(&gooseCommParameters, "eth0"); + /* + * Create a new GOOSE publisher instance. As the second parameter the interface + * name can be provided (e.g. "eth0" on a Linux system). If the second parameter + * is NULL the interface name as defined with CONFIG_ETHERNET_INTERFACE_ID in + * stack_config.h is used. + */ + GoosePublisher publisher = GoosePublisher_create(&gooseCommParameters, NULL); GoosePublisher_setGoCbRef(publisher, "simpleIOGenericIO/LLN0$GO$gcbAnalogValues"); GoosePublisher_setConfRev(publisher, 1);