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

[new core alignment] integrate new core #1370

Merged
merged 27 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
2bc4413
new nanopb serialization added
rex-schilasky Feb 14, 2024
0398425
core tests adapted
rex-schilasky Feb 14, 2024
414ff6f
samples adapted
rex-schilasky Feb 14, 2024
20886bc
core adapted
rex-schilasky Feb 14, 2024
85eb378
core_pb adapted
rex-schilasky Feb 14, 2024
4ef900c
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 14, 2024
76f789e
missing files added
rex-schilasky Feb 14, 2024
2b685e7
minor nanopb generated files sync
rex-schilasky Feb 14, 2024
81f26ba
ECAL_CORE CMake options moved to ecal/CMakeLists.txt
rex-schilasky Feb 14, 2024
692b636
padding added
rex-schilasky Feb 14, 2024
4beb95d
padding tested
rex-schilasky Feb 14, 2024
0d819ef
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 14, 2024
9bf5a55
padding logic reintegrated into tcp_writer (8 Byte alignment)
rex-schilasky Feb 14, 2024
e8697b9
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 15, 2024
2ecb8fc
global process dataclock, dataread bytes, datawrite bytes removed (us…
rex-schilasky Feb 15, 2024
038427c
dataread/write removed from SProcessMon, test adapted
rex-schilasky Feb 15, 2024
4d42f4a
clang tidy public API (not completed)
rex-schilasky Feb 16, 2024
5f52014
clang tidy serialization
rex-schilasky Feb 16, 2024
dd8c947
clang-tidy core internal
rex-schilasky Feb 19, 2024
1dc9156
nanopb library and autogenerated code excluded for clang-tidy review
rex-schilasky Feb 19, 2024
3a5e542
minor bugfix in service/ecal_service_client_impl.cpp (possible nullpt…
rex-schilasky Feb 19, 2024
995dc3a
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 21, 2024
ae9ccc0
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 26, 2024
e3c7940
Merge branch 'master' into new-core-alignment/integrate-new-core
rex-schilasky Feb 27, 2024
5c3260c
udpcap submodule switched to master
rex-schilasky Feb 27, 2024
5d23cbd
unnecessary struct keyword removed
rex-schilasky Feb 27, 2024
0f1ae41
deprecated functions removed: eCAL_Client_AddResponseCallbackC, eCAL_…
rex-schilasky Feb 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 3 additions & 19 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,11 +309,6 @@ endif()
# --------------------------------------------------------
add_subdirectory(contrib/ecalproto)

# --------------------------------------------------------
# ecal core protobuf interface
# --------------------------------------------------------
add_subdirectory(ecal/core_pb)

# --------------------------------------------------------
# ecal app protobuf interface
# --------------------------------------------------------
Expand All @@ -322,8 +317,7 @@ add_subdirectory(app/app_pb)
# --------------------------------------------------------
# ecal core
# --------------------------------------------------------
add_subdirectory(ecal/service)
add_subdirectory(ecal/core)
add_subdirectory(ecal)

# --------------------------------------------------------
# custom libs
Expand Down Expand Up @@ -470,17 +464,8 @@ if(BUILD_ECAL_TESTS)
# ------------------------------------------------------
# test ecal
# ------------------------------------------------------
add_subdirectory(testing/ecal/clientserver_test)

add_subdirectory(testing/ecal/core_test)
add_subdirectory(testing/ecal/event_test)
add_subdirectory(testing/ecal/expmap_test)
add_subdirectory(testing/ecal/io_memfile_test)
add_subdirectory(testing/ecal/pubsub_proto_test)
add_subdirectory(testing/ecal/pubsub_test)
add_subdirectory(testing/ecal/topic2mcast_test)
add_subdirectory(testing/ecal/util_test)

add_subdirectory(testing/ecal)

# ------------------------------------------------------
# test apps
# ------------------------------------------------------
Expand Down Expand Up @@ -591,5 +576,4 @@ message(STATUS "ECAL_THIRDPARTY_BUILD_UDPCAP : ${ECAL_THIRDPAR
message(STATUS "ECAL_THIRDPARTY_BUILD_YAML-CPP : ${ECAL_THIRDPARTY_BUILD_YAML-CPP}")
message(STATUS "ECAL_LINK_HDF5_SHARED : ${ECAL_LINK_HDF5_SHARED}")
message(STATUS "CPACK_PACK_WITH_INNOSETUP : ${CPACK_PACK_WITH_INNOSETUP}")

message(STATUS "--------------------------------------------------------------------------------")
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ void HostWidget::autoSizeColumns()
example_process_pb->set_pname("");
example_process_pb->set_uname("CameraSensorMapFusionCAF___");
example_process_pb->set_pparam("");
example_process_pb->set_datawrite(99999999999);
example_process_pb->set_dataread(99999999999);

HostTreeItem* example_host_item = new HostTreeItem("CARPC00____");
example_host_item->update(example_monitoring_pb);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ ProcessWidget::ProcessWidget(QWidget *parent)
(int)ProcessTreeModel::Columns::STATE,
(int)ProcessTreeModel::Columns::INFO,
(int)ProcessTreeModel::Columns::HEARTBEAT,
(int)ProcessTreeModel::Columns::DATAWRITE,
(int)ProcessTreeModel::Columns::DATAREAD,
(int)ProcessTreeModel::Columns::ECAL_RUNTIME_VERSION,
};
setVisibleColumns(default_visible_columns);
Expand Down Expand Up @@ -116,8 +114,6 @@ void ProcessWidget::autoSizeColumns()
example_process_pb.set_pname("");
example_process_pb.set_uname("eCALProcessUnitNameABCDE___");
example_process_pb.set_pparam("");
example_process_pb.set_datawrite(99999999999);
example_process_pb.set_dataread(99999999999);

example_process_pb.mutable_state()->set_severity(eCAL::pb::eProcessSeverity::proc_sev_warning);
example_process_pb.mutable_state()->set_severity_level(eCAL::pb::eProcessSeverityLevel::proc_sev_level5);
Expand All @@ -138,8 +134,6 @@ void ProcessWidget::autoSizeColumns()
(int)ProcessTreeModel::Columns::PROCESS_NAME,
(int)ProcessTreeModel::Columns::STATE,
(int)ProcessTreeModel::Columns::HEARTBEAT,
(int)ProcessTreeModel::Columns::DATAWRITE,
(int)ProcessTreeModel::Columns::DATAREAD,
(int)ProcessTreeModel::Columns::TIMESYNC_STATE,
(int)ProcessTreeModel::Columns::TIMESYNC_MOD_NAME,
(int)ProcessTreeModel::Columns::COMPONENT_INIT_INFO,
Expand Down
12 changes: 6 additions & 6 deletions app/mon/mon_gui/src/widgets/log_widget/log_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ LogWidget::LogWidget(QWidget *parent)
: QWidget(parent)
, log_update_time_milliseconds_(100)
, parse_time_enabled_(true)
, log_model_(new LogModel(this))
, log_proxy_model_(new LogSortFilterProxyModel(this))
{
ui_.setupUi(this);

// Tree Model
log_model_ = new LogModel(this);
log_proxy_model_ = new LogSortFilterProxyModel(this);
log_proxy_model_->setFilterRole(ItemDataRoles::FilterRole);
log_proxy_model_->setSortRole(ItemDataRoles::SortRole);
log_proxy_model_->setFilterCaseSensitivity(Qt::CaseSensitivity::CaseInsensitive);
Expand Down Expand Up @@ -188,9 +188,9 @@ LogWidget::~LogWidget()
void LogWidget::getEcalLogs()
{
eCAL::pb::LogMessageList logging;
std::string logging_string;
std::string logging_string;

if (eCAL::Monitoring::GetLogging(logging_string))
if (eCAL::Logging::GetLogging(logging_string) != 0)
{
logging.ParseFromString(logging_string);
}
Expand Down Expand Up @@ -420,7 +420,7 @@ void LogWidget::setLogLevelFilter(int log_level)
void LogWidget::contextMenu(const QPoint &pos)
{
auto selected_proxy_rows = ui_.log_tree->selectionModel()->selectedRows(LogModel::Columns::TIME);
if (selected_proxy_rows.size() > 0)
if (!selected_proxy_rows.empty())
{
QMenu context_menu(this);

Expand All @@ -443,7 +443,7 @@ void LogWidget::copySelectedRows()
for (auto& proxy_row : selected_proxy_rows)
{
bool first_element = true;
auto ui_log_tree_model = ui_.log_tree->model();
auto *ui_log_tree_model = ui_.log_tree->model();
for (int column = 0; column < ui_log_tree_model->columnCount(); column++)
{
if (!ui_.log_tree->isColumnHidden(column))
Expand Down
6 changes: 3 additions & 3 deletions app/mon/mon_gui/src/widgets/log_widget/log_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ private slots:
void paused(bool paused);

private:
Ui::LogWidget ui_;
Ui::LogWidget ui_{};

QTimer* log_update_timer_;
int log_update_time_milliseconds_;
Expand All @@ -81,8 +81,8 @@ private slots:
};

QByteArray initial_tree_state_;
int initial_log_level_filter_;
bool initial_auto_scroll_;
int initial_log_level_filter_{};
bool initial_auto_scroll_{};


void saveGuiSettings();
Expand Down
10 changes: 0 additions & 10 deletions app/mon/mon_gui/src/widgets/models/process_tree_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
{
return process_.pparam().c_str();
}
else if (column == Columns::DATAWRITE)
{
return (long long)process_.datawrite();
}
else if (column == Columns::DATAREAD)
{
return (long long)process_.dataread();
}
else if (column == Columns::SEVERITY)
{
severityToCombinedInt(process_.state().severity(), process_.state().severity_level());
Expand Down Expand Up @@ -191,8 +183,6 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
{
if ((column == Columns::RCLOCK)
|| (column == Columns::PID)
|| (column == Columns::DATAWRITE)
|| (column == Columns::DATAREAD)
)
{
return Qt::AlignmentFlag::AlignRight;
Expand Down
2 changes: 0 additions & 2 deletions app/mon/mon_gui/src/widgets/models/process_tree_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ class ProcessTreeItem :
PNAME,
UNAME,
PPARAM,
DATAWRITE,
DATAREAD,
SEVERITY,
INFO,
TSYNC_STATE,
Expand Down
6 changes: 0 additions & 6 deletions app/mon/mon_gui/src/widgets/models/process_tree_model.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ class ProcessTreeModel : public GroupTreeModel
STATE,
INFO,
HEARTBEAT,
DATAWRITE,
DATAREAD,
TIMESYNC_STATE,
TIMESYNC_MOD_NAME,
COMPONENT_INIT_INFO,
Expand Down Expand Up @@ -93,8 +91,6 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::STATE, "State" },
{ Columns::INFO, "Info" },
{ Columns::HEARTBEAT, "Heartbeat" },
{ Columns::DATAWRITE, "Data Write [Byte/s]" },
{ Columns::DATAREAD, "Data Read [Byte/s]" },
{ Columns::TIMESYNC_STATE, "Timesync State" },
{ Columns::TIMESYNC_MOD_NAME, "Timesync Mod Name" },
{ Columns::COMPONENT_INIT_INFO, "Component Initialization" },
Expand All @@ -113,8 +109,6 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::STATE, (int)ProcessTreeItem::Columns::SEVERITY },
{ Columns::INFO, (int)ProcessTreeItem::Columns::INFO },
{ Columns::HEARTBEAT, (int)ProcessTreeItem::Columns::RCLOCK },
{ Columns::DATAWRITE, (int)ProcessTreeItem::Columns::DATAWRITE },
{ Columns::DATAREAD, (int)ProcessTreeItem::Columns::DATAREAD },
{ Columns::TIMESYNC_STATE, (int)ProcessTreeItem::Columns::TSYNC_STATE },
{ Columns::TIMESYNC_MOD_NAME, (int)ProcessTreeItem::Columns::TSYNC_MOD_NAME },
{ Columns::COMPONENT_INIT_INFO, (int)ProcessTreeItem::Columns::COMPONENT_INIT_INFO },
Expand Down
1 change: 1 addition & 0 deletions app/mon/mon_plugins/protobuf_reflection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::app_pb
protobuf::libprotobuf
MonitorTreeView
Expand Down
1 change: 1 addition & 0 deletions app/mon/mon_plugins/signals_plotting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ target_link_libraries (${PROJECT_NAME}
Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Widgets
eCAL::core
eCAL::proto
eCAL::app_pb
protobuf::libprotobuf
eCAL::mon_plugin_lib
Expand Down
1 change: 1 addition & 0 deletions app/mon/mon_tui/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ target_link_libraries(${PROJECT_NAME}
tclap::tclap
eCAL::core
eCAL::core_pb
eCAL::proto
ftxui::screen
ftxui::dom
ftxui::component)
Expand Down
2 changes: 0 additions & 2 deletions app/mon/mon_tui/src/model/data/process.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ struct Process
std::string host_name;
std::string unit_name;
std::string params;
int64_t data_sent_bytes;
int64_t data_recieved_bytes;
Severity severity;
SeverityLevel severity_level;
std::string state_info;
Expand Down
1 change: 0 additions & 1 deletion app/mon/mon_tui/src/model/data/topic.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ struct Topic
};

int32_t registration_clock;
int32_t host_id;
std::string host_name;
int32_t pid;
std::string process_name;
Expand Down
5 changes: 3 additions & 2 deletions app/mon/mon_tui/src/model/log.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
#ifdef _MSC_VER
#pragma warning(push, 0) // disable proto warnings
#endif
#include <ecal/core/pb/logging.pb.h>
#include "ecal/core/pb/logging.pb.h"
#include "ecal/core/pb/monitoring.pb.h"
#ifdef _MSC_VER
#pragma warning(pop)
#endif
Expand Down Expand Up @@ -110,7 +111,7 @@ class LogModel
{
std::lock_guard<std::mutex> lock{mtx};
std::string raw_data;
eCAL::Monitoring::GetLogging(raw_data);
eCAL::Logging::GetLogging(raw_data);
logs.ParseFromString(raw_data);

auto &pb_logs = logs.log_messages();
Expand Down
3 changes: 0 additions & 3 deletions app/mon/mon_tui/src/model/monitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,6 @@ class MonitorModel
process.host_name = std::move(*p.mutable_hname());
process.unit_name = std::move(*p.mutable_uname());
process.params = std::move(*p.mutable_pparam());
process.data_sent_bytes = p.datawrite();
process.data_recieved_bytes = p.dataread();
process.severity = Severity(p.state().severity());
process.severity_level = SeverityLevel(p.state().severity_level());
process.state_info = std::move(*p.mutable_state()->mutable_info());
Expand Down Expand Up @@ -194,7 +192,6 @@ class MonitorModel
}
auto &topic = topics.emplace_back();
topic.registration_clock = t.rclock();
topic.host_id = t.hid();
topic.host_name = std::move(*t.mutable_hname());
topic.pid = t.pid();
topic.process_name = std::move(*t.mutable_pname());
Expand Down
2 changes: 2 additions & 0 deletions app/play/play_core/src/measurement_container.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
*/

#include "measurement_container.h"

#include <ecal/ecal_util.h>
#include <ecal/measurement/hdf5/reader.h>

#include <algorithm>
Expand Down
69 changes: 69 additions & 0 deletions ecal/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ========================= eCAL LICENSE =================================
#
# Copyright (C) 2016 - 2019 Continental Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

project(core VERSION ${eCAL_VERSION_STRING})

# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# core internal feature configuration - start
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
option(ECAL_CORE_CONFIG_INIFILE "Enables to configure eCAL via ecal.ini file" ON)
option(ECAL_CORE_COMMAND_LINE "Enables eCAL application cmd line interfaces" ON)
option(ECAL_CORE_REGISTRATION "Enables the eCAL registration layer" ON)
option(ECAL_CORE_MONITORING "Enables the eCAL monitoring functionality" ON)
option(ECAL_CORE_PUBLISHER "Enables the eCAL publisher functionality" ON)
option(ECAL_CORE_SUBSCRIBER "Enables the eCAL subscriber functionality" ON)
option(ECAL_CORE_SERVICE "Enables the eCAL server/client functionality" ON)
option(ECAL_CORE_TIMEPLUGIN "Enables the eCAL time plugin functionality" ON)
#option(ECAL_CORE_NPCAP_SUPPORT "Enable the eCAL Npcap Receiver (Win10 performance fix for UDP communication)" OFF)
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# core registration layer options (change with care)
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
option(ECAL_CORE_REGISTRATION_SHM "Enables the eCAL registration layer over shared memory" ON)
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# core transport layer options (change with care)
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
option(ECAL_CORE_TRANSPORT_UDP "Enables the eCAL to transport payload via UDP multicast" ON)
option(ECAL_CORE_TRANSPORT_TCP "Enables the eCAL to transport payload via TCP" ON)
option(ECAL_CORE_TRANSPORT_SHM "Enables the eCAL to transport payload via local shared memory" ON)
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------
# core internal feature configuration - end
# ------------------------------------------------------------------------------------------------------------------------------------------------------------------

cmake_dependent_option(ECAL_CORE_NPCAP_SUPPORT "Enable the eCAL Npcap Receiver (Win10 performance fix for UDP communication)" ON "ECAL_NPCAP_SUPPORT" OFF)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer that the main CMakeLists.txt file sets these options, this file needs no knowledge of options from its parent.
in CMakeLists.txt

if (ECAL_NPCA_SUPPORT)
  set(ECAL_CORE_NPCAP_SUPPORT ON)
endif()


add_subdirectory(core)
add_subdirectory(core_pb)
add_subdirectory(service)


message(STATUS "ECAL_CORE Build Options:")
message(STATUS "--------------------------------------------------------------------------------")
message(STATUS "ECAL_CORE_CONFIG_INIFILE : ${ECAL_CORE_CONFIG_INIFILE}")
message(STATUS "ECAL_CORE_COMMAND_LINE : ${ECAL_CORE_COMMAND_LINE}")
message(STATUS "ECAL_CORE_REGISTRATION : ${ECAL_CORE_REGISTRATION}")
message(STATUS "ECAL_CORE_MONITORING : ${ECAL_CORE_MONITORING}")
message(STATUS "ECAL_CORE_PUBLISHER : ${ECAL_CORE_PUBLISHER}")
message(STATUS "ECAL_CORE_SUBSCRIBER : ${ECAL_CORE_SUBSCRIBER}")
message(STATUS "ECAL_CORE_SERVICE : ${ECAL_CORE_SERVICE}")
message(STATUS "ECAL_CORE_TIMEPLUGIN : ${ECAL_CORE_TIMEPLUGIN}")
message(STATUS "ECAL_CORE_NPCAP_SUPPORT : ${ECAL_CORE_NPCAP_SUPPORT}")
message(STATUS "ECAL_CORE_REGISTRATION_SHM : ${ECAL_CORE_REGISTRATION_SHM}")
message(STATUS "ECAL_CORE_TRANSPORT_UDP : ${ECAL_CORE_TRANSPORT_UDP}")
message(STATUS "ECAL_CORE_TRANSPORT_TCP : ${ECAL_CORE_TRANSPORT_TCP}")
message(STATUS "ECAL_CORE_TRANSPORT_SHM : ${ECAL_CORE_TRANSPORT_SHM}")
message(STATUS "--------------------------------------------------------------------------------")
Loading
Loading