public class Module
extends java.lang.Object
注意:
1、使用前请确认您的机器已安装此模块。
2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件。
3、在操作设备前需要调用 init(int)
打开设备,使用完后调用 free()
关闭设备
Note:
1, please confirm that your machine has installed this module before use.
2, for normal use of the module need to place libDeviceAPI.so file under below path: \ libs \ armeabi \ directory
3, Before use of the device, call b> open the device, call b> to close the device.
限定符和类型 | 方法和说明 |
---|---|
boolean |
free()
释放模块
Release the module |
static Module |
getInstance()
获取操作实例
Get instance |
boolean |
init(int module)
初始化模块
Initialize the module |
boolean |
init(int module,
int baudrate)
初始化模块
Initialize the module |
boolean |
powerOff(int module)
已过时。
|
boolean |
powerOn(int module)
已过时。
|
byte[] |
receive()
接收数据
Receive data. |
boolean |
send(byte[] data)
发送数据
Send data. |
boolean |
uartSwitch_module(int module)
已过时。
|
public static Module getInstance() throws ConfigurationException
ConfigurationException
@Deprecated public boolean powerOn(int module)
module
- 模块编号 1、1D(9600) 2、RFID(115200) 3、UHF(115200) 4、Finger(57600) 5、OBD @Deprecated public boolean powerOff(int module)
module
- 模块编号 1、1D(9600) 2、RFID(115200) 3、UHF(115200) 4、Finger(57600)@Deprecated public boolean uartSwitch_module(int module)
module
- 模块编号 模块编号 2、RFID(115200) 4、Finger(57600),5、OBD(9600) ,7、北斗(9600)
Module number : 2、RFID(115200) 4、Finger(57600),5、OBD(9600) ,7、Beidou(9600)public boolean init(int module)
module
- 模块编号 模块编号 1、1D(9600) 2、RFID(115200) 3、UHF(115200) 4、Finger(57600)5、OBD public boolean init(int module, int baudrate)
module
- 模块编号 模块编号 1、1D(9600) 2、RFID(115200) 3、UHF(115200) 4、Finger(57600)5、OBD baudrate
- 自定义波特率 public boolean free()
public boolean send(byte[] data)
data
- 数据 public byte[] receive()