public abstract class ATx88Reader extends ATEAReader implements com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
DEFALT_BATTERY_CHECK_INTERVAL, INFO, mAction, mBarcode, mCheckBatteryInterval, mDevice, mDeviceVersion, mFailCount, mIsDisconnecting, mIsForceBatteryGauging, mLastError, mLastTime, mRfidHf, mRfidUhf, mTransport, RETRY_COUNT, TAG
Constructor and Description |
---|
ATx88Reader(ATransport transport)
Create an instance of the ATx88Reader class.
|
ATx88Reader(int sessionId,
ATransport transport)
Create an instance of the ATx88Reader class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assertAction() |
ResultCode |
defaultParameter()
Reset all attributes of the device to default values.
|
void |
destroy()
Destroys an instance of the ATEAReader class and cleans up resources.
|
int |
getAutoOffTime()
Returns the time at which the instrument automatically turns off.
|
boolean |
getAutoSaveMode()
When the device reads a tag or barcode, it returns whether to store it in the device internal memory.
|
int |
getBatteryState()
Returns the state of the equipment.
|
BuzzerState |
getBuzzer()
Returns the buzzer operation status of the equipment.
|
int |
getDisplayOffTime()
Returns the time to turn off the display automatically when the device is not in use.
|
OperationMode |
getOperationMode()
Returns the current operating mode of the instrument.
|
java.lang.String |
getSerialNo()
Returns the serial number of the device.
|
int |
getStoredTagCount()
Returns the number of data stored in the device's internal memory.
|
java.util.Date |
getTime()
Returns the system time of the device.
|
boolean |
getUseActionKey()
Returns whether to use the action of the Trigger button on the instrument.
|
boolean |
initReader()
Initializes an ATEAReader instance after the ATEAReader instance is associated with the device.
|
ResultCode |
loadStoredData()
Read the data stored in the device.
|
void |
onActionChanged(ResultCode code,
ActionType action,
java.lang.Object params) |
void |
onBatteryState(int batteryState,
java.lang.Object params) |
void |
onEvent(int sub,
byte[] data) |
void |
onKeyEvent(KeyType type,
KeyState state,
java.lang.Object params) |
void |
onNotificationState(NotificationState state,
java.lang.Object params) |
void |
onOperationModeChanged(OperationMode mode,
java.lang.Object params) |
void |
onStateChanged(ConnectState state,
java.lang.Object params)
Called when the connection state of the ATransport instance and the device changes.
|
void |
onUsbChargerChanged(UsbChargerType type,
UsbChargerState state,
java.lang.Object params) |
ResultCode |
removeAllStoreadData()
Deletes all data stored in the device.
|
ResultCode |
reset()
Reset the device.
|
ResultCode |
saveStoredData(StoredDataList datas)
Store tag data or barcode data on the instrument.
|
void |
setAutoOffTime(int time)
Sets the time at which the equipment automatically turns off.
|
void |
setAutoSaveMode(boolean enabled)
When the device reads a tag or barcode, it sets whether or not to store it in the internal memory of the device.
|
void |
setBuzzer(BuzzerState state)
Sets the buzzer operation status of the equipment.
|
void |
setDisplayOffTime(int time)
Sets the time to turn off the display automatically when not using the device.
|
void |
setOperationMode(OperationMode mode)
Sets the current operating mode of the instrument.
|
void |
setSerialNo(java.lang.String serialNo)
Set the serial number of the device.
|
void |
setTime(java.util.Date time)
Sets the system time of the instrument.
|
void |
setUsbChargingPhone(UsbChargerControl contorl)
Set whether or not to enable charging the phone. ( USB communication will be lost when charging the phone. )
Only ATS100 is supported.
|
void |
setUseActionKey(boolean enabled)
Set whether or not to use the operation of the Trigger button of the equipment.
|
void |
sleep()
An instance of the ATEAReader class is called before an active Host device goes to sleep.
|
void |
sleep(IATEAReaderEventListener listener)
An instance of the ATEAReader class is called before an active Host device goes to sleep.
|
void |
wakeUp()
An instance of the ATEAReader class is called when an active Host device is in the Sleep state and wakes up.
|
void |
wakeUp(IATEAReaderEventListener listener)
An instance of the ATEAReader class is called when an active Host device is in the Sleep state and wakes up.
|
addListener, checkError, clearListener, connect, disconnect, getAction, getAddress, getAlertNotify, getAutoConnect, getBackupState, getBarcode, getButtonNotify, getButtonNotifyTime, getCheckInterval, getConnectType, getDeviceAttached, getDeviceName, getDeviceType, getFullVersionHexa, getLastError, getProtocol, getRfidHf, getRfidUhf, getSessionId, getState, getTransport, getVersion, getVersionHexa, isEmptyRef, listen, onReaderActionChanged, onReaderBatteryState, onReaderKeyChanged, onReaderNotificationState, onReaderOperationModeChanged, onReaderStateChanged, onReaderUsbChargerChanged, removeListener, resetError, setAction, setAddress, setAlertNotify, setAutoConnect, setButtonNotify, setButtonNotifyTime, setCheckInterval, setDeviceName, setDeviceType, setForceBatteryGauging, setLastError, toString
public ATx88Reader(ATransport transport)
transport
- ATx88Reader An instance of an inherited class of the ATransport class that defines how an instance is associated with a Device.public ATx88Reader(int sessionId, ATransport transport)
sessionId
- A unique ID number for identifying instances to manage multiple instances.transport
- ATx88Reader An instance of an inherited class of the ATransport class that defines how an instance is associated with a Device.public void destroy()
ATEAReader
destroy
in class ATEAReader
public void wakeUp()
ATEAReader
wakeUp
in class ATEAReader
public void wakeUp(IATEAReaderEventListener listener)
ATEAReader
wakeUp
in class ATEAReader
listener
- An instance of IATEAReaderEventListener to receive events when an instance of ATEAReader is woken up.public void sleep()
ATEAReader
sleep
in class ATEAReader
public void sleep(IATEAReaderEventListener listener)
ATEAReader
sleep
in class ATEAReader
listener
- An instance of IATEAReaderEventListener to unblock events when an instance of ATEAReader is sleeping.public ResultCode reset()
ATEAReader
reset
in class ATEAReader
public ResultCode defaultParameter()
ATEAReader
defaultParameter
in class ATEAReader
public ResultCode loadStoredData()
ATEAReader
loadStoredData
in class ATEAReader
public ResultCode saveStoredData(StoredDataList datas)
ATEAReader
saveStoredData
in class ATEAReader
datas
- An instance of StoredDataList that maintains a list of data to store.public ResultCode removeAllStoreadData()
ATEAReader
removeAllStoreadData
in class ATEAReader
public BuzzerState getBuzzer() throws ATException
ATEAReader
getBuzzer
in class ATEAReader
ATException
- Sets or returns the data for the equipment fails, the data poked ATException exception occurs.public void setBuzzer(BuzzerState state) throws ATException
ATEAReader
setBuzzer
in class ATEAReader
state
- To specify the status of the buzzer BuzzerState enumeration.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public boolean getUseActionKey() throws ATException
ATEAReader
getUseActionKey
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setUseActionKey(boolean enabled) throws ATException
ATEAReader
setUseActionKey
in class ATEAReader
enabled
- A boolean specifying whether to use the trigger button.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public int getBatteryState() throws ATException
ATEAReader
getBatteryState
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public int getDisplayOffTime() throws ATException
ATException
- Sets or returns the data for the equipment fails, the data poked ATException exception occurs.public void setDisplayOffTime(int time) throws ATException
time
- An integer representing the time in milliseconds.ATException
- Sets or returns the data for the equipment fails, the data poked ATException exception occurs.public int getAutoOffTime() throws ATException
ATEAReader
getAutoOffTime
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setAutoOffTime(int time) throws ATException
ATEAReader
setAutoOffTime
in class ATEAReader
time
- An integer that indicates how long the device will automatically turn itself off. The time unit is specified in seconds. If you set the time to 0, the instrument will not turn off automatically.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public OperationMode getOperationMode() throws ATException
ATEAReader
getOperationMode
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setOperationMode(OperationMode mode) throws ATException
ATEAReader
setOperationMode
in class ATEAReader
mode
- An OperationMode enum indicating the operating mode of the device.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public java.util.Date getTime() throws ATException
ATEAReader
getTime
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setTime(java.util.Date time) throws ATException
ATEAReader
setTime
in class ATEAReader
time
- An instance of Date representing the current date and time on the device.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public java.lang.String getSerialNo() throws ATException
ATEAReader
getSerialNo
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public void setSerialNo(java.lang.String serialNo) throws ATException
ATEAReader
setSerialNo
in class ATEAReader
serialNo
- A string representing the serial number of the device.ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public int getStoredTagCount() throws ATException
ATEAReader
getStoredTagCount
in class ATEAReader
ATException
- An ATException exception is thrown if a failure occurs while setting data on the instrument or returning data.public boolean getAutoSaveMode() throws ATException
ATException
- Sets or returns the data for the equipment fails, the data poked ATException exception occurs.public void setAutoSaveMode(boolean enabled) throws ATException
enabled
- A boolean indicating whether data should be saved.ATException
- Sets or returns the data for the equipment fails, the data poked ATException exception occurs.public void setUsbChargingPhone(UsbChargerControl contorl) throws ATException
contorl
- A boolean specifying whether to enabled charging the phone.ATException
- An ATException 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)
ATransport.IConnectStateEventListener
onStateChanged
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
onStateChanged
in interface ATransport.IConnectStateEventListener
onStateChanged
in class ATEAReader
state
- A ConnectState enumeration that indicates the device and its connection status.params
- This parameter is used to transmit additional information that is generated when the device and connection are changed.public void onActionChanged(ResultCode code, ActionType action, java.lang.Object params)
onActionChanged
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onOperationModeChanged(OperationMode mode, java.lang.Object params)
onOperationModeChanged
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onBatteryState(int batteryState, java.lang.Object params)
onBatteryState
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onKeyEvent(KeyType type, KeyState state, java.lang.Object params)
onKeyEvent
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onUsbChargerChanged(UsbChargerType type, UsbChargerState state, java.lang.Object params)
onUsbChargerChanged
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onNotificationState(NotificationState state, java.lang.Object params)
onNotificationState
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public void onEvent(int sub, byte[] data)
onEvent
in interface com.atid.lib.atx88.device.ATDeviceATx88.IDeviceEventListener
public boolean initReader()
ATEAReader
initReader
in class ATEAReader
protected void assertAction() throws ATException
ATException