Ejemplo n.º 1
0
        /**
         * Initialize EMVX control with servers
         * and response timeout
         */
        protected bool ReInitDevice()
        {
            if (pdc_ax_control == null)
            {
                pdc_ax_control = new DsiPDCX();
                pdc_ax_control.ServerIPConfig(server_list, 0);
                pdc_ax_control.SetResponseTimeout(CONNECT_TIMEOUT);
                InitPDCX();
            }
            lock (pdcLock) {
                if (pdc_active)
                {
                    Console.WriteLine("Reset PDC");
                    pdc_ax_control.CancelRequest();
                    pdc_active = false;
                }
            }

            if (emv_ax_control == null)
            {
                emv_ax_control = new DsiEMVX();
            }
            FlaggedReset();

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

            return(true);
        }
Ejemplo n.º 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);
                InitPDCX();
            }
            pdc_ax_control.CancelRequest();

            if (emv_ax_control == null)
            {
                emv_ax_control = new DsiEMVX();
            }
            PadReset();

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

            return(true);
        }
Ejemplo n.º 3
0
        /**
         * Initialize EMVX control with servers
         * and response timeout
         */
        protected bool ReInitDevice()
        {
            if (pdc_ax_control == null)
            {
                pdc_ax_control = new DsiPDCX();
                pdc_ax_control.ServerIPConfig(server_list, 0);
                pdc_ax_control.SetResponseTimeout(CONNECT_TIMEOUT);
                InitPDCX();
            }
            lock (pdcLock) {
                if (pdc_active)
                {
                    Console.WriteLine("Reset PDC");
                    pdc_ax_control.CancelRequest();
                    pdc_active = false;
                }
            }

            /*
             * lock (emvLock) {
             *  if (emv_active) {
             *      try {
             *          Console.WriteLine("Reset EMV");
             *          emv_ax_control.CancelRequest();
             *          emv_active = false;
             *      } catch (Exception) {
             *          // I assume this will through if either the ActiveX DLL
             *          // was generated against an older OCX that doesn't have
             *          // this method or if the DLL has the method but the
             *          // OCX does not. OCX v1.22+ should have the method.
             *      }
             *  }
             * }
             */

            if (emv_ax_control == null)
            {
                emv_ax_control = new DsiEMVX();
            }
            FlaggedReset();

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

            return(true);
        }
Ejemplo n.º 4
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);
            InitPDCX();
        }
        pdc_ax_control.CancelRequest();

        if (emv_ax_control == null) {
            emv_ax_control = new DsiEMVX();
        }
        PadReset();

        return true;
    }
Ejemplo n.º 5
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);
                InitPDCX();
            }
            pdc_ax_control.CancelRequest();

            if (emv_ax_control == null)
            {
                emv_ax_control = new DsiEMVX();
            }
            PadReset();

            return(true);
        }
Ejemplo n.º 6
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();
            }
            lock (pdcLock) {
                if (pdc_active)
                {
                    Console.WriteLine("Reset PDC");
                    pdc_ax_control.CancelRequest();
                }
            }

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

            if (rba == null)
            {
                if (device_identifier == "INGENICOISC250_MERCURY_E2E")
                {
                    rba = new RBA_Stub("COM" + com_port);
                    rba.SetParent(this.parent);
                    rba.SetVerbose(this.verbose_mode);
                    rba.SetEMV(true);
                }
            }

            if (rba != null)
            {
                try {
                    rba.stubStart();
                } catch (Exception) {}
            }

            return(true);
        }
Ejemplo n.º 7
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();
        }

        /* see if terminal is more consistent
        if (rba != null) {
            rba.SetParent(this.parent);
            rba.SetVerbose(this.verbose_mode);
            try {
                rba.stubStart();
            } catch (Exception) {}
        }
        */

        return true;
    }
Ejemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the 
 /// <see cref="EmvWrapper"/> class
 /// </summary>
 public EmvWrapper()
 {
     this.control = new DsiEMVX();
 }