예제 #1
0
        public bool Attach()
        {
            try
            {
                _adaptor.Attach();
                _IsReady = Check();
                if (!_IsReady)
                {
                    throw new ModemException("adaptor is not ready.");
                }

                return(true);
            }
            catch (Exception p)
            {
                logger.Error(p);
                return(false);
            }
        }
예제 #2
0
        public bool Attach()
        {
            try
            {
                _adaptor.Attach();
                _IsReady = Check();
                if (!_IsReady)
                {
                    throw new ModemException("adaptor is not ready.");
                }

                _Stopped = false;
                _ReaderT.Start();
                _WriterT.Start();

                OnAttached(EventArgs.Empty);
                return(true);
            }
            catch (Exception p)
            {
                logger.Error(p);
                return(false);
            }
        }