Skip to content

Commit

Permalink
eCAL v5.4.0:
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Kerstin-Keller committed Sep 18, 2019
1 parent 244531e commit 5d3c077
Show file tree
Hide file tree
Showing 84 changed files with 2,724 additions and 463 deletions.
8 changes: 5 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
86 changes: 46 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<option>=<value>` or in the CMake GUI application.

## Setup on Linux Systems

Update gcc to 5.3.x or newer and install cmake.
Expand Down Expand Up @@ -187,33 +220,6 @@ You can find the ecal.ini configuration file under %APPDATA%\eCAL.

Don't forget to disable any windows firewall.

## CMake build options

When configuring with CMake, you can turn on / off specific features of eCAL.

- `HAS_QT5`, default: `ON`
Platform supports Qt 5 library, necessary to build monitoring tool
- `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 Monitor
- `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
- `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 Npcap Receiver (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).

All options can be passed on the command line `cmake -D<option>=<value>` or in the CMake GUI application.

## Initial Test

To initially check the functionality of a fresh installed eCAL system, just follow these steps.
Expand Down Expand Up @@ -270,19 +276,19 @@ H/W path Device Class Description

|Payload Size (kB)|Win10 AMD64|Ubuntu16 AMD64|
|----------------:|----------:|-------------:|
| 1 | 25 | 14 |
| 2 | 25 | 14 |
| 4 | 26 | 15 |
| 8 | 28 | 16 |
| 16 | 33 | 18 |
| 32 | 37 | 22 |
| 64 | 47 | 26 |
| 128 | 68 | 40 |
| 256 | 107 | 66 |
| 512 | 190 | 134 |
| 1024 | 401 | 720 |
| 2048 | 937 | 1500 |
| 4096 | 1868 | 3600 |
| 1 | 13 | 14 |
| 2 | 13 | 14 |
| 4 | 15 | 15 |
| 8 | 16 | 16 |
| 16 | 19 | 18 |
| 32 | 20 | 22 |
| 64 | 27 | 26 |
| 128 | 40 | 40 |
| 256 | 63 | 66 |
| 512 | 108 | 134 |
| 1024 | 288 | 720 |
| 2048 | 768 | 1500 |
| 4096 | 1548 | 3600 |

## Usage

Expand Down
4 changes: 2 additions & 2 deletions app/mon/eCALMon/src/Widgets/EcalmonTreeWidget/HostWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ void HostWidget::autoSizeColumns()
example_process_pb->set_pmemory(99999999999);
example_process_pb->set_pcpu(1000);
example_process_pb->set_usrptime(999999.9999f);
example_process_pb->set_udpsbytes(999999);
example_process_pb->set_udprbytes(999999);
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
12 changes: 6 additions & 6 deletions app/mon/eCALMon/src/Widgets/EcalmonTreeWidget/ProcessWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ ProcessWidget::ProcessWidget(QWidget *parent)
(int)ProcessTreeModel::Columns::HEARTBEAT,
(int)ProcessTreeModel::Columns::MEMORY,
(int)ProcessTreeModel::Columns::CPU_PERCENTAGE,
(int)ProcessTreeModel::Columns::UDP_SENT,
(int)ProcessTreeModel::Columns::UDP_RECEIVED,
(int)ProcessTreeModel::Columns::DATAWRITE,
(int)ProcessTreeModel::Columns::DATAREAD,
};
setVisibleColumns(default_visible_columns);

Expand Down Expand Up @@ -114,8 +114,8 @@ void ProcessWidget::autoSizeColumns()
example_process_pb.set_pmemory(99999999999);
example_process_pb.set_pcpu(1000);
example_process_pb.set_usrptime(999999.9999f);
example_process_pb.set_udpsbytes(999999);
example_process_pb.set_udprbytes(999999);
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 @@ -139,8 +139,8 @@ void ProcessWidget::autoSizeColumns()
(int)ProcessTreeModel::Columns::MEMORY,
(int)ProcessTreeModel::Columns::CPU_PERCENTAGE,
(int)ProcessTreeModel::Columns::USER_TIME,
(int)ProcessTreeModel::Columns::UDP_SENT,
(int)ProcessTreeModel::Columns::UDP_RECEIVED,
(int)ProcessTreeModel::Columns::DATAWRITE,
(int)ProcessTreeModel::Columns::DATAREAD,
(int)ProcessTreeModel::Columns::TIMESYNC_MODE,
};

