|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectamlib.hw.HardwareInterface
public class HardwareInterface
Constructor Summary | |
---|---|
HardwareInterface(HWType Type)
Constructor |
Method Summary | |
---|---|
boolean |
Close()
To close hardware interface |
HWType |
getHWType()
To get the Hardware type |
int |
getMaxRxPkLength()
To get maximum data length for each Rx packet. |
int |
getMaxTxPkLength()
To get maximum data length for each Tx packet. |
java.lang.Object |
getmDevObj()
To get the casted hardware interface instance (UsbDevice for instance)which has been stored |
boolean |
getSerialNumber(byte[] pBuff,
byte[] Len)
|
boolean |
Init(android.hardware.usb.UsbManager Manager,
android.hardware.usb.UsbDevice Device)
To initial the hardware for communication |
boolean |
IsDevSet()
|
boolean |
Rx(byte[] pBuff,
int[] Len)
To receive data from hardware interface |
boolean |
Tx(byte[] pBuff,
int Len)
To transfer data to hardware interface |
boolean |
usbGetDesc(byte[] pDesc,
int requestType,
int request,
int value,
int index,
byte[] pBuffer,
int[] pLength)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HardwareInterface(HWType Type)
Type
- Type of hardware, eUSB is the only option currently.HWType
Method Detail |
---|
public boolean Init(android.hardware.usb.UsbManager Manager, android.hardware.usb.UsbDevice Device) throws java.lang.IllegalArgumentException
Manager
- UsbManagerDevice
- UsbDevice which smart card belong to
java.lang.IllegalArgumentException
UsbManager
,
UsbDevice
public boolean Close()
public boolean Tx(byte[] pBuff, int Len) throws java.io.IOException, java.lang.IllegalArgumentException
pBuff
- data to transfer, the length of pBuffer is specified in parameter 'Len'Len
- length of data to transfer
java.io.IOException
java.lang.IllegalArgumentException
public boolean Rx(byte[] pBuff, int[] Len) throws java.io.IOException, java.lang.IllegalArgumentException
pBuff
- data to receive. Be aware that providing a buffer with enough size.Len
- length of received data
java.io.IOException
java.lang.IllegalArgumentException
public boolean getSerialNumber(byte[] pBuff, byte[] Len) throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public boolean usbGetDesc(byte[] pDesc, int requestType, int request, int value, int index, byte[] pBuffer, int[] pLength)
public java.lang.Object getmDevObj()
Object
public boolean IsDevSet()
public HWType getHWType()
HWType
public int getMaxTxPkLength()
public int getMaxRxPkLength()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |