Skip to content

Commit

Permalink
eCAL v5.3.4:
Browse files Browse the repository at this point in the history
fix: tcp client server handling for messages greater the 64k
fix: corrected sample namespaces
fix: used third party simpleini in eCAL core
fix: QStableSortFilterProxyModel that leads to monitor crash when closing multiple tasks
optimization: data reader performance optimization
add: samples latency_snd / latency_rec added to measure pub/sub latency and throughput
add: NPCap status dialog for ecal monitor
adapt: different static code analysis fixes
adapt: make eCAL compile on current Arch Linux.
adapt: improved windows cpack wix setup

author Rex Schilasky <[email protected]> 1559562280 +0200
Co-authored-by: Florian Reimold <[email protected]>
committer Rex Schilasky <[email protected]> 1560499303 +0200
  • Loading branch information
rex-schilasky committed Jul 9, 2019
1 parent eb4d0d8 commit 1584e17
Show file tree
Hide file tree
Showing 50 changed files with 1,158 additions and 3,839 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ set(eCAL_config ${eCAL_config_dir}/eCALConfig.cmake)
set(eCAL_config_version ${eCAL_config_dir}/eCALConfigVersion.cmake)
if(WIN32)
#set(eCAL_install_config_dir $ENV{PROGRAMDATA}/eCAL)

set(eCAL_install_samples_dir samples/bin/)
set(eCAL_install_samples_src_dir samples/src/)
set(eCAL_install_tests_dir tests)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ setup the correct ip address - here for adapter eth0, ip address 192.168.0.1
sudo ifconfig eth0 192.168.0.1 netmask 255.255.255.0
```

Restart the ethernet interface or the whole to apply changes, check if you can ping to each other.
Restart the ethernet interface or the whole machine to apply changes, check if you can ping to each other.

After the ipc configuration setup the multicast route for udp multicasting

Expand Down
21 changes: 21 additions & 0 deletions app/mon/eCALMon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ set(source_files
src/Widgets/TreeItemViewWidget/TreeItemViewWidget.cpp
src/Widgets/TreeItemViewWidget/TreeItemViewWidget.h
)

set(qt_resource_files
../../iconset/ecalicons.qrc
resources/resources.qrc
Expand All @@ -151,6 +152,18 @@ set(ui_files
src/Widgets/VisualisationWidget/VisualisationWidget.ui
)

if(ECAL_NPCAP_SUPPORT)
set(source_files
${source_files}
src/Widgets/NpcapStatusDialog/NpcapStatusDialog.cpp
src/Widgets/NpcapStatusDialog/NpcapStatusDialog.h
)
set(ui_files
${ui_files}
src/Widgets/NpcapStatusDialog/NpcapStatusDialog.ui
)
endif(ECAL_NPCAP_SUPPORT)

# compile qt resource files and ui files
qt5_add_resources(autogen_resources ${qt_resource_files})
qt5_wrap_ui (autogen_ui ${ui_files})
Expand All @@ -176,6 +189,14 @@ target_link_libraries (${PROJECT_NAME}
Qt5::Widgets
CustomQt
)

if(ECAL_NPCAP_SUPPORT)
add_definitions(-DECAL_NPCAP_SUPPORT)
target_link_libraries(${PROJECT_NAME}
udpcap
)
endif(ECAL_NPCAP_SUPPORT)

if(WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
Expand Down
15 changes: 15 additions & 0 deletions app/mon/eCALMon/src/Ecalmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@
#include "Widgets/LicenseDialog/LicenseDialog.h"
#include "Widgets/PluginSettingsDialog/PluginSettingsDialog.h"

#ifdef ECAL_NPCAP_SUPPORT
#include "Widgets/NpcapStatusDialog/NpcapStatusDialog.h"
#endif //ECAL_NPCAP_SUPPORT

#include "EcalmonGlobals.h"
#include "PluginLoader.h"

Expand Down Expand Up @@ -157,6 +161,17 @@ Ecalmon::Ecalmon(QWidget *parent)
// Parse Time
connect(ui_.action_show_parsed_times, &QAction::toggled, this, &Ecalmon::setParseTimeEnabled);

#ifdef ECAL_NPCAP_SUPPORT
connect(ui_.action_npcap_status, &QAction::triggered, this,
[this]()
{
NpcapStatusDialog npcap_status_dialog(this);
npcap_status_dialog.exec();
});
#else
ui_.action_npcap_status->setVisible(false);
#endif // ECAL_NPCAP_SUPPORT

// Reset layout
connect(ui_.action_reset_layout, &QAction::triggered, this, &Ecalmon::resetLayout);

Expand Down
9 changes: 8 additions & 1 deletion app/mon/eCALMon/src/MainWindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<x>0</x>
<y>0</y>
<width>1024</width>
<height>26</height>
<height>21</height>
</rect>
</property>
<widget class="QMenu" name="menu_file">
Expand Down Expand Up @@ -79,6 +79,8 @@
<addaction name="separator"/>
<addaction name="action_alternating_row_colors"/>
<addaction name="action_show_parsed_times"/>
<addaction name="separator"/>
<addaction name="action_npcap_status"/>
</widget>
<widget class="QMenu" name="menu_help">
<property name="title">
Expand Down Expand Up @@ -534,6 +536,11 @@
<string>Plugin settings...</string>
</property>
</action>
<action name="action_npcap_status">
<property name="text">
<string>Npcap status...</string>
</property>
</action>
</widget>
<resources>
<include location="../resources/resources.qrc"/>
Expand Down
4 changes: 2 additions & 2 deletions app/mon/eCALMon/src/Widgets/EcalmonTreeWidget/TopicWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <ecal/ecal_util.h>
#include <ecal_def_ini.h>
#include <simpleini.h>
#include <SimpleIni.h>

#include <QSettings>
#include <QMenu>
Expand Down Expand Up @@ -386,4 +386,4 @@ void TopicWidget::setParseTimeEnabled(bool enabled)
{
visualisation_window->setParseTimeEnabled(parse_time_);
}
}
}
2 changes: 1 addition & 1 deletion app/mon/eCALMon/src/Widgets/Models/ProcessTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <QColor>
#include <QFont>

#include <math.h>
#include <cmath>
#include <cfloat>

#include "ItemDataRoles.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/* ========================= 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 =================================
*/

#include "NpcapStatusDialog.h"

#include <QPushButton>
#include <udpcap/npcap_helpers.h>

NpcapStatusDialog::NpcapStatusDialog(QWidget *parent)
: QDialog(parent)
{
ui_.setupUi(this);
Udpcap::Initialize();
ui_.status_textedit->setPlainText(QString::fromStdString(Udpcap::GetHumanReadibleErrorText()));
connect(ui_.button_box->button(QDialogButtonBox::StandardButton::Close), SIGNAL(clicked()), this, SLOT(close()));
}

NpcapStatusDialog::~NpcapStatusDialog()
{}
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,25 @@
* ========================= eCAL LICENSE =================================
*/

#include <simpleini.h>
#pragma once

#include <QDialog>
#include <QDialogButtonBox>

#include "ui_NpcapStatusDialog.h"

#include <string>
#include <utility>
#include <cstdint>
#include <vector>

/*
* This file provides two methods to access the Simple Inifile Setter/Getters on a template basis.
*/

template<typename T>
T GetValue(const CSimpleIni& ini_, const std::string& section_, const std::string& key_, const T& default_);
template<typename T>
SI_Error SetValue(CSimpleIni& ini_, const std::string& section_, const std::string& key_, const T& value_, const std::string& comment_, bool force_overwrite_);
class NpcapStatusDialog : public QDialog
{
Q_OBJECT

public:
NpcapStatusDialog(QWidget *parent = Q_NULLPTR);
~NpcapStatusDialog();

private:
Ui::NpcapStatusDialog ui_;
};
49 changes: 49 additions & 0 deletions app/mon/eCALMon/src/Widgets/NpcapStatusDialog/NpcapStatusDialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>NpcapStatusDialog</class>
<widget class="QDialog" name="NpcapStatusDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>326</width>
<height>228</height>
</rect>
</property>
<property name="windowTitle">
<string>Npcap Status</string>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<property name="modal">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QPlainTextEdit" name="status_textedit">
<property name="font">
<font>
<family>Courier New</family>
</font>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="button_box">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
<property name="centerButtons">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
2 changes: 2 additions & 0 deletions cmake/helper_functions/ecal_install_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ function(ecal_install_app TARGET_NAME)
install(TARGETS ${TARGET_NAME}
RUNTIME DESTINATION "${eCAL_install_app_dir}" COMPONENT app
)
set_property(INSTALL "${eCAL_install_app_dir}/$<TARGET_FILE_NAME:${TARGET_NAME}>" PROPERTY CPACK_START_MENU_SHORTCUTS "${TARGET_NAME}")

endfunction()

function(ecal_install_gtest TARGET_NAME)
Expand Down
9 changes: 8 additions & 1 deletion contrib/ecalproto/include/ecal/protobuf/ecal_proto_dyn.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#pragma warning(push)
#pragma warning(disable: 4100 4146 4800)
#endif
#if defined(__linux__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif
#include <google/protobuf/message.h>
#include <google/protobuf/descriptor.pb.h>
#include <google/protobuf/dynamic_message.h>
Expand All @@ -38,6 +42,9 @@
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#if defined(__linux__)
#pragma GCC diagnostic pop
#endif

#include <ecal/protobuf/ecal_proto_hlp.h>

Expand Down Expand Up @@ -135,4 +142,4 @@ namespace protobuf
google::protobuf::DynamicMessageFactory m_message_factory;
};
}
}
}
4 changes: 2 additions & 2 deletions contrib/ecaltime/linuxptp/src/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <unistd.h>

#define CLOCKFD 3
#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
#define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))
#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
#define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))

namespace linuxptp{
/**
Expand Down
4 changes: 2 additions & 2 deletions contrib/ecaltime/linuxptp/src/ecal_time_linuxptp.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include <mutex>

#define CLOCKFD 3
#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
#define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))
#define FD_TO_CLOCKID(fd) ((~(clockid_t) (fd) << 3) | CLOCKFD)
#define CLOCKID_TO_FD(clk) ((unsigned int) ~((clk) >> 3))

class Linuxptp
{
Expand Down
2 changes: 2 additions & 0 deletions cpack/cpack_variables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ set(CPACK_PACKAGE_VERSION_PATCH ${GIT_REVISION_PATCH})
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${PROJECT_NAME})
set(CPACK_PACKAGE_CONTACT "[email protected]")
set(CPACK_SOURCE_STRIP_FILES "")
set(CPACK_WIX_PATCH_FILE ${CMAKE_SOURCE_DIR}/cpack/ecal_path.xml)
#set(CPACK_WIX_EXTRA_SOURCES ${CMAKE_SOURCE_DIR}/cpack/settings.wxs)

if(WIN32)
set(CPACK_GENERATOR "WIX")
Expand Down
6 changes: 6 additions & 0 deletions cpack/ecal_path.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<CPackWiXPatch>
<CPackWiXFragment Id="CM_SHORTCUT_app">
<Environment Id="SystemEnvironment" Action="set" System="yes" Part="all" Name="ECAL_HOME" Value="[INSTALL_ROOT]"/>
<Environment Id="PATH" Name="PATH" Value="[INSTALL_ROOT]bin" Permanent="yes" Part="last" Action="set" System="yes" />
</CPackWiXFragment>
</CPackWiXPatch>
4 changes: 2 additions & 2 deletions ecal/core/include/ecal/ecal_publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,13 +440,13 @@ namespace eCAL
bool ShareType(bool state_ = true)
{
if (!m_publisher) return(false);
return(eCAL_Pub_ShareType(m_publisher, static_cast<int>(state_)));
return(eCAL_Pub_ShareType(m_publisher, static_cast<int>(state_)) != 0);
}

bool ShareDescription(bool state_ = true)
{
if (!m_publisher) return(false);
return(eCAL_Pub_ShareDescription(m_publisher, static_cast<int>(state_)));
return(eCAL_Pub_ShareDescription(m_publisher, static_cast<int>(state_)) != 0);
}

bool SetQOS(const QOS::SWriterQOS& qos_)
Expand Down
Loading

0 comments on commit 1584e17

Please sign in to comment.