示例#1
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            cs.SetStandard(WorkstationDAL.Model.clsShareOption.ComPort, 115200, Handshake.none, Parity.none);
            return(cs);
        }
示例#2
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            //string path = AppDomain.CurrentDomain.BaseDirectory + settingFileName;
            //FileInfo file = new FileInfo(path);
            //if (file.Exists)
            //{
            //    cs = CommBase.CommBaseSettings.LoadFromXML(file.OpenRead());
            //}
            //else
            //{
            cs.SetStandard(ShareOption.ComPort, 19200, Handshake.none, Parity.odd);
            clsDY5000LD.CommBaseSettings set = cs;
            set.autoReopen            = false;
            set.sendTimeoutMultiplier = 10;
            set.sendTimeoutConstant   = 1000;
            set.rxLowWater            = 100;
            set.rxHighWater           = 100;
            set.rxQueue       = 0;
            set.txQueue       = 0;
            set.useDTR        = JH.CommBase.CommBase.HSOutput.none;
            set.useRTS        = JH.CommBase.CommBase.HSOutput.none;
            set.checkAllSends = true;
            //}
            return(cs);
        }
示例#3
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            cs.SetStandard(ShareOption.ComPort, 9600, Handshake.none, Parity.none);
            return(cs);
        }
示例#4
0
            protected override CommBaseSettings CommSettings()
            {
                CommBaseSettings cb = new CommBaseSettings();

                cb.SetStandard("COM" + mComPort.ToString() + ":", 4800, CommBase.Handshake.none);
                //cb.checkAllSends = true;

                return(cb);
            }
示例#5
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            cs.SetStandard(ShareOption.ComPort, 9600, Handshake.none, Parity.none); //Parity.odd;
            clsDY723PC.CommBaseSettings set = cs;
            set.autoReopen = true;

            return(cs);
        }
示例#6
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            cs.SetStandard(ShareOption.ComPort, 9600, Handshake.none, Parity.none);
            cs.sendTimeoutMultiplier = 100;
            cs.sendTimeoutConstant   = 1000;
            cs.rxLowWater            = 256;
            cs.rxHighWater           = 256;
            cs.txWhenRxXoff          = false;
            return(cs);
        }
示例#7
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();
            Handshake        hs;

            switch (handshake)
            {
            case "CtsRts":
                hs = Handshake.CtsRts;
                break;

            case "DsrDtr":
                hs = Handshake.DsrDtr;
                break;

            case "XonXoff":
                hs = Handshake.XonXoff;
                break;

            default:
                hs = Handshake.none;
                break;
            }
            cs.SetStandard(commport, baudrate, hs);
            switch (parity)
            {
            case "Odd":
                cs.parity = Parity.odd;
                break;

            case "Even":
                cs.parity = Parity.even;
                break;

            case "Mark":
                cs.parity = Parity.mark;
                break;

            case "Space":
                cs.parity = Parity.space;
                break;

            default:
                cs.parity = Parity.none;
                break;
            }
            cs.sendTimeoutConstant   = 0;
            cs.sendTimeoutMultiplier = 450;
            return(cs);
        }
示例#8
0
        protected override CommBaseSettings CommSettings()
        {
            CommBaseSettings cs = new CommBaseSettings();

            //string path = AppDomain.CurrentDomain.BaseDirectory + settingFileName;
            //FileInfo file = new FileInfo(path);
            //if (file.Exists)
            //{
            //    cs = CommBase.CommBaseSettings.LoadFromXML(file.OpenRead());
            //}
            //else
            //{
            cs.SetStandard(ShareOption.ComPort, 9600, Handshake.none, Parity.none);
            //}
            return(cs);
        }
示例#9
0
            protected override CommBaseSettings CommSettings()
            {
                CommBaseSettings cb = new CommBaseSettings();
                cb.SetStandard("COM" + mComPort.ToString() + ":", 4800, CommBase.Handshake.none);
                //cb.checkAllSends = true;

                return cb;
            }
示例#10
0
    protected override CommBaseSettings CommSettings()
    {
      CommBaseSettings cs = new CommBaseSettings();
      Handshake hs;
      switch (handshake)
      {
        case "CtsRts":
          hs = Handshake.CtsRts;
          break;
        case "DsrDtr":
          hs = Handshake.DsrDtr;
          break;
        case "XonXoff":
          hs = Handshake.XonXoff;
          break;
        default:
          hs = Handshake.none;
          break;
      }
      cs.SetStandard(commport, baudrate, hs);
      switch (parity)
      {
        case "Odd":
          cs.parity = Parity.odd;
          break;
        case "Even":
          cs.parity = Parity.even;
          break;
        case "Mark":
          cs.parity = Parity.mark;
          break;
        case "Space":
          cs.parity = Parity.space;
          break;
        default:
          cs.parity = Parity.none;
          break;
      }

      return cs;
    }
示例#11
0
		/* I N I T */
		/*----------------------------------------------------------------------------
			%%Function: Init
			%%Qualified: bg._bg:DevComm.Init
			%%Contact: rlittle

			
		----------------------------------------------------------------------------*/
		public void Init()
		{
			m_cbs = new CommBaseSettings();

			m_cbs.SetStandard("COM5:", 9600, CommBase.Handshake.none);
			rgbRxBuffer = new byte[512];
		}
示例#12
0
 private void defNohLinkLabel_LinkClicked(object sender, System.Windows.Forms.LinkLabelLinkClickedEventArgs e)
 {
     m_settings.SetStandard(Project.gpsPortSettings.port, Project.gpsPortSettings.baudRate, Handshake.none);
     FillValues();
 }