Skip to content

Commit

Permalink
eCAL v5.3.5:
Browse files Browse the repository at this point in the history
* windows cpack installer install all needed runtime libs and config files
* 2 new application "ecal_config" and "ecal_stop" added (dumpl config, stop all running eCAL processes)
* minor fix on server/client tcp header for future extensions

author: Rex Schilasky <[email protected]>
  • Loading branch information
Kerstin-Keller committed Aug 1, 2019
1 parent 4318a2c commit 244531e
Show file tree
Hide file tree
Showing 32 changed files with 370 additions and 74 deletions.
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,10 @@ set(eCAL_config_dir ${eCAL_BINARY_DIR}/cmake/)
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)
set(eCAL_install_config_dir cfg)
set(eCAL_install_samples_dir samples/bin/)
set(eCAL_install_samples_src_dir samples/src/)
set(eCAL_install_tests_dir tests)
endif()

set(THREADS_PREFER_PTHREAD_FLAG ON)
Expand Down Expand Up @@ -304,6 +303,8 @@ endif()
add_subdirectory(app/apps)
if(BUILD_APPS)
add_subdirectory(app/mon/eCALTopic/src)
add_subdirectory(app/util/eCALConfig/src)
add_subdirectory(app/util/eCALStop/src)
endif()

# --------------------------------------------------------
Expand Down
9 changes: 0 additions & 9 deletions HowToWindows.txt

This file was deleted.

