Class of UsbPrinter implement.
More...
|
|
| UsbPrinter (Context context) |
| |
| void | selectPrinter (UsbDevice device) |
| | Select external usb printer. More...
|
| |
| void | selectBuiltInPrinter () |
| | Select built-in printer. More...
|
| |
| void | open () throws SmartPosException |
| | Open printer and request permission. More...
|
| |
| void | close () throws SmartPosException |
| | Close printer. More...
|
| |
| int | read (byte[] buf, int len) throws SmartPosException |
| | Read data from printer(timeout 1s) More...
|
| |
| void | write (byte[] buf, int len) throws SmartPosException |
| | Write data to printer(timeout 1s) More...
|
| |
| int | getType () |
| | Get the printer type. More...
|
| |
| int | read (byte[] buf, int len, int timeout) throws SmartPosException |
| | Read data from printer. More...
|
| |
| void | write (byte[] buf, int len, int timeout) throws SmartPosException |
| | Write data to printer. More...
|
| |
| List< UsbDevice > | getPrinterList () |
| | Get all usb printer. More...
|
| |
Class of UsbPrinter implement.
◆ close()
| void com.paydevice.smartpos.sdk.printer.UsbPrinter.close |
( |
| ) |
throws SmartPosException |
◆ getPrinterList()
| List<UsbDevice> com.paydevice.smartpos.sdk.printer.UsbPrinter.getPrinterList |
( |
| ) |
|
Get all usb printer.
- Returns
- UsbDevice list of all usb printer
◆ getType()
| int com.paydevice.smartpos.sdk.printer.UsbPrinter.getType |
( |
| ) |
|
◆ open()
◆ read() [1/2]
| int com.paydevice.smartpos.sdk.printer.UsbPrinter.read |
( |
byte[] |
buf, |
|
|
int |
len |
|
) |
| throws SmartPosException |
◆ read() [2/2]
| int com.paydevice.smartpos.sdk.printer.UsbPrinter.read |
( |
byte[] |
buf, |
|
|
int |
len, |
|
|
int |
timeout |
|
) |
| throws SmartPosException |
Read data from printer.
- Parameters
-
| buf | data buffer |
| len | data len |
| timeout | timeout in ms |
- Returns
◆ selectBuiltInPrinter()
| void com.paydevice.smartpos.sdk.printer.UsbPrinter.selectBuiltInPrinter |
( |
| ) |
|
◆ selectPrinter()
| void com.paydevice.smartpos.sdk.printer.UsbPrinter.selectPrinter |
( |
UsbDevice |
device | ) |
|
Select external usb printer.
- Parameters
-
- Returns
◆ write() [1/2]
| void com.paydevice.smartpos.sdk.printer.UsbPrinter.write |
( |
byte[] |
buf, |
|
|
int |
len |
|
) |
| throws SmartPosException |
◆ write() [2/2]
| void com.paydevice.smartpos.sdk.printer.UsbPrinter.write |
( |
byte[] |
buf, |
|
|
int |
len, |
|
|
int |
timeout |
|
) |
| throws SmartPosException |
Write data to printer.
- Parameters
-
| buf | data buffer |
| len | data len |
| timeout | timeout in ms |
- Returns
The documentation for this class was generated from the following file: