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] client eventcallback as reference and cmakelists whitespace alignment #1980

Merged
merged 8 commits into from
Jan 30, 2025
106 changes: 53 additions & 53 deletions CMakeLists.txt

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ set(ecal_header_cmn
include/ecal/service/client_instance.h
include/ecal/service/server.h
include/ecal/service/types.h
include/ecal/types/custom_data_types.h
Copy link
Contributor

Choose a reason for hiding this comment

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

The naming custom_data_types.h is not really in line with the naming of all our other header files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I know .. I just started to remove the ecal_ prefix for now.

include/ecal/types/logging.h
include/ecal/types/monitoring.h
include/ecal/ecal.h
Expand Down
7 changes: 6 additions & 1 deletion ecal/core/include/ecal/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
* ========================= eCAL LICENSE =================================
*/

/**
* @file config.h
* @brief eCAL configuration access
**/

#pragma once

#include <cstddef>
Expand Down Expand Up @@ -70,7 +75,7 @@ namespace eCAL
ECAL_API size_t GetTcpPubsubWriterThreadpoolSize ();
ECAL_API int GetTcpPubsubMaxReconnectionAttemps ();

ECAL_API std::string GetShmTransportDomain ();
ECAL_API std::string GetShmTransportDomain ();

/////////////////////////////////////
// time
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/config/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <ecal/config/publisher.h>
#include <ecal/config/subscriber.h>
#include <ecal/config/time.h>
#include <ecal/types/ecal_custom_data_types.h>
#include <ecal/types/custom_data_types.h>


#include "ecal/os.h"
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/config/publisher.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

#pragma once

#include <ecal/types/ecal_custom_data_types.h>
#include <ecal/types/custom_data_types.h>
#include <ecal/config/transport_layer.h>

#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/config/transport_layer.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#pragma once

#include <ecal/types/ecal_custom_data_types.h>
#include <ecal/types/custom_data_types.h>
#include <ecal/os.h>

namespace eCAL
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/process_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file ecal_process_mode.h
* @file process_mode.h
* @brief eCAL process start mode
**/

Expand Down
4 changes: 2 additions & 2 deletions ecal/core/include/ecal/service/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace eCAL
* @param event_callback_ The client event callback funtion.
**/
ECAL_API_EXPORTED_MEMBER
CServiceClient(const std::string& service_name_, const ServiceMethodInformationSetT& method_information_set_ = ServiceMethodInformationSetT(), const ClientEventCallbackT event_callback_ = ClientEventCallbackT());
CServiceClient(const std::string& service_name_, const ServiceMethodInformationSetT& method_information_set_ = ServiceMethodInformationSetT(), const ClientEventCallbackT& event_callback_ = ClientEventCallbackT());

/**
* @brief Destructor.
Expand Down Expand Up @@ -92,7 +92,7 @@ namespace eCAL
std::vector<CClientInstance> GetClientInstances() const;

/**
* @brief Blocking call of a service method for all existing service instances, response will be returned as vector<pair<bool, SServiceReponse>>
* @brief Blocking call of a service method for all existing service instances, response will be returned as ServiceResponseVecT
*
* @param method_name_ Method name.
* @param request_ Request string.
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/service/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace eCAL
* @param event_callback_ Callback function for server events.
**/
ECAL_API_EXPORTED_MEMBER
explicit CServiceServer(const std::string& service_name_, const ServerEventCallbackT event_callback_ = ServerEventCallbackT());
CServiceServer(const std::string& service_name_, const ServerEventCallbackT& event_callback_ = ServerEventCallbackT());

/**
* @brief Destructor.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file ecal_custom_types.h
* @file types/custom_types.h
* @brief eCAL custom types for configuration declarations
**/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <string>
#include <cstddef>
#include "ecal/types/ecal_custom_data_types.h"
#include "ecal/types/custom_data_types.h"

namespace eCAL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

#include <ecal/config/transport_layer.h>

#include "ecal/types/ecal_custom_data_types.h"
#include "ecal/types/custom_data_types.h"

namespace eCAL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include "udp_attribute_builder.h"
#include "ecal/types/ecal_custom_data_types.h"
#include "ecal/types/custom_data_types.h"

namespace eCAL
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <chrono>
#include <string>
#include <ecal/types/ecal_custom_data_types.h>
#include <ecal/types/custom_data_types.h>

namespace eCAL
{
Expand Down
12 changes: 6 additions & 6 deletions ecal/core/src/service/ecal_service_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

namespace eCAL
{
CServiceClient::CServiceClient(const std::string & service_name_, const ServiceMethodInformationSetT& method_information_set_, const ClientEventCallbackT event_callback_)
CServiceClient::CServiceClient(const std::string& service_name_, const ServiceMethodInformationSetT& method_information_set_, const ClientEventCallbackT& event_callback_)
{
// create client implementation
m_service_client_impl = CServiceClientImpl::CreateInstance(service_name_, method_information_set_, event_callback_);
Expand All @@ -50,12 +50,12 @@ namespace eCAL
if (g_clientgate() != nullptr) g_clientgate()->Unregister(m_service_client_impl->GetServiceName(), m_service_client_impl);
}

CServiceClient::CServiceClient(CServiceClient && rhs) noexcept
CServiceClient::CServiceClient(CServiceClient&& rhs) noexcept
: m_service_client_impl(std::move(rhs.m_service_client_impl))
{
}

CServiceClient & CServiceClient::operator=(CServiceClient && rhs) noexcept
CServiceClient& CServiceClient::operator=(CServiceClient&& rhs) noexcept
{
if (this != &rhs)
{
Expand All @@ -78,7 +78,7 @@ namespace eCAL
return instances;
}

bool CServiceClient::CallWithResponse(const std::string & method_name_, const std::string & request_, int timeout_, ServiceResponseVecT & service_response_vec_) const
bool CServiceClient::CallWithResponse(const std::string& method_name_, const std::string& request_, int timeout_, ServiceResponseVecT& service_response_vec_) const
{
auto instances = GetClientInstances();
size_t num_instances = instances.size();
Expand Down Expand Up @@ -133,7 +133,7 @@ namespace eCAL
return overall_success;
}

bool CServiceClient::CallWithCallback(const std::string & method_name_, const std::string & request_, int timeout_, const ResponseCallbackT & response_callback_) const
bool CServiceClient::CallWithCallback(const std::string& method_name_, const std::string& request_, int timeout_, const ResponseCallbackT& response_callback_) const
{
auto instances = GetClientInstances();
size_t num_instances = instances.size();
Expand Down Expand Up @@ -168,7 +168,7 @@ namespace eCAL
return return_state;
}

bool CServiceClient::CallWithCallbackAsync(const std::string & method_name_, const std::string & request_, const ResponseCallbackT & response_callback_) const
bool CServiceClient::CallWithCallbackAsync(const std::string& method_name_, const std::string& request_, const ResponseCallbackT& response_callback_) const
{
bool return_state = true;
auto instances = GetClientInstances();
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/service/ecal_service_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

namespace eCAL
{
CServiceServer::CServiceServer(const std::string & service_name_, const ServerEventCallbackT event_callback_)
CServiceServer::CServiceServer(const std::string & service_name_, const ServerEventCallbackT& event_callback_)
: m_service_server_impl(nullptr)
{
// create server implementation
Expand Down
2 changes: 1 addition & 1 deletion ecal/core/src/types/ecal_custom_data_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* @brief Definition of custom data types.
**/

#include "ecal/types/ecal_custom_data_types.h"
#include "ecal/types/custom_data_types.h"

#include <array>
#include <regex>
Expand Down
2 changes: 1 addition & 1 deletion ecal/samples/cpp/misc/config/src/config_sample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include <ecal/ecal.h>
#include <ecal/types/ecal_custom_data_types.h>
#include <ecal/types/custom_data_types.h>

#include <iostream>

Expand Down
2 changes: 1 addition & 1 deletion ecal/tests/cpp/pubsub_test/src/pubsub_acknowledge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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::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_)
{
std::string const sleep_time((const char*)data_.buf, data_.size);
int const sleep = std::stoi(sleep_time);
Expand Down
Loading