예제 #1
0
        /**
         * Initialize PDCX control with servers
         * and response timeout
         */
        protected bool initDevice()
        {
            if (ax_control == null)
            {
                ax_control = new DsiPDCX();
                ax_control.ServerIPConfig(server_list, 0);
                ax_control.SetResponseTimeout(CONNECT_TIMEOUT);
                InitPDCX();
            }
            lock (pdcLock) {
                if (pdc_active)
                {
                    ax_control.CancelRequest();
                }
            }
            if (rba != null)
            {
                rba.SetParent(this.parent);
                rba.SetVerbose(this.verbose_mode);
                rba.stubStart();
            }

            return(true);
        }
예제 #2
0
        /**
         * Initialize EMVX control with servers
         * and response timeout
         */
        protected bool initDevice()
        {
            if (pdc_ax_control == null)
            {
                pdc_ax_control = new DsiPDCX();
                pdc_ax_control.ServerIPConfig(server_list, 0);
                pdc_ax_control.SetResponseTimeout(CONNECT_TIMEOUT);
                InitPDCX();
            }
            if (emv_active.WaitOne(0) == false)
            {
                Console.WriteLine("Reset PDC");
                pdc_ax_control.CancelRequest();
            }

            if (emv_ax_control == null)
            {
                emv_ax_control = new DsiEMVX();
            }
            if (pdc_active.WaitOne(0) == false)
            {
                Console.WriteLine("Reset EMV");
                PadReset();
            }

            if (rba != null)
            {
                rba.SetParent(this.parent);
                rba.SetVerbose(this.verbose_mode);
                try {
                    rba.stubStart();
                } catch (Exception) {}
            }

            return(true);
        }