Skip to content

[rec_core] Record ecalhdf5 v6, respecting topic-id.#1884

Draft
KerstinKeller wants to merge 2 commits intomasterfrom
feature/record-with-topicid
Draft

[rec_core] Record ecalhdf5 v6, respecting topic-id.#1884
KerstinKeller wants to merge 2 commits intomasterfrom
feature/record-with-topicid

Conversation

@KerstinKeller
Copy link
Copy Markdown
Contributor

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.

@KerstinKeller KerstinKeller added the cherry-pick-to-NONE Don't cherry-pick these changes label Jan 10, 2025
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot left a 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

}

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_)
Copy link
Copy Markdown
Contributor

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]

Suggested change
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);
Copy link
Copy Markdown
Contributor

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]

Suggested change
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);

Comment thread app/rec/rec_client_core/src/frame.h Outdated
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);
Copy link
Copy Markdown
Contributor

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);
                                               ^

Comment thread app/rec/rec_client_core/src/frame.h Outdated
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);
Copy link
Copy Markdown
Contributor

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);
                     ^

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 };
Copy link
Copy Markdown
Contributor

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]

Suggested change
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_);
Copy link
Copy Markdown
Contributor

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]

Suggested change
std::lock_guard<decltype(monitoring_mutex_)> monitoring_lock(monitoring_mutex_);
std::lock_guard<decltype(monitoring_mutex_)> const monitoring_lock(monitoring_mutex_);

@KerstinKeller KerstinKeller force-pushed the feature/record-with-topicid branch 3 times, most recently from ae58db3 to af31e40 Compare February 4, 2026 13:42
@KerstinKeller KerstinKeller force-pushed the feature/record-with-topicid branch from 2a582d5 to 47c77d3 Compare February 17, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cherry-pick-to-NONE Don't cherry-pick these changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant