Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/nanobind core #1682

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ body:
Platform : x64

------------------------- CONFIGURATION --------------------------
Default INI : C:\ProgramData\eCAL\ecal.ini
Default YAML : C:\ProgramData\eCAL\ecal.yaml

------------------------- NETWORK --------------------------------
Host name : FRLBJRXW
Expand Down
50 changes: 21 additions & 29 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,21 @@ jobs:
runs-on: macos-13

steps:
- name: Downgrade Python version
uses: actions/setup-python@v4
id: cp39
with:
python-version: '3.9'
# XProtect can cause random failures if it decides that the DMG we create
# during the packaging phase is malware.
# See https://github.com/actions/runner-images/issues/7522 and https://github.com/servo/servo/pull/30779
- name: Kill XProtectBehaviorService
run: |
echo Killing XProtect.; sudo pkill -9 XProtect >/dev/null || true;

- name: Install latest Python3 via brew
run: brew install python3 || brew link --overwrite [email protected]

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
setup-python: false
version: '5.15.2'
target: 'desktop'
- name: Install latest Qt5 via brew
run: brew install qt@5

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

- name: Install Cap’n Proto
run: |
mkdir "${{ runner.workspace }}/capnp"
cd "${{ runner.workspace }}/capnp"
curl -O https://capnproto.org/capnproto-c++-0.9.0.tar.gz
tar zxf capnproto-c++-0.9.0.tar.gz
cd capnproto-c++-0.9.0
./configure
make -j
sudo make install
run: brew install ninja doxygen graphviz protobuf [email protected] pkg-config capnp

- name: Checkout
uses: actions/checkout@v4
Expand All @@ -49,7 +38,7 @@ jobs:

- name: Install Python requirements
run: |
sudo pip3 install -r "$GITHUB_WORKSPACE/doc/requirements.txt"
sudo pip3 install -r "$GITHUB_WORKSPACE/doc/requirements.txt" --break-system-packages

- name: CMake
run: |
Expand Down Expand Up @@ -84,20 +73,23 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PREFIX_PATH=/usr/local/opt/[email protected] \
-DCMAKE_PREFIX_PATH="/usr/local/opt/[email protected];/usr/local/opt/qt@5" \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=ON \
-DPython_FIND_STRATEGY=LOCATION \
-DPython_FIND_REGISTRY=NEVER
sudo mkdir /etc/ecal
sudo cp "$GITHUB_WORKSPACE/ecal/core/cfg/ecal.ini" /etc/ecal
-DPython_FIND_REGISTRY=NEVER
shell: bash

- name: Build Release
run: cmake --build . --config Release
working-directory: ${{ runner.workspace }}/_build

- name: Create config path and copy ecal.yaml
run: |
sudo mkdir /etc/ecal
sudo cp "./ecal/core/cfg/gen/ecal.yaml" /etc/ecal
working-directory: ${{ runner.workspace }}/_build

# - name: Build Documentation C
# run: cmake --build . --target documentation_c
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,24 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=ON \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LOCALSTATEDIR=/var \
-DCMAKE_INSTALL_LIBDIR=lib/x86_64-linux-gnu \
-DPython_FIND_VIRTUALENV=ONLY

sudo mkdir /etc/ecal
sudo cp "$GITHUB_WORKSPACE/ecal/core/cfg/ecal.ini" /etc/ecal
shell: bash

- name: Build Release
run: cmake --build . --parallel -- -k 0
working-directory: ${{ runner.workspace }}/_build

- name: Create config path and copy ecal.yaml
run: |
sudo mkdir /etc/ecal
sudo cp "./ecal/core/cfg/gen/ecal.yaml" /etc/ecal
working-directory: ${{ runner.workspace }}/_build
shell: bash

