public class RFIDWithISO15693
extends java.lang.Object
注意:
1、使用前请确认您的机器已安装此模块。
2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
3、在操作设备前需要调用 init()
打开设备,使用完后调用 free()
关闭设备
Note:
? * 1, Please confirm that your machine has installed this module before use.
? * 2, For the normal use of the module need to place the libDeviceAPI.so file under below pathto \ libs \ armeabi \ directory.
? * 3, Before operation, you need to call b> open the device, use the call after the b> to close the device.
Modifier and Type | Class and Description |
---|---|
static class |
RFIDWithISO15693.TagType
标签类型
Tag type |
Modifier and Type | Method and Description |
---|---|
boolean |
free()
释放rfid模块
Release the RFID module |
char[] |
genericFunction(char command,
char[] databuf,
char datalen) |
static RFIDWithISO15693 |
getInstance()
获取ISO15693协议操作实例
Get instance for RFID with 15693 protocol |
java.lang.String |
getVersion()
Deprecated.
|
boolean |
init()
初始化rfid模块
Initialize RFID module |
ISO15693Entity |
inventory()
读卡
Read tag |
boolean |
isPowerOn()
判断设备是否上电
Detect whether device is powered on or not. |
boolean |
lockAFI()
锁定AFI
Lock AFI |
boolean |
lockDSFID()
锁定DSFID
Lock DSFID. |
ISO15693Entity |
read(int block)
读取块数据
Read block data |
boolean |
rfidUpgrade(int packageCount,
int index,
int currSize,
byte[] data)
固件升级
RFID firmware upgrade |
boolean |
write(int block,
java.lang.String hexData)
写卡
Wrtie Card |
boolean |
writeAFI(int iAFI)
写入AFI
Write AFI. |
boolean |
writeDSFID(int iDSFID)
写入DSFID
Write DSFID. |
public static RFIDWithISO15693 getInstance() throws ConfigurationException
ConfigurationException
- 配置错误异常public ISO15693Entity inventory()
public ISO15693Entity read(int block) throws RFIDReadFailureException
block
- 块区RFIDReadFailureException
- 读卡失败异常public boolean write(int block, java.lang.String hexData) throws RFIDNotFoundException
block
- 块区hexData
- 十六进制数据RFIDNotFoundException
- 寻卡失败异常public boolean writeAFI(int iAFI) throws RFIDNotFoundException
iAFI
- AFI值RFIDNotFoundException
- 寻卡失败异常public boolean lockAFI() throws RFIDNotFoundException
RFIDNotFoundException
public boolean writeDSFID(int iDSFID) throws RFIDNotFoundException
iDSFID
- DSFID值RFIDNotFoundException
- 寻卡失败异常public boolean lockDSFID() throws RFIDNotFoundException
RFIDNotFoundException
- 寻卡失败异常public char[] genericFunction(char command, char[] databuf, char datalen)
command
- 命令databuf
- 数据datalen
- 数据长度public boolean init()
public boolean free()
@Deprecated public java.lang.String getVersion()
public boolean rfidUpgrade(int packageCount, int index, int currSize, byte[] data)
packageCount
- 包的数量 index
- 当前为第几个包 currSize
- 当前包大小 data
- 包数据 public boolean isPowerOn()