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] redesign service server api #1849

Merged
merged 25 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
91741af
v5 renaming
rex-schilasky Dec 6, 2024
e79fa88
intermediate commit
rex-schilasky Dec 9, 2024
a2ccd10
intermediate commit (building, not working)
rex-schilasky Dec 9, 2024
9d2bf06
intermediate commit
rex-schilasky Dec 9, 2024
d9d7177
commenting
rex-schilasky Dec 9, 2024
3f9de03
first server implementation
rex-schilasky Dec 10, 2024
8e9fa32
Merge branch 'master' into feature/redesign-service-api
rex-schilasky Dec 11, 2024
7011eaa
Merge branch 'master' into feature/client-api-cleanup
rex-schilasky Dec 11, 2024
63082f3
commenting, logging + minor fix
rex-schilasky Dec 11, 2024
ffa87a5
eCAL::v5::CServiceServerImpl implemented based on eCAL::CServiceServer
rex-schilasky Dec 11, 2024
4181604
missing include
rex-schilasky Dec 11, 2024
02e8ad1
logging improved
rex-schilasky Dec 11, 2024
f59b100
minor comment and include fixes
rex-schilasky Dec 11, 2024
a5fb463
improved logging
rex-schilasky Dec 11, 2024
c89f8ee
Merge branch 'feature/client-api-cleanup' into feature/redesign-servi…
rex-schilasky Dec 11, 2024
95187e9
formatting
rex-schilasky Dec 11, 2024
f9d9a0a
minor review adaptions
rex-schilasky Dec 12, 2024
c327a90
shared_ptr handling, commenting
rex-schilasky Dec 12, 2024
2ccc9c1
check for nullptr in destructor
rex-schilasky Dec 13, 2024
7bb8b57
logging added/improved for CServiceClientImpl and CServiceServerImpl
rex-schilasky Dec 13, 2024
995c66c
GetServiceID added to public API of CServerClient and CServiceServer …
rex-schilasky Dec 13, 2024
238b326
review results
rex-schilasky Dec 13, 2024
1f41360
Merge branch 'master' into feature/redesign-service-api
Peguen Dec 13, 2024
3f9a963
server/client samples updated to v6
rex-schilasky Dec 13, 2024
d1cb855
minor test fix
rex-schilasky Dec 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ecal/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,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 @@ -511,7 +514,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 @@ -537,6 +539,7 @@ set(ecal_header_cmn
include/ecal/ecal_registration.h
include/ecal/ecal_publisher.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
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
Loading
Loading