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

[config] Remove simpleini as submodule #1806

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
[submodule "thirdparty/tclap"]
path = thirdparty/tclap/tclap
url = https://github.com/xguerin/tclap.git
[submodule "thirdparty/simpleini"]
path = thirdparty/simpleini/simpleini
url = https://github.com/brofield/simpleini.git
[submodule "thirdparty/spdlog"]
path = thirdparty/spdlog/spdlog
url = https://github.com/gabime/spdlog.git
Expand Down
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ message(STATUS "ECAL_THIRDPARTY_BUILD_HDF5 : ${ECAL_THIRDPAR
message(STATUS "ECAL_THIRDPARTY_BUILD_PROTOBUF : ${ECAL_THIRDPARTY_BUILD_PROTOBUF}")
message(STATUS "ECAL_THIRDPARTY_BUILD_QWT : ${ECAL_THIRDPARTY_BUILD_QWT}")
message(STATUS "ECAL_THIRDPARTY_BUILD_RECYCLE : ${ECAL_THIRDPARTY_BUILD_RECYCLE}")
message(STATUS "ECAL_THIRDPARTY_BUILD_SIMPLEINI : ${ECAL_THIRDPARTY_BUILD_SIMPLEINI}")
message(STATUS "ECAL_THIRDPARTY_BUILD_SPDLOG : ${ECAL_THIRDPARTY_BUILD_SPDLOG}")
message(STATUS "ECAL_THIRDPARTY_BUILD_TCLAP : ${ECAL_THIRDPARTY_BUILD_TCLAP}")
message(STATUS "ECAL_THIRDPARTY_BUILD_TCP_PUBSUB : ${ECAL_THIRDPARTY_BUILD_TCP_PUBSUB}")
Expand Down
9 changes: 0 additions & 9 deletions NOTICE.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,6 @@ recycle
- Binary distributions for Windows
- Binary distributions for Linux

SimpleIni
- License: MIT
- Project: https://github.com/brofield/simpleini
- Copyright: 2006-2013 Brodie Thiesfield
- Included in:
- Git submodule `/tirdparty/simpleini/simpleini`
- Binary distributions for Windows
- Binary distributions for Linux

spdlog
- License: MIT
- Project: https://github.com/gabime/spdlog
Expand Down
24 changes: 0 additions & 24 deletions cmake/Modules/Findsimpleini.cmake

This file was deleted.

1 change: 0 additions & 1 deletion cmake/submodule_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ set(ecal_submodule_dependencies
Protobuf
qwt
recycle
simpleini
spdlog
tclap
tcp_pubsub
Expand Down
6 changes: 3 additions & 3 deletions contrib/ecaltime/linuxptp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

project(ecaltime-linuxptp)

find_package(simpleini REQUIRED)
find_package(yaml-cpp REQUIRED)

set(ecal_time_linuxptp_src
src/ecal_time_linuxptp.cpp
Expand All @@ -38,7 +38,7 @@ endif()

ecal_add_time_plugin(${PROJECT_NAME} SHARED ${ecal_time_linuxptp_src} ${ecal_time_linuxptp_header})

target_link_libraries(${PROJECT_NAME} eCAL::core simpleini::simpleini)
target_link_libraries(${PROJECT_NAME} eCAL::core yaml-cpp::yaml-cpp)

target_include_directories(${PROJECT_NAME}
PRIVATE
Expand All @@ -49,7 +49,7 @@ ecal_install_time_plugin(${PROJECT_NAME})

set(ECALTIME_CONFIG_FILES
${ECALTIME_CONFIG_FILES}
${CMAKE_CURRENT_SOURCE_DIR}/src/config/ecaltime.ini
${CMAKE_CURRENT_SOURCE_DIR}/src/config/ecaltime.yaml
PARENT_SCOPE)

set_target_properties(${PROJECT_NAME} PROPERTIES
Expand Down
32 changes: 20 additions & 12 deletions contrib/ecaltime/linuxptp/src/config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

#pragma once

#include <SimpleIni.h>
#include <yaml-cpp/yaml.h>

#include <iostream>
#include <unistd.h>
Expand All @@ -32,20 +32,28 @@ namespace LinuxPtpConfig {
* @brief reads the file ~/.ecal/ecaltime.ini to get the device
* @return the device value from the linuxptp section
*/
std::string getDevice() {
CSimpleIniA ini;

std::string getDevice() {
std::string path_to_ini = eCAL::Util::GeteCALConfigPath();
path_to_ini += "ecaltime.ini";
path_to_ini += "ecaltime.yaml";

int err = ini.LoadFile(path_to_ini.c_str());
if (err != SI_OK){
std::cerr << "Error reading ecaltime config file" << std::endl;
YAML::Node yaml;
try
{
yaml = YAML::LoadFile(path_to_ini);
}
catch(const std::exception& e)
{
std::cerr << "Error reading ecaltime config file: " << e.what() << "\n";
}

if (yaml["linuxptp"])
{
if (yaml["linuxptp"]["device"])
{
return yaml["linuxptp"]["device"].as<std::string>();
}
}

const char * pVal = ini.GetValue("linuxptp", "device", "/dev/ptp0");

std::string device(pVal);
return device;
return std::string("/dev/ptp0");
}
}
15 changes: 0 additions & 15 deletions contrib/ecaltime/linuxptp/src/config/ecaltime.ini

This file was deleted.

13 changes: 13 additions & 0 deletions contrib/ecaltime/linuxptp/src/config/ecaltime.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# ---------------------------------------------
# ecaltime-linuxptp Settings
# ---------------------------------------------
#
# device = /dev/ptp0 The device can be any ptp clock.
# Alternatively, you can use:
# - CLOCK_MONOTONIC (a steady clock with undefined epoche)
# - CLOCK_REALTIME (the current system time)
# - CLOCK_TAI (Like CLOCK_REALTIME but in International Atomic Time)
#
# ---------------------------------------------
linuxptp:
device: "/dev/ptp0"
1 change: 1 addition & 0 deletions contrib/ecaltime/linuxptp/src/ecaltime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <ecaltime.h>
#include <chrono>
#include <thread>
#include <cstring>

#include "ecal_time_linuxptp.h"
#include "config/config.h"
Expand Down
2 changes: 1 addition & 1 deletion doc/rst/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx_book_theme',
Copy link
Contributor

Choose a reason for hiding this comment

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

@Peguen why did you remove this line? It seems unrelated.

#'sphinx_book_theme',
'sphinx_tabs.tabs',
'sphinx.ext.githubpages',
'sphinx.ext.todo',
Expand Down
2 changes: 0 additions & 2 deletions doc/rst/development/ecal_cmake_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ All options can be passed on the command line cmake ``-D<option>=<value>`` or in
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_SPDLOG`` | ``ON`` | Build spdlog with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_SIMPLEINI`` | ``ON`` | Build simpleini with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_TCLAP`` | ``ON`` | Build tclap library with eCAL |
+-------------------------------------------+---------+-----------------------------------------------------------------+
| ``ECAL_THIRDPARTY_BUILD_TCP_PUBSUB`` | ``ON`` | Build tcp_pubsub library with eCAL |
Expand Down
7 changes: 0 additions & 7 deletions doc/rst/license/thirdparty_licenses.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,6 @@ They are used by Eclipse eCAL, but not associated to it in any way.
- |fa-windows| Binary distributions for Windows
- |fa-ubuntu| Binary distributions for Linux

* - `SimpleIni <https://github.com/brofield/simpleini>`_
- :ref:`mit_license`
- 2006-2013 Brodie Thiesfield
- - |fa-github| Git submodule ``/tirdparty/simpleini/simpleini``
- |fa-windows| Binary distributions for Windows
- |fa-ubuntu| Binary distributions for Linux

* - `spdlog <https://github.com/gabime/spdlog>`_
- :ref:`mit_license`
- 2016 Gabi Melman
Expand Down
4 changes: 1 addition & 3 deletions ecal/core/src/config/ecal_config_initializer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,7 @@ namespace eCAL
InitFromFile(g_default_ini_file);
}

Configuration::Configuration()
{
}
Configuration::Configuration() = default;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like an unrelated change


std::string Configuration::GetYamlFilePath()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace eCAL
attributes.network_enabled = reg_config_.network_enabled;
attributes.loopback = reg_config_.loopback;
attributes.drop_out_of_order_messages = sub_config_.drop_out_of_order_messages;
attributes.registation_timeout_ms = reg_config_.registration_timeout;
attributes.registration_timeout_ms = reg_config_.registration_timeout;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like an unrelated change

attributes.topic_name = topic_name_;
attributes.host_name = Process::GetHostName();
attributes.host_group_name = Process::GetHostGroupName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace eCAL
bool network_enabled;
bool drop_out_of_order_messages;
bool loopback;
unsigned int registation_timeout_ms;
unsigned int registration_timeout_ms;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like an unrelated change


SUDPAttributes udp;
STCPAttributes tcp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace eCAL
SHM::SAttributes attributes;

attributes.process_id = attr_.process_id;
attributes.registration_timeout_ms = attr_.registation_timeout_ms;
attributes.registration_timeout_ms = attr_.registration_timeout_ms;
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like an unrelated change


return attributes;
}
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ sdist.only-include = [
"thirdparty/ecaludp/",
"thirdparty/protobuf/",
"thirdparty/recycle/",
"thirdparty/simpleini/",
"thirdparty/tclap/",
"thirdparty/tcp_pubsub/",
"thirdparty/yaml-cpp/",
Expand Down
3 changes: 0 additions & 3 deletions thirdparty/simpleini/CMakeLists.txt

This file was deleted.

3 changes: 0 additions & 3 deletions thirdparty/simpleini/build-simpleini.cmake

This file was deleted.

1 change: 0 additions & 1 deletion thirdparty/simpleini/simpleini
Submodule simpleini deleted from 9b3ed7
Loading