public class HT730Reader extends BaseReader implements com.unitech.lib.device.IDeviceEventListener
_actionState, _baseDevice, _baseTransport, _baseUHF, _checkInterval, _failCount, _fwVersion, _isDisconnecting, _lastError, _serialNo, DEFAULT_BATTERY_CHECK_INTERVAL, mLastTime, RETRY_COUNT, TAG
Constructor and Description |
---|
HT730Reader(Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
connect()
An instance of the BaseReader class tries to connect to the configured address
|
void |
destroy()
Destroys an instance of the BaseReader class and cleans up resources.
|
void |
disconnect()
Causes an instance of the BaseReader class to disconnect from the connected device.
|
ResultCode |
factoryReset()
Reset the device to factory default.
|
int |
getAutoOffTime()
Returns the time which the instrument automatically turns off.
|
int[] |
getAutoOffTimeList()
Returns the equipment supports auto off time list, the unit is minutes
|
int |
getBatteryState()
Returns the battery state of the equipment.
|
BeeperState |
getBeeper()
Returns the beeper operation status of the equipment.
|
DataFormat |
getDataFormat()
Returns the data format setting of the equipment.
|
DataInfo |
getDataInfo()
Returns the data info setting of the equipment.
|
DataRange |
getDataRange()
Returns the data range setting of the equipment.
|
DataTerminator |
getDataTerminator()
Returns the data terminator setting of the equipment.
|
FindDevice |
getFindDevice()
Returns the find device status of the equipment.
|
OperatingMode |
getOperatingMode()
Returns the operating mode status of the equipment.
|
PowerDutyLimitationMap |
getPowerAndDutyLimitationMapInfo()
Returns the Power Duty Limitation Map setting of the equipment.
|
ReadMode |
getReadMode()
Returns the read mode status of the equipment.
|
ScreenOffTime |
getScreenOffTime()
Returns the time which the instrument automatically screen off.
|
SKUType |
getSKU()
Returns the SKU type of the equipment.
|
double |
getTemperature()
Returns the temperature of the equipment.
|
java.util.Date |
getTime()
Returns the system time of the device.
|
VibratorState |
getVibrator()
Returns the vibrator operation status of the equipment.
|
boolean |
initReader()
Initializes an BaseReader instance after the BaseReader instance is associated with the device.
|
void |
onActionChanged(ResultCode resultCode,
ActionType actionType,
java.lang.Object params)
Called when the operational state of the Device.
|
void |
onBatteryState(int batteryState,
java.lang.Object params)
Called to report the battery state of the Device.
|
void |
onEvent(int sub,
java.lang.Object data) |
void |
onKeyEvent(KeyType keyType,
KeyState keyState,
java.lang.Object params)
Called to report the key type and state of the Device.
|
void |
onNotificationState(NotificationState state,
java.lang.Object params)
Called to notify the state of the Device.
|
void |
onStateChanged(ConnectState state,
java.lang.Object params)
Called when the connection state of the BaseTransport instance and the device changes.
|
void |
onTemperatureState(double temperature,
java.lang.Object params)
Called to report the temperature state of the Device.
|
void |
setAutoOffTime(int time)
Sets the time which the equipment automatically turns off.
|
void |
setBeeper(BeeperState state)
Sets the beeper operation status of the equipment.
|
void |
setDataFormat(DataFormat dataFormat)
Sets the data format setting of the equipment.
|
void |
setDataInfo(DataInfo dataInfo)
Sets the data info setting of the equipment.
|
void |
setDataRange(DataRange dataRange)
Sets the data range setting of the equipment.
|
void |
setDataTerminator(DataTerminator dataTerminator)
Sets the data terminator setting of the equipment.
|
void |
setDisplayOutput(DisplayOutput displayOut)
Sets the display output setting of the equipment.
|
void |
setDisplayTags(DisplayTags displayTags)
Sets the display tags setting of the equipment output.
|
void |
setFindDevice(FindDevice mode)
Sets the find device status of the equipment.
|
void |
setOperatingMode(OperatingMode mode)
Sets the operating mode status of the equipment.
|
void |
setReadMode(ReadMode mode)
Sets the read mode status of the equipment.
|
void |
setScreenOffTime(ScreenOffTime time)
Sets the time which the equipment automatically screen off.
|
void |
setSoftWareScan(boolean softwareScan)
Sets the software scan setting of the equipment.
|
void |
setTime(java.util.Date time)
Sets the system time of the instrument.
|
void |
setVibrator(VibratorState state)
Sets the vibrator operation status of the equipment.
|
addListener, checkError, clearListener, getAction, getAddress, getCheckInterval, getConnectType, getDeviceName, getDeviceType, getLastError, getProtocol, getRfidUhf, getSerialNo, getState, getTransport, getVersion, listen, onReaderActionChanged, onReaderBatteryState, onReaderKeyChanged, onReaderNotificationState, onReaderStateChanged, onReaderTemperatureState, removeListener, resetError, setAction, setAddress, setCheckInterval, setDeviceName, setDeviceType, setLastError, toString
public HT730Reader(Context context) throws java.lang.Exception
java.lang.Exception
public boolean connect()
BaseReader
connect
in class BaseReader
public void disconnect()
BaseReader
disconnect
in class BaseReader
public void destroy()
BaseReader
destroy
in class BaseReader
public ResultCode factoryReset() throws ReaderException
BaseReader
factoryReset
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public SKUType getSKU() throws ReaderException
BaseReader
getSKU
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public double getTemperature() throws ReaderException
BaseReader
getTemperature
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public ReadMode getReadMode() throws ReaderException
BaseReader
getReadMode
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setReadMode(ReadMode mode) throws ReaderException
BaseReader
setReadMode
in class BaseReader
mode
- To specify the status of the read mode ReadMode enumeration.ReaderException
public int[] getAutoOffTimeList()
BaseReader
getAutoOffTimeList
in class BaseReader
public int getAutoOffTime() throws ReaderException
BaseReader
getAutoOffTime
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setAutoOffTime(int time) throws ReaderException
BaseReader
setAutoOffTime
in class BaseReader
time
- An integer that indicates how long the device will automatically turn itself off.
The time unit is specified in minutes. If you set the time to 0, the instrument
will not turn off automatically.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public FindDevice getFindDevice() throws ReaderException
BaseReader
getFindDevice
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setFindDevice(FindDevice mode) throws ReaderException
BaseReader
setFindDevice
in class BaseReader
mode
- To specify the status of the find device FindDevice class.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public OperatingMode getOperatingMode() throws ReaderException
BaseReader
getOperatingMode
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setOperatingMode(OperatingMode mode) throws ReaderException
BaseReader
setOperatingMode
in class BaseReader
mode
- To specify the status of the operating mode OperatingMode enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public DataFormat getDataFormat() throws ReaderException
BaseReader
getDataFormat
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setDataFormat(DataFormat dataFormat) throws ReaderException
BaseReader
setDataFormat
in class BaseReader
dataFormat
- To specify the setting of the data format DataFormat enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public DataInfo getDataInfo() throws ReaderException
BaseReader
getDataInfo
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setDataInfo(DataInfo dataInfo) throws ReaderException
BaseReader
setDataInfo
in class BaseReader
dataInfo
- To specify the setting of the data info DataInfo enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public DataRange getDataRange() throws ReaderException
BaseReader
getDataRange
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setDataRange(DataRange dataRange) throws ReaderException
BaseReader
setDataRange
in class BaseReader
dataRange
- To specify the setting of the data range DataRange enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public DataTerminator getDataTerminator() throws ReaderException
BaseReader
getDataTerminator
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setDataTerminator(DataTerminator dataTerminator) throws ReaderException
BaseReader
setDataTerminator
in class BaseReader
dataTerminator
- To specify the setting of the data terminator DataTerminator enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public BeeperState getBeeper() throws ReaderException
BaseReader
getBeeper
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setBeeper(BeeperState state) throws ReaderException
BaseReader
setBeeper
in class BaseReader
state
- To specify the status of the beeper BeeperState enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public VibratorState getVibrator() throws ReaderException
BaseReader
getVibrator
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setVibrator(VibratorState state) throws ReaderException
BaseReader
setVibrator
in class BaseReader
state
- To specify the status of the vibrator VibratorState enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public int getBatteryState() throws ReaderException
BaseReader
getBatteryState
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public java.util.Date getTime() throws ReaderException
BaseReader
getTime
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setTime(java.util.Date time) throws ReaderException
BaseReader
setTime
in class BaseReader
time
- An instance of Date representing the current date and time on the device.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public PowerDutyLimitationMap getPowerAndDutyLimitationMapInfo()
BaseReader
getPowerAndDutyLimitationMapInfo
in class BaseReader
public void setSoftWareScan(boolean softwareScan)
BaseReader
setSoftWareScan
in class BaseReader
softwareScan
- To specify the setting of the software scan SoftWareScan enumeration.public void setDisplayTags(DisplayTags displayTags)
BaseReader
setDisplayTags
in class BaseReader
displayTags
- To specify the setting of the display tags DisplayTags enumeration.public void setDisplayOutput(DisplayOutput displayOut) throws ReaderException
BaseReader
setDisplayOutput
in class BaseReader
displayOut
- To specify the setting of the display output DisplayOutput enumeration.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public ScreenOffTime getScreenOffTime() throws ReaderException
BaseReader
getScreenOffTime
in class BaseReader
ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setScreenOffTime(ScreenOffTime time) throws ReaderException
BaseReader
setScreenOffTime
in class BaseReader
time
- It indicates how long the device will automatically screen off.
The time is specified in minutes and seconds. If you set the minutes to 0
and seconds to 0, the instrument will not screen off automatically.ReaderException
- An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void onStateChanged(ConnectState state, java.lang.Object params)
BaseReader
onStateChanged
in interface com.unitech.lib.device.IDeviceEventListener
onStateChanged
in interface com.unitech.lib.transport.event.IConnectStateEventListener
onStateChanged
in class BaseReader
state
- A ConnectState enumeration that indicates the device and its connection status.params
- This parameter is used to transmit additional information that is generatedpublic void onActionChanged(ResultCode resultCode, ActionType actionType, java.lang.Object params)
com.unitech.lib.device.IDeviceEventListener
onActionChanged
in interface com.unitech.lib.device.IDeviceEventListener
resultCode
- ResultCode enumeration type indicating the operation result of the Device.actionType
- An ActionType enumeration indicating the device's operational state.params
- If the event is accompanied by additional information, a non-null value is passed to the instance.public void onBatteryState(int batteryState, java.lang.Object params)
com.unitech.lib.device.IDeviceEventListener
onBatteryState
in interface com.unitech.lib.device.IDeviceEventListener
batteryState
- An integer representing the battery state of the Device.params
- If the event is accompanied by additional information, a non-null value is passed to the instance.public void onKeyEvent(KeyType keyType, KeyState keyState, java.lang.Object params)
com.unitech.lib.device.IDeviceEventListener
onKeyEvent
in interface com.unitech.lib.device.IDeviceEventListener
keyType
- An KeyType enum indicating the Device's Trigger Event.keyState
- An KeyState enum indicating the Device's Key Event.params
- If the event is accompanied by additional information, a non-null value is passed to the instance.public void onNotificationState(NotificationState state, java.lang.Object params)
com.unitech.lib.device.IDeviceEventListener
onNotificationState
in interface com.unitech.lib.device.IDeviceEventListener
state
- A NotificationState enumeration indicating the notification status with the Device.params
- If the event is accompanied by additional information, a non-null value is passed to the instance.public void onTemperatureState(double temperature, java.lang.Object params)
com.unitech.lib.device.IDeviceEventListener
onTemperatureState
in interface com.unitech.lib.device.IDeviceEventListener
temperature
- An double representing the temperature state of the Device.params
- If the event is accompanied by additional information, a non-null value is passed to the instance.public void onEvent(int sub, java.lang.Object data)
onEvent
in interface com.unitech.lib.device.IDeviceEventListener
public boolean initReader()
BaseReader
initReader
in class BaseReader