Apollo
6.0
Open source self driving car software
|
Service handles Request
from the Client, and send a Response
to it.
More...
#include <service.h>
Public Types | |
using | ServiceCallback = std::function< void(const std::shared_ptr< Request > &, std::shared_ptr< Response > &)> |
Public Member Functions | |
Service (const std::string &node_name, const std::string &service_name, const ServiceCallback &service_callback) | |
Construct a new Service object. More... | |
Service (const std::string &node_name, const std::string &service_name, ServiceCallback &&service_callback) | |
Construct a new Service object. More... | |
Service ()=delete | |
Forbid default constructing. More... | |
~Service () | |
bool | Init () |
Init the Service. More... | |
void | destroy () |
Destroy the Service. More... | |
![]() | |
ServiceBase (const std::string &service_name) | |
Construct a new Service Base object. More... | |
virtual | ~ServiceBase () |
const std::string & | service_name () const |
Get the service name. More... | |
Additional Inherited Members | |
![]() | |
std::string | service_name_ |
Service handles Request
from the Client, and send a Response
to it.
Request | the request type |
Response | the response type |
using apollo::cyber::Service< Request, Response >::ServiceCallback = std::function<void(const std::shared_ptr<Request>&, std::shared_ptr<Response>&)> |
|
inline |
Construct a new Service object.
node_name | used to fill RoleAttribute when join the topology |
service_name | the service name we provide |
service_callback | reference of ServiceCallback object |
|
inline |
Construct a new Service object.
node_name | used to fill RoleAttribute when join the topology |
service_name | the service name we provide |
service_callback | rvalue reference of ServiceCallback object |
|
delete |
Forbid default constructing.
|
inline |
|
virtual |
Destroy the Service.
Implements apollo::cyber::ServiceBase.
bool apollo::cyber::Service< Request, Response >::Init | ( | ) |
Init the Service.