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] service client use datainfo #1876

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

rex-schilasky
Copy link
Contributor

Description

1. Provide/use new SDataTypeInformation fields in client and server registration (old fields still supported)

2. Introduce new method callback function signature for eCAL::v6::CServiceServer

Old v5 signature:

using MethodCallbackT = std::function<int(const std::string& method_, const std::string& req_type_, const std::string& resp_type_, const std::string& request_, std::string& response_)>;

New v6 signature:

using MethodInfoCallbackT = std::function<int(const std::string& method_, const SDataTypeInformation& req_type_, const SDataTypeInformation& resp_type_, const std::string& request_, std::string& response_)>;

@rex-schilasky rex-schilasky added this to the eCAL 6 milestone Jan 7, 2025
@rex-schilasky rex-schilasky added the cherry-pick-to-NONE Don't cherry-pick these changes label Jan 7, 2025
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

ecal/core/src/service/ecal_service_server_v5_impl.cpp Outdated Show resolved Hide resolved
@rex-schilasky rex-schilasky mentioned this pull request Jan 8, 2025
92 tasks
…m SMethodMon

ugly logic added to make new service server implementation compatible to old v5 API (where AddDescription may be called any time separately)
python API extended with datatype information for pub/sub and server/client
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

Logging::Log(log_level_warning, "CServiceServerImpl::AddMethodCallback: Method already exists, updating callback: " + method_);
Logging::Log(log_level_warning, "CServiceServerImpl::SetMethodCallback: Method already exists, updating attributes and callback: " + method_);

#if 0 // this is how it should look like if we do not use the old type and descriptor fields
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: preprocessor condition is always 'false', consider removing both the condition and its contents [readability-avoid-unconditional-preprocessor-if]

#if 0 // this is how it should look like if we do not use the old type and descriptor fields
 ^

// method name
method.method.mname = method_;

#if 0 // this is how it should look like if we do not use the old type and descriptor fields
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: preprocessor condition is always 'false', consider removing both the condition and its contents [readability-avoid-unconditional-preprocessor-if]

#if 0 // this is how it should look like if we do not use the old type and descriptor fields
 ^

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