Class CServiceServer

Class Documentation

class eCAL::CServiceServer

Service Server wrapper class.

Public Functions

CServiceServer()

Constructor.

CServiceServer(const std::string &service_name_)

Constructor.

Parameters

service_name_ – Unique service name.

virtual ~CServiceServer()

Destructor.

CServiceServer(const CServiceServer&) = delete

CServiceServers are non-copyable.

CServiceServer &operator=(const CServiceServer&) = delete

CServiceServers are non-copyable.

bool Create(const std::string &service_name_)

Creates this object.

Parameters

service_name_ – Unique service name.

Returns

True if successful.

bool Destroy()

Destroys this object.

Returns

True if successful.

bool AddMethodCallback(const std::string &method_, const std::string &req_type_, const std::string &resp_type_, const MethodCallbackT &callback_)

Add method callback for server response.

Parameters
  • method_ – Service method name.

  • req_type_ – Service method request type.

  • resp_type_ – Service method response type.

  • callback_ – Callback function for client request.

Returns

True if successful.

bool RemMethodCallback(const std::string &method_)

Remove client request callback.

Parameters

method_ – Service method name.

Returns

True if successful.

std::string GetServiceName()

Retrieve service name.

Returns

The service name.