37 #ifndef ACTIONLIB__CLIENT__SERVICE_CLIENT_IMP_H_
38 #define ACTIONLIB__CLIENT__SERVICE_CLIENT_IMP_H_
46 template<
class ActionSpec>
49 ac_.reset(
new SimpleActionClientT(n, name,
true));
52 template<
class ActionSpec>
55 return ac_->waitForServer(timeout);
58 template<
class ActionSpec>
61 return ac_->isServerConnected();
64 template<
class ActionSpec>
66 void * result, std::string result_md5sum)
69 const Goal * goal_c =
static_cast<const Goal *
>(goal);
70 Result * result_c =
static_cast<Result *
>(result);
75 if (strcmp(mt::md5sum(*goal_c),
76 goal_md5sum.c_str()) || strcmp(mt::md5sum(*result_c), result_md5sum.c_str()))
78 ROS_ERROR_NAMED(
"actionlib",
"Incorrect md5Sums for goal and result types");
82 if (!ac_->isServerConnected()) {
84 "Attempting to make a service call when the server isn't actually connected to the client.");
88 ac_->sendGoalAndWait(*goal_c);
90 (*result_c) = *(ac_->getResult());
98 template<
class Goal,
class Result>
102 return client_->call(&goal, mt::md5sum(goal), &result, mt::md5sum(result));
107 return client_->waitForServer(timeout);
112 return client_->isServerConnected();
116 template<
class ActionSpec>
120 return ServiceClient(client_ptr);
124 #endif // ACTIONLIB__CLIENT__SERVICE_CLIENT_IMP_H_