Exemple #1
0
        public static bool ClosePort()
        {
            Logger.Info("+");

            if (_runConfig.IsMockupMode)
            {
                return(true);
            }
            if (_serialPort.IsOpen)
            {
                _serialPort.DiscardInBuffer();
                _serialPort.DiscardOutBuffer();
                _serialPort.Close();
            }
            return(!_serialPort.IsOpen);
        }
Exemple #2
0
 private void DiscardBuffers()
 {
     Logger.Debug("");
     _sp.DiscardInBuffer();
     _sp.DiscardOutBuffer();
 }