Package uk.co.nimp.scard

Examples of uk.co.nimp.scard.MP300Exception


    static void SCardForceDisconnection(int deviceId, int couplerId) throws MP300Exception {
        setDeviceId(deviceId);
        //int status = win32Mp300ComDll.MPS_CouplerAbort(couplerId);//more complicate to use, we need to use OpenComm and CloseComm
        int status = win32Mp300ComDll.AbortCoupler(couplerId,null);
        if (RET_OK != status) {
            throw new MP300Exception("AbortCoupler failed",status);
        }
    }
View Full Code Here


                break;
            case CRET_ABSENT:
                out = GenericTerminal.State.CARD_ABSENT;
                break;
            default:
                throw new MP300Exception("MPS_CardDetect failed", status);
        }
        return out;
    }
View Full Code Here

        System.out.println("Start batch:");
        System.out.println(debug);
        for(int i=1;i<=nRun;i++){
            status=win32Mp300ComDll.MPS_ExecuteBatch(batchId, BATCH_EXECUTE_STOP_ON_ERROR, pdwFaultyLine);
            if (RET_OK != status) {
                throw new MP300Exception("Batch iteration "+i+": MPS_ExecuteBatch returned " + status + "\n" +
                        "pdwFaultyLine="+pdwFaultyLine.getValue(), status);
            }
            if(0==(i%25))
                System.out.print(".");
            if(0==(i%1000))
                System.out.println(i+" iterations done");
        }
        status=win32Mp300ComDll.MPS_CloseBatch(batchId);
        if (RET_OK != status) {
            throw new MP300Exception("MPS_CloseBatch returned " + status, status);
        }
        if(0!=(nRun%10))
            System.out.println(nRun+" iterations done");
        System.out.println("Batch terminated succesfully");
    }
View Full Code Here

TOP

Related Classes of uk.co.nimp.scard.MP300Exception

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.