Go to the documentation of this file.
29 #ifndef SWRI_ROSCPP_SERVICE_SERVER_IMPL_H_
30 #define SWRI_ROSCPP_SERVICE_SERVER_IMPL_H_
98 std::vector<std::string> names;
101 std::map<std::string, ServiceServerStatistics>::const_iterator it;
103 names.push_back(it->first);
109 const std::string &
name)
const
111 std::map<std::string, ServiceServerStatistics>::const_iterator it;
128 template<
class MReq,
class MRes,
class T>
137 const std::string &service)
145 ROS_INFO(
"Serving to '%s' at '%s'.",
158 ROS_INFO(
"Service '%s' called by '%s'",
169 const_cast<MReq&
>(event.
getRequest()),
event.getResponse());
172 event.
getCallerName(),
event.getRequest(),
event.getResponse());
196 const std::string &service,
197 bool(T::*srv_func)(MReq &, MRes &),
208 const std::string &service,
220 const std::string &service,
221 bool(T::*srv_func)(
const std::string &,
const MReq &, MRes &),
232 #endif // SWRI_ROSCPP_SERVICE_SERVER_IMPL_H_
const std::string & unmappedService() const
ServiceServerStatistics clientStatistics(const std::string &name) const
std::map< std::string, ServiceServerStatistics > client_stats_
const RequestType & getRequest() const
const ServiceServerStatistics & totalStats() const
const std::string & mappedService() const
void setLogCalls(bool enable)
bool(T::* callback_with_event_)(ros::ServiceEvent< MReq, MRes > &)
std::string unmapped_service_
ServiceServer advertiseService(AdvertiseServiceOptions &ops)
void processServing(const std::string caller_name, bool success, const ros::WallDuration &runtime)
void setInstrumentPerClient(bool enable)
bool(T::* callback_with_name_)(const std::string &, const MReq &, MRes &)
bool(T::* callback_plain_)(MReq &, MRes &)
bool handleService(ros::ServiceEvent< MReq, MRes > &event)
std::string resolveName(const std::string &name, bool remap=true) const
void merge(bool success, const ros::WallDuration &runtime)
TypedServiceServerImpl(ros::NodeHandle &nh, const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
bool instrument_per_client_
ServiceServerStatistics total_stats_
const std::string & getCallerName() const
virtual ~ServiceServerImpl()
TypedServiceServerImpl(ros::NodeHandle &nh, const std::string &service, bool(T::*srv_func)(ros::ServiceEvent< MReq, MRes > &), T *obj)
std::string mapped_service_
TypedServiceServerImpl(ros::NodeHandle &nh, const std::string &service, bool(T::*srv_func)(const std::string &, const MReq &, MRes &), T *obj)
std::vector< std::string > clientNames() const
ros::ServiceServer server_
void initialize(ros::NodeHandle &nh, const std::string &service)
bool instrumentPerClient() const
swri_roscpp
Author(s): P. J. Reed
autogenerated on Fri Aug 2 2024 08:39:15