public class PSAM
extends java.lang.Object
注意:
Attention:
1、使用前请确认您的机器已安装此模块。
1. Make sure this module is installed before using your device.
2、要正常使用模块需要在\libs\armeabi\目录放置libDeviceAPI.so文件
2. Put libDeviceAPI.so file in directory \libs\armeabi\ then module can be used normally.
3、在操作设备前需要调用 init()
打开设备,使用完后调用 free()
关闭设备
3. Call init()
to switch on device before operating the device, call free()
to switch off device after using.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
executeCmd(java.lang.String hexCmd,
java.lang.String hexData)
执行PSAM命令
Execute PSAM command |
boolean |
free()
释放PSAM
Release PSAM |
static PSAM |
getInstance()
获取PSAM操作实例
Acquire PSAM operation Instance |
boolean |
init()
初始化PSAM
Initialize PSAM |
boolean |
isPowerOn()
判断设备是否上电
Judge the device is powered on or not. |
boolean |
Upgrade(int packageCount,
int index,
int currSize,
byte[] data)
固件升级
Firmware upgrade |
public static PSAM getInstance()
public boolean init()
public boolean free()
public java.lang.String executeCmd(java.lang.String hexCmd, java.lang.String hexData)
hexCmd
- 十六进制命令codehexData
- 十六进制命令内容public boolean Upgrade(int packageCount, int index, int currSize, byte[] data)
packageCount
- 包的数量index
- 当前为第几个包currSize
- 当前包大小data
- 包数据public boolean isPowerOn()