- name: Run Tests
run: ctest -V
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=OFF ^
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF ^
-DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^
Expand Down Expand Up @@ -131,14 +130,11 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=ON ^
-DECAL_THIRDPARTY_BUILD_YAML-CPP=ON ^
-DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_PREFIX_PATH="%ProgramFiles%/Cap'n Proto/lib/cmake/CapnProto" ^
-DCMAKE_BUILD_TYPE=Release ^
-DCPACK_PACK_WITH_INNOSETUP=ON
mkdir "%ALLUSERSPROFILE%\eCAL"
copy "%GITHUB_WORKSPACE%\ecal\core\cfg\ecal.ini" "%ALLUSERSPROFILE%\eCAL"
-DCPACK_PACK_WITH_INNOSETUP=ON
shell: cmd

- name: Build SDK
Expand All @@ -149,6 +145,13 @@ jobs:
run: cmake --build . --config Release
working-directory: ${{ runner.workspace }}/_build/complete

- name: Create config path and copy ecal.yaml
run: |
mkdir "%ALLUSERSPROFILE%\eCAL"
copy ".\ecal\core\cfg\gen\ecal.yaml" "%ALLUSERSPROFILE%\eCAL"
working-directory: ${{ runner.workspace }}/_build/complete
shell: cmd

- name: Run Tests
run: ctest -C Release -V
working-directory: ${{ runner.workspace }}/_build/complete
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/clang-tidy-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON \
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON \
-DECAL_THIRDPARTY_BUILD_QWT=OFF \
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PREFIX=/usr \
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ option(ECAL_USE_CLOCKLOCK_MUTEX "Use native mutex with monotonic
set(ECAL_CORE_HAS_PROTOBUF ON)
set(ECAL_CORE_BUILD_SAMPLES ${BUILD_SAMPLES})
set(ECAL_CORE_BUILD_TESTS ${BUILD_ECAL_TESTS})
set(ECAL_CORE_CONFIG_INIFILE ON)
set(ECAL_CORE_CONFIGURATION ON)
set(ECAL_CORE_COMMAND_LINE ON)
set(ECAL_CORE_REGISTRATION ON)
set(ECAL_CORE_MONITORING ON)
Expand Down
3 changes: 1 addition & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@
"HAS_FTXUI": "OFF",
"BUILD_APPS": "OFF",
"BUILD_SAMPLES": "OFF",
"ECAL_CORE_CONFIGURATION": "OFF",
"ECAL_INSTALL_SAMPLE_SOURCES": "OFF",
"ECAL_THIRDPARTY_BUILD_FINEFTP": "OFF",
"ECAL_THIRDPARTY_BUILD_FTXUI": "OFF",
"ECAL_THIRDPARTY_BUILD_SPDLOG": "OFF",
"ECAL_THIRDPARTY_BUILD_TERMCOLOR": "OFF",
"ECAL_THIRDPARTY_BUILD_TINYXML2": "OFF",
"ECAL_THIRDPARTY_BUILD_YAML-CPP": "OFF",
"ECAL_THIRDPARTY_BUILD_CURL": "OFF",
"ECAL_THIRDPARTY_BUILD_HDF5": "OFF"
}
Expand Down Expand Up @@ -100,7 +100,6 @@
"ECAL_THIRDPARTY_BUILD_SPDLOG": "ON",
"ECAL_THIRDPARTY_BUILD_TERMCOLOR": "ON",
"ECAL_THIRDPARTY_BUILD_TINYXML2": "ON",
"ECAL_THIRDPARTY_BUILD_YAML-CPP": null,
"ECAL_THIRDPARTY_BUILD_CURL": null,
"ECAL_THIRDPARTY_BUILD_HDF5": null
}
Expand Down
11 changes: 3 additions & 8 deletions app/meas_cutter/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
# Copyright (C) 2016 - 2024 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -22,13 +22,8 @@ find_package(Threads REQUIRED)
find_package(tclap REQUIRED)
find_package(yaml-cpp REQUIRED)

#compatibility with yaml-cpp < 0.8.0
if (NOT TARGET yaml-cpp::yaml-cpp AND TARGET yaml-cpp)
# ALIASing a imported non-global library requires CMake 3.18 so we do this
add_library(yaml-cpp::yaml-cpp INTERFACE IMPORTED)
target_link_libraries(yaml-cpp::yaml-cpp INTERFACE yaml-cpp)
endif()

