public class RG768Reader 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 |
|---|
RG768Reader(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, toStringpublic RG768Reader(Context context)
throws java.lang.Exception
java.lang.Exceptionpublic boolean connect()
BaseReaderconnect in class BaseReaderpublic void disconnect()
BaseReaderdisconnect in class BaseReaderpublic 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 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 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 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 displayOut) throws ReaderException
BaseReadersetDisplayOutput in class BaseReaderdisplayOut - 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 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