Base class of Client
更多...
#include <client_base.h>
◆ ClientBase()
apollo::cyber::ClientBase::ClientBase |
( |
const std::string & |
service_name | ) |
|
|
inlineexplicit |
Construct a new Client Base object
- 参数
-
service_name | the service we can request |
在文件 client_base.h 第 40 行定义.
std::string service_name_
◆ ~ClientBase()
virtual apollo::cyber::ClientBase::~ClientBase |
( |
| ) |
|
|
inlinevirtual |
◆ Destroy()
virtual void apollo::cyber::ClientBase::Destroy |
( |
| ) |
|
|
pure virtual |
◆ ServiceIsReady()
virtual bool apollo::cyber::ClientBase::ServiceIsReady |
( |
| ) |
const |
|
pure virtual |
◆ ServiceName()
const std::string & apollo::cyber::ClientBase::ServiceName |
( |
| ) |
const |
|
inline |
◆ WaitForServiceNanoseconds()
bool apollo::cyber::ClientBase::WaitForServiceNanoseconds |
( |
std::chrono::nanoseconds |
time_out | ) |
|
|
inlineprotected |
在文件 client_base.h 第 62 行定义.
62 {
63 bool has_service = false;
64 auto step_duration = std::chrono::nanoseconds(5 * 1000 * 1000);
65 while (time_out.count() > 0) {
66 has_service = service_discovery::TopologyManager::Instance()
67 ->service_manager()
69 if (!has_service) {
70 std::this_thread::sleep_for(step_duration);
71 time_out -= step_duration;
72 } else {
73 break;
74 }
75 }
76 return has_service;
77 }
◆ service_name_
std::string apollo::cyber::ClientBase::service_name_ |
|
protected |
该类的文档由以下文件生成: