Skip to content

Commit

Permalink
header cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rex-schilasky committed Feb 12, 2025
1 parent 7f1ae60 commit db8c73d
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file client.h
* @file msg/protobuf/client.h
* @brief eCAL Protobuf Client Interface
*
* This header file defines two primary templated client classes for interacting with
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file client_base.h
* @file msg/protobuf/client_base.h
* @brief Base class for templated Protobuf service clients.
*
* This file defines a base class for Protobuf-based service clients. It encapsulates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* @file client_instance.h
* @file msg/protobuf/client_instance.h
* @brief eCAL client instance interface based on protobuf service description
*
* This header file provides the implementation of client instance interfaces for eCAL services
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@
*/

/**
* @file client_typed_response.h
* @file msg/protobuf/client_protobuf_types.h
* @brief eCAL client protobuf templated response type
**/

#pragma once

#include <ecal/service/types.h>

#include <google/protobuf/message.h>

#include <memory>
#include <string>
#include <vector>

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

/**
* @file client_protobuf_utils.h
* @file msg/protobuf/client_protobuf_utils.h
* @brief eCAL client protobuf service utility functions
**/

Expand Down
35 changes: 31 additions & 4 deletions serialization/protobuf/protobuf/include/ecal/msg/protobuf/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,35 @@
*/

/**
* @file server.h
* @file msg/protobuf/server.h
* @brief eCAL Server interface based on protobuf service description
**/
*
* This header defines the CServiceServer class, a Google Protocol Buffers server wrapper
* for eCAL. The class automatically extracts service method information from a provided
* protobuf service instance and registers all available methods with the underlying eCAL
* service server infrastructure.
*
* Key Features:
* - Automatic extraction of the full service name from the protobuf descriptor.
* - Dynamic generation of method information (input/output types and their descriptors)
* using the CProtoDynDecoder.
* - Registration of all protobuf-defined methods as callbacks with the underlying
* eCAL::CServiceServer.
* - Handling of incoming requests by deserializing the request message, invoking
* the appropriate service method, and serializing the response.
*
* Usage Example:
* // Create a protobuf service implementation instance (e.g., MathServiceImpl)
* std::shared_ptr<MathServiceImpl> service_impl = std::make_shared<MathServiceImpl>();
*
* // Create a server for the protobuf service
* eCAL::protobuf::CServiceServer<MathService> server(service_impl);
*
* // The server automatically registers all methods and is ready to process incoming requests.
*
* @note The service instance must provide access to its protobuf ServiceDescriptor (typically
* via a GetDescriptor() method) so that the server can correctly extract method information.
*/

#pragma once

Expand Down Expand Up @@ -185,5 +211,6 @@ namespace eCAL
std::shared_ptr<T> m_service;
std::map<std::string, const google::protobuf::MethodDescriptor*> m_methods;
};
}
}

} // namespace protobuf
} // namespace eCAL

0 comments on commit db8c73d

Please sign in to comment.