@Override public void writeToParcel(Parcel dest, int flags) { dest.writeString(name); dest.writeStrongBinder(readerControl.asBinder()); }
@Override public byte[] control(int slotNum, int controlCode, byte[] command) { byte[] response; try { response = readerControl.control(slotNum, controlCode, command); } catch (RemoteException e) { throw new AcrReaderException(e); } return readByteArray(response); }
public boolean getExclusiveMode() { byte[] response; try { response = readerControl.getExclusiveMode(); } catch (RemoteException e) { throw new AcrReaderException(e); } byte[] resultByteArray = readByteArray(response); return resultByteArray[1] != 0; }
public List<AcrLED> getLEDs() { byte[] response; try { response = readerControl.getLEDs(); } catch (RemoteException e) { throw new AcrReaderException(e); } List<AcrLED> leds = new ArrayList<AcrLED>(); if((response[0] & LED_RED) != 0) { leds.add(AcrLED.RED); } if((response[0] & LED_GREEN) != 0) { leds.add(AcrLED.GREEN); } return leds; }
public List<AcrPICC> getPICC() { byte[] response; try { response = readerControl.getPICC(); } catch (RemoteException e) { throw new AcrReaderException(e); } int operation = readInteger(response); ArrayList<AcrPICC> values = new ArrayList<AcrPICC>(); if((operation & POLL_ISO14443_TYPE_B) != 0) { values.add(AcrPICC.POLL_ISO14443_TYPE_B); } if((operation & POLL_ISO14443_TYPE_A) != 0) { values.add(AcrPICC.POLL_ISO14443_TYPE_A); } return values; }
public String getFirmware() throws AcrReaderException { byte[] response; try { response = readerControl.getFirmware(); } catch (RemoteException e) { throw new AcrReaderException(e); } return readString(response); }
public List<AcrDefaultLEDAndBuzzerBehaviour> getDefaultLEDAndBuzzerBehaviour() { byte[] response; try { response = readerControl.getDefaultLEDAndBuzzerBehaviour(); } catch (RemoteException e) { throw new AcrReaderException(e); } return parseBehaviour(readInteger(response)); }
public List<AcrAutomaticPICCPolling> getAutomaticPICCPolling() { byte[] response; try { response = readerControl.getAutomaticPICCPolling(); } catch (RemoteException e) { throw new AcrReaderException(e); } return AcrAutomaticPICCPolling.parse(readInteger(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); } }