public boolean displayText(AcrFont font, int style, int line, int position, String message) throws AcrReaderException { return displayText(font, style, line, position, font.mapString(message)); }
public List<AcrDefaultLEDAndBuzzerBehaviour> getDefaultLEDAndBuzzerBehaviour() { byte[] response; try { response = readerControl.getDefaultLEDAndBuzzerBehaviour(); } catch (RemoteException e) { throw new AcrReaderException(e); } return parseBehaviour(readInteger(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); }
public boolean setLEDs(AcrLED ... types) { byte[] response; try { int operation = serializeLEDs(types); response = readerControl.setLEDs(operation); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
acr1283LReader.lightDisplayBacklight(true); acr1283LReader.clearDisplay(); acr1283LReader.displayText(AcrFont.FontA, Typeface.BOLD, 0, 0, "Hello ACR1283L!"); acr1283LReader.displayText(AcrFont.FontB, Typeface.BOLD, 1, 0, "ABCDE 0123456789"); } else if (reader instanceof Acr1252UReader) { Acr1252UReader acr1252UReader = (Acr1252UReader) reader;
public boolean lightDisplayBacklight(boolean value) { byte[] response; try { response = readerControl.lightDisplayBacklight(value); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
@Override public byte[] transmit(int slotNum, byte[] command) { byte[] response; try { response = readerControl.transmit(slotNum, command); } catch (RemoteException e) { throw new AcrReaderException(e); } return readByteArray(response); }
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 boolean setLEDs(AcrLED ... types) { byte[] response; try { int operation = Acr1283LReader.serializeLEDs(types); response = readerControl.setLEDs(operation); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }
public List<AcrDefaultLEDAndBuzzerBehaviour> getDefaultLEDAndBuzzerBehaviour() { byte[] response; try { response = readerControl.getDefaultLEDAndBuzzerBehaviour(); } catch (RemoteException e) { throw new AcrReaderException(e); } return Acr1283LReader.parseBehaviour(readInteger(response)); }
public boolean setDefaultLEDAndBuzzerBehaviour(AcrDefaultLEDAndBuzzerBehaviour ... types) { byte[] response; try { int operation = Acr1283LReader.serializeBehaviour(types); response = readerControl.setDefaultLEDAndBuzzerBehaviour(operation); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); } @Override
public boolean setDisplayContrast(int contrast) { byte[] response; try { response = readerControl.setDisplayContrast(contrast); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); } }
@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 List<AcrAutomaticPICCPolling> getAutomaticPICCPolling() { byte[] response; try { response = readerControl.getAutomaticPICCPolling(); } catch (RemoteException e) { throw new AcrReaderException(e); } return AcrAutomaticPICCPolling.parse(readInteger(response)); }
public boolean clearDisplay() { byte[] response; try { response = readerControl.clearDisplay(); } 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 displayText(AcrFont font, int style, int line, int position, byte[] message) throws AcrReaderException { if(line < 0) { throw new IllegalArgumentException("Expected non-negative line index"); } if(position < 0) { throw new IllegalArgumentException("Expected non-negative position index"); } if(line >= font.getLines()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLines() + " lines"); } if(position + message.length > font.getLineLength()) { throw new IllegalArgumentException("Font " + font + " supports " + font.getLineLength() + " chars per line"); } if(style != Typeface.BOLD && style != Typeface.NORMAL) { throw new IllegalArgumentException("Only font styles " + Typeface.NORMAL +" and " + Typeface.BOLD + " supported"); } byte[] response; try { response = readerControl.displayText(font.getId(), style == Typeface.BOLD, line, position, message); } catch (RemoteException e) { throw new AcrReaderException(e); } return readBoolean(response); }