/// <summary> /// Initializes a new <see cref="ZusiTcpClientConnection"/> object that uses the specified event handlers to pass datasets to the client application. /// </summary> /// <param name="clientId">Identifies the client to the server. Use your application's name for this.</param> /// <param name="priority">Client priority. Determines measurement update frequency. Recommended value for control desks: "High"</param> /// <param name="commands">A set of commands.</param> public ZusiTcpClientConnection(string clientId, ClientPriority priority, TCPCommands commands) { if (SynchronizationContext.Current == null) { throw new ZusiTcpException("Cannot create TCP connection object: SynchronizationContext.Current is null. " + "This happens when the object is created before the context is initialized in " + "Application.Run() or equivalent. " + "Possible solution: Create object later, e.g. when the user clicks the \"Connect\" button."); } ClientId = clientId; ClientPriority = priority; _hostContext = SynchronizationContext.Current; _commands = commands; }
public ZusiTcpConn(string clientId, ClientPriority priority, TCPCommands commands) : base(clientId, priority, commands) { }
/// <summary> /// Initializes a new <see cref="ZusiTcpClientConnection"/> object that uses the specified event handlers to pass datasets to the client application. /// </summary> /// <param name="clientId">Identifies the client to the server. Use your application's name for this.</param> /// <param name="priority">Client priority. Determines measurement update frequency. Recommended value for control desks: "High"</param> /// <param name="commandsetPath">Path to the XML file containing the command set.</param> public ZusiTcpClientConnection(string clientId, ClientPriority priority, String commandsetPath = "commandset.xml") : this(clientId, priority, TCPCommands.LoadFromFile(commandsetPath)) { }
public ZusiTcpConn(string clientId, ClientPriority priority, string commandsetPath = "commandset.xml") : base(clientId, priority, commandsetPath) { }