예제 #1
0
파일: Master.cs 프로젝트: cephdon/ROS.NET
        public static bool kill(string node)
        {
            CachedXmlRpcClient cl = clientForNode(node);

            if (cl == null)
            {
                return(false);
            }
            XmlRpcValue req = new XmlRpcValue(), resp = new XmlRpcValue(), payl = new XmlRpcValue();

            req.Set(0, this_node.Name);
            req.Set(1, "Out of respect for Mrs. " + this_node.Name);
            if (!cl.Execute("shutdown", req, resp) || !XmlRpcManager.Instance.validateXmlrpcResponse("lookupNode", resp, ref payl))
            {
                return(false);
            }
            payl.Dump();
            XmlRpcManager.Instance.releaseXMLRPCClient(cl);
            return(true);
        }
예제 #2
0
 public static bool kill(string node)
 {
     CachedXmlRpcClient cl = clientForNode(node);
     if (cl == null)
         return false;
     XmlRpcValue req = new XmlRpcValue(), resp = new XmlRpcValue(), payl = new XmlRpcValue();
     req.Set(0, this_node.Name);
     req.Set(1, "Out of respect for Mrs. " + this_node.Name);
     if (!cl.Execute("shutdown", req, resp) || !XmlRpcManager.Instance.validateXmlrpcResponse("lookupNode", resp, payl))
         return false;
     payl.Dump();
     XmlRpcManager.Instance.releaseXMLRPCClient(cl);
     return true;
 }