32 changes: 30 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ sudo apt-get install doxygen
sudo apt-get install graphviz
```

*Note:* building cmake including documentation requires using a fairly new version of CMake, so the version installed with your system (e.g. 3.5.1 for Ubuntu 16.04) might not be sufficient. You can install newer versions of CMake by adding a ppa as described [here]( https://blog.kitware.com/ubuntu-cmake-repository-now-available/) or downloading it from the [CMake website](https://cmake.org/download/)

#### Install third party dependencies:

```bash
Expand All @@ -79,7 +81,6 @@ make -j
cpack -G DEB
sudo dpkg -i eCAL*
```

### UDP network configuration

setup the correct ip address - here for adapter eth0, ip address 192.168.0.1
Expand Down Expand Up @@ -138,7 +139,7 @@ Run the following batch files to create the Visual Studio 2015 (2017) solutions

```bat
build_win\win_make_cmake.bat v140 (v141)
build_win\win_make_ build.bat
build_win\win_make_build.bat
```

#### Create Setup
Expand Down Expand Up @@ -186,6 +187,33 @@ 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
39 changes: 39 additions & 0 deletions app/mon/eCALMon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -235,3 +235,42 @@ endif()
set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER app/mon)

ecal_install_app(${PROJECT_NAME})
get_target_property(_qmake_executable Qt5::qmake IMPORTED_LOCATION)
get_filename_component(_qt_bin_dir "${_qmake_executable}" DIRECTORY)
find_program(WINDEPLOYQT_EXECUTABLE windeployqt HINTS "${_qt_bin_dir}")

# Running this with MSVC 2015 requires CMake 3.6+
if((MSVC_VERSION VERSION_EQUAL 1900 OR MSVC_VERSION VERSION_GREATER 1900)
AND CMAKE_VERSION VERSION_LESS "3.6")
message(WARNING "Deploying with MSVC 2015+ requires CMake 3.6+")
endif()

if(WIN32)
install(CODE
"
set(_file ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/ecal_mon.exe)
execute_process(
COMMAND \"${CMAKE_COMMAND}\" -E
env PATH=\"${_qt_bin_dir}\" \"${WINDEPLOYQT_EXECUTABLE}\"
--dry-run
--no-compiler-runtime
--no-angle
--no-opengl-sw
--list mapping
\${_file}
OUTPUT_VARIABLE _output
OUTPUT_STRIP_TRAILING_WHITESPACE
)
separate_arguments(_files WINDOWS_COMMAND \${_output})
while(_files)
list(GET _files 0 _src)
list(GET _files 1 _dest)
execute_process(
COMMAND \"${CMAKE_COMMAND}\" -E
copy \${_src} \"\${CMAKE_INSTALL_PREFIX}/bin/\${_dest}\"
)
list(REMOVE_AT _files 0 1)
endwhile()
"
)
endif()
2 changes: 2 additions & 0 deletions app/mon/eCALMon/src/Widgets/EcalmonTreeWidget/TopicWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <ecal_def_ini.h>
#include <SimpleIni.h>

#include <iostream>

#include <QSettings>
#include <QMenu>
#include <QApplication>
Expand Down
2 changes: 0 additions & 2 deletions app/mon/eCALMon/src/Widgets/Models/ProcessTreeItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,7 @@ QVariant ProcessTreeItem::data(Columns column, Qt::ItemDataRole role) const
switch (process_.tsync_mode())
{
case 0:
return QVariant();
case 1:
return QVariant();
case 2:
return QVariant();
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"SupportedTopics":
[
{
"Format": "proto"
"Format": "proto"
}
],

Expand Down
37 changes: 37 additions & 0 deletions app/util/eCALConfig/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ========================= 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(config)

set(ecalconfig_src
eCALConfig.cpp
)

ecal_add_app_console(${PROJECT_NAME} ${ecalconfig_src})

target_include_directories(${PROJECT_NAME}
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

target_compile_definitions(${PROJECT_NAME}
PRIVATE $<$<BOOL:${MSVC}>:PCRE_STATIC;_UNICODE>)

target_link_libraries(${PROJECT_NAME} eCAL::core)

ecal_install_app(${PROJECT_NAME})

set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER app/util)
39 changes: 39 additions & 0 deletions app/util/eCALConfig/src/eCALConfig.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/* ========================= 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 =================================
*/

/**
* @brief eCALConfig Console Application
**/

#include <ecal/ecal.h>

int main(int argc, char** argv)
{
// initialize eCAL API
eCAL::Initialize(argc, argv, "eCALConfig");

// print config
eCAL::Process::DumpConfig();

// finalize eCAL API
eCAL::Finalize();

// return success
return 0;
}
37 changes: 37 additions & 0 deletions app/util/eCALStop/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ========================= 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(stop)

set(ecalstop_src
eCALStop.cpp
)

ecal_add_app_console(${PROJECT_NAME} ${ecalstop_src})

target_include_directories(${PROJECT_NAME}
PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

target_compile_definitions(${PROJECT_NAME}
PRIVATE $<$<BOOL:${MSVC}>:PCRE_STATIC;_UNICODE>)

target_link_libraries(${PROJECT_NAME} eCAL::core)

ecal_install_app(${PROJECT_NAME})

set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER app/util)
67 changes: 67 additions & 0 deletions app/util/eCALStop/src/eCALStop.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/* ========================= 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 =================================
*/

/**
* @brief eCALStop Console Application
**/

#include <algorithm>
#include <iostream>

#include <ecal/ecal.h>

int main(int argc, char** argv)
{
// initialize eCAL API
eCAL::Initialize(argc, argv, "eCALStop", eCAL::Init::All);

// set process state
eCAL::Process::SetState(proc_sev_healthy, proc_sev_level1, "Running");

// some nice info show while collection
std::cout << "Collecting local process informations." << std::endl;
std::string sstring = "\nPlease wait ..........................\nStand by .............................\nStay tuned ...........................\n\n";
std::reverse(sstring.begin(), sstring.end());
while (!sstring.empty())
{
std::cout << sstring.back();
sstring.pop_back();
eCAL::Process::SleepMS(25);
}
eCAL::Process::SleepMS(500);

// shut down local user processes
std::cout << "--------------------------------------" << std::endl;
std::cout << "Shutdown local eCAL user processes." << std::endl;
std::cout << "--------------------------------------" << std::endl;
eCAL::Util::ShutdownProcesses();
std::cout << std::endl;

// shut down local eCAL core
std::cout << "--------------------------------------" << std::endl;
std::cout << "Shutdown local eCAL core components." << std::endl;
std::cout << "--------------------------------------" << std::endl;
eCAL::Util::ShutdownCore();
std::cout << std::endl;

// finalize eCAL API
eCAL::Finalize();

return EXIT_SUCCESS;
}
2 changes: 1 addition & 1 deletion build_win/win_make_cmake.bat
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set COMPILE_WIN64=%VISUAL_STUDIO_GENERATOR% Win64

if not exist "%BUILD_DIR%" mkdir %BUILD_DIR%
cd /d %BUILD_DIR%

cmake .. -G "%COMPILE_WIN64%" -DCMAKE_INSTALL_PREFIX=_install


popd
2 changes: 2 additions & 0 deletions cmake/helper_functions/ecal_add_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ function(ecal_add_app_gui TARGET_NAME)
VERSION ${eCAL_VERSION_STRING}
SOVERSION ${eCAL_VERSION_MAYOR}
OUTPUT_NAME ecal_${TARGET_NAME})
set_property(INSTALL "${eCAL_install_app_dir}/$<TARGET_FILE_NAME:${TARGET_NAME}>" PROPERTY CPACK_START_MENU_SHORTCUTS "${TARGET_NAME}")
endfunction()

function(ecal_add_app_qt TARGET_NAME)
Expand All @@ -61,6 +62,7 @@ function(ecal_add_app_qt TARGET_NAME)
OUTPUT_NAME ecal_${TARGET_NAME})
if(WIN32)
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup")
set_property(INSTALL "${eCAL_install_app_dir}/$<TARGET_FILE_NAME:${TARGET_NAME}>" PROPERTY CPACK_START_MENU_SHORTCUTS "${TARGET_NAME}")
endif()
endfunction()

Expand Down
1 change: 0 additions & 1 deletion cmake/helper_functions/ecal_install_functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ 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()

Expand Down
Binary file added cpack/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cpack/background.xcf
Binary file not shown.
Binary file added cpack/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added cpack/banner.xcf
Binary file not shown.
Loading

0 comments on commit 244531e

Please sign in to comment.