58 return service_manager;
61 ServiceManager::ServiceManager()
62 : shutting_down_(false)
91 ROSCPP_LOG_DEBUG(
"ServiceManager::shutdown(): unregistering our advertised services");
112 L_ServiceServerLink::iterator it = local_service_clients.begin();
113 L_ServiceServerLink::iterator end = local_service_clients.end();
114 for (; it != end; ++it)
119 local_service_clients.clear();
137 ROS_ERROR(
"Tried to advertise a service that is already advertised in this node [%s]", ops.
service.c_str());
149 std::snprintf(uri_buf,
sizeof(uri_buf),
"rosrpc://%s:%d",
151 args[2] = string(uri_buf);
173 if((*i)->getName() == serv_name && !(*i)->isDropped())
199 std::snprintf(uri_buf,
sizeof(uri_buf),
"rosrpc://%s:%d",
201 args[2] = string(uri_buf);
203 return master::execute(
"unregisterService", args, result, payload,
false);
210 if (((*s)->getName() == serv_name) && !(*s)->isDropped())
226 if ((*t)->getName() == service)
236 const std::string& request_md5sum,
const std::string& response_md5sum,
247 std::string serv_host;
261 if (transport->connect(serv_host, serv_port))
263 ServiceServerLinkPtr client(boost::make_shared<ServiceServerLink>(service, persistent, request_md5sum, response_md5sum, header_values));
270 client->initialize(connection);
275 ROSCPP_LOG_DEBUG(
"Failed to connect to service [%s] (mapped=[%s]) at [%s:%d]", service.c_str(), service.c_str(), serv_host.c_str(), serv_port);
312 string serv_uri(payload);
313 if (!serv_uri.length())
315 ROS_ERROR(
"lookupService: Empty server URI returned from master");
322 ROS_ERROR(
"lookupService: Bad service uri [%s]", serv_uri.c_str());