/// <summary> /// Retrieve a value for an existing parameter, if it exists /// </summary> /// <param name="parms"></param> /// <param name="result"></param> public void getParam([In][Out] IntPtr parms, [In][Out] IntPtr result) { XmlRpcValue res = XmlRpcValue.Create(ref result), parm = XmlRpcValue.Create(ref parms); res.Set(0, 1); res.Set(1, "getParam"); String caller_id = parm[0].GetString(); String topic = parm[1].GetString(); // value = new XmlRpcValue(); XmlRpcValue value = handler.getParam(caller_id, topic); //value // String vi = v.getString(); if (value == null) { res.Set(0, 0); res.Set(1, "Parameter " + topic + " is not set"); value = new XmlRpcValue(""); } res.Set(2, value); //XmlRpcValue parm2 = new XmlRpcValue(), result2 = new XmlRpcValue(); //parm2.Set(0, this_node.Name); //parm2.Set(1, mapped_key); //bool ret = master.execute("getParam", parm2, ref result2, ref v, false); }
/// <summary> /// Retrieve a value for an existing parameter, if it exists /// </summary> /// <param name="parms"></param> /// <param name="result"></param> public XmlRpcValue getParam(String caller_id, String topic) { XmlRpcValue res = new XmlRpcValue();//XmlRpcValue.Create(ref result), parm = XmlRpcValue.Create(ref parms); res.Set(0, 1); res.Set(1, "getParam"); //String caller_id = parm[0].GetString(); //String topic = parm[1].GetString(); // value = new XmlRpcValue(); XmlRpcValue value = handler.getParam(caller_id, topic); //value // String vi = v.getString(); if (value == null) { res.Set(0, 0); res.Set(1, "Parameter " + topic + " is not set"); value = new XmlRpcValue(""); } res.Set(2, value); return(res); }