Skip to content

Commit

Permalink
Merge branch 'master' into feature/redesign-publisher-api
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Dec 13, 2024
2 parents cd8d045 + 9cdfe52 commit 1673590
Show file tree
Hide file tree
Showing 59 changed files with 1,437 additions and 1,329 deletions.
5 changes: 4 additions & 1 deletion ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ if(ECAL_CORE_SERVICE)
src/service/ecal_service_server.cpp
src/service/ecal_service_server_impl.cpp
src/service/ecal_service_server_impl.h
src/service/ecal_service_server_v5.cpp
src/service/ecal_service_server_v5_impl.cpp
src/service/ecal_service_server_v5_impl.h
src/service/ecal_service_singleton_manager.cpp
src/service/ecal_service_singleton_manager.h
)
Expand Down Expand Up @@ -512,7 +515,6 @@ set(ecal_header_cmn
include/ecal/config/monitoring.h
include/ecal/config/publisher.h
include/ecal/config/registration.h
include/ecal/config/service.h
include/ecal/config/subscriber.h
include/ecal/config/time.h
include/ecal/config/transport_layer.h
Expand All @@ -539,6 +541,7 @@ set(ecal_header_cmn
include/ecal/ecal_publisher.h
include/ecal/ecal_publisher_v5.h
include/ecal/ecal_server.h
include/ecal/ecal_server_v5.h
include/ecal/ecal_service_info.h
include/ecal/ecal_subscriber.h
include/ecal/ecal_time.h
Expand Down
18 changes: 2 additions & 16 deletions ecal/core/include/ecal/cimpl/ecal_log_cimpl.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,26 +33,12 @@
extern "C"
{
#endif /*__cplusplus*/
/**
* @brief Sets the log level.
*
* @param level_ The level.
**/
ECALC_API void eCAL_Logging_SetLogLevel(enum eCAL_Logging_eLogLevel level_);

/**
* @brief Get the current log level.
*
* @return The current log level.
**/
ECALC_API enum eCAL_Logging_eLogLevel eCAL_Logging_GetLogLevel();

/**
* @brief Log a message (with current log level).
*
* @param msg_ The log message string.
**/
ECALC_API void eCAL_Logging_Log(const char* const msg_);
ECALC_API void eCAL_Logging_Log(enum eCAL_Logging_eLogLevel level_, const char* const msg_);

/**
* @brief Get logging string.
Expand Down
2 changes: 0 additions & 2 deletions ecal/core/include/ecal/config/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include <ecal/config/application.h>
#include <ecal/config/monitoring.h>
#include <ecal/config/registration.h>
#include <ecal/config/service.h>
#include <ecal/config/logging.h>
#include <ecal/config/user_arguments.h>
#include <ecal/config/publisher.h>
Expand All @@ -54,7 +53,6 @@ namespace eCAL
Subscriber::Configuration subscriber;
Publisher::Configuration publisher;
Time::Configuration timesync;
Service::Configuration service;
Application::Configuration application;
Logging::Configuration logging;
Cli::Configuration command_line_arguments;
Expand Down
39 changes: 0 additions & 39 deletions ecal/core/include/ecal/config/service.h

This file was deleted.

39 changes: 33 additions & 6 deletions ecal/core/include/ecal/ecal_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@

#include <ecal/ecal_deprecate.h>
#include <ecal/ecal_os.h>

#include <ecal/ecal_callback.h>
#include <ecal/ecal_service_info.h>
#include <ecal/ecal_client_instance.h>
#include <ecal/ecal_service_info.h>
#include <ecal/ecal_types.h>

#include <memory>
#include <string>
Expand Down Expand Up @@ -62,13 +64,27 @@ namespace eCAL
ECAL_API_EXPORTED_MEMBER
virtual ~CServiceClient();

// Deleted copy constructor and copy assignment operator
/**
* @brief CServiceClient are non-copyable
**/
CServiceClient(const CServiceClient&) = delete;

/**
* @brief CServiceClient are non-copyable
**/
CServiceClient& operator=(const CServiceClient&) = delete;

// Move constructor and move assignment operator
ECAL_API_EXPORTED_MEMBER CServiceClient(CServiceClient&& rhs) noexcept;
ECAL_API_EXPORTED_MEMBER CServiceClient& operator=(CServiceClient&& rhs) noexcept;
/**
* @brief CServiceClient are move-enabled
**/
ECAL_API_EXPORTED_MEMBER
CServiceClient(CServiceClient&& rhs) noexcept;

/**
* @brief CServiceClient are move-enabled
**/
ECAL_API_EXPORTED_MEMBER
CServiceClient& operator=(CServiceClient&& rhs) noexcept;

/**
* @brief Get the client instances for all matching services
Expand Down Expand Up @@ -124,6 +140,17 @@ namespace eCAL
ECAL_API_EXPORTED_MEMBER
std::string GetServiceName() const;

/**
* @brief Retrieve the service id.
*
* @return The service id.
**/

// TODO: Implement this

ECAL_API_EXPORTED_MEMBER
Registration::SServiceMethodId GetServiceId() const;

/**
* @brief Check connection to at least one service.
*
Expand All @@ -136,4 +163,4 @@ namespace eCAL
std::shared_ptr<eCAL::CServiceClientImpl> m_service_client_impl;
};
}
}
}
2 changes: 1 addition & 1 deletion ecal/core/include/ecal/ecal_client_v5.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ namespace eCAL
ECAL_API_EXPORTED_MEMBER
bool IsConnected();

protected:
private:
std::shared_ptr<CServiceClientImpl> m_service_client_impl;
};
}
Expand Down
9 changes: 2 additions & 7 deletions ecal/core/include/ecal/ecal_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ namespace eCAL
ECAL_API Configuration& GetConfiguration ();
ECAL_API Subscriber::Configuration& GetSubscriberConfiguration ();
ECAL_API Publisher::Configuration& GetPublisherConfiguration ();
ECAL_API Service::Configuration& GetServiceConfiguration ();

namespace Config
{
Expand Down Expand Up @@ -103,18 +102,14 @@ namespace eCAL
/////////////////////////////////////
// publisher
/////////////////////////////////////

ECAL_API bool IsTopicTypeSharingEnabled ();
ECAL_API bool IsTopicDescriptionSharingEnabled ();

/////////////////////////////////////
// service
/////////////////////////////////////
ECAL_API bool IsServiceProtocolV0Enabled ();
ECAL_API bool IsServiceProtocolV1Enabled ();

/////////////////////////////////////
// subscriber
/////////////////////////////////////

ECAL_API bool GetDropOutOfOrderMessages ();

/////////////////////////////////////
Expand Down
50 changes: 2 additions & 48 deletions ecal/core/include/ecal/ecal_log.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* ========================= eCAL LICENSE =================================
*
* Copyright (C) 2016 - 2019 Continental Corporation
* Copyright (C) 2016 - 2024 Continental Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -35,59 +35,13 @@ namespace eCAL
{
namespace Logging
{
/**
* @brief Sets the log level.
*
* @param level_ The level.
**/
ECAL_API void SetLogLevel(eCAL_Logging_eLogLevel level_);

/**
* @brief Sets the file log filter.
*
* @param filter_ The filter;
*/
ECAL_API void SetFileLogFilter(eCAL_Logging_Filter filter_);

/**
* @brief Sets the udp log filter.
*
* @param filter_ The filter;
*/
ECAL_API void SetUDPLogFilter(eCAL_Logging_Filter filter_);

/**
* @brief Sets the console log filter.
*
* @param filter_ The filter;
*/
ECAL_API void SetConsoleLogFilter(eCAL_Logging_Filter filter_);

/**
* @brief Get the current log level.
*
* @return The current log level.
**/
ECAL_API eCAL_Logging_eLogLevel GetLogLevel();

/**
* @brief Log a message (with current log level).
*
* @param msg_ The log message string.
**/
ECAL_API void Log(const std::string& msg_);

/**
* @brief Log a message.
*
* @param level_ The level.
* @param msg_ The log message string.
**/
inline void Log(eCAL_Logging_eLogLevel level_, const std::string& msg_)
{
SetLogLevel(level_);
Log(msg_);
}
ECAL_API void Log(eCAL_Logging_eLogLevel level_, const std::string& msg_);

/**
* @brief Get logging as serialized protobuf string.
Expand Down
Loading

0 comments on commit 1673590

Please sign in to comment.