class eCAL::CServiceServer
Service Server wrapper class.
Members
public ECAL_API CServiceServer()
Constructor.
public ECAL_API CServiceServer(const std::string & service_name_)
Constructor.
Parameters
service_name_Unique service name.
public virtual ECAL_API ~CServiceServer()
Destructor.
public ECAL_API CServiceServer(const CServiceServer &) = delete
CServiceServers are non-copyable.
public ECAL_API CServiceServer&operator=(const CServiceServer &) = delete
CServiceServers are non-copyable.
public ECAL_API bool Create(const std::string & service_name_)
Creates this object.
Parameters
service_name_Unique service name.
Returns
True if successful.
public ECAL_API bool Destroy()
Destroys this object.
Returns
True if successful.
public ECAL_API bool AddDescription(const std::string & method_,const std::string & req_type_,const std::string & req_desc_,const std::string & resp_type_,const std::string & resp_desc_)
Add method type descriptions.
Parameters
-
method_Service method name. -
req_type_Service method request type. -
req_desc_Service method request description. -
resp_type_Service method response type. -
resp_desc_Service method response description.
Returns
True if successful.
public ECAL_API bool AddMethodCallback(const std::string & method_,const std::string & req_type_,const std::string & resp_type_,const MethodCallbackT & callback_)
Add method callback.
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.
public ECAL_API bool RemMethodCallback(const std::string & method_)
Remove method callback.
Parameters
method_Service method name.
Returns
True if successful.
public ECAL_API bool AddEventCallback(eCAL_Server_Event type_,ServerEventCallbackT callback_)
Add server event callback function.
Parameters
-
type_The event type to react on. -
callback_The callback function to add.
Returns
True if succeeded, false if not.
public ECAL_API bool RemEventCallback(eCAL_Server_Event type_)
Remove server event callback function.
Parameters
type_The event type to remove.
Returns
True if succeeded, false if not.
public ECAL_API std::string GetServiceName()
Retrieve service name.
Returns
The service name.
public ECAL_API bool IsConnected()
Check connection state.
Returns
True if connected, false if not.