public static bool exists(string port, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_exists__SWIG_4(port, ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) { throw yarpPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool writeToNameServer(PortWriter cmd, PortReader reply, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_writeToNameServer(PortWriter.getCPtr(cmd), PortReader.getCPtr(reply), ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) { throw yarpPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool isConnected(string src, string dest, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_isConnected__SWIG_2(src, dest, ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) { throw yarpPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
/// <summary> /// /// </summary> /// <param name="nameInputPort"></param> /// <param name="nameOutputPort"></param> public void openReceiver(string nameOutputPort,string nameInputPort) { if (!String.IsNullOrEmpty(nameInputPort) && !String.IsNullOrEmpty(nameOutputPort)) { Network.init(); input = new BufferedPortBottle(); input.open(nameInputPort); style = new ContactStyle(); style.persistent=true; if(Network.isConnected(nameOutputPort,nameInputPort,style)) Network.disconnect(nameOutputPort,nameInputPort,style); if (Network.connect(nameOutputPort, nameInputPort, style)) Console.WriteLine(nameInputPort + " port is connected to " + nameOutputPort); } }
public static bool connect(string src, string dest, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_connect__SWIG_3(src, dest, ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static bool writeToNameServer(PortWriter cmd, PortReader reply, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_writeToNameServer(PortWriter.getCPtr(cmd), PortReader.getCPtr(reply), ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static new bool write(Contact contact, PortWriter cmd, PortReader reply, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_write__SWIG_4(Contact.getCPtr(contact), PortWriter.getCPtr(cmd), PortReader.getCPtr(reply), ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public static bool exists(string port, ContactStyle style) { bool ret = yarpPINVOKE.NetworkBase_exists__SWIG_2(port, ContactStyle.getCPtr(style)); if (yarpPINVOKE.SWIGPendingException.Pending) throw yarpPINVOKE.SWIGPendingException.Retrieve(); return ret; }
internal static HandleRef getCPtr(ContactStyle obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
/// <summary> /// /// </summary> /// <param name="nameOutputPort"></param> /// <param name="namePortDb"></param> /// <returns></returns> public bool openConnectionToDb(string nameOutputPort, string namePortDb) { if (!String.IsNullOrEmpty(namePortDb) && !String.IsNullOrEmpty(nameOutputPort)) { Network.init(); outPort = new Port(); outPort.open(nameOutputPort); style = new ContactStyle(); style.persistent = true; if (PortExists(namePortDb)) { //if (Network.isConnected(nameOutputPort, namePortDb, style)) Network.disconnect(nameOutputPort, namePortDb,style); if (Network.connect(nameOutputPort, namePortDb, style)) { Console.WriteLine(namePortDb + " port is connected to " + nameOutputPort); return true; } else return false; } else return false; } else return false; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ContactStyle obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }