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

[core] remove multiple structs from Registration namespace. (IDs for pubsub / services). #1946

Merged

Conversation

KerstinKeller
Copy link
Contributor

A few structs (STopicId, SEntityId, SServiceId, ) are moved from eCAL::Registration namespace to only eCAL namespace.

@KerstinKeller KerstinKeller added the cherry-pick-to-NONE Don't cherry-pick these changes label Jan 24, 2025
@KerstinKeller KerstinKeller requested a review from hannemn January 24, 2025 12:30
@KerstinKeller KerstinKeller marked this pull request as ready for review January 24, 2025 12:31
Copy link
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

@@ -95,7 +95,7 @@ namespace eCAL
Logging::Log(Logging::log_level_debug1, "v5::CServiceClientImpl: Creating service client with name: " + service_name_);

// Define the event callback to pass to CServiceClient
v6::ClientEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SClientEventCallbackData& data_)
v6::ClientEventCallbackT event_callback = [this](const SServiceId& service_id_, const v6::SClientEventCallbackData& data_)
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'event_callback' of type 'v6::ClientEventCallbackT' (aka 'function<void (const SServiceId &, const SClientEventCallbackData &)>') can be declared 'const' [misc-const-correctness]

Suggested change
v6::ClientEventCallbackT event_callback = [this](const SServiceId& service_id_, const v6::SClientEventCallbackData& data_)
v6::ClientEventCallbackT const event_callback = [this](const SServiceId& service_id_, const v6::SClientEventCallbackData& data_)

@@ -57,7 +57,7 @@ namespace eCAL
}

// Define the event callback to pass to CServiceClient
v6::ServerEventCallbackT event_callback = [this](const Registration::SServiceId& service_id_, const v6::SServerEventCallbackData& data_)
v6::ServerEventCallbackT event_callback = [this](const SServiceId& service_id_, const v6::SServerEventCallbackData& data_)
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'event_callback' of type 'v6::ServerEventCallbackT' (aka 'function<void (const SServiceId &, const struct SServerEventCallbackData &)>') can be declared 'const' [misc-const-correctness]

Suggested change
v6::ServerEventCallbackT event_callback = [this](const SServiceId& service_id_, const v6::SServerEventCallbackData& data_)
v6::ServerEventCallbackT const event_callback = [this](const SServiceId& service_id_, const v6::SServerEventCallbackData& data_)

@@ -61,7 +61,7 @@ TEST(core_cpp_pubsub, TimeoutAcknowledgment)
// create publisher
eCAL::CPublisher pub("topic", {}, pub_config);
auto sub1 = std::make_shared< eCAL::CSubscriber>("topic");
auto sleeper_variable_time = [](const eCAL::Registration::STopicId& topic_id_, const eCAL::SDataTypeInformation& /*data_type_info_*/, const eCAL::SReceiveCallbackData& data_)
auto sleeper_variable_time = [](const eCAL::STopicId& topic_id_, const eCAL::SDataTypeInformation& /*data_type_info_*/, const eCAL::SReceiveCallbackData& data_)
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: parameter 'topic_id_' is unused [misc-unused-parameters]

Suggested change
auto sleeper_variable_time = [](const eCAL::STopicId& topic_id_, const eCAL::SDataTypeInformation& /*data_type_info_*/, const eCAL::SReceiveCallbackData& data_)
auto sleeper_variable_time = [](const eCAL::STopicId& /*topic_id_*/, const eCAL::SDataTypeInformation& /*data_type_info_*/, const eCAL::SReceiveCallbackData& data_)

Copy link
Contributor

@hannemn hannemn left a comment

Choose a reason for hiding this comment

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

I hope I haven't overlooked anything. :-D

@KerstinKeller KerstinKeller merged commit 8ab86bf into master Jan 24, 2025
23 checks passed
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.

2 participants