diff --git a/ecal/core/include/ecal/ecal_callback.h b/ecal/core/include/ecal/ecal_callback.h index afaf86539c..920002276e 100644 --- a/ecal/core/include/ecal/ecal_callback.h +++ b/ecal/core/include/ecal/ecal_callback.h @@ -60,12 +60,12 @@ namespace eCAL * @param data_type_info_ Topic data type information (encoding, type, descriptor). * @param data_ Data struct containing payload, timestamp and publication clock. **/ - using ReceiveIDCallbackT = std::function; + using ReceiveCallbackT = std::function; /** * @brief eCAL publisher event callback struct. **/ - struct SPubEventIDCallbackData + struct SPubEventCallbackData { eCAL_Publisher_Event type{ pub_event_none }; //!< publisher event type long long time{ 0 }; //!< publisher event time in µs @@ -79,12 +79,12 @@ namespace eCAL * @param topic_id_ The topic id struct of the received message. * @param data_ Event callback data structure with the event specific information. **/ - using PubEventIDCallbackT = std::function; + using PubEventCallbackT = std::function; /** * @brief eCAL subscriber event callback struct. **/ - struct SSubEventIDCallbackData + struct SSubEventCallbackData { eCAL_Subscriber_Event type{ sub_event_none }; //!< subscriber event type long long time{ 0 }; //!< subscriber event time in µs @@ -98,12 +98,12 @@ namespace eCAL * @param topic_id_ The topic id struct of the received message. * @param data_ Event callback data structure with the event specific information. **/ - using SubEventIDCallbackT = std::function; + using SubEventCallbackT = std::function; /** * @brief eCAL client event callback struct. **/ - struct SClientEventIDCallbackData + struct SClientEventCallbackData { eCAL_Client_Event type = client_event_none; //!< event type long long time = 0; //!< event time in µs @@ -115,12 +115,12 @@ namespace eCAL * @param service_id_ The service id struct of the connection that triggered the event. * @param data_ Event callback data structure with the event specific information. **/ - using ClientEventIDCallbackT = std::function; + using ClientEventCallbackT = std::function; /** * @brief eCAL server event callback struct. **/ - struct SServerEventIDCallbackData + struct SServerEventCallbackData { eCAL_Server_Event type = server_event_none; //!< event type long long time = 0; //!< event time in µs @@ -132,6 +132,6 @@ namespace eCAL * @param service_id_ The service id struct of the connection that triggered the event. * @param data_ Event callback data structure with the event specific information. **/ - using ServerEventIDCallbackT = std::function; + using ServerEventCallbackT = std::function; } } diff --git a/ecal/core/include/ecal/ecal_client.h b/ecal/core/include/ecal/ecal_client.h index aeec429acc..2803de560c 100644 --- a/ecal/core/include/ecal/ecal_client.h +++ b/ecal/core/include/ecal/ecal_client.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,7 +56,7 @@ namespace eCAL * @param event_callback_ The client event callback funtion. **/ ECAL_API_EXPORTED_MEMBER - CServiceClient(const std::string& service_name_, const ServiceMethodInformationMapT method_information_map_ = ServiceMethodInformationMapT(), const ClientEventIDCallbackT event_callback_ = ClientEventIDCallbackT()); + CServiceClient(const std::string& service_name_, const ServiceMethodInformationMapT method_information_map_ = ServiceMethodInformationMapT(), const ClientEventCallbackT event_callback_ = ClientEventCallbackT()); /** * @brief Destructor. diff --git a/ecal/core/include/ecal/ecal_publisher.h b/ecal/core/include/ecal/ecal_publisher.h index 2e32bf6efb..2e26b0b52e 100644 --- a/ecal/core/include/ecal/ecal_publisher.h +++ b/ecal/core/include/ecal/ecal_publisher.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -69,7 +69,7 @@ namespace eCAL * @param config_ Optional configuration parameters. **/ ECAL_API_EXPORTED_MEMBER - CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubEventIDCallbackT event_callback_, const Publisher::Configuration& config_ = GetPublisherConfiguration()); + CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubEventCallbackT event_callback_, const Publisher::Configuration& config_ = GetPublisherConfiguration()); /** * @brief Destructor. diff --git a/ecal/core/include/ecal/ecal_server.h b/ecal/core/include/ecal/ecal_server.h index 24af028f3b..7cda8bdf31 100644 --- a/ecal/core/include/ecal/ecal_server.h +++ b/ecal/core/include/ecal/ecal_server.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,7 +53,7 @@ namespace eCAL * @param event_callback_ Callback function for server events. **/ ECAL_API_EXPORTED_MEMBER - explicit CServiceServer(const std::string& service_name_, const ServerEventIDCallbackT event_callback_ = ServerEventIDCallbackT()); + explicit CServiceServer(const std::string& service_name_, const ServerEventCallbackT event_callback_ = ServerEventCallbackT()); /** * @brief Destructor. diff --git a/ecal/core/include/ecal/ecal_subscriber.h b/ecal/core/include/ecal/ecal_subscriber.h index efecbf0638..5e2fb66751 100644 --- a/ecal/core/include/ecal/ecal_subscriber.h +++ b/ecal/core/include/ecal/ecal_subscriber.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -65,7 +65,7 @@ namespace eCAL * @param config_ Configuration parameters. **/ ECAL_API_EXPORTED_MEMBER - CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventIDCallbackT event_callback_, const Subscriber::Configuration& config_ = GetSubscriberConfiguration()); + CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventCallbackT event_callback_, const Subscriber::Configuration& config_ = GetSubscriberConfiguration()); /** * @brief Destructor. @@ -103,7 +103,7 @@ namespace eCAL * @return True if succeeded, false if not. **/ ECAL_API_EXPORTED_MEMBER - bool SetReceiveCallback(ReceiveIDCallbackT callback_); + bool SetReceiveCallback(ReceiveCallbackT callback_); /** * @brief Remove callback function for incoming receives. diff --git a/ecal/core/include/ecal/ecal_subscriber_v5.h b/ecal/core/include/ecal/ecal_subscriber_v5.h index 8af5aa89a9..9b7fd95266 100644 --- a/ecal/core/include/ecal/ecal_subscriber_v5.h +++ b/ecal/core/include/ecal/ecal_subscriber_v5.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -194,7 +194,7 @@ namespace eCAL * @return True if succeeded, false if not. **/ ECAL_API_EXPORTED_MEMBER - bool AddReceiveCallback(ReceiveIDCallbackT callback_); + bool AddReceiveCallback(v6::ReceiveCallbackT callback_); /** * @brief Remove callback function for incoming receives. diff --git a/ecal/core/include/ecal/msg/dynamic.h b/ecal/core/include/ecal/msg/dynamic.h index 2b2e73ac94..3231e9f971 100644 --- a/ecal/core/include/ecal/msg/dynamic.h +++ b/ecal/core/include/ecal/msg/dynamic.h @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -166,7 +166,7 @@ namespace eCAL m_cb_callback = callback_; } - ReceiveIDCallbackT callback = std::bind(&CDynamicMessageSubscriber::ReceiveCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); + ReceiveCallbackT callback = std::bind(&CDynamicMessageSubscriber::ReceiveCallback, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); return(v5::CSubscriber::AddReceiveCallback(callback)); } diff --git a/ecal/core/src/pubsub/ecal_publisher.cpp b/ecal/core/src/pubsub/ecal_publisher.cpp index 7768de48d3..bff91d95a8 100644 --- a/ecal/core/src/pubsub/ecal_publisher.cpp +++ b/ecal/core/src/pubsub/ecal_publisher.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,11 +47,11 @@ namespace eCAL if(g_pubgate() != nullptr) g_pubgate()->Register(topic_name_, m_publisher_impl); } - CPublisher::CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubEventIDCallbackT event_callback_, const Publisher::Configuration& config_) : + CPublisher::CPublisher(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const PubEventCallbackT event_callback_, const Publisher::Configuration& config_) : CPublisher(topic_name_, data_type_info_, config_) { // add event callback for all current event types - m_publisher_impl->SetEventIDCallback(event_callback_); + m_publisher_impl->SetEventCallback(event_callback_); } CPublisher::~CPublisher() diff --git a/ecal/core/src/pubsub/ecal_publisher_impl.cpp b/ecal/core/src/pubsub/ecal_publisher_impl.cpp index 2549704662..285b01e662 100644 --- a/ecal/core/src/pubsub/ecal_publisher_impl.cpp +++ b/ecal/core/src/pubsub/ecal_publisher_impl.cpp @@ -400,12 +400,12 @@ namespace eCAL return(true); } - bool CPublisherImpl::SetEventIDCallback(const PubEventIDCallbackT callback_) + bool CPublisherImpl::SetEventCallback(const PubEventCallbackT callback_) { if (!m_created) return false; #ifndef NDEBUG - Logging::Log(log_level_debug2, m_attributes.topic_name + "::CPublisherImpl::SetEventIDCallback"); + Logging::Log(log_level_debug2, m_attributes.topic_name + "::CPublisherImpl::SetEventCallback"); #endif // set event id callback @@ -416,12 +416,12 @@ namespace eCAL return true; } - bool CPublisherImpl::RemoveEventIDCallback() + bool CPublisherImpl::RemoveEventCallback() { if (!m_created) return false; #ifndef NDEBUG - Logging::Log(log_level_debug2, m_attributes.topic_name + "::CPublisherImpl::RemoveEventIDCallback"); + Logging::Log(log_level_debug2, m_attributes.topic_name + "::CPublisherImpl::RemoveEventCallback"); #endif // remove event id callback @@ -738,7 +738,7 @@ namespace eCAL // new event handling with topic id if(m_event_id_callback) { - SPubEventIDCallbackData data; + SPubEventCallbackData data; data.type = type_; data.time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); data.clock = 0; diff --git a/ecal/core/src/pubsub/ecal_publisher_impl.h b/ecal/core/src/pubsub/ecal_publisher_impl.h index dae0a21177..6234cf2f6d 100644 --- a/ecal/core/src/pubsub/ecal_publisher_impl.h +++ b/ecal/core/src/pubsub/ecal_publisher_impl.h @@ -87,8 +87,8 @@ namespace eCAL bool RemoveEventCallback(eCAL_Publisher_Event type_); // future event callback interface - bool SetEventIDCallback(const PubEventIDCallbackT callback_); - bool RemoveEventIDCallback(); + bool SetEventCallback(const PubEventCallbackT callback_); + bool RemoveEventCallback(); bool SetAttribute(const std::string& attr_name_, const std::string& attr_value_); bool ClearAttribute(const std::string& attr_name_); @@ -168,7 +168,7 @@ namespace eCAL EventCallbackMapT m_event_callback_map; std::mutex m_event_id_callback_mutex; - PubEventIDCallbackT m_event_id_callback; + PubEventCallbackT m_event_id_callback; long long m_id = 0; long long m_clock = 0; diff --git a/ecal/core/src/pubsub/ecal_subscriber.cpp b/ecal/core/src/pubsub/ecal_subscriber.cpp index e2e67a4d07..a48c76e3e6 100644 --- a/ecal/core/src/pubsub/ecal_subscriber.cpp +++ b/ecal/core/src/pubsub/ecal_subscriber.cpp @@ -40,7 +40,7 @@ namespace eCAL if (g_subgate() != nullptr) g_subgate()->Register(topic_name_, m_subscriber_impl); } - CSubscriber::CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventIDCallbackT event_callback_, const Subscriber::Configuration& config_) : + CSubscriber::CSubscriber(const std::string& topic_name_, const SDataTypeInformation& data_type_info_, const SubEventCallbackT event_callback_, const Subscriber::Configuration& config_) : CSubscriber(topic_name_, data_type_info_, config_) { // add event callback for all current event types @@ -70,7 +70,7 @@ namespace eCAL return *this; } - bool CSubscriber::SetReceiveCallback(ReceiveIDCallbackT callback_) + bool CSubscriber::SetReceiveCallback(ReceiveCallbackT callback_) { if (m_subscriber_impl == nullptr) return false; return m_subscriber_impl->SetReceiveCallback(std::move(callback_)); diff --git a/ecal/core/src/pubsub/ecal_subscriber_impl.cpp b/ecal/core/src/pubsub/ecal_subscriber_impl.cpp index 718eb8c98b..d8eed21647 100644 --- a/ecal/core/src/pubsub/ecal_subscriber_impl.cpp +++ b/ecal/core/src/pubsub/ecal_subscriber_impl.cpp @@ -163,7 +163,7 @@ namespace eCAL return(false); } - bool CSubscriberImpl::SetReceiveCallback(ReceiveIDCallbackT callback_) + bool CSubscriberImpl::SetReceiveCallback(ReceiveCallbackT callback_) { if (!m_created) return(false); @@ -231,7 +231,7 @@ namespace eCAL return(true); } - bool CSubscriberImpl::SetEventIDCallback(const SubEventIDCallbackT callback_) + bool CSubscriberImpl::SetEventIDCallback(const SubEventCallbackT callback_) { if (!m_created) return false; @@ -247,12 +247,12 @@ namespace eCAL return true; } - bool CSubscriberImpl::RemoveEventIDCallback() + bool CSubscriberImpl::RemoveEventCallback() { if (!m_created) return false; #ifndef NDEBUG - Logging::Log(log_level_debug2, m_attributes.topic_name + "::CSubscriberImpl::RemoveEventIDCallback"); + Logging::Log(log_level_debug2, m_attributes.topic_name + "::CSubscriberImpl::RemoveEventCallback"); #endif // remove event id callback @@ -787,7 +787,7 @@ namespace eCAL // new event handling with topic id if (m_event_id_callback) { - SSubEventIDCallbackData data; + SSubEventCallbackData data; data.type = type_; data.time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); data.clock = 0; @@ -909,7 +909,7 @@ namespace eCAL // new event handling with topic id if (m_event_id_callback) { - SSubEventIDCallbackData data; + SSubEventCallbackData data; data.type = sub_event_dropped; data.time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); data.clock = current_clock_; diff --git a/ecal/core/src/pubsub/ecal_subscriber_impl.h b/ecal/core/src/pubsub/ecal_subscriber_impl.h index e18b36fcbe..38f9af546b 100644 --- a/ecal/core/src/pubsub/ecal_subscriber_impl.h +++ b/ecal/core/src/pubsub/ecal_subscriber_impl.h @@ -70,7 +70,7 @@ namespace eCAL bool Read(std::string& buf_, long long* time_ = nullptr, int rcv_timeout_ms_ = 0); - bool SetReceiveCallback(ReceiveIDCallbackT callback_); + bool SetReceiveCallback(ReceiveCallbackT callback_); bool RemoveReceiveCallback(); // deprecated event callback interface @@ -78,8 +78,8 @@ namespace eCAL bool RemoveEventCallback(eCAL_Subscriber_Event type_); // future event callback interface - bool SetEventIDCallback(const SubEventIDCallbackT callback_); - bool RemoveEventIDCallback(); + bool SetEventIDCallback(const SubEventCallbackT callback_); + bool RemoveEventCallback(); bool SetAttribute(const std::string& attr_name_, const std::string& attr_value_); bool ClearAttribute(const std::string& attr_name_); @@ -158,7 +158,7 @@ namespace eCAL long long m_read_time = 0; std::mutex m_receive_callback_mutex; - ReceiveIDCallbackT m_receive_callback; + ReceiveCallbackT m_receive_callback; std::atomic m_receive_time; std::deque m_sample_hash_queue; @@ -168,7 +168,7 @@ namespace eCAL EventCallbackMapT m_event_callback_map; std::mutex m_event_id_callback_mutex; - SubEventIDCallbackT m_event_id_callback; + SubEventCallbackT m_event_id_callback; std::atomic m_clock; diff --git a/ecal/core/src/pubsub/ecal_subscriber_v5.cpp b/ecal/core/src/pubsub/ecal_subscriber_v5.cpp index b8e23b3af1..602ee9a639 100644 --- a/ecal/core/src/pubsub/ecal_subscriber_v5.cpp +++ b/ecal/core/src/pubsub/ecal_subscriber_v5.cpp @@ -148,14 +148,14 @@ namespace eCAL bool CSubscriber::AddReceiveCallback(ReceiveCallbackT callback_) { - auto id_callback = [callback_](const Registration::STopicId& topic_id_, const SDataTypeInformation&, const SReceiveCallbackData& data_) + auto v6_callback = [callback_](const Registration::STopicId& topic_id_, const SDataTypeInformation&, const eCAL::SReceiveCallbackData& data_) { callback_(topic_id_.topic_name.c_str(), &data_); }; - return AddReceiveCallback(id_callback); + return AddReceiveCallback(v6_callback); } - bool CSubscriber::AddReceiveCallback(ReceiveIDCallbackT callback_) + bool CSubscriber::AddReceiveCallback(v6::ReceiveCallbackT callback_) { if (m_subscriber_impl == nullptr) return(false); RemReceiveCallback(); diff --git a/ecal/core/src/service/ecal_service_client.cpp b/ecal/core/src/service/ecal_service_client.cpp index 89b9bec9d1..35de283414 100644 --- a/ecal/core/src/service/ecal_service_client.cpp +++ b/ecal/core/src/service/ecal_service_client.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +31,7 @@ namespace eCAL { - CServiceClient::CServiceClient(const std::string& service_name_, const ServiceMethodInformationMapT method_information_map_, const ClientEventIDCallbackT event_callback_) + CServiceClient::CServiceClient(const std::string& service_name_, const ServiceMethodInformationMapT method_information_map_, const ClientEventCallbackT event_callback_) { // create client implementation m_service_client_impl = CServiceClientImpl::CreateInstance(service_name_, method_information_map_, event_callback_); diff --git a/ecal/core/src/service/ecal_service_client_impl.cpp b/ecal/core/src/service/ecal_service_client_impl.cpp index fafc644437..2493a23e60 100644 --- a/ecal/core/src/service/ecal_service_client_impl.cpp +++ b/ecal/core/src/service/ecal_service_client_impl.cpp @@ -74,7 +74,7 @@ namespace eCAL { // Factory method to create a new instance of CServiceClientImpl std::shared_ptr CServiceClientImpl::CreateInstance( - const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventIDCallbackT& event_callback_) + const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventCallbackT& event_callback_) { #ifndef NDEBUG eCAL::Logging::Log(log_level_debug2, "CServiceClientImpl::CreateInstance: Creating instance of CServiceClientImpl for service: " + service_name_); @@ -84,7 +84,7 @@ namespace eCAL // Constructor: Initializes client ID, method call counts, and registers the client CServiceClientImpl::CServiceClientImpl( - const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventIDCallbackT& event_callback_) + const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventCallbackT& event_callback_) : m_service_name(service_name_), m_method_information_map(method_information_map_) { #ifndef NDEBUG @@ -524,7 +524,7 @@ namespace eCAL const std::lock_guard lock(m_event_callback_mutex); if (m_event_callback == nullptr) return; - SClientEventIDCallbackData callback_data; + SClientEventCallbackData callback_data; callback_data.type = event_type_; callback_data.time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); m_event_callback(service_id_, callback_data); diff --git a/ecal/core/src/service/ecal_service_client_impl.h b/ecal/core/src/service/ecal_service_client_impl.h index ff827ffdaa..afb3421294 100644 --- a/ecal/core/src/service/ecal_service_client_impl.h +++ b/ecal/core/src/service/ecal_service_client_impl.h @@ -47,11 +47,11 @@ namespace eCAL public: // Factory method to create an instance of the client implementation static std::shared_ptr CreateInstance( - const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventIDCallbackT& event_callback_); + const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventCallbackT& event_callback_); private: // Private constructor to enforce creation through factory method - CServiceClientImpl(const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventIDCallbackT& event_callback_); + CServiceClientImpl(const std::string& service_name_, const ServiceMethodInformationMapT& method_information_map_, const ClientEventCallbackT& event_callback_); public: ~CServiceClientImpl(); @@ -165,6 +165,6 @@ namespace eCAL // Event callback map and synchronization std::mutex m_event_callback_mutex; - ClientEventIDCallbackT m_event_callback; + ClientEventCallbackT m_event_callback; }; } diff --git a/ecal/core/src/service/ecal_service_client_v5_impl.cpp b/ecal/core/src/service/ecal_service_client_v5_impl.cpp index d7d28089b9..0037eaefbd 100644 --- a/ecal/core/src/service/ecal_service_client_v5_impl.cpp +++ b/ecal/core/src/service/ecal_service_client_v5_impl.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -94,7 +94,7 @@ namespace eCAL Logging::Log(log_level_debug1, "v5::CServiceClientImpl: Creating service client with name: " + service_name_); // Define the event callback to pass to CServiceClient - ClientEventIDCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const struct SClientEventIDCallbackData& data_) + v6::ClientEventCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const v6::SClientEventCallbackData& data_) { Logging::Log(log_level_debug2, "v5::CServiceClientImpl: Event callback triggered for event type: " + std::to_string(data_.type)); diff --git a/ecal/core/src/service/ecal_service_server.cpp b/ecal/core/src/service/ecal_service_server.cpp index c0c3bb2a91..fd0e78b685 100644 --- a/ecal/core/src/service/ecal_service_server.cpp +++ b/ecal/core/src/service/ecal_service_server.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,7 +29,7 @@ namespace eCAL { - CServiceServer::CServiceServer(const std::string& service_name_, const ServerEventIDCallbackT event_callback_) + CServiceServer::CServiceServer(const std::string& service_name_, const ServerEventCallbackT event_callback_) : m_service_server_impl(nullptr) { // create server implementation diff --git a/ecal/core/src/service/ecal_service_server_impl.cpp b/ecal/core/src/service/ecal_service_server_impl.cpp index 75cef9ac72..05f19b8b54 100644 --- a/ecal/core/src/service/ecal_service_server_impl.cpp +++ b/ecal/core/src/service/ecal_service_server_impl.cpp @@ -35,7 +35,7 @@ namespace eCAL { // Factory method to create a new instance of CServiceServerImpl std::shared_ptr CServiceServerImpl::CreateInstance( - const std::string& service_name_, const ServerEventIDCallbackT& event_callback_) + const std::string& service_name_, const ServerEventCallbackT& event_callback_) { #ifndef NDEBUG Logging::Log(log_level_debug2, "CServiceServerImpl::CreateInstance: Creating instance of CServiceServerImpl for service: " + service_name_); @@ -49,7 +49,7 @@ namespace eCAL } // Constructor - CServiceServerImpl::CServiceServerImpl(const std::string& service_name_, const ServerEventIDCallbackT& event_callback_) + CServiceServerImpl::CServiceServerImpl(const std::string& service_name_, const ServerEventCallbackT& event_callback_) : m_created(false), m_service_name(service_name_), m_event_callback(event_callback_) { #ifndef NDEBUG @@ -502,7 +502,7 @@ namespace eCAL const std::lock_guard lock_cb(m_event_callback_mutex); if (m_event_callback == nullptr) return; - SServerEventIDCallbackData callback_data; + SServerEventCallbackData callback_data; callback_data.type = event_type_; callback_data.time = std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()).count(); m_event_callback(service_id_, callback_data); diff --git a/ecal/core/src/service/ecal_service_server_impl.h b/ecal/core/src/service/ecal_service_server_impl.h index a970019d1d..b3e57367d9 100644 --- a/ecal/core/src/service/ecal_service_server_impl.h +++ b/ecal/core/src/service/ecal_service_server_impl.h @@ -47,11 +47,11 @@ namespace eCAL public: // Factory method to create an instance of the client implementation static std::shared_ptr CreateInstance( - const std::string& service_name_, const ServerEventIDCallbackT& event_callback_); + const std::string& service_name_, const ServerEventCallbackT& event_callback_); private: // Private constructor to enforce creation through factory method - CServiceServerImpl(const std::string& service_name_, const ServerEventIDCallbackT& event_callback_); + CServiceServerImpl(const std::string& service_name_, const ServerEventCallbackT& event_callback_); public: ~CServiceServerImpl(); @@ -118,7 +118,7 @@ namespace eCAL // Event callback and synchronization std::mutex m_event_callback_mutex; - ServerEventIDCallbackT m_event_callback; + ServerEventCallbackT m_event_callback; // Server interface std::shared_ptr m_tcp_server; diff --git a/ecal/core/src/service/ecal_service_server_v5_impl.cpp b/ecal/core/src/service/ecal_service_server_v5_impl.cpp index 6625b9a0d3..f2b5279b7c 100644 --- a/ecal/core/src/service/ecal_service_server_v5_impl.cpp +++ b/ecal/core/src/service/ecal_service_server_v5_impl.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -57,7 +57,7 @@ namespace eCAL } // Define the event callback to pass to CServiceClient - ServerEventIDCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const struct SServerEventIDCallbackData& data_) + v6::ServerEventCallbackT event_callback = [this](const Registration::SServiceMethodId& service_id_, const v6::SServerEventCallbackData& data_) { Logging::Log(log_level_debug2, "v5::CServiceServerImpl: Event callback triggered for event type: " + std::to_string(data_.type)); diff --git a/ecal/tests/cpp/clientserver_test/src/clientserver_test.cpp b/ecal/tests/cpp/clientserver_test/src/clientserver_test.cpp index 0e7a05c1e0..35a95c6591 100644 --- a/ecal/tests/cpp/clientserver_test/src/clientserver_test.cpp +++ b/ecal/tests/cpp/clientserver_test/src/clientserver_test.cpp @@ -1,6 +1,6 @@ /* ========================= eCAL LICENSE ================================= * - * Copyright (C) 2016 - 2024 Continental Corporation + * Copyright (C) 2016 - 2025 Continental Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -116,7 +116,7 @@ TEST(core_cpp_clientserver, ClientConnectEvent) // client event callback for connect events atomic_signalable event_connected_fired (0); atomic_signalable event_disconnected_fired(0); - auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SClientEventIDCallbackData& data_) + auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SClientEventCallbackData& data_) { switch (data_.type) { @@ -181,7 +181,7 @@ TEST(core_cpp_clientserver, ServerConnectEvent) // server event callback for connect events atomic_signalable event_connected_fired (0); atomic_signalable event_disconnected_fired(0); - auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SServerEventIDCallbackData& data_) -> void + auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SServerEventCallbackData& data_) -> void { switch (data_.type) { @@ -384,7 +384,7 @@ TEST(core_cpp_clientserver, ClientServerBaseCallbackTimeout) // event callback for timeout event std::atomic timeout_fired(0); - auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SClientEventIDCallbackData& data_) -> void + auto event_callback = [&](const eCAL::Registration::SServiceMethodId& /*service_id_*/, const struct eCAL::SClientEventCallbackData& data_) -> void { if (data_.type == client_event_timeout) {