public boolean setLEDs(AcrLED ... types) { byte[] response; try { int operation = 0; for(AcrLED type : types) { if(type == AcrLED.GREEN) { operation |= LED_GREEN; } else if(type == AcrLED.RED) { operation |= LED_RED; } else { throw new IllegalArgumentException("LED " + type + " not supported"); } } response = readerControl.setLEDs(operation); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean setPICC(AcrPICC ... types) { int picc = 0; for(AcrPICC type : types) { switch(type) { case POLL_ISO14443_TYPE_A:{ picc |= POLL_ISO14443_TYPE_A; break; } case POLL_ISO14443_TYPE_B: { picc |= POLL_ISO14443_TYPE_B; break; } default : { throw new IllegalArgumentException("Unexpected PICC " + type); } } } byte[] response; try { response = readerControl.setPICC(picc); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean setAutomaticPICCPolling(AcrAutomaticPICCPolling ... types) { byte[] response; try { response = readerControl.setAutomaticPICCPolling(AcrAutomaticPICCPolling.serialize(types)); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public boolean setDefaultLEDAndBuzzerBehaviour(AcrDefaultLEDAndBuzzerBehaviour ... types) { byte[] response; try { int operation = serializeBehaviour(types); response = readerControl.setDefaultLEDAndBuzzerBehaviour(operation); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); } }