/// <summary> /// Constructor /// </summary> /// <param name="id"> The id of the plc. This is purely used for identification and log purposes. </param> /// <param name="name"> The name of the plc. This is purely used for identification and log purposes. </param> protected Plc(int id, string name) { // Save parameters. this.Id = id; this.Name = name; // Initialize fields. this.ConnectionState = PlcConnectionState.Disconnected; _disposeTokenSource = new CancellationTokenSource(); _disposeToken = _disposeTokenSource.Token; _isReconnecting = 0; _connectionStateChangeLock = new object(); _waitQueue = new ConcurrentQueue <CancellationTokenSource>(); }
/// <summary> /// Constructor /// </summary> /// <param name="connectionState"> The new <see cref="PlcConnectionState"/>. </param> public PlcConnectionStateChangedEventArgs(PlcConnectionState connectionState) { this.ConnectionState = connectionState; }