Esempio n. 1
0
 public void Reset()
 {
     lock (s_sync)
     {
         Id      = GenerateId();
         _closed = true;
         _closedEvent.Set();
         ReceivingAllowed = true;
         VotingResult     = null;
         _error           = null;
         ErrorSpecified.Reset();
         DropResult = DropResult.Timeout;
     }
 }
Esempio n. 2
0
        public void Open()
        {
            lock (s_sync)
            {
                Id      = GenerateId();
                _closed = false;
                _closedEvent.Reset();
                ReceivingAllowed = true;
                VotingResult     = null;
                _error           = null;
                ErrorSpecified.Reset();
                DropResult = DropResult.Timeout;


                GCSettings.LatencyMode = GCLatencyMode.LowLatency;
            }
        }
Esempio n. 3
0
 private void CloseSheetProcessingSessionWithError(int errorCode, bool driverError)
 {
     var errorConfig = GetErrorConfig(errorCode);
     if (errorConfig == null)
     {
         Logger.LogWarning(Message.ScannerManagerUnknownErrorOnClosingSheetProcessingSession,
             _sheetProcessingSession.Id, errorCode, driverError);
         return;
     }
     lock (s_sheetProcessingSessionSync)
     {
         Logger.LogVerbose(Message.ScannerManagerCloseSheetProcessingSessionWithError,
                       _sheetProcessingSession.Id, errorCode, driverError);
         var needAlert =
             _config.Alerts.NeedAlertAboutError(errorConfig) &&
             !string.IsNullOrEmpty(errorConfig.Description);
         var error = new SheetProcessingError(
             errorConfig.Code,
             errorConfig.Description,
             errorConfig.IsReverse,
             needAlert);
         _sheetProcessingSession.Error = error;
         if (driverError && errorConfig.IsReverse && _recognitionManager.NeedSaveImageOnDriverReverse)
             _recognitionManager.SaveLastImageOnDriverError(errorCode);
         if (_sheetProcessingSession.Closed)
         {
             Logger.LogVerbose(Message.ScannerManagerTryToCloseAlreadyClosedSheetProcessingSessionWithError,
                 _sheetProcessingSession.Id, errorCode, driverError);
             return;
         }
         CoreApplication.Instance.LoggerEnabled = true;
         Logger.LogVerbose(
             Message.ScannerManagerSheetProcessedWithError,
             _sheetProcessingSession.Error);
         _sheetProcessingSession.Close();
         StartRollTextMachine();
         SheetProcessed.RaiseEvent(this, new SheetEventArgs(_sheetProcessingSession));
     }
 }
Esempio n. 4
0
        public void Open()
        {
            lock (s_sync)
            {
                Id = GenerateId();
                _closed = false;
                _closedEvent.Reset();
                ReceivingAllowed = true;
                VotingResult = null;
                _error = null;
                ErrorSpecified.Reset();
                DropResult = DropResult.Timeout;

                GCSettings.LatencyMode = GCLatencyMode.LowLatency;
            }
        }
Esempio n. 5
0
 public void Reset()
 {
     lock (s_sync)
     {
         Id = GenerateId();
         _closed = true;
         _closedEvent.Set();
         ReceivingAllowed = true;
         VotingResult = null;
         _error = null;
         ErrorSpecified.Reset();
         DropResult = DropResult.Timeout;
     }
 }
Esempio n. 6
0
 private void ScannerManager_SheetProcessed(object sender, SheetEventArgs e)
 {
     _lastVotingResult = e.SheetProcessingSession.VotingResult;
     _lastError = e.SheetProcessingSession.Error;
     _lastDropResult = e.SheetProcessingSession.DropResult;
     _lastSheetType = e.SheetProcessingSession.SheetType;
     _sheetProcessed.GetAccess(this);
     _sheetProcessed.Set();
 }