public class WiFiInterface extends PrinterInterface
connectListener| Constructor and Description |
|---|
WiFiInterface() |
| Modifier and Type | Method and Description |
|---|---|
void |
connect(java.lang.Object object)
Connect printer device
连接打印机 |
void |
disConnect()
Interrupt connection
断开连接 |
ConnectStateEnum |
getConnectState()
Get connect state
获取连接状态 |
boolean |
getisAlwaysReadInputStream() |
boolean |
getIsPrinting() |
byte[] |
readMsg()
Read the messages from the printer
读取打印机的回传信息 |
void |
setAlwaysReadInputStream(boolean alwaysReadInputStream) |
void |
setPrintListener(PrintListener printListener) |
void |
writeMsg(byte[] btCmds)
Send byte array to the printer(Run in Main Thread)
发送指令到打印机(主线程中运行) |
void |
writeMsgAsync(byte[] btCmds)
Send byte array to the printer(Run in Sub-Thread)
发送指令到打印机(子线程中运行) |
getConfigObject, getmName, setConfigObject, setConnectListener, setmNamepublic void connect(java.lang.Object object)
throws java.lang.Exception
PrinterInterfaceconnect in class PrinterInterfaceobject - BluetoothEdrConfigBean, WiFiConfigBean, UsbConfigBeanjava.lang.Exceptionpublic void disConnect()
PrinterInterfacedisConnect in class PrinterInterfacepublic ConnectStateEnum getConnectState()
PrinterInterfacegetConnectState in class PrinterInterfacepublic void writeMsg(byte[] btCmds)
PrinterInterfacewriteMsg in class PrinterInterfacebtCmds - commnads , 指令public void writeMsgAsync(byte[] btCmds)
PrinterInterfacewriteMsgAsync in class PrinterInterfacebtCmds - commnads , 指令public byte[] readMsg()
PrinterInterfacereadMsg in class PrinterInterfacepublic boolean getIsPrinting()
getIsPrinting in class PrinterInterfacepublic void setPrintListener(PrintListener printListener)
setPrintListener in class PrinterInterfacepublic void setAlwaysReadInputStream(boolean alwaysReadInputStream)
setAlwaysReadInputStream in class PrinterInterfacepublic boolean getisAlwaysReadInputStream()
getisAlwaysReadInputStream in class PrinterInterface