Skip to content

Commit

Permalink
Merge branch 'master' into feature/active-descgate-unregistration
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Apr 17, 2024
2 parents e819830 + 09f56b3 commit 6bd7b83
Show file tree
Hide file tree
Showing 73 changed files with 309 additions and 759 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
target: 'desktop'

- name: Install Dependencies
run: brew install ninja doxygen graphviz protobuf@21 [email protected] pkg-config
run: brew install ninja doxygen graphviz protobuf [email protected] pkg-config

- name: Install Cap’n Proto
run: |
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH="/usr/local/opt/[email protected]:/usr/local/opt/protobuf@21" \
-DCMAKE_PREFIX_PATH=/usr/local/opt/[email protected] \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
-DPython_FIND_STRATEGY=LOCATION \
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@
[submodule "thirdparty/udpcap"]
path = thirdparty/udpcap/udpcap
url = https://github.com/eclipse-ecal/udpcap.git
[submodule "thirdparty/ecaludp/ecaludp"]
path = thirdparty/ecaludp/ecaludp
url = https://github.com/eclipse-ecal/ecaludp.git
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,9 @@ option(ECAL_USE_CLOCKLOCK_MUTEX "Use native mutex with monotonic
# --------------------------------------------------------
# ecal core configuration
# --------------------------------------------------------
set(ECAL_CORE_HAS_PROTOBUF ON)
set(ECAL_CORE_BUILD_SAMPLES ${BUILD_SAMPLES})
set(ECAL_CORE_BUILD_SAMPLES_PROTOBUF ${BUILD_SAMPLES})
set(ECAL_CORE_BUILD_TESTS ${BUILD_ECAL_TESTS})
set(ECAL_CORE_BUILD_TESTS_PROTOBUF ${BUILD_ECAL_TESTS})
set(ECAL_CORE_CONFIG_INIFILE ON)
set(ECAL_CORE_COMMAND_LINE ON)
set(ECAL_CORE_REGISTRATION ON)
Expand Down Expand Up @@ -234,11 +233,6 @@ if(WIN32)
set(CMAKE_RELWITHDEBINFO_POSTFIX reldbg)
endif()

# --------------------------------------------------------
# protobuf utilities
# --------------------------------------------------------
add_subdirectory(contrib/ecalproto)

# --------------------------------------------------------
# ecal app protobuf interface
# --------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,8 @@ target_compile_definitions(${PROJECT_NAME}
create_targets_protobuf()

target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
tclap::tclap
eCAL::core
eCAL::core_protobuf
eCAL::core_pb)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)

Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ create_targets_protobuf()
target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::core_protobuf
eCAL::app_pb
protobuf::libprotobuf
MonitorTreeView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "ui_plugin_widget.h"

#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>
#include <protobuf_tree_builder.h>

class PluginWidget : public QWidget, public eCAL::mon::PluginWidgetInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <google/protobuf/message.h>
#include "monitor_tree_model.h"

#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <stack>

class ProtobufTreeBuilder : public eCAL::protobuf::MessageVisitor
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_plugins/signals_plotting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::core_protobuf
eCAL::app_pb
protobuf::libprotobuf
eCAL::mon_plugin_lib
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_plugins/signals_plotting/src/plugin_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

#include "ui_plugin_widget.h"

#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>
#include <protobuf_tree_builder.h>

class PluginWidget : public QWidget, public eCAL::mon::PluginWidgetInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <google/protobuf/message.h>
#include "signal_tree_model.h"

#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <stack>

class ProtobufTreeBuilder : public eCAL::protobuf::MessageVisitor
Expand Down
3 changes: 1 addition & 2 deletions app/mon/mon_tui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,8 @@ create_targets_protobuf()
target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
tclap::tclap
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::proto
ftxui::screen
ftxui::dom
ftxui::component)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include <stack>

#include <ecal/ecal.h>
#include <ecal/protobuf/ecal_proto_visitor.h>
#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_visitor.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>

#include <google/protobuf/message.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include <ecal/msg/string/subscriber.h>

#include <ecal/msg/protobuf/dynamic_subscriber.h>
#include <ecal/protobuf/ecal_proto_decoder.h>
#include <ecal/msg/protobuf/ecal_proto_decoder.h>

#include "tui/viewmodel/message_visualization/message_visualization.hpp"

