[rec_core] Record ecalhdf5 v6, respecting topic-id.#1884
[rec_core] Record ecalhdf5 v6, respecting topic-id.#1884KerstinKeller wants to merge 2 commits intomasterfrom
Conversation
| } | ||
|
|
||
| void EcalRecImpl::EcalMessageReceived(const eCAL::Registration::STopicId& topic_id_, const eCAL::SReceiveCallbackData& data_) | ||
| void EcalRecImpl::EcalMessageReceived(const Registration::STopicId& topic_id_, const SDataTypeInformation& datatype_info_, const SReceiveCallbackData& callback_data_) |
There was a problem hiding this comment.
warning: parameter 'datatype_info_' is unused [misc-unused-parameters]
| void EcalRecImpl::EcalMessageReceived(const Registration::STopicId& topic_id_, const SDataTypeInformation& datatype_info_, const SReceiveCallbackData& callback_data_) | |
| void EcalRecImpl::EcalMessageReceived(const Registration::STopicId& topic_id_, const SDataTypeInformation& /*datatype_info_*/, const SReceiveCallbackData& callback_data_) |
| auto system_receive_time = std::chrono::steady_clock::now(); | ||
|
|
||
| std::shared_ptr<Frame> frame = std::make_shared<Frame>(&data_, topic_id_.topic_name, ecal_receive_time, system_receive_time); | ||
| std::shared_ptr<Frame> frame = std::make_shared<Frame>(callback_data_, topic_id_, ecal_receive_time, system_receive_time); |
There was a problem hiding this comment.
warning: variable 'frame' of type 'std::shared_ptr' can be declared 'const' [misc-const-correctness]
| std::shared_ptr<Frame> frame = std::make_shared<Frame>(callback_data_, topic_id_, ecal_receive_time, system_receive_time); | |
| std::shared_ptr<Frame> const frame = std::make_shared<Frame>(callback_data_, topic_id_, ecal_receive_time, system_receive_time); |
| data_.reserve(callback_data->size); | ||
| data_.assign((char*)callback_data->buf, (char*)callback_data->buf + callback_data->size); | ||
| data_.reserve(callback_data.size); | ||
| data_.assign((char*)callback_data.buf, (char*)callback_data.buf + callback_data.size); |
There was a problem hiding this comment.
warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast]
data_.assign((char*)callback_data.buf, (char*)callback_data.buf + callback_data.size);
^| data_.reserve(callback_data->size); | ||
| data_.assign((char*)callback_data->buf, (char*)callback_data->buf + callback_data->size); | ||
| data_.reserve(callback_data.size); | ||
| data_.assign((char*)callback_data.buf, (char*)callback_data.buf + callback_data.size); |
There was a problem hiding this comment.
warning: do not use C-style cast to convert between unrelated types [cppcoreguidelines-pro-type-cstyle-cast]
data_.assign((char*)callback_data.buf, (char*)callback_data.buf + callback_data.size);
^| for (const auto& topic : topic_info_map_to_set) | ||
| { | ||
| // convert from eCAL core types to eCAL measurement types before writing to the measurement. | ||
| eh5::SChannel channel{ topic.first.topic_name, topic.first.topic_id.entity_id }; |
There was a problem hiding this comment.
warning: variable 'channel' of type 'eh5::SChannel' (aka 'eCAL::experimental::measurement::base::Channel') can be declared 'const' [misc-const-correctness]
| eh5::SChannel channel{ topic.first.topic_name, topic.first.topic_id.entity_id }; | |
| eh5::SChannel const channel{ topic.first.topic_name, topic.first.topic_id.entity_id }; |
| topic_info_snapshot.insert({ publisher_id , std::move(datatype_info) }); | ||
| } | ||
|
|
||
| std::lock_guard<decltype(monitoring_mutex_)> monitoring_lock(monitoring_mutex_); |
There was a problem hiding this comment.
warning: variable 'monitoring_lock' of type 'std::lock_guard<decltype(this->monitoring_mutex_)>' (aka 'lock_guardstd::mutex') can be declared 'const' [misc-const-correctness]
| std::lock_guard<decltype(monitoring_mutex_)> monitoring_lock(monitoring_mutex_); | |
| std::lock_guard<decltype(monitoring_mutex_)> const monitoring_lock(monitoring_mutex_); |
ae58db3 to
af31e40
Compare
2a582d5 to
47c77d3
Compare
We want to record both Publisher and its unque ID within the measurement.
This PR aims to do that.
We do not need to do any kind of quality computation any longer.
Later on, we might be able to play back only topics published by a given publisher.
Currently, it builds, however, nothing is recorded. Need to review why it breaks the recording.