Expand Down
12 changes: 6 additions & 6 deletions app/mon/eCALMon/src/Widgets/Models/ProcessTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
{
return process_.usrptime();
}
else if (column == Columns::UDPSBYTES)
else if (column == Columns::DATAWRITE)
{
return process_.udpsbytes();
return (long long)process_.datawrite();
}
else if (column == Columns::UDPRBYTES)
else if (column == Columns::DATAREAD)
{
return process_.udprbytes();
return (long long)process_.dataread();
}
else if (column == Columns::SEVERITY)
{
Expand Down Expand Up @@ -212,8 +212,8 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
|| (column == Columns::PMEMORY)
|| (column == Columns::PCPU)
|| (column == Columns::USRPTIME)
|| (column == Columns::UDPSBYTES)
|| (column == Columns::UDPRBYTES)
|| (column == Columns::DATAWRITE)
|| (column == Columns::DATAREAD)
)
{
return Qt::AlignmentFlag::AlignRight;
Expand Down
4 changes: 2 additions & 2 deletions app/mon/eCALMon/src/Widgets/Models/ProcessTreeItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class ProcessTreeItem :
PMEMORY,
PCPU,
USRPTIME,
UDPSBYTES,
UDPRBYTES,
DATAWRITE,
DATAREAD,
SEVERITY,
INFO,
TSYNC_MODE,
Expand Down
12 changes: 6 additions & 6 deletions app/mon/eCALMon/src/Widgets/Models/ProcessTreeModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class ProcessTreeModel : public GroupTreeModel
MEMORY,
CPU_PERCENTAGE,
USER_TIME,
UDP_SENT,
UDP_RECEIVED,
DATAWRITE,
DATAREAD,
TIMESYNC_MODE,

COLUMN_COUNT
Expand Down Expand Up @@ -94,8 +94,8 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::MEMORY, "RAM [KiB]" },
{ Columns::CPU_PERCENTAGE,"CPU %" },
{ Columns::USER_TIME, "User Time" },
{ Columns::UDP_SENT, "UDP Sent [Byte/s]" },
{ Columns::UDP_RECEIVED, "UDP Rec [Byte/s]" },
{ Columns::DATAWRITE, "Data Write [Byte/s]" },
{ Columns::DATAREAD, "Data Read [Byte/s]" },
{ Columns::TIMESYNC_MODE, "Timesync Mode" },
};

Expand All @@ -113,8 +113,8 @@ class ProcessTreeModel : public GroupTreeModel
{ Columns::CPU_PERCENTAGE, (int)ProcessTreeItem::Columns::PCPU },
{ Columns::MEMORY, (int)ProcessTreeItem::Columns::PMEMORY },
{ Columns::USER_TIME, (int)ProcessTreeItem::Columns::USRPTIME },
{ Columns::UDP_SENT, (int)ProcessTreeItem::Columns::UDPSBYTES },
{ Columns::UDP_RECEIVED, (int)ProcessTreeItem::Columns::UDPRBYTES },
{ Columns::DATAWRITE, (int)ProcessTreeItem::Columns::DATAWRITE },
{ Columns::DATAREAD, (int)ProcessTreeItem::Columns::DATAREAD },
{ Columns::TIMESYNC_MODE, (int)ProcessTreeItem::Columns::TSYNC_MODE },

};
Expand Down
4 changes: 4 additions & 0 deletions app/mon/eCALMonPlugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@
# limitations under the License.
#
# ========================= eCAL LICENSE =================================

#add_subdirectory(DummyPlugin)
add_subdirectory(MonitorTreeView)
add_subdirectory(ProtobufReflection)
if (HAS_CAPNPROTO)
add_subdirectory(CapnprotoReflection)
endif (HAS_CAPNPROTO)
add_subdirectory(RawDataReflection)
add_subdirectory(StringReflection)
69 changes: 69 additions & 0 deletions app/mon/eCALMonPlugins/CapnprotoReflection/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(mon_plugin_capnproto_reflection)

find_package(Qt5 COMPONENTS
Core
Widgets
REQUIRED)

find_package(CapnProto REQUIRED)

if(POLICY CMP0071)
cmake_policy(SET CMP0071 OLD)
endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC OFF) # Reason for being turned off: AutoUIC will prevent VS from detecting changes in .ui files
set(CMAKE_AUTORCC OFF) # Reason for being turned off: AutoRCC will create an entirely new project in VS which clutters the solution appearance. Additionally, we cannot assign a source group to the generated .cpp files which will clutter the project.
set(CMAKE_INCLUDE_CURRENT_DIR ON)

set(${PROJECT_NAME}_src
src/CapnprotoTreeBuilder.cpp
src/PluginWidget.cpp
src/Plugin.cpp
)

set(${PROJECT_NAME}_header
src/CapnprotoTreeBuilder.h
src/PluginWidget.h
src/Plugin.h
)

set(${PROJECT_NAME}_ui
src/PluginWidget.ui
)

qt5_wrap_ui(autogen_ui ${${PROJECT_NAME}_ui})

ecal_add_mon_plugin(${PROJECT_NAME} SHARED ${${PROJECT_NAME}_src} ${${PROJECT_NAME}_header} ${${PROJECT_NAME}_ui} ${autogen_ui})

target_link_libraries (${PROJECT_NAME} Qt5::Widgets eCAL::core CapnProto::capnp CustomQt eCAL::mon_plugin_lib MonitorTreeView)
target_link_options(${PROJECT_NAME} PRIVATE $<$<CXX_COMPILER_ID:MSVC>:/ignore:4099>)

target_include_directories(${PROJECT_NAME} PRIVATE src)
ecal_install_mon_plugin(${PROJECT_NAME})

if (TARGET mon)
add_dependencies(mon ${PROJECT_NAME})
endif()

set_target_properties(${PROJECT_NAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$<CONFIGURATION>/${ECAL_MON_PLUGIN_DIR}
FOLDER app/mon/plugins)
Loading

0 comments on commit 5d3c077

Please sign in to comment.