public static RosSocket ConnectToRos(Protocols protocolType, string serverUrl, EventHandler onConnected = null, EventHandler onClosed = null) { RosSharp.RosBridgeClient.Protocols.IProtocol protocol = GetProtocol(protocolType, serverUrl); protocol.OnConnected += onConnected; protocol.OnClosed += onClosed; return(new RosSocket(protocol)); }
public static RosSocket ConnectToRos(Protocols protocolType, string serverUrl, EventHandler onConnected = null, EventHandler onClosed = null, RosSocket.SerializerEnum serializer = RosSocket.SerializerEnum.Microsoft) { RosSharp.RosBridgeClient.Protocols.IProtocol protocol = GetProtocol(protocolType, serverUrl); protocol.OnConnected += onConnected; protocol.OnClosed += onClosed; return(new RosSocket(protocol, serializer)); }