コード例 #1
0
 public SerialPortClient(ICommucationFacade commucationFacade)
 {
     _commucationFacade = commucationFacade;
     _comm = new SerialPort
     {
         NewLine   = "\n",
         RtsEnable = true
     }; //初始化串口
     //根据实际情况吧。
     _comm.DataReceived += ReceiveData;
 }
コード例 #2
0
        public CommPresenter(IViewCommStatus view)
        {
            _view = view;
            _commucationFacade   = new CommucationFacade(this);
            _sqlPresenter        = new SqlPresenter(this);
            _poleDetectPresenter = new PoleDetectPresenter();

            //子帧收集计时器
            _timerSendDelay = new Timer(PresetInfo.FrameSendDelay)
            {
                AutoReset = false
            };
            _timerSendDelay.Elapsed += FrameSendDelay;
        }
コード例 #3
0
 public BitkyTcpClient(ICommucationFacade commucationFacade)
 {
     _commucationFacade = commucationFacade;
 }