protected volatile bool terminated; // necessary to stop the thread /// <summary> /// Initializes a new instance of the class. /// </summary> public SerialChannelLogic(ILineContext lineContext, ChannelConfig channelConfig) : base(lineContext, channelConfig) { options = new SerialChannelOptions(channelConfig.CustomOptions); requestArgs = new IncomingRequestArgs(); serialConn = null; thread = null; terminated = false; }
/// <summary> /// Makes the communication channel ready for operating. /// </summary> public override void MakeReady() { CheckBehaviorSupport(); serialConn = new SerialConnection(Log, new SerialPort( options.PortName, options.BaudRate, options.Parity, options.DataBits, options.StopBits) { DtrEnable = options.DtrEnable, RtsEnable = options.RtsEnable }); SetDeviceConnection(serialConn); }