include(${ECAL_PROJECT_ROOT}/thirdparty/yaml-cpp/compatibility-yaml-cpp.cmake)
yaml_cpp_create_compatibility_targets()

set(meas_cutter_src
src/main.cpp
Expand Down
2 changes: 1 addition & 1 deletion app/mon/mon_cli/src/ecal_mon_cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ void ProcProto(const std::string& topic_name, int msg_count)

// get topic type
eCAL::SDataTypeInformation topic_info;
eCAL::Util::GetTopicDataTypeInformation(topic_name, topic_info);
eCAL::Registration::GetTopicDataTypeInformation(topic_name, topic_info);
if(topic_info.name.empty())
{
std::cout << "could not get type name for topic " << topic_name << std::endl;
Expand Down
6 changes: 3 additions & 3 deletions app/mon/mon_gui/src/ecalmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,21 +102,21 @@ Ecalmon::Ecalmon(QWidget *parent)

if (multicast_ttl <= 0)
{
network_mode_widget_->setToolTip("ERROR: Network enabled but TTL is " + QString::number(multicast_ttl) + ". Change via ecal.ini");
network_mode_widget_->setToolTip("ERROR: Network enabled but TTL is " + QString::number(multicast_ttl) + ". Change via ecal.yaml");
network_mode_widget_->setStyleSheet("background-color: rgb(255, 128, 128); color: black");
network_mode_warning_icon_->setVisible(true);
}
else
{
network_mode_widget_->setStyleSheet("background-color: rgb(80, 255, 120); color: black");
network_mode_widget_->setToolTip("Change via ecal.ini");
network_mode_widget_->setToolTip("Change via ecal.yaml");
}
}
else
{
network_mode_label_->setText("Network mode: Local");
network_mode_widget_->setStyleSheet("background-color: rgb(44, 148, 255); color: black");
network_mode_widget_->setToolTip("Change via ecal.ini");
network_mode_widget_->setToolTip("Change via ecal.yaml");
}

error_label_ = new QLabel(this);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,11 @@ void TopicWidget::loadRegExpLists()
include_string = QString::fromStdString(eCAL::Config::GetMonitoringFilterIncludeList()); //ini.GetValue(MON_SECTION_S, MON_FILTER_INCL_S);


// The ecal.ini defines a very strange regex format: A filter consists of
// The ecal.yaml defines a very strange regex format: A filter consists of
// several regular expressions divided by "," or ";". Thus we have to
// split the string into 'actual' regular expressions. This will break every
// regular expression that properly uses a ",". We cannot do anything about
// that without changing the ecal.ini specification.
// that without changing the ecal.yaml specification.
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QList<QString> const exclude_string_list = exclude_string.split(QRegularExpression("[\\,,;]"), Qt::SplitBehaviorFlags::SkipEmptyParts);
QList<QString> const include_string_list = include_string.split(QRegularExpression("[\\,,;]"), Qt::SplitBehaviorFlags::SkipEmptyParts);
Expand Down
8 changes: 4 additions & 4 deletions app/mon/mon_gui/src/widgets/models/topic_tree_item.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -95,7 +95,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
if (!monitor_topic_name.empty())
{
eCAL::SDataTypeInformation topic_info;
eCAL::Util::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
eCAL::Registration::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
return topic_info.encoding.c_str();
}
}
Expand All @@ -115,7 +115,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
if (!monitor_topic_name.empty())
{
eCAL::SDataTypeInformation topic_info;
eCAL::Util::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
eCAL::Registration::GetTopicDataTypeInformation(monitor_topic_name, topic_info);
return topic_info.name.c_str();
}
}
Expand Down Expand Up @@ -209,7 +209,7 @@ QVariant TopicTreeItem::data(Columns column, Qt::ItemDataRole role) const
for (const auto& layer : layer_pb)
{
QString this_layer_string;
if (layer.confirmed())
if (layer.active())
{
switch (layer.type())
{
Expand Down
4 changes: 2 additions & 2 deletions app/mon/mon_tui/src/model/monitor.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -204,7 +204,7 @@ class MonitorModel
topic.type_descriptor = std::move(*t.mutable_tdatatype()->mutable_desc());
for(auto &tl: t.tlayer())
{
if (tl.confirmed())
if (tl.active())
{
topic.transport_layers.emplace_back(TopicTransportLayer(tl.type()));
}
Expand Down
14 changes: 7 additions & 7 deletions app/rec/rec_client_core/src/job/record_job.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ namespace eCAL
}
}

// Copy ecal.ini
// Copy ecal.yaml
#ifdef CopyFile
#define CopyFile_6376c040f4f54106b205ef6ddbb2090a CopyFile
#undef CopyFile
Expand All @@ -174,28 +174,28 @@ namespace eCAL

if (ecal_ini_original_path.empty())
{
const std::string error_message = "Error copying ecal.ini: The system information does not contain \"Default INI\" identifier.";
const std::string error_message = "Error copying ecal.yaml: The system information does not contain \"Default INI\" identifier.";
info_ = { false, error_message };
EcalRecLogger::Instance()->error(error_message);
}

if (EcalUtils::Filesystem::IsFile(ecal_ini_original_path))
{
std::string ecal_ini_dest_path = EcalUtils::Filesystem::ToNativeSeperators(hostname_dir + "/ecal.ini");
EcalRecLogger::Instance()->info("Copying ecal.ini from \"" + ecal_ini_original_path + "\" to \"" + ecal_ini_dest_path + "\"");
std::string ecal_ini_dest_path = EcalUtils::Filesystem::ToNativeSeperators(hostname_dir + "/ecal.yaml");
EcalRecLogger::Instance()->info("Copying ecal.yaml from \"" + ecal_ini_original_path + "\" to \"" + ecal_ini_dest_path + "\"");

if (!EcalUtils::Filesystem::CopyFile(ecal_ini_original_path, ecal_ini_dest_path, EcalUtils::Filesystem::OsStyle::Current))
{
const std::string error_message = "Error copying ecal.ini file to \"" + ecal_ini_dest_path + "\"";
const std::string error_message = "Error copying ecal.yaml file to \"" + ecal_ini_dest_path + "\"";
info_ = { false, error_message };
EcalRecLogger::Instance()->error(error_message);
}
}
else
{
const std::string error_message = "Warning: ecal.ini does not exist and will not be copied.";
const std::string error_message = "Warning: ecal.yaml does not exist and will not be copied.";
info_ = { false, error_message };
EcalRecLogger::Instance()->warn("Warning: ecal.ini does not exist and will not be copied.");
EcalRecLogger::Instance()->warn("Warning: ecal.yaml does not exist and will not be copied.");
}
}
#ifdef CopyFile_6376c040f4f54106b205ef6ddbb2090a
Expand Down
2 changes: 0 additions & 2 deletions build_win/win_make_cmake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ set CMAKE_OPTIONS_COMPLETE=-DCMAKE_INSTALL_PREFIX=_install ^
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=ON ^
-DECAL_THIRDPARTY_BUILD_YAML-CPP=ON ^
-DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Release ^
Expand Down Expand Up @@ -66,7 +65,6 @@ set CMAKE_OPTIONS_SDK=-DCMAKE_INSTALL_PREFIX=_install ^
-DECAL_THIRDPARTY_BUILD_RECYCLE=ON ^
-DECAL_THIRDPARTY_BUILD_TCP_PUBSUB=ON ^
-DECAL_THIRDPARTY_BUILD_QWT=OFF ^
-DECAL_THIRDPARTY_BUILD_YAML-CPP=OFF ^
-DECAL_THIRDPARTY_BUILD_UDPCAP=ON ^
-DBUILD_SHARED_LIBS=OFF ^
-DCMAKE_BUILD_TYPE=Debug ^
Expand Down
Loading
Loading