-
Notifications
You must be signed in to change notification settings - Fork 180
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
[rec_core] Record ecalhdf5 v6, respecting topic-id. #1884
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clang-tidy made some suggestions
@@ -695,12 +695,12 @@ namespace eCAL | |||
return subscribed_topics; | |||
} | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ecal_receive_time = eCAL::Time::ecal_clock::now(); | ||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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);
^
@@ -168,8 +168,10 @@ namespace eCAL | |||
|
|||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 }; |
} | ||
|
||
std::lock_guard<decltype(monitoring_mutex_)> monitoring_lock(monitoring_mutex_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_); |
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.