Ejemplo n.º 1
0
 public virtual void InitDevice(bool connectBarcode)
 {
     plc = new PLCController(SysConfig.Port);
     if (connectBarcode)
     {
         barcode1 = new BarcodeDevice(SysConfig.ScannerPort_1);
         barcode2 = new BarcodeDevice(SysConfig.ScannerPort_2);
     }
 }
Ejemplo n.º 2
0
 public virtual void InitDevice(UHFReaderType readerType, bool connectBarcode)
 {
     reader = new UHFReader(readerType);
     plc    = new PLCController(SysConfig.Port);
     if (connectBarcode)
     {
         barcode1 = new BarcodeDevice(SysConfig.ScannerPort_1);
         barcode2 = new BarcodeDevice(SysConfig.ScannerPort_2);
     }
 }
Ejemplo n.º 3
0
 void initBarcode(string barcodeComPort)
 {
     try
     {
         barcodeDevice = new BarcodeDevice(barcodeComPort);
         barcodeDevice.OnBarcodeReported += OnBarcodeReported;
         barcodeDevice.Connect();
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 4
0
        public virtual void InitDevice(UHFReaderType readerType, bool connectBarcode)
        {
            //reader = new UHFReader(readerType);
            Reader.SetSerialTransport("tcp", SerialTransportTCP.CreateSerialReader);
            reader = Reader.Create(string.Format("tcp://{0}", readerIp));

            plc = new PLCController(SysConfig.Port);
            if (connectBarcode)
            {
                barcode1 = new BarcodeDevice(SysConfig.ScannerPort_1);
                barcode2 = new BarcodeDevice(SysConfig.ScannerPort_2);
            }
        }
Ejemplo n.º 5
0
        public void initBarcode()
        {
            try
            {
                barcode1 = new BarcodeDevice(SysConfig.ScannerPort_1);
                barcode2 = new BarcodeDevice(SysConfig.ScannerPort_2);

                barcode1.OnBarcodeReported += OnBarcodeReported;
                barcode1.Connect();
                barcode2.OnBarcodeReported += OnBarcodeReported;
                barcode2.Connect();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Ejemplo n.º 6
0
        public virtual void InitDevice(READER_TYPE readerType, bool connectBarcode)
        {
            mReader = new CReader(readerType);

            if (readerType == READER_TYPE.READER_IMP || readerType == READER_TYPE.READER_TM)
            {
                mReader.OnTagReported += Reader_OnTagReported;
            }
            if (readerType == READER_TYPE.READER_DLX_PM || readerType == READER_TYPE.READER_XD_PM)
            {
                mReader.OnTagReported += Reader_OnTagReportedPM;
            }

            mPlc = new PLCController(SysConfig.Port);
            if (connectBarcode)
            {
                mBarcode1 = new BarcodeDevice(SysConfig.ScannerPort_1);
                mBarcode2 = new BarcodeDevice(SysConfig.ScannerPort_2);
            }
        }
Ejemplo n.º 7
0
        public virtual void InitDevice(READER_TYPE readerType, PLC_TYPE plcType, bool connectBarcode)
        {
            mReader = new CReader(readerType);
            mPlc    = new CPLC(plcType);

            if (connectBarcode)
            {
                mBarcode1 = new BarcodeDevice(CConfig.mScannerPort_1);
                mBarcode2 = new BarcodeDevice(CConfig.mScannerPort_2);
            }

            if (plcType == PLC_TYPE.PLC_NONE)
            {
                mReader.OnTagReported += Reader_OnTagReportedPM;
            }
            else
            {
                mReader.OnTagReported += Reader_OnTagReported;
            }
        }