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

[22317] Service feature implementation on CPP #63

Open
wants to merge 3 commits into
base: test/service_node_listener
Choose a base branch
from

Conversation

Javgilavi
Copy link
Contributor

@Javgilavi Javgilavi commented Jan 22, 2025

This PR implements all filea needed for the feature service on sustainml_cpp.

Depend on the PR #62

@Javgilavi Javgilavi requested a review from Mario-DL January 22, 2025 07:35
@Javgilavi Javgilavi force-pushed the feature/service_dev branch from 61eac3f to e4d1e33 Compare January 22, 2025 12:11
sustainml_cpp/src/cpp/core/NodeImpl.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/NodeImpl.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/RequestReplier.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/RequestReplier.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/RequestReplier.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/RequestReplier.cpp Outdated Show resolved Hide resolved
sustainml_cpp/src/cpp/core/RequestReplier.cpp Outdated Show resolved Hide resolved
@Javgilavi Javgilavi changed the base branch from main to test/service_node_listener January 22, 2025 14:53
@Javgilavi Javgilavi force-pushed the feature/service_dev branch from e4d1e33 to 233010d Compare January 22, 2025 16:51
@Javgilavi Javgilavi requested a review from Mario-DL January 22, 2025 16:51
@Javgilavi Javgilavi force-pushed the feature/service_dev branch from 233010d to eea063a Compare January 23, 2025 08:36
@@ -0,0 +1,164 @@
// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Copyright 2023 Proyectos y Sistemas de Mantenimiento SL (eProsima).
// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).

Comment on lines 146 to 147
matched_ = status.current_count;
std::cout << "Subscriber matched." << std::endl;
Copy link
Member

Choose a reason for hiding this comment

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

Spacing, and pls remove the std::cout
Applies elsewhere

// Non-valid option
else
{
std::cout << status.current_count_change
Copy link
Member

Choose a reason for hiding this comment

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

This should be a EPROSIMA_LOG_ERROR if so

Comment on lines 121 to 122
types::ResponseType res;
res = in;
Copy link
Member

@Mario-DL Mario-DL Jan 23, 2025

Choose a reason for hiding this comment

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

I think these lines are not needed. Would apply in the OrchestratorNode too


{
std::lock_guard<std::mutex> lock(this->mtx_);
this->res_ = res;
Copy link
Member

Choose a reason for hiding this comment

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

It is not so intutitive that the new operator = in RequestType and ResponseType takes a RequestTypeImpl* or ResponseTypeImpl*. It should take a RequestTypeImpl (not a pointer) . Please, change that and this line should be
this->res_ = *sample_in

Same suggestion applies for the OrchestratorNode

Signed-off-by: Javier Gil Aviles <[email protected]>
@Javgilavi Javgilavi force-pushed the feature/service_dev branch from eea063a to fe4b668 Compare January 23, 2025 16:11
Signed-off-by: Javier Gil Aviles <[email protected]>
@Javgilavi Javgilavi force-pushed the feature/service_dev branch from 27d80e6 to 0cd2a24 Compare January 24, 2025 09:24
@Javgilavi Javgilavi changed the title Service feature implementation on CPP [22317] Service feature implementation on CPP Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants