From 5d3c07768594383c4e64706e0565a5a14a0bf3fe Mon Sep 17 00:00:00 2001 From: Kerstin Keller <49187426+Kerstin-Keller@users.noreply.github.com> Date: Wed, 18 Sep 2019 14:05:50 +0200 Subject: [PATCH] eCAL v5.4.0: * Capnproto added as natively supported serialization format: * publisher & subscriber register descriptor information * dynamic subscriber added that doesn't require schematas * reflection support in eCAL Monitor * eCALMon display & calculation of CPU usage fixed * performance improvements * minor fixes --- CMakeLists.txt | 8 +- README.md | 86 ++--- .../Widgets/EcalmonTreeWidget/HostWidget.cpp | 4 +- .../EcalmonTreeWidget/ProcessWidget.cpp | 12 +- .../src/Widgets/Models/ProcessTreeItem.cpp | 12 +- .../src/Widgets/Models/ProcessTreeItem.h | 4 +- .../src/Widgets/Models/ProcessTreeModel.h | 12 +- app/mon/eCALMonPlugins/CMakeLists.txt | 4 + .../CapnprotoReflection/CMakeLists.txt | 69 ++++ .../src/CapnprotoTreeBuilder.cpp | 303 ++++++++++++++++ .../src/CapnprotoTreeBuilder.h | 66 ++++ .../CapnprotoReflection/src/Plugin.cpp | 28 ++ .../CapnprotoReflection/src/Plugin.h | 31 ++ .../CapnprotoReflection/src/PluginWidget.cpp | 339 ++++++++++++++++++ .../CapnprotoReflection/src/PluginWidget.h | 87 +++++ .../src/PluginWidget.ui} | 60 +++- .../CapnprotoReflection/src/metadata.json | 16 + .../eCALMonPlugins/DummyPlugin/src/Plugin.cpp | 19 + .../eCALMonPlugins/DummyPlugin/src/Plugin.h | 19 + .../DummyPlugin/src/PluginWidget.cpp | 32 +- .../DummyPlugin/src/PluginWidget.h | 32 +- .../ProtobufReflection/CMakeLists.txt | 7 +- .../ProtobufReflection/src/Plugin.cpp | 32 +- .../ProtobufReflection/src/Plugin.h | 32 +- .../ProtobufReflection/src/PluginWidget.cpp | 32 +- .../ProtobufReflection/src/PluginWidget.h | 32 +- .../src/ProtobufTreeBuilder.cpp | 19 + .../src/ProtobufTreeBuilder.h | 33 +- .../RawDataReflection/CMakeLists.txt | 4 + .../RawDataReflection/src/Plugin.cpp | 19 + .../RawDataReflection/src/Plugin.h | 19 + .../RawDataReflection/src/PluginWidget.cpp | 32 +- .../RawDataReflection/src/PluginWidget.h | 32 +- .../StringReflection/CMakeLists.txt | 4 + .../StringReflection/src/Plugin.cpp | 19 + .../StringReflection/src/Plugin.h | 2 +- .../StringReflection/src/PluginWidget.cpp | 32 +- .../StringReflection/src/PluginWidget.h | 32 +- cmake/eCALConfig.cmake.in | 2 +- .../helper_functions/ecal_add_functions.cmake | 18 +- contrib/ecaltime/linuxptp/src/CMakeLists.txt | 4 +- doc/CMakeLists.txt | 18 + ecal/core/cfg/ecal.ini | 6 +- .../include/ecal/cimpl/ecal_process_cimpl.h | 30 +- ecal/core/include/ecal/ecal_process.h | 51 ++- .../core/include/ecal/msg/capnproto/dynamic.h | 202 +++++++++++ ecal/core/include/ecal/msg/capnproto/helper.h | 120 +++++++ .../include/ecal/msg/capnproto/publisher.h | 142 +++++++- .../include/ecal/msg/capnproto/subscriber.h | 191 ++++++++-- ecal/core/include/ecal/msg/dynamic.h | 56 +++ .../ecal/msg/protobuf/dynamic_subscriber.h | 34 +- ecal/core/src/CMakeLists.txt | 3 + ecal/core/src/ecal.cpp | 6 +- ecal/core/src/ecal_def.h | 5 +- ecal/core/src/ecal_def_ini.h | 3 +- ecal/core/src/ecal_global_accessors.cpp | 8 +- ecal/core/src/ecal_global_accessors.h | 8 +- ecal/core/src/ecal_process.cpp | 14 +- ecal/core/src/ecal_register.cpp | 18 +- ecal/core/src/ecal_util.cpp | 2 +- ecal/core/src/ecalc.cpp | 14 +- ecal/core/src/io/ecal_memfile.cpp | 2 +- ecal/core/src/io/ecal_memfile_pool.cpp | 28 +- ecal/core/src/io/ecal_memfile_pool.h | 3 +- ecal/core/src/mon/ecal_monitoring_impl.cpp | 18 +- ecal/core/src/mon/ecal_monitoring_impl.h | 8 +- ecal/core/src/pubsub/ecal_subgate.cpp | 2 +- ecal/core/src/readwrite/ecal_writer.cpp | 4 +- ecal/core/src/readwrite/ecal_writer_shm.cpp | 60 ++-- ecal/core/src/readwrite/ecal_writer_shm.h | 5 +- ecal/core/src/sys_usage.cpp | 4 +- ecal/pb/src/ecal/pb/process.proto | 4 +- samples/CMakeLists.txt | 7 +- .../capnp/addressbook_rec/src/CMakeLists.txt | 37 ++ .../addressbook_rec/src/addressbook_rec.cpp | 7 +- .../addressbook_rec_cb/src/CMakeLists.txt | 37 ++ .../src/addressbook_rec_cb.cpp | 109 ++++++ .../src/capnp/addressbook.capnp | 56 +++ .../src/CMakeLists.txt | 33 ++ .../src/addressbook_rec_dynamic.cpp | 130 +++++++ .../capnp/addressbook_snd/src/CMakeLists.txt | 37 ++ .../addressbook_snd/src/addressbook_snd.cpp | 11 +- .../cpp/event/event_rec/src/CMakeLists.txt | 1 - .../monitoring_rec/src/monitoring_rec.cpp | 4 +- 84 files changed, 2724 insertions(+), 463 deletions(-) create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/CMakeLists.txt create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/CapnprotoTreeBuilder.cpp create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/CapnprotoTreeBuilder.h create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/Plugin.cpp create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/Plugin.h create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/PluginWidget.cpp create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/PluginWidget.h rename app/mon/eCALMonPlugins/{StringReflection/src/PluginWidget.ui.autosave => CapnprotoReflection/src/PluginWidget.ui} (62%) create mode 100644 app/mon/eCALMonPlugins/CapnprotoReflection/src/metadata.json create mode 100644 ecal/core/include/ecal/msg/capnproto/dynamic.h create mode 100644 ecal/core/include/ecal/msg/capnproto/helper.h create mode 100644 ecal/core/include/ecal/msg/dynamic.h create mode 100644 samples/cpp/capnp/addressbook_rec/src/CMakeLists.txt create mode 100644 samples/cpp/capnp/addressbook_rec_cb/src/CMakeLists.txt create mode 100644 samples/cpp/capnp/addressbook_rec_cb/src/addressbook_rec_cb.cpp create mode 100644 samples/cpp/capnp/addressbook_rec_cb/src/capnp/addressbook.capnp create mode 100644 samples/cpp/capnp/addressbook_rec_dynamic/src/CMakeLists.txt create mode 100644 samples/cpp/capnp/addressbook_rec_dynamic/src/addressbook_rec_dynamic.cpp create mode 100644 samples/cpp/capnp/addressbook_snd/src/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 37dbb1b846..51c8ed6670 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,7 +15,8 @@ # limitations under the License. # # ========================= eCAL LICENSE ================================= -cmake_minimum_required(VERSION 3.5) + +cmake_minimum_required(VERSION 3.13) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/find_scripts) @@ -34,6 +35,7 @@ cmake_policy(SET CMP0054 NEW) # use it that way cmake .. -DBUILD_APPS=ON -DBUILD_SAMPLES=ON # -------------------------------------------------------- option(HAS_QT5 "Platform supports Qt 5 library" ON) +option(HAS_CAPNPROTO "Platform supports Cap'n Proto library" OFF) option(BUILD_DOCS "Build the eCAL documentation" ON) option(BUILD_APPS "Build the eCAL applications" ON) @@ -120,10 +122,10 @@ endif() find_package(CMakeFunctions REQUIRED) git_revision_information() -set(eCAL_VERSION_MAYOR ${GIT_REVISION_MAYOR}) +set(eCAL_VERSION_MAJOR ${GIT_REVISION_MAYOR}) set(eCAL_VERSION_MINOR ${GIT_REVISION_MINOR}) set(eCAL_VERSION_PATCH ${GIT_REVISION_PATCH}) -set(eCAL_VERSION_STRING ${eCAL_VERSION_MAYOR}.${eCAL_VERSION_MINOR}.${eCAL_VERSION_PATCH}) +set(eCAL_VERSION_STRING ${eCAL_VERSION_MAJOR}.${eCAL_VERSION_MINOR}.${eCAL_VERSION_PATCH}) set(eCAL_VERSION ${eCAL_VERSION_STRING}) include(helper_functions/ecal_add_functions) diff --git a/README.md b/README.md index fbc463973d..5afd7ad3e5 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,39 @@ git submodule init git submodule update ``` +## CMake build options + +eCAL is using CMake as build system. When configuring with CMake, you can turn on / off the following features. + +- `HAS_QT5`, default: `ON` + Platform supports Qt 5 library, necessary to build eCAL monitoring tool +- `HAS_CAPNPROTO`, default: `OFF` + Platform supports Cap'n Proto library, necessary to use capnp serialization as message system and to enable eCAL monitoring capnp message reflection + eCAL does not add Cap'n Proto as a submodule. If you set this option to `ON`, please make sure that the library is installed on your system and CMake can find it (consider setting CMAKE_PREFIX_PATH to point to the library). + Currently Version 0.6.1 is supported and has been tested, to use 0.7.0 some adaptations in CMakeLists.txt files needs to be made to make the samples compile. +- `BUILD_DOCS`, default `ON` + Build the eCAL documentation, requires the installation of doxygen and a recent CMake version (>= 3.14 preferred, but some lower versions might work) +- `BUILD_APPS`, default `ON`, + Build the eCAL applications, such as the monitoring tool +- `BUILD_SAMPLES`, default `OFF` + Build the eCAL sample applications +- `BUILD_TIME`, default `ON` + Build the eCAL time interfaces, necessary if you want to use ecal in time synchronized mode (based on ptp for example) +- `ECAL_LAYER_FASTRTPS`, default `OFF` + Provide fast rtps as communication layer, requires fast-rtps and fast-cdr installations +- `ECAL_INSTALL_SAMPLE_SOURCES`, default: `ON` + Install the sources of eCAL samples +- `ECAL_JOIN_MULTICAST_TWICE`, default: `OFF` + Specific multicast network bug workaround +- `ECAL_NPCAP_SUPPORT`, default `OFF` + Enable the eCAL to use Npcap for udp socket communication (i.e. the Win10 performance fix) +- `ECAL_THIRDPARTY_BUILD_PROTOBUF`, default `ON` + Build Protobuf with eCAL, included as a submodule in the thirdparty folder. You can always use your custom protobuf installation, this is only for convenience. Note, at least protobuf 3.0 is required to compile eCAL, we recommend using 3.5.1 or newer (tested with 3.5.1). +- `ECAL_THIRDPARTY_BUILD_PROTOBUF`, default `ON` + Build Protobuf with eCAL, included as a submodule in the thirdparty folder. You can always use your custom protobuf installation, this is only for convenience. Note, at least protobuf 3.0 is required to compile eCAL, we recommend using 3.5.1 or newer (tested with 3.5.1). + +All options can be passed on the command line `cmake -D