public class RP902Reader extends BaseReader implements com.unitech.lib.device.IDeviceEventListener, com.unitech.stuhflBridge.ISerialStream
_actionState, _baseDevice, _baseTransport, _baseUHF, _checkInterval, _failCount, _fwVersion, _isDisconnecting, _lastError, _serialNo, DEFAULT_BATTERY_CHECK_INTERVAL, mLastTime, RETRY_COUNT, TAG| Constructor and Description |
|---|
RP902Reader(BaseTransport baseTransport) |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys an instance of the BaseReader class and cleans up resources.
|
void |
eventNotify(EventNotifyId eventNotifyId,
boolean enable)
Notifies the device of an event.
|
ResultCode |
factoryReset()
Reset the device to factory default.
|
double |
getAmbientTemperature()
Returns the ambient temperature of the equipment.
|
int |
getAmbientTemperatureProtection()
Returns the ambient temperature protection setting of the equipment.
|
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.
|
double |
getPATemperature()
Returns the PA temperature of the equipment.
|
int |
getPATemperatureProtection()
Returns the PA temperature protection setting 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.
|
TemperatureProtectionMode |
getTemperatureProtectionMode()
Returns the temperature protection mode 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.
|
int |
read(byte[] buff,
int length) |
void |
sendFwFileData(byte[] bytes)
Writes the firmware data into flash memory.
|
void |
setAmbientTemperatureProtection(int temperature)
Sets the ambient temperature protection setting of the equipment.
|
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 displayOutput)
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 |
setPATemperatureProtection(int temperature)
Sets the PA temperature protection setting 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 |
setTemperatureProtectionMode(TemperatureProtectionMode mode)
Sets the temperature protection mode 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.
|
void |
startFwFileTransfer(java.lang.String fileName,
long fileSize)
Prepares for a firmware update.
|
void |
startFwUpdate(FirmwareUpdateMode mode)
Starts the firmware update process with the specified mode.
|
int |
write(byte[] buff,
int length) |
addListener, checkError, clearListener, connect, disconnect, 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, toStringpublic RP902Reader(BaseTransport baseTransport)
public int read(byte[] buff,
int length)
read in interface com.unitech.stuhflBridge.ISerialStreampublic int write(byte[] buff,
int length)
write in interface com.unitech.stuhflBridge.ISerialStreampublic void destroy()
BaseReaderdestroy in class BaseReaderpublic ResultCode factoryReset() throws ReaderException
BaseReaderfactoryReset in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public SKUType getSKU() throws ReaderException
BaseReadergetSKU in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public double getTemperature()
throws ReaderException
BaseReadergetTemperature in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public double getAmbientTemperature()
throws ReaderException
BaseReadergetAmbientTemperature in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public double getPATemperature()
throws ReaderException
BaseReadergetPATemperature in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public int getAmbientTemperatureProtection()
throws ReaderException
BaseReadergetAmbientTemperatureProtection in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setAmbientTemperatureProtection(int temperature)
throws ReaderException
BaseReadersetAmbientTemperatureProtection in class BaseReadertemperature - An integer representing the ambient temperature protection setting of the device.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public int getPATemperatureProtection()
throws ReaderException
BaseReadergetPATemperatureProtection in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setPATemperatureProtection(int temperature)
throws ReaderException
BaseReadersetPATemperatureProtection in class BaseReadertemperature - An integer representing the PA temperature protection setting of the device.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public TemperatureProtectionMode getTemperatureProtectionMode() throws ReaderException
BaseReadergetTemperatureProtectionMode in class BaseReaderReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void setTemperatureProtectionMode(TemperatureProtectionMode mode) throws ReaderException
BaseReadersetTemperatureProtectionMode in class BaseReadermode - To specify the status of the temperature protection mode TemperatureProtectionMode enumeration.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public ReadMode getReadMode() throws ReaderException
BaseReadergetReadMode in class BaseReaderReaderException - 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
BaseReadersetReadMode in class BaseReadermode - To specify the status of the read mode ReadMode enumeration.ReaderExceptionpublic int[] getAutoOffTimeList()
BaseReadergetAutoOffTimeList in class BaseReaderpublic int getAutoOffTime()
throws ReaderException
BaseReadergetAutoOffTime in class BaseReaderReaderException - 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
BaseReadersetAutoOffTime in class BaseReadertime - 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
BaseReadergetFindDevice in class BaseReaderReaderException - 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
BaseReadersetFindDevice in class BaseReadermode - 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
BaseReadergetOperatingMode in class BaseReaderReaderException - 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
BaseReadersetOperatingMode in class BaseReadermode - 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
BaseReadergetDataFormat in class BaseReaderReaderException - 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
BaseReadersetDataFormat in class BaseReaderdataFormat - 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
BaseReadergetDataInfo in class BaseReaderReaderException - 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
BaseReadersetDataInfo in class BaseReaderdataInfo - 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
BaseReadergetDataRange in class BaseReaderReaderException - 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
BaseReadersetDataRange in class BaseReaderdataRange - 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
BaseReadergetDataTerminator in class BaseReaderReaderException - 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
BaseReadersetDataTerminator in class BaseReaderdataTerminator - 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 PowerDutyLimitationMap getPowerAndDutyLimitationMapInfo()
BaseReadergetPowerAndDutyLimitationMapInfo in class BaseReaderpublic void setSoftWareScan(boolean softwareScan)
BaseReadersetSoftWareScan in class BaseReadersoftwareScan - To specify the setting of the software scan SoftWareScan enumeration.public void setDisplayTags(DisplayTags displayTags)
BaseReadersetDisplayTags in class BaseReaderdisplayTags - To specify the setting of the display tags DisplayTags enumeration.public void setDisplayOutput(DisplayOutput displayOutput) throws ReaderException
BaseReadersetDisplayOutput in class BaseReaderdisplayOutput - 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
BaseReadergetScreenOffTime in class BaseReaderReaderException - 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
BaseReadersetScreenOffTime in class BaseReadertime - 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 startFwFileTransfer(java.lang.String fileName,
long fileSize)
throws ReaderException
BaseReaderstartFwFileTransfer in class BaseReaderfileName - A String of file name.fileSize - A Long of file size.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void sendFwFileData(byte[] bytes)
throws ReaderException
BaseReadersendFwFileData in class BaseReaderbytes - A Byte Array of firmware dataReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void startFwUpdate(FirmwareUpdateMode mode) throws ReaderException
BaseReaderstartFwUpdate in class BaseReadermode - A FirmwareUpdateMode enumeration that specifies the firmware update mode.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public void eventNotify(EventNotifyId eventNotifyId, boolean enable) throws ReaderException
BaseReadereventNotify in class BaseReadereventNotifyId - An EventNotifyId enumeration that specifies the event to notify.enable - A boolean indicating whether to enable or disable the event notification.ReaderException - An ReaderException exception is thrown if a failure occurs while
setting data on the instrument or returning data.public BeeperState getBeeper() throws ReaderException
BaseReadergetBeeper in class BaseReaderReaderException - 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
BaseReadersetBeeper in class BaseReaderstate - 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
BaseReadergetVibrator in class BaseReaderReaderException - 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
BaseReadersetVibrator in class BaseReaderstate - 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
BaseReadergetBatteryState in class BaseReaderReaderException - 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
BaseReadergetTime in class BaseReaderReaderException - 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
BaseReadersetTime in class BaseReadertime - 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 void onStateChanged(ConnectState state, java.lang.Object params)
BaseReaderonStateChanged in interface com.unitech.lib.device.IDeviceEventListeneronStateChanged in interface com.unitech.lib.transport.event.IConnectStateEventListeneronStateChanged in class BaseReaderstate - 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.IDeviceEventListeneronActionChanged in interface com.unitech.lib.device.IDeviceEventListenerresultCode - 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.IDeviceEventListeneronBatteryState in interface com.unitech.lib.device.IDeviceEventListenerbatteryState - 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.IDeviceEventListeneronKeyEvent in interface com.unitech.lib.device.IDeviceEventListenerkeyType - 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.IDeviceEventListeneronNotificationState in interface com.unitech.lib.device.IDeviceEventListenerstate - 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.IDeviceEventListeneronTemperatureState in interface com.unitech.lib.device.IDeviceEventListenertemperature - 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.IDeviceEventListenerpublic boolean initReader()
BaseReaderinitReader in class BaseReader