diff --git a/CMakeLists.txt b/CMakeLists.txt index dabd905461..fd2308f4fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -369,6 +369,7 @@ endif() # ecal hdf5 support # -------------------------------------------------------- if(HAS_HDF5) + add_subdirectory(contrib/measurement/hdf5) add_subdirectory(contrib/ecalhdf5) add_subdirectory(contrib/message) endif() diff --git a/app/meas_cutter/CMakeLists.txt b/app/meas_cutter/CMakeLists.txt index 3869177616..ca265d5993 100644 --- a/app/meas_cutter/CMakeLists.txt +++ b/app/meas_cutter/CMakeLists.txt @@ -52,7 +52,7 @@ target_include_directories(${PROJECT_NAME} target_link_libraries(${PROJECT_NAME} yaml-cpp tclap::tclap eCAL::ecal-utils - eCAL::hdf5 + eCAL::measurement_hdf5 Threads::Threads) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/app/meas_cutter/src/measurement_exporter.cpp b/app/meas_cutter/src/measurement_exporter.cpp index 65d2bc00d8..eb234e02ea 100644 --- a/app/meas_cutter/src/measurement_exporter.cpp +++ b/app/meas_cutter/src/measurement_exporter.cpp @@ -18,10 +18,10 @@ */ #include "measurement_exporter.h" -#include +#include MeasurementExporter::MeasurementExporter(): - _writer(std::make_unique()) + _writer(std::make_unique()) { } diff --git a/app/meas_cutter/src/measurement_importer.cpp b/app/meas_cutter/src/measurement_importer.cpp index 5311b094c3..8993640f9f 100644 --- a/app/meas_cutter/src/measurement_importer.cpp +++ b/app/meas_cutter/src/measurement_importer.cpp @@ -18,10 +18,10 @@ */ #include "measurement_importer.h" -#include +#include MeasurementImporter::MeasurementImporter() : - _reader(std::make_unique()), + _reader(std::make_unique()), _current_opened_channel_data() { } diff --git a/app/meas_cutter/src/utils.h b/app/meas_cutter/src/utils.h index 562df4eb25..19fda28bdb 100644 --- a/app/meas_cutter/src/utils.h +++ b/app/meas_cutter/src/utils.h @@ -29,12 +29,13 @@ #define YAML_CPP_STATIC_DEFINE #include "yaml-cpp/yaml.h" -#include #include #include #include "logger.h" +#include + namespace eCALMeasCutterUtils { typedef long long Timestamp; diff --git a/app/play/play_core/CMakeLists.txt b/app/play/play_core/CMakeLists.txt index b6db372da2..466e6ee9e1 100644 --- a/app/play/play_core/CMakeLists.txt +++ b/app/play/play_core/CMakeLists.txt @@ -58,7 +58,7 @@ target_link_libraries(${PROJECT_NAME} PUBLIC eCAL::core eCAL::app_pb eCAL::ecaltime_pb - eCAL::hdf5 + eCAL::measurement_hdf5 ) target_link_libraries(${PROJECT_NAME} PRIVATE diff --git a/app/play/play_core/src/ecal_play.cpp b/app/play/play_core/src/ecal_play.cpp index 041f4b9a7e..e3a72ef93f 100644 --- a/app/play/play_core/src/ecal_play.cpp +++ b/app/play/play_core/src/ecal_play.cpp @@ -27,7 +27,7 @@ #include "ecal_play_logger.h" #include "play_thread.h" -#include "ecalhdf5/eh5_reader.h" +#include #include #include @@ -58,7 +58,7 @@ bool EcalPlay::LoadMeasurement(const std::string& path) { EcalPlayLogger::Instance()->info("Loading measurement..."); - std::shared_ptr measurement(std::make_shared()); + std::shared_ptr measurement(std::make_shared()); std::string meas_dir; // The directory of the measurement std::string path_to_load; // The actual path we load the measurement from. May be a directory or a .hdf5 file diff --git a/app/play/play_core/src/measurement_container.cpp b/app/play/play_core/src/measurement_container.cpp index de9e774bfc..4b94b48acc 100644 --- a/app/play/play_core/src/measurement_container.cpp +++ b/app/play/play_core/src/measurement_container.cpp @@ -18,7 +18,7 @@ */ #include "measurement_container.h" -#include +#include #include #include diff --git a/app/play/play_core/src/play_thread.h b/app/play/play_core/src/play_thread.h index 6b8bda92b4..618e01fb33 100644 --- a/app/play/play_core/src/play_thread.h +++ b/app/play/play_core/src/play_thread.h @@ -27,7 +27,6 @@ #include "ecal_play_command.h" #include "stop_watch.h" -#include #include #include diff --git a/app/rec/rec_client_core/CMakeLists.txt b/app/rec/rec_client_core/CMakeLists.txt index 2646e5fb02..ec7312dd5e 100644 --- a/app/rec/rec_client_core/CMakeLists.txt +++ b/app/rec/rec_client_core/CMakeLists.txt @@ -98,7 +98,7 @@ target_link_libraries(${PROJECT_NAME} eCAL::core_pb eCAL::app_pb PRIVATE - eCAL::hdf5 + eCAL::measurement_hdf5 ThreadingUtils Threads::Threads eCAL::ecal-utils diff --git a/app/rec/rec_client_core/src/job/hdf5_writer_thread.cpp b/app/rec/rec_client_core/src/job/hdf5_writer_thread.cpp index 2af28d52e7..e8fc791850 100644 --- a/app/rec/rec_client_core/src/job/hdf5_writer_thread.cpp +++ b/app/rec/rec_client_core/src/job/hdf5_writer_thread.cpp @@ -18,7 +18,7 @@ */ #include "hdf5_writer_thread.h" -#include +#include #include "rec_client_core/ecal_rec_logger.h" @@ -42,7 +42,7 @@ namespace eCAL , new_topic_info_map_available_(true) , flushing_ (false) { - hdf5_writer_ = std::make_unique(); + hdf5_writer_ = std::make_unique(); } Hdf5WriterThread::~Hdf5WriterThread() diff --git a/contrib/ecalhdf5/CMakeLists.txt b/contrib/ecalhdf5/CMakeLists.txt index b0bff9bbd2..d5285101c1 100644 --- a/contrib/ecalhdf5/CMakeLists.txt +++ b/contrib/ecalhdf5/CMakeLists.txt @@ -50,14 +50,9 @@ set(ecalhdf5_src ) set(ecalhdf5_header_base - include/ecal/measurement/imeasurement.h - include/ecal/measurement/measurement.h - include/ecal/measurement/omeasurement.h include/ecalhdf5/eh5_defs.h include/ecalhdf5/eh5_meas.h - include/ecalhdf5/eh5_reader.h include/ecalhdf5/eh5_types.h - include/ecalhdf5/eh5_writer.h ) ecal_add_library(${PROJECT_NAME} ${ecalhdf5_src} ${ecalhdf5_header_base}) @@ -79,8 +74,8 @@ target_compile_options(${PROJECT_NAME} $<$:-Wextra>) target_link_libraries(${PROJECT_NAME} - PUBLIC - eCAL::message + PUBLIC + eCAL::measurement_base PRIVATE eCAL::ecal-utils ) diff --git a/contrib/ecalhdf5/include/ecalhdf5/eh5_meas.h b/contrib/ecalhdf5/include/ecalhdf5/eh5_meas.h index 7f99e0b4a7..c7cdcf6884 100644 --- a/contrib/ecalhdf5/include/ecalhdf5/eh5_meas.h +++ b/contrib/ecalhdf5/include/ecalhdf5/eh5_meas.h @@ -30,7 +30,6 @@ #include #include "eh5_types.h" -#include namespace eCAL { @@ -41,7 +40,7 @@ namespace eCAL /** * @brief eCAL HDF5 measurement API **/ - class HDF5Meas : public eCAL::measurement::base::Measurement + class HDF5Meas { public: /** @@ -61,7 +60,7 @@ namespace eCAL /** * @brief Destructor **/ - ~HDF5Meas() override; + ~HDF5Meas(); /** * @brief Copy constructor deleted @@ -106,42 +105,42 @@ namespace eCAL * @return true if output (eAccessType::CREATE) measurement directory structure can be accessed/created, false otherwise. * true if input (eAccessType::RDONLY) measurement/file path was opened, false otherwise. **/ - bool Open(const std::string& path, measurement::base::AccessType access = measurement::base::AccessType::RDONLY) override; + bool Open(const std::string& path, measurement::base::AccessType access = measurement::base::AccessType::RDONLY); /** * @brief Close file * * @return true if succeeds, false if it fails **/ - bool Close() override; + bool Close(); /** * @brief Checks if file/measurement is ok * * @return true if meas can be opened(read) or location is accessible(write), false otherwise **/ - bool IsOk() const override; + bool IsOk() const; /** * @brief Get the File Type Version of the current opened file * * @return file version **/ - std::string GetFileVersion() const override; + std::string GetFileVersion() const; /** * @brief Gets maximum allowed size for an individual file * * @return maximum size in MB **/ - size_t GetMaxSizePerFile() const override; + size_t GetMaxSizePerFile() const; /** * @brief Sets maximum allowed size for an individual file * * @param size maximum size in MB **/ - void SetMaxSizePerFile(size_t size) override; + void SetMaxSizePerFile(size_t size); /** * @brief Whether each Channel shall be writte in its own file @@ -152,7 +151,7 @@ namespace eCAL * * @return true, if one file per channel is enabled */ - bool IsOneFilePerChannelEnabled() const override; + bool IsOneFilePerChannelEnabled() const; /** * @brief Enable / disable the creation of one individual file per channel @@ -163,14 +162,14 @@ namespace eCAL * * @param enabled Whether one file shall be created per channel */ - void SetOneFilePerChannelEnabled(bool enabled) override; + void SetOneFilePerChannelEnabled(bool enabled); /** * @brief Get the available channel names of the current opened file / measurement * * @return channel names **/ - std::set GetChannelNames() const override; + std::set GetChannelNames() const; /** * @brief Check if channel exists in measurement @@ -179,7 +178,7 @@ namespace eCAL * * @return true if exists, false otherwise **/ - bool HasChannel(const std::string& channel_name) const override; + bool HasChannel(const std::string& channel_name) const; /** * @brief Get the channel description for the given channel @@ -188,7 +187,7 @@ namespace eCAL * * @return channel description **/ - std::string GetChannelDescription(const std::string& channel_name) const override; + std::string GetChannelDescription(const std::string& channel_name) const; /** * @brief Set description of the given channel @@ -196,7 +195,7 @@ namespace eCAL * @param channel_name channel name * @param description description of the channel **/ - void SetChannelDescription(const std::string& channel_name, const std::string& description) override; + void SetChannelDescription(const std::string& channel_name, const std::string& description); /** * @brief Gets the channel type of the given channel @@ -205,7 +204,7 @@ namespace eCAL * * @return channel type **/ - std::string GetChannelType(const std::string& channel_name) const override; + std::string GetChannelType(const std::string& channel_name) const; /** * @brief Set type of the given channel @@ -213,7 +212,7 @@ namespace eCAL * @param channel_name channel name * @param type type of the channel **/ - void SetChannelType(const std::string& channel_name, const std::string& type) override; + void SetChannelType(const std::string& channel_name, const std::string& type); /** * @brief Gets minimum timestamp for specified channel @@ -222,7 +221,7 @@ namespace eCAL * * @return minimum timestamp value **/ - long long GetMinTimestamp(const std::string& channel_name) const override; + long long GetMinTimestamp(const std::string& channel_name) const; /** * @brief Gets maximum timestamp for specified channel @@ -231,7 +230,7 @@ namespace eCAL * * @return maximum timestamp value **/ - long long GetMaxTimestamp(const std::string& channel_name) const override; + long long GetMaxTimestamp(const std::string& channel_name) const; /** * @brief Gets the header info for all data entries for the given channel @@ -242,7 +241,7 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool GetEntriesInfo(const std::string& channel_name, measurement::base::EntryInfoSet& entries) const override; + bool GetEntriesInfo(const std::string& channel_name, measurement::base::EntryInfoSet& entries) const; /** * @brief Gets the header info for data entries for the given channel included in given time range (begin->end) @@ -255,7 +254,7 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, measurement::base::EntryInfoSet& entries) const override; + bool GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, measurement::base::EntryInfoSet& entries) const; /** * @brief Gets data size of a specific entry @@ -265,7 +264,7 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool GetEntryDataSize(long long entry_id, size_t& size) const override; + bool GetEntryDataSize(long long entry_id, size_t& size) const; /** * @brief Gets data from a specific entry @@ -275,14 +274,14 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool GetEntryData(long long entry_id, void* data) const override; + bool GetEntryData(long long entry_id, void* data) const; /** * @brief Set measurement file base name (desired name for the actual hdf5 files that will be created) * * @param base_name Name of the hdf5 files that will be created. **/ - void SetFileBaseName(const std::string& base_name) override; + void SetFileBaseName(const std::string& base_name); /** * @brief Add entry to file @@ -297,19 +296,24 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock) override; + bool AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock); + + /** + * @brief Callback function type for pre file split notification + **/ + typedef std::function CallbackFunction; /** * @brief Connect callback for pre file split notification * * @param cb callback function **/ - void ConnectPreSplitCallback(CallbackFunction cb) override; + void ConnectPreSplitCallback(CallbackFunction cb); /** * @brief Disconnect pre file split callback **/ - void DisconnectPreSplitCallback() override; + void DisconnectPreSplitCallback(); private: std::unique_ptr hdf_meas_impl_; diff --git a/contrib/ecalhdf5/include/ecalhdf5/eh5_reader.h b/contrib/ecalhdf5/include/ecalhdf5/eh5_reader.h deleted file mode 100644 index 88faee7cfb..0000000000 --- a/contrib/ecalhdf5/include/ecalhdf5/eh5_reader.h +++ /dev/null @@ -1,201 +0,0 @@ -/* ========================= 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 ================================= -*/ - -/** - * @file eh5_reader.h - * @brief Hdf5 based Reader implementation -**/ - -#pragma once - -#include "eh5_meas.h" -#include - -namespace eCAL -{ - namespace eh5 - { - - /** - * @brief Hdf5 based Reader Implementation - **/ - class Reader : public measurement::base::Reader - { - public: - /** - * @brief Constructor - **/ - Reader() = default; - - /** - * @brief Constructor - * - * @param path Input file path / measurement directory path (see meas directory structure description bellow, in Open method). - * - **/ - explicit Reader(const std::string& path) : measurement(path, eAccessType::RDONLY){}; - - /** - * @brief Open file - * - * @param path Input file path / Reader directory path. - * - * Default Reader directory structure: - * - root directory e.g.: M:\Reader_directory\Reader01 - * - documents directory: |_doc - * - hosts directories: |_Host1 (e.g.: CARPC01) - * |_Host2 (e.g.: CARPC02) - * - * File path as input - * - root directory (e.g.: M:\Reader_directory\Reader01) in this case all hosts subdirectories will be iterated, - * - host directory (e.g.: M:\Reader_directory\Reader01\CARPC01), - * - file path, path to file from Reader (e.g.: M:\Reader_directory\Reader01\CARPC01\meas01_05.hdf5). - * - * - * @return true if input measurement/file path was opened, false otherwise. - **/ - bool Open(const std::string& path) override { - return measurement.Open(path, eAccessType::RDONLY); - } - - /** - * @brief Close file - * - * @return true if succeeds, false if it fails - **/ - bool Close() override { return measurement.Close(); } - - /** - * @brief Checks if file/measurement is ok - * - * @return true if meas can be opened(read) false otherwise - **/ - bool IsOk() const override { return measurement.IsOk(); } - - /** - * @brief Get the File Type Version of the current opened file - * - * @return file version - **/ - std::string GetFileVersion() const override { return measurement.GetFileVersion(); } - - /** - * @brief Get the available channel names of the current opened file / measurement - * - * @return channel names - **/ - std::set GetChannelNames() const override { return measurement.GetChannelNames(); } - - /** - * @brief Check if channel exists in measurement - * - * @param channel_name name of the channel - * - * @return true if exists, false otherwise - **/ - bool HasChannel(const std::string& channel_name) const override { return measurement.HasChannel(channel_name); } - - /** - * @brief Get the channel description for the given channel - * - * @param channel_name channel name - * - * @return channel description - **/ - std::string GetChannelDescription(const std::string& channel_name) const override { return measurement.GetChannelDescription(channel_name); } - - /** - * @brief Gets the channel type of the given channel - * - * @param channel_name channel name - * - * @return channel type - **/ - std::string GetChannelType(const std::string& channel_name) const override { return measurement.GetChannelType(channel_name); } - - /** - * @brief Gets minimum timestamp for specified channel - * - * @param channel_name channel name - * - * @return minimum timestamp value - **/ - long long GetMinTimestamp(const std::string& channel_name) const override { return measurement.GetMinTimestamp(channel_name); } - - /** - * @brief Gets maximum timestamp for specified channel - * - * @param channel_name channel name - * - * @return maximum timestamp value - **/ - long long GetMaxTimestamp(const std::string& channel_name) const override { return measurement.GetMaxTimestamp(channel_name); } - - /** - * @brief Gets the header info for all data entries for the given channel - * Header = timestamp + entry id - * - * @param [in] channel_name channel name - * @param [out] entries header info for all data entries - * - * @return true if succeeds, false if it fails - **/ - bool GetEntriesInfo(const std::string& channel_name, EntryInfoSet& entries) const override { return measurement.GetEntriesInfo(channel_name, entries); } - - /** - * @brief Gets the header info for data entries for the given channel included in given time range (begin->end) - * Header = timestamp + entry id - * - * @param [in] channel_name channel name - * @param [in] begin time range begin timestamp - * @param [in] end time range end timestamp - * @param [out] entries header info for data entries in given range - * - * @return true if succeeds, false if it fails - **/ - bool GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, EntryInfoSet& entries) const override { return measurement.GetEntriesInfoRange(channel_name, begin, end, entries); } - - /** - * @brief Gets data size of a specific entry - * - * @param [in] entry_id Entry ID - * @param [out] size Entry data size - * - * @return true if succeeds, false if it fails - **/ - bool GetEntryDataSize(long long entry_id, size_t& size) const override { return measurement.GetEntryDataSize(entry_id, size); } - - /** - * @brief Gets data from a specific entry - * - * @param [in] entry_id Entry ID - * @param [out] data Entry data - * - * @return true if succeeds, false if it fails - **/ - bool GetEntryData(long long entry_id, void* data) const override { return measurement.GetEntryData(entry_id, data); } - - private: - HDF5Meas measurement; - - }; - - - } // namespace eh5 -} // namespace eCAL diff --git a/contrib/measurement/base/include/ecal/measurement/base/measurement.h b/contrib/measurement/base/include/ecal/measurement/base/measurement.h deleted file mode 100644 index 8be7fcb208..0000000000 --- a/contrib/measurement/base/include/ecal/measurement/base/measurement.h +++ /dev/null @@ -1,305 +0,0 @@ -/* ========================= 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 ================================= -*/ - -/** - * @file measurement.h - * @brief Base class for low level measurement operations -**/ - -#pragma once - -#include -#include -#include -#include - -#include - -namespace eCAL -{ - namespace measurement - { - namespace base - { - /** - * @brief eCAL measurement API - **/ - class Measurement - { - public: - /** - * @brief Constructor - **/ - Measurement() = default; - - /** - * @brief Destructor - **/ - virtual ~Measurement() = default; - - /** - * @brief Copy operator - **/ - Measurement(const Measurement& other) = delete; - Measurement& operator=(const Measurement& other) = delete; - - /** - * @brief Move operator - **/ - Measurement(Measurement&&) = default; - Measurement& operator=(Measurement&&) = default; - - /** - * @brief Open file - * - * @param path Input file path / measurement directory path. - * - * Default measurement directory structure: - * - root directory e.g.: M:\measurement_directory\measurement01 - * - documents directory: |_doc - * - hosts directories: |_Host1 (e.g.: CARPC01) - * |_Host2 (e.g.: CARPC02) - * - * File path as input (AccessType::RDONLY): - * - root directory (e.g.: M:\measurement_directory\measurement01) in this case all hosts subdirectories will be iterated, - * - host directory (e.g.: M:\measurement_directory\measurement01\CARPC01), - * - file path, path to file from measurement (e.g.: M:\measurement_directory\measurement01\CARPC01\meas01_05.hdf5). - * - * File path as output (AccessType::CREATE): - * - full path to measurement directory (recommended with host name) (e.g.: M:\measurement_directory\measurement01\CARPC01), - * - to set the name of the actual hdf5 file use SetFileBaseName method. - * - * @param access Access type - * - * @return true if output (AccessType::CREATE) measurement directory structure can be accessed/created, false otherwise. - * true if input (AccessType::RDONLY) measurement/file path was opened, false otherwise. - **/ - virtual bool Open(const std::string& path, AccessType access = AccessType::RDONLY) = 0; - - /** - * @brief Close file - * - * @return true if succeeds, false if it fails - **/ - virtual bool Close() = 0; - - /** - * @brief Checks if file/measurement is ok - * - * @return true if meas can be opened(read) or location is accessible(write), false otherwise - **/ - virtual bool IsOk() const = 0; - - /** - * @brief Get the File Type Version of the current opened file - * - * @return file version - **/ - virtual std::string GetFileVersion() const = 0; - - /** - * @brief Gets maximum allowed size for an individual file - * - * @return maximum size in MB - **/ - virtual size_t GetMaxSizePerFile() const = 0; - - /** - * @brief Sets maximum allowed size for an individual file - * - * @param size maximum size in MB - **/ - virtual void SetMaxSizePerFile(size_t size) = 0; - - /** - * @brief Whether each Channel shall be writte in its own file - * - * When enabled, data is clustered by channel and each channel is written - * to its own file. The filenames will consist of the basename and the - * channel name. - * - * @return true, if one file per channel is enabled - */ - virtual bool IsOneFilePerChannelEnabled() const = 0; - - /** - * @brief Enable / disable the creation of one individual file per channel - * - * When enabled, data is clustered by channel and each channel is written - * to its own file. The filenames will consist of the basename and the - * channel name. - * - * @param enabled Whether one file shall be created per channel - */ - virtual void SetOneFilePerChannelEnabled(bool enabled) = 0; - - /** - * @brief Get the available channel names of the current opened file / measurement - * - * @return channel names - **/ - virtual std::set GetChannelNames() const = 0; - - /** - * @brief Check if channel exists in measurement - * - * @param channel_name name of the channel - * - * @return true if exists, false otherwise - **/ - virtual bool HasChannel(const std::string& channel_name) const = 0; - - /** - * @brief Get the channel description for the given channel - * - * @param channel_name channel name - * - * @return channel description - **/ - virtual std::string GetChannelDescription(const std::string& channel_name) const = 0; - - /** - * @brief Set description of the given channel - * - * @param channel_name channel name - * @param description description of the channel - **/ - virtual void SetChannelDescription(const std::string& channel_name, const std::string& description) = 0; - - /** - * @brief Gets the channel type of the given channel - * - * @param channel_name channel name - * - * @return channel type - **/ - virtual std::string GetChannelType(const std::string& channel_name) const = 0; - - /** - * @brief Set type of the given channel - * - * @param channel_name channel name - * @param type type of the channel - **/ - virtual void SetChannelType(const std::string& channel_name, const std::string& type) = 0; - - /** - * @brief Gets minimum timestamp for specified channel - * - * @param channel_name channel name - * - * @return minimum timestamp value - **/ - virtual long long GetMinTimestamp(const std::string& channel_name) const = 0; - - /** - * @brief Gets maximum timestamp for specified channel - * - * @param channel_name channel name - * - * @return maximum timestamp value - **/ - virtual long long GetMaxTimestamp(const std::string& channel_name) const = 0; - - /** - * @brief Gets the header info for all data entries for the given channel - * Header = timestamp + entry id - * - * @param [in] channel_name channel name - * @param [out] entries header info for all data entries - * - * @return true if succeeds, false if it fails - **/ - virtual bool GetEntriesInfo(const std::string& channel_name, EntryInfoSet& entries) const = 0; - - /** - * @brief Gets the header info for data entries for the given channel included in given time range (begin->end) - * Header = timestamp + entry id - * - * @param [in] channel_name channel name - * @param [in] begin time range begin timestamp - * @param [in] end time range end timestamp - * @param [out] entries header info for data entries in given range - * - * @return true if succeeds, false if it fails - **/ - virtual bool GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, EntryInfoSet& entries) const = 0; - - /** - * @brief Gets data size of a specific entry - * - * @param [in] entry_id Entry ID - * @param [out] size Entry data size - * - * @return true if succeeds, false if it fails - **/ - virtual bool GetEntryDataSize(long long entry_id, size_t& size) const = 0; - - /** - * @brief Gets data from a specific entry - * - * @param [in] entry_id Entry ID - * @param [out] data Entry data - * - * @return true if succeeds, false if it fails - **/ - virtual bool GetEntryData(long long entry_id, void* data) const = 0; - - /** - * @brief Set measurement file base name (desired name for the actual hdf5 files that will be created) - * - * @param base_name Name of the hdf5 files that will be created. - **/ - virtual void SetFileBaseName(const std::string& base_name) = 0; - - /** - * @brief Add entry to file - * - * @param data data to be added - * @param size size of the data - * @param snd_timestamp send time stamp - * @param rcv_timestamp receive time stamp - * @param channel_name channel name - * @param id message id - * @param clock message clock - * - * @return true if succeeds, false if it fails - **/ - virtual bool AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock) = 0; - - /** - * @brief Callback function type for pre file split notification - **/ - typedef std::function CallbackFunction; - - /** - * @brief Connect callback for pre file split notification - * - * @param cb callback function - **/ - virtual void ConnectPreSplitCallback(CallbackFunction cb) = 0; - - /** - * @brief Disconnect pre file split callback - **/ - virtual void DisconnectPreSplitCallback() = 0; - }; - } // namespace base - } // namespace measurement -} // namespace eCAL diff --git a/contrib/ecalhdf5/include/ecal/measurement/imeasurement.h b/contrib/measurement/base/include/ecal/measurement/imeasurement.h similarity index 98% rename from contrib/ecalhdf5/include/ecal/measurement/imeasurement.h rename to contrib/measurement/base/include/ecal/measurement/imeasurement.h index b2c311558c..00d8c12068 100644 --- a/contrib/ecalhdf5/include/ecal/measurement/imeasurement.h +++ b/contrib/measurement/base/include/ecal/measurement/imeasurement.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include namespace eCAL @@ -229,7 +229,7 @@ namespace eCAL }; inline IMeasurement::IMeasurement(const std::string& path) - : meas{ std::make_shared(path) } + : meas{ std::make_shared(path) } { } diff --git a/contrib/ecalhdf5/include/ecal/measurement/measurement.h b/contrib/measurement/base/include/ecal/measurement/measurement.h similarity index 100% rename from contrib/ecalhdf5/include/ecal/measurement/measurement.h rename to contrib/measurement/base/include/ecal/measurement/measurement.h diff --git a/contrib/ecalhdf5/include/ecal/measurement/omeasurement.h b/contrib/measurement/base/include/ecal/measurement/omeasurement.h similarity index 97% rename from contrib/ecalhdf5/include/ecal/measurement/omeasurement.h rename to contrib/measurement/base/include/ecal/measurement/omeasurement.h index 2b96ff6de7..482ddd1aaa 100644 --- a/contrib/ecalhdf5/include/ecal/measurement/omeasurement.h +++ b/contrib/measurement/base/include/ecal/measurement/omeasurement.h @@ -24,7 +24,7 @@ #include #include -#include +#include #include namespace eCAL @@ -119,7 +119,7 @@ namespace eCAL inline OMeasurement::OMeasurement(const std::string& base_path_, const std::string& measurement_name_) - : meas{ std::make_shared(base_path_) } + : meas{ std::make_shared(base_path_) } { meas->SetFileBaseName(measurement_name_); } diff --git a/contrib/measurement/hdf5/CMakeLists.txt b/contrib/measurement/hdf5/CMakeLists.txt new file mode 100644 index 0000000000..9e17e8aefc --- /dev/null +++ b/contrib/measurement/hdf5/CMakeLists.txt @@ -0,0 +1,48 @@ +# ========================= 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(measurement_hdf5) + +add_library(${PROJECT_NAME} + include/ecal/measurement/hdf5/reader.h + include/ecal/measurement/hdf5/writer.h + src/reader.cpp + src/writer.cpp +) + +add_library(eCAL::${PROJECT_NAME} ALIAS ${PROJECT_NAME}) + +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +) + +target_link_libraries(${PROJECT_NAME} + INTERFACE + eCAL::measurement_base + PRIVATE + eCAL::hdf5 +) + +ecal_install_library(${PROJECT_NAME}) + +install(DIRECTORY + "include/" DESTINATION "${INSTALL_INCLUDE_DIR}" COMPONENT sdk +) + +set_property(TARGET ${PROJECT_NAME} PROPERTY FOLDER contrib) diff --git a/contrib/measurement/hdf5/include/ecal/measurement/hdf5/reader.h b/contrib/measurement/hdf5/include/ecal/measurement/hdf5/reader.h new file mode 100644 index 0000000000..249ba728a2 --- /dev/null +++ b/contrib/measurement/hdf5/include/ecal/measurement/hdf5/reader.h @@ -0,0 +1,223 @@ +/* ========================= 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 ================================= +*/ + +/** + * @file eh5_reader.h + * @brief Hdf5 based Reader implementation +**/ + +#pragma once + +#include +#include + + +namespace eCAL +{ + namespace eh5 + { + class HDF5Meas; + } + + namespace measurement + { + namespace hdf5 + { + /** + * @brief Hdf5 based Reader Implementation + **/ + class Reader : public measurement::base::Reader + { + public: + /** + * @brief Constructor + **/ + Reader(); + + /** + * @brief Constructor + * + * @param path Input file path / measurement directory path (see meas directory structure description bellow, in Open method). + * + **/ + explicit Reader(const std::string& path); + + /** + * @brief Destructor + **/ + virtual ~Reader(); + + /** + * @brief Copy operator + **/ + Reader(const Reader& other) = delete; + Reader& operator=(const Reader& other) = delete; + + /** + * @brief Move operator + **/ + Reader(Reader&&) noexcept; + Reader& operator=(Reader&&) noexcept; + + /** + * @brief Open file + * + * @param path Input file path / Reader directory path. + * + * Default Reader directory structure: + * - root directory e.g.: M:\Reader_directory\Reader01 + * - documents directory: |_doc + * - hosts directories: |_Host1 (e.g.: CARPC01) + * |_Host2 (e.g.: CARPC02) + * + * File path as input + * - root directory (e.g.: M:\Reader_directory\Reader01) in this case all hosts subdirectories will be iterated, + * - host directory (e.g.: M:\Reader_directory\Reader01\CARPC01), + * - file path, path to file from Reader (e.g.: M:\Reader_directory\Reader01\CARPC01\meas01_05.hdf5). + * + * + * @return true if input measurement/file path was opened, false otherwise. + **/ + bool Open(const std::string& path) override; + + /** + * @brief Close file + * + * @return true if succeeds, false if it fails + **/ + bool Close() override; + + /** + * @brief Checks if file/measurement is ok + * + * @return true if meas can be opened(read) false otherwise + **/ + bool IsOk() const override; + + /** + * @brief Get the File Type Version of the current opened file + * + * @return file version + **/ + std::string GetFileVersion() const override; + + /** + * @brief Get the available channel names of the current opened file / measurement + * + * @return channel names + **/ + std::set GetChannelNames() const override; + + /** + * @brief Check if channel exists in measurement + * + * @param channel_name name of the channel + * + * @return true if exists, false otherwise + **/ + bool HasChannel(const std::string& channel_name) const override; + + /** + * @brief Get the channel description for the given channel + * + * @param channel_name channel name + * + * @return channel description + **/ + std::string GetChannelDescription(const std::string& channel_name) const override; + + /** + * @brief Gets the channel type of the given channel + * + * @param channel_name channel name + * + * @return channel type + **/ + std::string GetChannelType(const std::string& channel_name) const override; + + /** + * @brief Gets minimum timestamp for specified channel + * + * @param channel_name channel name + * + * @return minimum timestamp value + **/ + long long GetMinTimestamp(const std::string& channel_name) const override; + + /** + * @brief Gets maximum timestamp for specified channel + * + * @param channel_name channel name + * + * @return maximum timestamp value + **/ + long long GetMaxTimestamp(const std::string& channel_name) const override; + + /** + * @brief Gets the header info for all data entries for the given channel + * Header = timestamp + entry id + * + * @param [in] channel_name channel name + * @param [out] entries header info for all data entries + * + * @return true if succeeds, false if it fails + **/ + bool GetEntriesInfo(const std::string& channel_name, measurement::base::EntryInfoSet& entries) const override; + + /** + * @brief Gets the header info for data entries for the given channel included in given time range (begin->end) + * Header = timestamp + entry id + * + * @param [in] channel_name channel name + * @param [in] begin time range begin timestamp + * @param [in] end time range end timestamp + * @param [out] entries header info for data entries in given range + * + * @return true if succeeds, false if it fails + **/ + bool GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, measurement::base::EntryInfoSet& entries) const override; + + /** + * @brief Gets data size of a specific entry + * + * @param [in] entry_id Entry ID + * @param [out] size Entry data size + * + * @return true if succeeds, false if it fails + **/ + bool GetEntryDataSize(long long entry_id, size_t& size) const override; + + /** + * @brief Gets data from a specific entry + * + * @param [in] entry_id Entry ID + * @param [out] data Entry data + * + * @return true if succeeds, false if it fails + **/ + bool GetEntryData(long long entry_id, void* data) const override; + + private: + std::unique_ptr measurement; + + }; + + } //namespace hdf5 + } // namespace measurement +} // namespace eCAL diff --git a/contrib/ecalhdf5/include/ecalhdf5/eh5_writer.h b/contrib/measurement/hdf5/include/ecal/measurement/hdf5/writer.h similarity index 79% rename from contrib/ecalhdf5/include/ecalhdf5/eh5_writer.h rename to contrib/measurement/hdf5/include/ecal/measurement/hdf5/writer.h index ccc8122391..76189744b0 100644 --- a/contrib/ecalhdf5/include/ecalhdf5/eh5_writer.h +++ b/contrib/measurement/hdf5/include/ecal/measurement/hdf5/writer.h @@ -30,12 +30,18 @@ #include #include -#include namespace eCAL { namespace eh5 { + class HDF5Meas; + } + + namespace measurement + { + namespace hdf5 + { /** * @brief Hdf5 based Writer implementation **/ @@ -45,12 +51,31 @@ namespace eCAL /** * @brief Constructor **/ - Writer() = default; + Writer(); /** * @brief Constructor **/ - Writer(const std::string& path) : measurement(path, eAccessType::CREATE) {} + Writer(const std::string& path); + + /** + * @brief Destructor + **/ + virtual ~Writer(); + + /** + * @brief Copy operator + **/ + Writer(const Writer& other) = delete; + Writer& operator=(const Writer& other) = delete; + + /** + * @brief Move operator + **/ + Writer(Writer&&) noexcept; + Writer& operator=(Writer&&) noexcept; + + /** * @brief Open file @@ -69,35 +94,35 @@ namespace eCAL * * @return true if output (AccessType::CREATE) measurement directory structure can be accessed/created, false otherwise. **/ - bool Open(const std::string& path) override { return measurement.Open(path, eAccessType::CREATE); } + bool Open(const std::string& path) override; /** * @brief Close file * * @return true if succeeds, false if it fails **/ - bool Close() override { return measurement.Close(); } + bool Close() override; /** * @brief Checks if file/measurement is ok * * @return true if location is accessible, false otherwise **/ - bool IsOk() const override { return measurement.IsOk(); } + bool IsOk() const override; /** * @brief Gets maximum allowed size for an individual file * * @return maximum size in MB **/ - size_t GetMaxSizePerFile() const override { return measurement.GetMaxSizePerFile(); } + size_t GetMaxSizePerFile() const override; /** * @brief Sets maximum allowed size for an individual file * * @param size maximum size in MB **/ - void SetMaxSizePerFile(size_t size) override { return measurement.SetMaxSizePerFile(size); } + void SetMaxSizePerFile(size_t size) override; /** * @brief Whether each Channel shall be writte in its own file @@ -108,7 +133,7 @@ namespace eCAL * * @return true, if one file per channel is enabled */ - bool IsOneFilePerChannelEnabled() const override { return measurement.IsOneFilePerChannelEnabled(); } + bool IsOneFilePerChannelEnabled() const override; /** * @brief Enable / disable the creation of one individual file per channel @@ -119,7 +144,7 @@ namespace eCAL * * @param enabled Whether one file shall be created per channel */ - void SetOneFilePerChannelEnabled(bool enabled) override { return measurement.SetOneFilePerChannelEnabled(enabled); } + void SetOneFilePerChannelEnabled(bool enabled) override; /** * @brief Set description of the given channel @@ -127,7 +152,7 @@ namespace eCAL * @param channel_name channel name * @param description description of the channel **/ - void SetChannelDescription(const std::string& channel_name, const std::string& description) override { return measurement.SetChannelDescription(channel_name, description); } + void SetChannelDescription(const std::string& channel_name, const std::string& description) override; /** * @brief Set type of the given channel @@ -135,14 +160,14 @@ namespace eCAL * @param channel_name channel name * @param type type of the channel **/ - void SetChannelType(const std::string& channel_name, const std::string& type) override { return measurement.SetChannelType(channel_name, type); } + void SetChannelType(const std::string& channel_name, const std::string& type) override; /** * @brief Set measurement file base name (desired name for the actual hdf5 files that will be created) * * @param base_name Name of the hdf5 files that will be created. **/ - void SetFileBaseName(const std::string& base_name) override { return measurement.SetFileBaseName(base_name); } + void SetFileBaseName(const std::string& base_name) override; /** * @brief Add entry to file @@ -157,15 +182,11 @@ namespace eCAL * * @return true if succeeds, false if it fails **/ - bool AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock) override - { - return measurement.AddEntryToFile(data, size, snd_timestamp, rcv_timestamp, channel_name, id, clock); - } - - private: - HDF5Meas measurement; + bool AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock) override; + private: + std::unique_ptr measurement; }; - - } // namespace eh5 + } // namespace hdf5 + } // namespace measurement } // namespace eCAL diff --git a/contrib/measurement/hdf5/src/reader.cpp b/contrib/measurement/hdf5/src/reader.cpp new file mode 100644 index 0000000000..a72fb11471 --- /dev/null +++ b/contrib/measurement/hdf5/src/reader.cpp @@ -0,0 +1,88 @@ +#include +#include + +using namespace eCAL::measurement::hdf5; + +Reader::Reader() + : measurement(std::make_unique()) +{} + +Reader::Reader(const std::string& path) + : measurement(std::make_unique(path, eh5::eAccessType::RDONLY)) +{} + +Reader::~Reader() = default; + +Reader::Reader(Reader&&) noexcept = default; + +Reader& Reader::operator=(Reader&&) noexcept = default; + +bool Reader::Open(const std::string& path) +{ + return measurement->Open(path, eh5::eAccessType::RDONLY); +} + +bool Reader::Close() +{ + return measurement->Close(); +} + +bool Reader::IsOk() const +{ + return measurement->IsOk(); +} + +std::string Reader::GetFileVersion() const +{ + return measurement->GetFileVersion(); +} + +std::set Reader::GetChannelNames() const +{ + return measurement->GetChannelNames(); +} + +bool Reader::HasChannel(const std::string& channel_name) const +{ + return measurement->HasChannel(channel_name); +} + +std::string Reader::GetChannelDescription(const std::string& channel_name) const +{ + return measurement->GetChannelDescription(channel_name); +} + +std::string Reader::GetChannelType(const std::string& channel_name) const +{ + return measurement->GetChannelType(channel_name); +} + +long long Reader::GetMinTimestamp(const std::string& channel_name) const +{ + return measurement->GetMinTimestamp(channel_name); +} + +long long Reader::GetMaxTimestamp(const std::string& channel_name) const +{ + return measurement->GetMaxTimestamp(channel_name); +} + +bool Reader::GetEntriesInfo(const std::string& channel_name, base::EntryInfoSet& entries) const +{ + return measurement->GetEntriesInfo(channel_name, entries); +} + +bool Reader::GetEntriesInfoRange(const std::string& channel_name, long long begin, long long end, base::EntryInfoSet& entries) const +{ + return measurement->GetEntriesInfoRange(channel_name, begin, end, entries); +} + +bool Reader::GetEntryDataSize(long long entry_id, size_t& size) const +{ + return measurement->GetEntryDataSize(entry_id, size); +} + +bool Reader::GetEntryData(long long entry_id, void* data) const +{ + return measurement->GetEntryData(entry_id, data); +} \ No newline at end of file diff --git a/contrib/measurement/hdf5/src/writer.cpp b/contrib/measurement/hdf5/src/writer.cpp new file mode 100644 index 0000000000..d2a0ccc101 --- /dev/null +++ b/contrib/measurement/hdf5/src/writer.cpp @@ -0,0 +1,73 @@ +#include +#include + +using namespace eCAL::measurement::hdf5; + +Writer::Writer() + : measurement(std::make_unique()) +{} + +Writer::Writer(const std::string& path) + : measurement(std::make_unique(path, eh5::eAccessType::CREATE)) +{} + +Writer::~Writer() = default; + +Writer::Writer(Writer&&) noexcept = default; + +Writer& Writer::operator=(Writer&&) noexcept = default; + +bool Writer::Open(const std::string& path) +{ + return measurement->Open(path, eh5::eAccessType::CREATE); +} + +bool Writer::Close() +{ + return measurement->Close(); +} + +bool Writer::IsOk() const +{ + return measurement->IsOk(); +} + +size_t Writer::GetMaxSizePerFile() const +{ + return measurement->GetMaxSizePerFile(); +} + +void Writer::SetMaxSizePerFile(size_t size) +{ + return measurement->SetMaxSizePerFile(size); +} + +bool Writer::IsOneFilePerChannelEnabled() const +{ + return measurement->IsOneFilePerChannelEnabled(); +} + +void Writer::SetOneFilePerChannelEnabled(bool enabled) +{ + return measurement->SetOneFilePerChannelEnabled(enabled); +} + +void Writer::SetChannelDescription(const std::string& channel_name, const std::string& description) +{ + return measurement->SetChannelDescription(channel_name, description); +} + +void Writer::SetChannelType(const std::string& channel_name, const std::string& type) +{ + return measurement->SetChannelType(channel_name, type); +} + +void Writer::SetFileBaseName(const std::string& base_name) +{ + return measurement->SetFileBaseName(base_name); +} + +bool Writer::AddEntryToFile(const void* data, const unsigned long long& size, const long long& snd_timestamp, const long long& rcv_timestamp, const std::string& channel_name, long long id, long long clock) +{ + return measurement->AddEntryToFile(data, size, snd_timestamp, rcv_timestamp, channel_name, id, clock); +} diff --git a/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx b/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx index b9283675d3..98f591c114 100644 --- a/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx +++ b/lang/python/ecalhdf5/src/ecalhdf5_wrap.cxx @@ -39,7 +39,7 @@ typedef struct { PyObject_HEAD - eCAL::measurement::base::Measurement *hdf5_meas; + eCAL::eh5::HDF5Meas *hdf5_meas; } Meas; /****************************************/ diff --git a/samples/cpp/measurement/measurement_read/CMakeLists.txt b/samples/cpp/measurement/measurement_read/CMakeLists.txt index b5c75e2f8f..d6db89cda5 100644 --- a/samples/cpp/measurement/measurement_read/CMakeLists.txt +++ b/samples/cpp/measurement/measurement_read/CMakeLists.txt @@ -43,9 +43,13 @@ PROTOBUF_TARGET_CPP(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src/protobuf ${m #target_include_directories(${PROJECT_NAME} PRIVATE .) target_compile_definitions(${PROJECT_NAME} PRIVATE MEASUREMENT_PATH="${SAMPLE_PERSON_MEASUREMENT_PATH}") -target_link_libraries(${PROJECT_NAME} eCAL::hdf5 eCAL::proto) - -target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf) +target_link_libraries(${PROJECT_NAME} + PRIVATE + eCAL::measurement_hdf5 + eCAL::proto + eCAL::message + protobuf::libprotobuf +) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/samples/cpp/measurement/measurement_write/CMakeLists.txt b/samples/cpp/measurement/measurement_write/CMakeLists.txt index d095572764..cf532d9eb3 100644 --- a/samples/cpp/measurement/measurement_write/CMakeLists.txt +++ b/samples/cpp/measurement/measurement_write/CMakeLists.txt @@ -43,9 +43,13 @@ PROTOBUF_TARGET_CPP(${PROJECT_NAME} ${CMAKE_CURRENT_SOURCE_DIR}/src/protobuf ${m #target_include_directories(${PROJECT_NAME} PRIVATE .) target_compile_definitions(${PROJECT_NAME} PRIVATE MEASUREMENT_PATH="${SAMPLE_PERSON_MEASUREMENT_PATH}") -target_link_libraries(${PROJECT_NAME} eCAL::hdf5 eCAL::proto) - -target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf) +target_link_libraries(${PROJECT_NAME} + PRIVATE + eCAL::measurement_hdf5 + eCAL::proto + eCAL::message + protobuf::libprotobuf +) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)