Beispiel #1
0
 public SerialPortClient(
     ISerialPort port,
     SerialPortParams setting)
 {
     this.Port    = port;
     this.Setting = setting;
 }
 public void SetParams(SerialPortParams prm)
 {
     this.BaudRate = prm.BaudRate;
     this.Parity   = prm.Parity;
     this.DataBits = prm.DataBits;
     this.StopBits = prm.StopBits;
 }
 public static ICommClient GetClient(
     this ISerialPort port,
     SerialPortParams setting)
 {
     return(new SerialPortClient(
                port,
                setting));
 }
Beispiel #4
0
        /// <summary>
        /// Create the instance by using a textual compact form
        /// </summary>
        /// <param name="settings"></param>
        /// <param name="rtsEnable"></param>
        public SerialPortParams(
            string settings,
            bool rtsEnable)
        {
            SerialPortParams.ParseSettings(
                settings,
                out this.BaudRate,
                out this.Parity,
                out this.DataBits,
                out this.StopBits
                );

            this.RtsEnable = rtsEnable;
        }