Expand Down
2 changes: 1 addition & 1 deletion app/play/play_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC
Threads::Threads
spdlog::spdlog
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::app_pb
eCAL::ecaltime_pb
eCAL::measurement_hdf5
Expand Down
2 changes: 1 addition & 1 deletion app/rec/rec_client_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ target_link_libraries(${PROJECT_NAME}
target_link_libraries(${PROJECT_NAME}
PUBLIC
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion app/rec/rec_server_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ target_link_libraries(${PROJECT_NAME}
PRIVATE
tinyxml2::tinyxml2
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::app_pb
ThreadingUtils
Threads::Threads
Expand Down
2 changes: 1 addition & 1 deletion app/sys/sys_client_cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ target_link_libraries(${PROJECT_NAME}
spdlog::spdlog
tclap::tclap
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
eCAL::sys_client_core
Expand Down
2 changes: 1 addition & 1 deletion app/sys/sys_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ target_link_libraries(${PROJECT_NAME}
tinyxml2::tinyxml2
spdlog::spdlog
protobuf::libprotobuf
eCAL::core
eCAL::core_protobuf
eCAL::core_pb
eCAL::app_pb
EcalParser
Expand Down
1 change: 1 addition & 0 deletions cmake/submodule_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ set(ecal_submodule_dependencies
asio
CMakeFunctions
CURL
ecaludp
fineftp
ftxui
GTest
Expand Down
2 changes: 1 addition & 1 deletion contrib/ecaltime/simtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ecal_add_time_plugin(${PROJECT_NAME} SHARED ${ecal_time_simtime_src} ${ecal_time

target_compile_definitions(${PROJECT_NAME} PRIVATE ECAL_TIME_PLUGIN_API_EXPORT)

target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::core)
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::core_protobuf)
target_link_libraries(${PROJECT_NAME} PRIVATE eCAL::ecaltime_pb)

target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
Expand Down
2 changes: 1 addition & 1 deletion contrib/message/include/ecal/msg/proto/message.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#pragma warning(pop)
#endif

#include <ecal/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/protobuf/ecal_proto_hlp.h>
#include <ecal/msg/message.h>

namespace eCAL
Expand Down
4 changes: 2 additions & 2 deletions contrib/mma/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ target_include_directories(${PROJECT_NAME}
create_targets_protobuf()

target_link_libraries(${PROJECT_NAME}
protobuf::libprotobuf
Threads::Threads
eCAL::core eCAL::app_pb
eCAL::core_protobuf
eCAL::app_pb
$<$<BOOL:${WIN32}>:Pdh>
$<$<BOOL:${WIN32}>:wbemuuid.lib>)

Expand Down
1 change: 1 addition & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
wheel
sphinx<7.3
sphinx-book-theme==1.1.2
sphinx-tabs==3.4.5
PyGithub
Expand Down
7 changes: 7 additions & 0 deletions doc/rst/license/thirdparty_licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ They may have a different license than eCAL.
- Copyright
- Included in...

* - `ecaludp <https://github.com/eclipse-ecal/ecaludp>`_
- :ref:`apache_2_0`
- 2024, Continental
- - |fa-github| Git submodule ``/tirdparty/ecaludp``
- |fa-windows| Binary distributions for Windows
- |fa-ubuntu| Binary distributions for Linux

* - `fineFTP Server <https://github.com/eclipse-ecal/fineftp-server>`_
- :ref:`mit_license`
- 2020 Continental Corporation
Expand Down
3 changes: 2 additions & 1 deletion ecal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ cmake_minimum_required(VERSION 3.13)
# --------------------------------------------------------
add_subdirectory(core)

if(ECAL_CORE_BUILD_SAMPLES_PROTOBUF)
if(ECAL_CORE_HAS_PROTOBUF)
add_subdirectory(msg/protobuf)
add_subdirectory(core_pb)
endif()

Expand Down
21 changes: 19 additions & 2 deletions ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,6 @@ set(ecal_header_msg
include/ecal/msg/protobuf/client.h
include/ecal/msg/protobuf/dynamic_publisher.h
include/ecal/msg/protobuf/dynamic_subscriber.h
include/ecal/msg/protobuf/ecal_proto_dyn.h
include/ecal/msg/protobuf/ecal_proto_hlp.h
include/ecal/msg/protobuf/publisher.h
include/ecal/msg/protobuf/server.h
include/ecal/msg/protobuf/subscriber.h
Expand Down Expand Up @@ -732,3 +730,22 @@ if(UNIX)

set_property(TARGET ${PROJECT_NAME_PROCESS_STUB} PROPERTY FOLDER core)
endif(UNIX)

if(ECAL_CORE_HAS_PROTOBUF)
find_package(Protobuf REQUIRED)

add_library(core_protobuf INTERFACE)
add_library(eCAL::core_protobuf ALIAS core_protobuf)

target_link_libraries(core_protobuf
INTERFACE
eCAL::core
eCAL::proto
)

install(
TARGETS core_protobuf
EXPORT eCALCoreTargets
)

endif()
5 changes: 5 additions & 0 deletions ecal/core/include/ecal/msg/protobuf/dynamic_json_subscriber.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include <google/protobuf/stubs/common.h>
#include <google/protobuf/util/json_util.h>
#include <google/protobuf/util/type_resolver_util.h>
#include <google/protobuf/util/type_resolver.h>
Expand Down Expand Up @@ -244,7 +245,11 @@ namespace eCAL
{

google::protobuf::util::JsonOptions options;
#if GOOGLE_PROTOBUF_VERSION >= 5026000
options.always_print_fields_with_no_presence = true;
#else
options.always_print_primitive_fields = true;
#endif

std::string binary_input;
binary_input.assign(static_cast<char*>(data_->buf), static_cast<size_t>(data_->size));
Expand Down
Loading

0 comments on commit 6bd7b83

Please sign in to comment.