32 #include "ros/common.h"
76 , name_(function_name)
82 func_(params, result);
100 static XMLRPCManagerPtr xmlrpc_manager = boost::make_shared<XMLRPCManager>();
101 return xmlrpc_manager;
104 XMLRPCManager::XMLRPCManager()
106 , shutting_down_(false)
107 , unbind_requested_(false)
128 std::stringstream ss;
154 for (V_CachedXmlRpcClient::iterator i =
clients_.begin();
171 for (
int wait_count = 0; !
clients_.empty() && wait_count < 10; wait_count++)
181 S_ASyncXMLRPCConnection::iterator it =
connections_.begin();
182 S_ASyncXMLRPCConnection::iterator end =
connections_.end();
183 for (; it != end; ++it)
205 if (
response.getType() != XmlRpcValue::TypeArray)
217 if (
response[0].getType() != XmlRpcValue::TypeInt)
219 ROSCPP_LOG_DEBUG(
"XML-RPC call [%s] didn't return a int as the 1st element",
224 if (
response[1].getType() != XmlRpcValue::TypeString)
226 ROSCPP_LOG_DEBUG(
"XML-RPC call [%s] didn't return a string as the 2nd element",
230 std::string status_string =
response[1];
231 if (status_code != 1)
234 method.c_str(), status_code, status_string.c_str());
243 std::string empty_array =
"<value><array><data></data></array></value>";
252 disableAllSignalsInThisThread();
260 for (; it != end; ++it)
286 S_ASyncXMLRPCConnection::iterator it =
connections_.begin();
287 S_ASyncXMLRPCConnection::iterator end =
connections_.end();
288 for (; it != end; ++it)
301 for (; it != end; ++it)
319 for (V_CachedXmlRpcClient::iterator i =
clients_.begin();
325 if (i->client_->getHost() == host &&
326 i->client_->getPort() == port &&
327 i->client_->getUri() == uri)
371 for (V_CachedXmlRpcClient::iterator i =
clients_.begin();
413 info.
name = function_name;