public class UHFManager extends java.lang.Object implements IUHFManager
Author cyd
Modifier and Type | Field and Description |
---|---|
int |
EPC
EPC area
|
int |
RESERVED
Reserved area
|
int |
TID
TID area
|
int |
USR
Usr area
|
Constructor and Description |
---|
UHFManager(android.bluetooth.BluetoothSocket mBluetoothSocket) |
Modifier and Type | Method and Description |
---|---|
void |
addTriggerKeyListener(TriggerKeyListener listener)
Monitor the trigger event of gun button
|
void |
closeSocketConnect() |
int[] |
frequenceRangeGet()
Get and set frequency point range
|
boolean |
frequenceRangeSet(int[] freqList,
int freqCnt,
boolean ifSave)
Set the frequency point range
|
int |
frequencyModeGet()
Obtain the current area frequency of the module
|
boolean |
frequencyModeSet(int freMode)
Regional settings
|
boolean |
frequencyModeSet(int freMode,
boolean flag) |
int |
getAntennaReturnLoss()
Get antenna return loss
|
java.lang.String |
getBlueToothTriggerSN()
Get Sn number of Bluetooth gun motherboard
|
java.lang.String[] |
getBTBatteryLevel()
Get whether the current gun is charged, and get the current gun power percentage,
battery[1] false means not charged,true means is charging
battery[2] Integer percentage of battery power
|
java.lang.String |
getBTHardwareVer()
Obtain the hardware version number of Bluetooth gun motherboard
|
java.lang.String |
getBTMBFirmwareVer()
Get the firmware version number of Bluetooth gun motherboard
|
boolean |
getFanSwitch()
Get whether the fan is on during inventory
|
java.lang.String |
getFirmwareVer()
Get UHF firmware version
|
java.lang.String |
getHardwareVer()
Get UHF hardware version
|
byte[] |
getInvVoiceParam()
Get buzzer parameters during counting
|
float |
getModuleTemperature()
Obtain the current temperature of the module
|
byte |
getTriggerMode()
Get the current trigger mode of the gun
|
java.lang.String |
getVersion()
Version number of the current SDK
|
java.lang.String[] |
inventoryDataGet()
Deprecated.
|
void |
inventoryDataGet(InventoryDataInfo mInvDataInfo)
Add count data return listening
|
boolean |
inventoryFilterData(int bank,
int ads,
int len,
java.lang.String data,
boolean save)
Set label filter conditions
|
int |
inventoryModeGet()
Get the mode of tag counting
|
boolean |
inventoryModeSet(int mode,
boolean save)
Set the working mode during counting
|
int[] |
inventoryTagBankGet()
Parameters for obtaining additional data returned during counting
|
boolean |
inventoryTagBankSet(int mode,
int startaddr,
int wordcnt,
boolean ifBootSave)
Attach return data when setting label counting (read-only EPC by default, no starting address and length at this time, and fill in 0)
|
int[] |
inventoryWaitTimeGet()
Get the parameters of duty cycle during counting
|
boolean |
inventoryWaitTimeSet(int scanTime,
int waitTime,
boolean save)
Set the duty cycle of counting time
|
boolean |
isInvLampInstructOpen()
Whether to turn on the indicator when getting the count
|
boolean |
killTag(java.lang.String killPwd,
int bank,
int ptr,
int cnt,
java.lang.String data)
Destroy label operation
|
boolean |
lockMen(java.lang.String accessPwd,
int bank,
int ptr,
int cnt,
java.lang.String data,
int bank1,
int lockType)
Lock label operation (temporary locking can be unlocked, and permanent unlocking cannot be locked again)
|
int |
powerGet()
Power acquisition
|
boolean |
powerSet(int power)
Power settings, saved at power down by default
|
boolean |
powerSet(int power,
boolean flag)
Power setting
|
java.lang.String |
readTag(java.lang.String accessPwd,
int bank,
int ptr,
int len,
java.lang.String data,
int bank1,
int ptr1,
int len1)
Read label operation
|
void |
removeTriggerKeyListener(TriggerKeyListener listener)
Remove the trigger event that monitors the gun key
|
boolean |
resetDefaultSetting()
Reset application settings
|
int |
sessionModeGet()
Get current session mode
|
boolean |
sessionModeSet(int sessionValue)
Set session mode
|
boolean |
sessionModeSet(int sessionValue,
boolean ifBootSave)
Set session mode
|
boolean |
setFanSwitch(boolean fanSwitch,
boolean ifBootSave)
Set the fan switch during inventory
|
boolean |
setInvLampPara(boolean isChecked,
boolean ifBootSave)
Whether the indicator light is turned on during counting
|
boolean |
setInvVoiceParam(boolean ifOpenVoice,
int voiceLevel,
boolean ifBootSave)
Set whether to turn on the buzzer and the sound frequency during counting
|
boolean |
startInventoryTag()
Start counting label
|
boolean |
stopInventory()
Stop counting tab
|
boolean |
unlockMen(java.lang.String accessPwd,
int bank,
int ptr,
int cnt,
java.lang.String data,
int bank1,
int lockType)
Unlock label operation
|
void |
updateBluetoothSocket(android.bluetooth.BluetoothSocket mBluetoothSocket) |
boolean |
updateBTMainBoard(java.lang.String path,
java.lang.String fileName)
Update Bluetooth motherboard firmware
|
boolean |
updateFirmware(java.lang.String path,
java.lang.String fileName)
Update UHF module firmware
|
boolean |
writeDataToEpc(java.lang.String pwd,
int ads,
int len,
java.lang.String EpcData)
Write data to the EPC area of the tag (without filtering)
|
boolean |
writeTag(java.lang.String accessPwd,
int bank,
int ptr,
int len,
java.lang.String data,
int bank1,
int ptr1,
int len1,
java.lang.String data1)
Write label operation
|
public final int RESERVED
public final int EPC
public final int TID
public final int USR
public void updateBluetoothSocket(android.bluetooth.BluetoothSocket mBluetoothSocket)
public void closeSocketConnect()
public void inventoryDataGet(InventoryDataInfo mInvDataInfo)
mInvDataInfo
- Listening events for counting datapublic void addTriggerKeyListener(TriggerKeyListener listener)
listener
- Listening eventspublic void removeTriggerKeyListener(TriggerKeyListener listener)
listener
- Listening eventspublic java.lang.String getVersion()
getVersion
in interface IUHFManager
public boolean powerSet(int power)
powerSet
in interface IUHFManager
power
- Power value(5~33)public boolean powerSet(int power, boolean flag)
power
- Power value(5~33)flag
- Whether to save the configuration after power failure. True to save, false not to savepublic int powerGet()
powerGet
in interface IUHFManager
public boolean frequencyModeSet(int freMode)
frequencyModeSet
in interface IUHFManager
freMode
- 0:china1(840-845MHz),1:china2(920-925MHz),2:EUR(865-868MHz), 3:USA(902-928MHz)public boolean frequencyModeSet(int freMode, boolean flag)
freMode
- 0:china1(840-845MHz),1:china2(920-925MHz),2:EUR(865-868MHz), 3:USA(902-928MHz)flag
- Whether to save the configuration after power failure. True to save, false not to savepublic int frequencyModeGet()
frequencyModeGet
in interface IUHFManager
frequencyModeSet(int, boolean)
Valuepoint fre modepublic java.lang.String getFirmwareVer()
getFirmwareVer
in interface IUHFManager
public java.lang.String getBTMBFirmwareVer()
public java.lang.String getHardwareVer()
getHardwareVer
in interface IUHFManager
public java.lang.String getBTHardwareVer()
public boolean updateFirmware(java.lang.String path, java.lang.String fileName)
updateFirmware
in interface IUHFManager
path
- Firmware storage pathfileName
- Firmware name (must start with "UM",otherwise will return -1)public boolean updateBTMainBoard(java.lang.String path, java.lang.String fileName)
path
- Firmware storage pathfileName
- Firmware name (must start with "UR",otherwise will return -1)public float getModuleTemperature()
getModuleTemperature
in interface IUHFManager
public int getAntennaReturnLoss()
getAntennaReturnLoss
in interface IUHFManager
public boolean startInventoryTag()
startInventoryTag
in interface IUHFManager
public boolean stopInventory()
stopInventory
in interface IUHFManager
@Deprecated public java.lang.String[] inventoryDataGet()
inventoryDataGet
in interface IUHFManager
public boolean inventoryModeSet(int mode, boolean save)
inventoryModeSet
in interface IUHFManager
mode
- 0: multi label mode, focusing on reading full labels, 1: fast disk mode, focusing on fast reading labels, 2: low power mode, 3: multi label mode V2, 4: adaptive modesave
- True power down to save the configuration, false do not savepublic int inventoryModeGet()
inventoryModeGet
in interface IUHFManager
inventoryModeSet(int, boolean)
parameter mode other values failedpublic boolean inventoryWaitTimeSet(int scanTime, int waitTime, boolean save)
inventoryWaitTimeSet
in interface IUHFManager
scanTime
- Time of inventorywaitTime
- Sleep timesave
- Power down and savepublic int[] inventoryWaitTimeGet()
inventoryWaitTimeGet
in interface IUHFManager
public java.lang.String readTag(java.lang.String accessPwd, int bank, int ptr, int len, java.lang.String data, int bank1, int ptr1, int len1)
readTag
in interface IUHFManager
accessPwd
- Access password in the reserved area of the labelbank
- For the storage area of the label to be filtered, seeRESERVED
,EPC
,TID
,USR
ptr
- Filtered start address (bit type)len
- Filtered data length (bit type)data
- Data to be filteredbank1
- Label storage area to be read, seeRESERVED
,EPC
,TID
,USR
ptr1
- Read from address (word type)len1
- Read data length (word type, greater than 0)public boolean writeDataToEpc(java.lang.String pwd, int ads, int len, java.lang.String EpcData)
writeDataToEpc
in interface IUHFManager
pwd
- Access password in the reserved area of the labelads
- Start of writelen
- Length of written data (word type, greater than 0)EpcData
- Data to be written (hexadecimal)public boolean writeTag(java.lang.String accessPwd, int bank, int ptr, int len, java.lang.String data, int bank1, int ptr1, int len1, java.lang.String data1)
writeTag
in interface IUHFManager
accessPwd
- Access password in the reserved area of the labelbank
- The storage area of filtered labels, seeRESERVED
,EPC
,TID
,USR
ptr
- Filtered start address (bit type)len
- Filtered data length (bit type)data
- Data to be filteredbank1
- For the label storage area to be written, seeRESERVED
,EPC
,TID
,USR
ptr1
- Start address written (word type), note:1word =2byte=16bitlen1
- Length of data written (word type, greater than 0)data1
- Specific data writtenpublic boolean lockMen(java.lang.String accessPwd, int bank, int ptr, int cnt, java.lang.String data, int bank1, int lockType)
lockMen
in interface IUHFManager
accessPwd
- Access password in the reserved area of the labelbank
- Label storage area, seeRESERVED
,EPC
,TID
,USR
ptr
- Filtered start address (bit type)cnt
- Filtered data length (bit type)data
- Data to be filteredbank1
- Lock the specified area, seeRESERVED
,EPC
,TID
,USR
lockType
- Lock type: 0 -- normal lock, can be unlocked; 1 -- permanent lock, and cannot be unlocked even if the password is correctpublic boolean unlockMen(java.lang.String accessPwd, int bank, int ptr, int cnt, java.lang.String data, int bank1, int lockType)
unlockMen
in interface IUHFManager
accessPwd
- Access password in the reserved area of the labelbank
- Label storage area, seeRESERVED
,EPC
,TID
,USR
ptr
- Filtered start address (bit type)cnt
- Filtered data length (bit type)data
- Data to be filteredbank1
- Unlock the specified area, seeRESERVED
,EPC
,TID
,USR
lockType
- Lock type: 0 -- normal lock, can be unlocked; 1 -- permanent lock, and cannot be unlocked even if the password is correctpublic boolean killTag(java.lang.String killPwd, int bank, int ptr, int cnt, java.lang.String data)
killTag
in interface IUHFManager
killPwd
- Kill password in the reserved area of the labelbank
- Label storage area, seeRESERVED
,EPC
,TID
,USR
ptr
- Start position of filtering (bit type)cnt
- Length of filtered data (bit type)data
- Data for filteringpublic boolean inventoryFilterData(int bank, int ads, int len, java.lang.String data, boolean save)
inventoryFilterData
in interface IUHFManager
bank
- Storage area to be filtered,See detailsRESERVED
,EPC
,TID
,USR
ads
- Filter start address (bit type)len
- Filter data length (bit type)data
- Data used to filtersave
- Whether to save after power failurepublic boolean frequenceRangeSet(int[] freqList, int freqCnt, boolean ifSave)
frequenceRangeSet
in interface IUHFManager
freqCnt
- Number of frequency pointsfreqList
- Frequency point valueifSave
- Power down and savepublic int[] frequenceRangeGet()
frequenceRangeGet
in interface IUHFManager
public boolean sessionModeSet(int sessionValue)
sessionModeSet
in interface IUHFManager
sessionValue
- The value of session mode. 0 ~ 3 indicates S 0 to s 3public boolean sessionModeSet(int sessionValue, boolean ifBootSave)
sessionValue
- The value of session mode. 0 ~ 3 indicates S 0 to s 3ifBootSave
- True power down to save the configuration, false do not savepublic int sessionModeGet()
sessionModeGet
in interface IUHFManager
public boolean inventoryTagBankSet(int mode, int startaddr, int wordcnt, boolean ifBootSave)
inventoryTagBankSet
in interface IUHFManager
mode
- 0:Read only EPC,
1:Read EPC + TID (TID fixed read 12 bytes),
2:Reading EPC + usr means reading label EPC and usr data at the same time. The reading range of usr is based on startaddr and wordcnt
3:Read EPC + TID + usr (TID is fixed to read 12 bytes, and the reading range of usr is based on startaddr and wordcnt),
4:Read EPC + TID + RFU, TID reads 12 bytes, and RFU reads the first 8 bytes (the first 4 bytes are kill PWD, and the last 4 bytes are access PWD),
5:Read EPC + RFU. The reading range of RFU is based on startaddr and wordcntstartaddr
- The starting address of additional data is wordwordcnt
- Length in wordifBootSave
- True power down to save the configuration, false do not savepublic int[] inventoryTagBankGet()
inventoryTagBankGet
in interface IUHFManager
inventoryTagBankSet(int, int, int, boolean)
mode parameter,
int[1]reference resources inventoryTagBankSet(int, int, int, boolean)
startaddr parameter,
int[2]reference resources inventoryTagBankSet(int, int, int, boolean)
mwordcnt parameter,public boolean resetDefaultSetting()
resetDefaultSetting
in interface IUHFManager
public java.lang.String[] getBTBatteryLevel()
public boolean setInvVoiceParam(boolean ifOpenVoice, int voiceLevel, boolean ifBootSave)
ifOpenVoice
- Buzzer switch: true on, false offvoiceLevel
- Buzzer sound frequency: 0: high, 1: medium, 2: lowifBootSave
- True power down to save the configuration, false do not savepublic byte[] getInvVoiceParam()
public boolean setInvLampPara(boolean isChecked, boolean ifBootSave)
isChecked
- True on, false offifBootSave
- True power down to save the configuration, false do not savepublic boolean isInvLampInstructOpen()
public boolean getFanSwitch()
public boolean setFanSwitch(boolean fanSwitch, boolean ifBootSave)
fanSwitch
- True on, false offifBootSave
- True power down to save the configuration, false do not savepublic byte getTriggerMode()
public java.lang.String getBlueToothTriggerSN()