|
Apollo 10.0
自动驾驶开放平台
|
Wrapper of cyber::Client which sends a topic with service name when SendRequst is invoked. 更多...
#include <client_wrapper.h>
Public 成员函数 | |
| ClientWrapper (const std::shared_ptr< cyber::Node > &node, const std::string &service_name) | |
| std::shared_ptr< Response > | SendRequest (std::shared_ptr< Request > request, const std::chrono::seconds &timeout_s=std::chrono::seconds(5)) |
| Request the Service with a shared ptr Request type | |
| std::shared_ptr< Response > | SendRequest (const Request &request, const std::chrono::seconds &timeout_s=std::chrono::seconds(5)) |
| Request the Service with a Request object | |
| std::shared_future< Response > | AsyncSendRequest (std::shared_ptr< Request > request) |
| Send Request shared ptr asynchronously | |
| std::shared_future< Response > | AsyncSendRequest (const Request &request) |
| Send Request object asynchronously | |
| std::shared_future< Response > | AsyncSendRequest (std::shared_ptr< Request > request, std::function< void(std::shared_future< std::shared_ptr< Response > >)> &&cb) |
Send Request shared ptr asynchronously and invoke cb after we get response | |
Wrapper of cyber::Client which sends a topic with service name when SendRequst is invoked.
在文件 client_wrapper.h 第 40 行定义.
| apollo::common::ClientWrapper< Request, Response >::ClientWrapper | ( | const std::shared_ptr< cyber::Node > & | node, |
| const std::string & | service_name | ||
| ) |
在文件 client_wrapper.h 第 96 行定义.
| std::shared_future< Response > apollo::common::ClientWrapper< Request, Response >::AsyncSendRequest | ( | const Request & | request | ) |
Send Request object asynchronously
在文件 client_wrapper.h 第 126 行定义.
| std::shared_future< Response > apollo::common::ClientWrapper< Request, Response >::AsyncSendRequest | ( | std::shared_ptr< Request > | request | ) |
Send Request shared ptr asynchronously
在文件 client_wrapper.h 第 118 行定义.
| std::shared_future< Response > apollo::common::ClientWrapper< Request, Response >::AsyncSendRequest | ( | std::shared_ptr< Request > | request, |
| std::function< void(std::shared_future< std::shared_ptr< Response > >)> && | cb | ||
| ) |
Send Request shared ptr asynchronously and invoke cb after we get response
| request | Request shared ptr |
| cb | callback function after we get response |
std::future shared ptr 在文件 client_wrapper.h 第 134 行定义.
| std::shared_ptr< Response > apollo::common::ClientWrapper< Request, Response >::SendRequest | ( | const Request & | request, |
| const std::chrono::seconds & | timeout_s = std::chrono::seconds(5) |
||
| ) |
Request the Service with a Request object
| request | Request object |
| timeout_s | request timeout, if timeout, response will be empty |
在文件 client_wrapper.h 第 110 行定义.
| std::shared_ptr< Response > apollo::common::ClientWrapper< Request, Response >::SendRequest | ( | std::shared_ptr< Request > | request, |
| const std::chrono::seconds & | timeout_s = std::chrono::seconds(5) |
||
| ) |
Request the Service with a shared ptr Request type
| request | shared ptr of Request type |
| timeout_s | request timeout, if timeout, response will be empty |
在文件 client_wrapper.h 第 102 行定义.