Exemple #1
0
        /// <summary>
        /// Initialize the reader.
        /// </summary>
        public override bool EnableScanner()
        {
            //Log.Write(new LogEntry("HoneywellReader: EnableScanner"));
            // If the reader is already initialized then fail the initialization.
            lock (_syncLock) {
                try {
                    //Log.Write(new LogEntry("HoneywellReader: EnableScanner API Revision = " + oDecodeAssembly.ApiRevision));
                    //Log.Write(new LogEntry("HoneywellReader: EnableScanner Decoder Revision = " + oDecodeAssembly.DecoderRevision));

                    oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.All, true);
                    oDecodeAssembly.DecodeMode = DecodeAssembly.DecodeModes.Standard;

                    /*
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.Code128, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.Code39, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.EAN13, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.EAN8, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.MSI, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.UPCA, true);
                     * oDecodeAssembly.EnableSymbology(SymbologyConfigurator.Symbologies.UPCE0, true);
                     */
                    _isScanButtonPressed = false;

                    //--- Add a Handler for the Decode Event ---
                    oDecodeAssembly.DecodeEvent += new DecodeAssembly.DecodeEventHandler(oDecodeAssembly_DecodeEvent);
                } catch (Exception ex) {
                    Services.Services.ReportException(ex);
                    //Log.Write(new LogEntry("Error enabling scanner: " + ex.ToString()));

                    return(false);
                }

                return(true);
            }
        }
        /// <summary>
        /// Инициализация сканера Dolphin 9950
        /// </summary>
        /// <returns>Whether initialization was successful</returns>
        public override bool Initialize()
        {
            base.nTermType = TERM_TYPE.DOLPH9950;
            xEng           = new DecodeAssembly();

            xEng.DecodeEvent += new DecodeAssembly.DecodeEventHandler(xEng_DecodeEvent);
            xEng.DecodeMode   = DecodeAssembly.DecodeModes.Standard;
            xEng.ScanTimeout  = 5000;

            // Разрешение DATAMATRIX
            xEng.EnableSymbology(SymbologyConfigurator.Symbologies.DataMatrix, true);

            // WiFi Init
            base.WiFi = new HoneyWiFi();

            return(true);
        }
        public Dolphin6XDriver()
        {
            _reader              = new DecodeAssembly();
            _reader.DecodeEvent += new DecodeAssembly.DecodeEventHandler(_reader_DecodeEvent);

            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.Code128, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.DataMatrix, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.Code39, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.Code93, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.GS1_128, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.ISBT, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.PDF417, true);
            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.QR, true);

            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.EAN13, true);
            _confEan13 = new SymbologyConfigurator(SymbologyConfigurator.Symbologies.EAN13);
            _confEan13.ReadConfig(DecodeAssembly.SetupTypes.Current);
            _confEan13.Flags  = SymbologyConfigurator.SymbologyFlags.Enable;
            _confEan13.Flags |= SymbologyConfigurator.SymbologyFlags.CheckTransmit;
            _confEan13.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda2Digit;
            _confEan13.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda5Digit;
            _confEan13.WriteConfig();
            _confEan13.Dispose();

            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.EAN8, true);
            _confEan8 = new SymbologyConfigurator(SymbologyConfigurator.Symbologies.EAN8);
            _confEan8.ReadConfig(DecodeAssembly.SetupTypes.Current);
            _confEan8.Flags  = SymbologyConfigurator.SymbologyFlags.Enable;
            _confEan8.Flags |= SymbologyConfigurator.SymbologyFlags.CheckTransmit;
            _confEan8.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda2Digit;
            _confEan8.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda5Digit;
            _confEan8.WriteConfig();
            _confEan8.Dispose();

            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.UPCA, true);
            _confUPCA = new SymbologyConfigurator(SymbologyConfigurator.Symbologies.UPCA);
            _confUPCA.ReadConfig(DecodeAssembly.SetupTypes.Current);
            _confUPCA.Flags  = SymbologyConfigurator.SymbologyFlags.Enable;
            _confUPCA.Flags |= SymbologyConfigurator.SymbologyFlags.CheckTransmit;
            _confUPCA.Flags |= SymbologyConfigurator.SymbologyFlags.NumSysTransmit;
            _confUPCA.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda2Digit;
            _confUPCA.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda5Digit;
            _confUPCA.WriteConfig();
            _confUPCA.Dispose();

            _reader.EnableSymbology(SymbologyConfigurator.Symbologies.UPCE0, true);
            _confUPCE0 = new SymbologyConfigurator(SymbologyConfigurator.Symbologies.UPCE0);
            _confUPCE0.ReadConfig(DecodeAssembly.SetupTypes.Current);
            _confUPCE0.Flags  = SymbologyConfigurator.SymbologyFlags.Enable;
            _confUPCE0.Flags |= SymbologyConfigurator.SymbologyFlags.CheckTransmit;
            _confUPCE0.Flags |= SymbologyConfigurator.SymbologyFlags.NumSysTransmit;
            _confUPCE0.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda2Digit;
            _confUPCE0.Flags |= SymbologyConfigurator.SymbologyFlags.Addenda5Digit;
            _confUPCE0.WriteConfig();
            _confUPCE0.Dispose();
        }