public class Command extends 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.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
|
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) |
Connecter |
getConnecter() |
boolean |
isCashUseful()
Whether the cash is available.
|
boolean |
isConnected()
Whether peripheral is connected
|
boolean |
openCashDrawer(CashDrawerConnection connection,
int level)
Open the cash.
|
void |
setConnecter(Connecter connecter)
Set up the connector.
|
public Connecter getConnecter()
public void setConnecter(Connecter connecter) throws NullPointerException, IllegalArgumentException
connecter
- ConnectorNullPointerException,IllegalArgumentException
NullPointerException
IllegalArgumentException
public int connect(Connecter connecter) throws IOException
connecter
- Peripheral InterfaceIOException
- IO exceptionConnecter.NOT_PERMISSION
,
Connecter.STATE_NONE
,
Connecter.STATE_CONNECTED
public void connect(android.content.Context context, Observer observer) throws IOException
IOException
public boolean isConnected()
public int close()
public boolean isCashUseful()
public boolean openCashDrawer(CashDrawerConnection connection, int level)
level
- Pulse level.level range: 1~3