public class Command
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Command.CHARACTER_SET
International character set
|
static class |
Command.ENABLE |
static class |
Command.FONT
Font mode
|
static class |
Command.FOOT
Pin NO.
|
static class |
Command.HEIGHT_ZOOM
Character vertical magnification
|
static class |
Command.HRI_POSITION
Barcode recognizes character position
|
static class |
Command.ImageAlgorithm
Bitmap processing algorithm
|
static class |
Command.JUSTIFICATION
Alignment mode
|
static class |
Command.STATUS
Printer status request
|
static class |
Command.UNDERLINE_MODE
Underline mode
|
static class |
Command.WIDTH_ZOOM
Character horizontal magnification
|
Modifier and Type | Field and Description |
---|---|
protected Connecter |
mConnecter |
protected android.app.Activity |
mContext |
Constructor and Description |
---|
Command() |
Modifier and Type | Method and Description |
---|---|
int |
close()
Close IO
|
int |
connect(Connecter connecter)
Connecting peripherals
|
void |
connect(android.content.Context context,
Observer observer)
Connecting peripherals
|
Connecter |
getConnecter() |
boolean |
isConnected()
Whether peripheral is connected
|
boolean |
openCashDrawer(CashDrawerConnection connection,
int level)
Open the cash.
|
void |
setConnecter(Connecter connecter)
Set up the connector.
|
protected volatile Connecter mConnecter
protected android.app.Activity mContext
public Connecter getConnecter()
public void setConnecter(Connecter connecter) throws java.lang.NullPointerException, java.lang.IllegalArgumentException
connecter
- ConnectorNullPointerException,IllegalArgumentException
java.lang.NullPointerException
java.lang.IllegalArgumentException
public int connect(Connecter connecter) throws java.io.IOException
connecter
- Peripheral Interfacejava.io.IOException
- IO exceptionConnecter.NOT_PERMISSION
,
Connecter.STATE_NONE
,
Connecter.STATE_CONNECTED
public void connect(android.content.Context context, Observer observer) throws java.io.IOException
context
- Application contextobserver
- Connect state callbackjava.io.IOException
- IO exceptionpublic boolean isConnected()
public int close()
public boolean openCashDrawer(CashDrawerConnection connection, int level)
level
- Pulse level.level range: 1~3