17 #ifndef CYBER_SERVICE_CLIENT_BASE_H_ 18 #define CYBER_SERVICE_CLIENT_BASE_H_ 63 bool has_service =
false;
64 auto step_duration = std::chrono::nanoseconds(5 * 1000 * 1000);
65 while (time_out.count() > 0) {
68 ->HasService(service_name_);
70 std::this_thread::sleep_for(step_duration);
71 time_out -= step_duration;
83 #endif // CYBER_SERVICE_CLIENT_BASE_H_ ClientBase(const std::string &service_name)
Construct a new Client Base object.
Definition: client_base.h:40
bool WaitForServiceNanoseconds(std::chrono::nanoseconds time_out)
Definition: client_base.h:62
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
virtual ~ClientBase()
Definition: client_base.h:42
const std::string & ServiceName() const
Get the service name.
Definition: client_base.h:52
Base class of Client.
Definition: client_base.h:33
virtual void Destroy()=0
Destroy the Client.
std::string service_name_
Definition: client_base.h:60
virtual bool ServiceIsReady() const =0
Ensure whether there is any Service named service_name_