-
Notifications
You must be signed in to change notification settings - Fork 181
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] separate unytyped msg client #2028
Conversation
CClientInstanceTyped renamed to CClientInstance CCServiceClientTyped renamed to CServiceClient
… easier migration adapted comments
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.
That's better!
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
|
||
static eCAL::rec::Error CallRemoteEcalrecService(const std::shared_ptr<eCAL::protobuf::CServiceClient<eCAL::pb::rec_server::EcalRecServerService>>& remote_ecalsys_service | ||
static eCAL::rec::Error CallRemoteEcalrecService(const std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>>& remote_ecalsys_service |
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: function 'eCAL::rec_cli::command::Command::CallRemoteEcalrecService' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
static eCAL::rec::Error CallRemoteEcalrecService(const std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>>& remote_ecalsys_service
^
Additional context
app/rec/rec_server_cli/src/commands/command.cpp:75: the definition seen here
eCAL::rec::Error Command::CallRemoteEcalrecService(const std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>>& remote_ecalrec_service
^
app/rec/rec_server_cli/src/commands/command.h:63: differing parameters are named here: ('remote_ecalsys_service'), in definition: ('remote_ecalrec_service')
static eCAL::rec::Error CallRemoteEcalrecService(const std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>>& remote_ecalsys_service
^
@@ -119,7 +119,7 @@ bool IsBuiltInFtpServerBusy(bool print_status = false); | |||
|
|||
// Rec Sever instance and rec_server_service. We will only use one of those, depending on the remote-control setting | |||
std::shared_ptr<eCAL::rec_server::RecServer> rec_server_instance; | |||
std::shared_ptr<eCAL::protobuf::CServiceClient<eCAL::pb::rec_server::EcalRecServerService>> remote_rec_server_service; | |||
std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>> remote_rec_server_service; |
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 'remote_rec_server_service' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
std::shared_ptr<eCAL::protobuf::CServiceClientUntyped<eCAL::pb::rec_server::EcalRecServerService>> remote_rec_server_service;
^
@@ -22,7 +22,7 @@ | |||
#pragma warning(push) | |||
#pragma warning(disable: 4100 4127 4146 4505 4800 4189 4592) // disable proto warnings | |||
#endif | |||
#include <ecal/msg/protobuf/client.h> | |||
#include <ecal/msg/protobuf/client_untyped.h> |
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: 'ecal/msg/protobuf/client_untyped.h' file not found [clang-diagnostic-error]
#include <ecal/msg/protobuf/client_untyped.h>
^
@@ -92,7 +92,7 @@ int main() | |||
eCAL::Initialize("ecalplayer client"); | |||
|
|||
// create player service client | |||
eCAL::protobuf::CServiceClient<eCAL::pb::play::EcalPlayService> player_service; | |||
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::play::EcalPlayService> player_service; |
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 'player_service' of type 'eCAL::protobuf::CServiceClientUntypedeCAL::pb::play::EcalPlayService' can be declared 'const' [misc-const-correctness]
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::play::EcalPlayService> player_service; | |
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::play::EcalPlayService> const player_service; |
@@ -69,7 +69,7 @@ int main() | |||
eCAL::Initialize("ecalsys client"); | |||
|
|||
// create player service client | |||
eCAL::protobuf::CServiceClient<eCAL::pb::sys::Service> sys_service; | |||
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::sys::Service> sys_service; |
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 'sys_service' of type 'eCAL::protobuf::CServiceClientUntypedeCAL::pb::sys::Service' can be declared 'const' [misc-const-correctness]
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::sys::Service> sys_service; | |
eCAL::protobuf::CServiceClientUntyped<eCAL::pb::sys::Service> const sys_service; |
|
||
#pragma once | ||
|
||
#include <ecal/service/client.h> |
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: 'ecal/service/client.h' file not found [clang-diagnostic-error]
^
|
||
#pragma once | ||
|
||
#include <ecal/service/client_instance.h> |
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: 'ecal/service/client_instance.h' file not found [clang-diagnostic-error]
#include <ecal/service/client_instance.h>
^
{ | ||
public: | ||
// Constructors | ||
CClientInstanceUntyped(eCAL::CClientInstance&& base_instance_) noexcept |
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: constructor does not initialize these fields: m_instance [cppcoreguidelines-pro-type-member-init]
serialization/protobuf/protobuf/include/ecal/msg/protobuf/client_untyped_instance.h:153:
- eCAL::CClientInstance m_instance;
+ eCAL::CClientInstance m_instance{};
{ | ||
public: | ||
// Constructors | ||
CClientInstanceUntyped(eCAL::CClientInstance&& base_instance_) noexcept |
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: rvalue reference parameter 'base_instance_' is never moved from inside the function body [cppcoreguidelines-rvalue-reference-param-not-moved]
CClientInstanceUntyped(eCAL::CClientInstance&& base_instance_) noexcept
^
{ | ||
} | ||
|
||
CClientInstanceUntyped(const SEntityId& 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: constructor does not initialize these fields: m_instance [cppcoreguidelines-pro-type-member-init]
CClientInstanceUntyped(const SEntityId& entity_id_,
^
Description
This pull request introduces several renaming and reorganization changes to improve clarity and consistency within the protobuf client interfaces:
Renaming Changes:
Reorganization:
Additional Improvements:
These changes provide a clearer separation between typed and untyped client interfaces, easing future maintenance and migration efforts.