public class AsReader
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
MAX_SELECTION_MASK |
static int |
MIN_SELECTION_MASK |
Modifier and Type | Method and Description |
---|---|
void |
addEpcMask(int offset,
int length,
java.lang.String mask)
Adds EPC Mask Memory that Masking will be applied to when RFID module is running Inventory.
|
void |
addEpcMask(SelectMaskEpcParam param)
Adds EPC Mask Memory that Masking will be applied to when RFID module is running Inventory.
|
void |
clearEpcMask()
Deletes all the EPC Mask Memory when RFID module is performing Inventory
|
void |
clearSelectionMask()
Delete all of Selection mask information in AsReader.
|
void |
connectDevice(Device device)
Try to connect to the ASR-R250G
|
ResultCode |
defaultParameter()
Reset all parameters to default
|
void |
destroy()
Destroys an instance of the AsReader class and cleans up resources.
|
void |
disconnectDevice()
Try to disconnect from the ASR-R250G
|
java.lang.String |
getAccessPassword()
Returns required Access Password when performing Access Command on the Tag that is in Lock.
|
ActionState |
getAction()
Returns operational status of ASR-R250G
|
AlgorithmType |
getAlgorithm()
Returns the algorithm that the RFID UHF module of the appliance uses to perform the inventory.
|
int |
getAutoOffTime()
Returns the time at which the instrument automatically turns off.
|
ParamValue |
getBarcodeParam(ParamName name)
Returns the parameter value on the barcode module.
|
ParamValueList |
getBarcodeParam(ParamName[] names)
Returns the parameter values on the barcode module.
|
int |
getBatteryStatus()
Returns the state of the battery.
|
BuzzerState |
getBuzzer()
Returns the buzzer operation status of the ASR-R250G.
|
java.nio.charset.Charset |
getCharset()
Returns Charset to be used to encode the Barcode data to string
|
boolean |
getContinuousMode()
Returns whether the RFID UHF module will cause the Inventory to run continuously.
|
int |
getDefaultLinkProfile()
Returns default link profile in RFID module.
|
SelectMaskEpcParam |
getEpcMask(int index)
Returns the EPC Mask information from the index given among its memory EPC Mask value in ASR-R250G
|
int |
getEpcMaskCount()
Returns the number of EPC Mask memory, which is saved in ASR-R250G.
|
boolean |
getEpcMaskMatchMode()
Returns Matching Mode status of EPC mask in ASR-R250G which filters whether EPC Mask matched Tag or unmatched one.
|
java.lang.String |
getFirmwareVersion()
Returns ASR-R250G's Firmware Version
|
GlobalBandType |
getGlobalBand()
Returns the national orientation of the RFID UHF module of the instrument.
|
int |
getIdleTime()
The RFID UHF module of the instrument returns the time that the radio waves are not output in the Inventory operation and is resting.
|
int |
getInventoryTime()
Returns the time at which radio waves are actually output from the Inventory operation of the RFID UHF module in the instrument.
|
LbtItem[] |
getLbt()
Returns frequency table information set in the ASR-R250G
|
java.lang.String |
getLbtFreq(int slot)
Returns frequency information of AsReader as string.
|
int[] |
getLbtMask()
Returns a mask value array of the frequency table information.
|
int |
getLinkProfile()
Returns link profile in RFID module.
|
MaskType |
getMaskType()
Returns mask type that be applied to when RFID module is running.
|
int |
getMaxQ()
If the algorithm of the RFID UHF module of the device uses Dynamic Q, it returns the maximum Q value.
|
int |
getMinQ()
If the algorithm of the RFID UHF module of the device uses Dynamic Q, it returns the minimum Q value.
|
int |
getOperationTime()
Returns the operating time of the RFID UHF module of the instrument.
|
int |
getPowerGain()
Returns the antenna output of the RFID UHF module
|
PowerRange |
getPowerGainRange()
Returns the antenna output range of the RFID UHF module.
|
QuerySession |
getQuerySession()
The RFID UHF module of the device returns the Session to check the state of the inventoried flag of the tag to be read by the Inventory operation.
|
QuerySL |
getQuerySL()
The RFID UHF module of the device returns the status of the Select Flag of the tag to be read by the Inventory operation.
|
QueryTarget |
getQueryTarget()
The RFID UHF module of the device returns the status of the Target of the tag to be read by the Inventory operation.
|
int |
getQValue()
Returns the Q value.
|
boolean |
getReportRSSI()
Returns whether the RFID UHF module of the device will pass additional RSSI and Phase to the operation result.
|
ResultCode |
getResultCode()
Returns the last ResultCode
|
java.lang.String |
getRFModuleVersion()
Returns RFID module's Firmware Version
|
SelectMaskParam |
getSelectionMask(int index)
Get the Selection Mask item of the RFID UHF module of the Device.
|
java.lang.String |
getSerialNumber()
Returns the serial number of the ASR-R250G.
|
int |
getSleepTime()
Returns the time to turn off the display automatically when the device is not in use.
|
ConnectionState |
getState()
Returns connection status of ASR-R250G
|
VibratorState |
getVibratorState()
Returns the vibrator status of the ASR-R250G.
|
ResultCode |
inventory()
Device instructs to inventory the RFID UHF tag of ISO18000-6c Gen2 standard.
|
boolean |
isBarcodeEnabled()
Returns the barcode module available or unavailable
|
boolean |
isRfidEnabled()
Returns the RFID module available or unavailable
|
ResultCode |
kill(java.lang.String killPassword)
Device instructs the RFID UHF tag of ISO18000-6c Gen2 specification to be no longer available.
|
ResultCode |
lock(LockParam param) |
ResultCode |
permaLock(LockParam param)
Device instructs the RFID UHF tag of ISO18000-6c Gen2 specification to perform a permanent lock.
|
ResultCode |
readMemory(MemoryBank bank,
int offset,
int length)
Device instructs to read specific memory of RFID UHF tag of ISO18000-6c Gen2 standard.
|
void |
removeEventListener(AsReaderEventListener listener)
Removes the Listener that is listening for events on an instance of the AsReader class.
|
void |
removeSelectionMask(int index)
Delete Selection mask information in AsReader.
|
ResultCode |
resetReader()
Reset the ASR-R250G.
|
ResultCode |
saveParameter()
Save all parameters, to memory.
|
void |
setAccessPassword(java.lang.String password)
Sets required Access Password when performing Access Command on the Tag that is in Lock.
|
void |
setAlgorithm(AlgorithmType type)
Sets the algorithm that the RFID UHF module of the appliance uses to perform the inventory.
|
void |
setAutoOffTime(int time)
Sets the time at which the equipment automatically turns off.
|
boolean |
setBarcodeParam(ParamValue value)
Sets the parameter value on the barcode module.
|
boolean |
setBarcodeParam(ParamValueList params)
Sets the parameter value on the barcode module.
|
void |
setBuzzer(BuzzerState state)
Sets the buzzer operation status of the ASR-R250G.
|
void |
setCharset(java.nio.charset.Charset charset)
Sets Charset to be used to encode the Barcode data to string
|
void |
setContinuousMode(boolean enabled)
Sets whether or not the RFID UHF module will run the Inventory continuously.
|
void |
setDefaultLinkProfile(int value)
Sets default link profile in RFID module.
|
void |
setEpcMaskMatchMode(boolean enabled)
Sets Matching Mode status of EPC mask in ASR-R250G which filters whether EPC Mask matched Tag or unmatched one.
|
void |
setEventListener(AsReaderEventListener listener)
Sets the Listener to receive events on an instance of the AsReader class.
|
void |
setIdleTime(int time)
The RFID UHF module of the instrument sets the time for which the radio waves are not output in the Inventory operation and the rest of the time.
|
void |
setInventoryTime(int time)
Sets the time at which radio waves are actually output in Inventory operation of the RFID UHF module of the instrument.
|
void |
setLbt(LbtItem[] table)
Sets up the frequency table information
|
void |
setLinkProfile(int value)
Sets link profile in RFID module.
|
void |
setMaskType(MaskType type)
Sets mask type that be applied to when RFID module is running.
|
void |
setMaxQ(int value)
If the algorithm of the RFID UHF module of the device uses Dynamic Q, set the maximum Q value.
|
void |
setMinQ(int value)
If the algorithm of the RFID UHF module of the device uses Dynamic Q, set the minimum Q value.
|
void |
setOperationTime(int time)
Set the operation time of the RFID UHF module of the device.
|
void |
setPowerGain(int power)
Set the antenna output of the RFID UHF module.
|
void |
setQuerySession(QuerySession session)
Device's RFID UHF module sets the Session to check the status of the inventoried flag of the tag to be read by Inventory operation.
|
void |
setQuerySL(QuerySL sl)
The RFID UHF module of the device sets the status of the Select Flag of the tag to be read by the Inventory operation.
|
void |
setQueryTarget(QueryTarget target)
Device's RFID UHF module sets the state of the Target of tag to read by Inventory operation.
|
void |
setQValue(int value)
Set the Q value.
|
void |
setReportRSSI(boolean enabled)
Sets whether the RFID UHF module of the device will pass additional RSSI and Phase to the operation result.
|
void |
setSelectionMask(int index,
SelectMaskParam param)
Set the Selection Mask item of the RFID UHF module of the Device.
|
void |
setSleepTime(int time)
Sets the time to turn off the display automatically when not using the device.
|
void |
setVibratorState(VibratorState state)
Sets the vibrator status of the ASR-R250G.
|
ResultCode |
startBuzzer(int milliseconds)
Activates the buzzer for the specified time.
|
ResultCode |
startDecode()
Instruct the instrument to read the bar code.
|
ResultCode |
startVibrator(int milliseconds)
Activates the vibrator for the specified time.
|
ResultCode |
stop()
Instructs the Device to stop the operation being performed.
|
ResultCode |
stopDecode()
Instructs the Device to stop the operation being performed.
|
ResultCode |
unlock(LockParam param)
Instructs the Device to unlock the RFID UHF tags of the ISO18000-6c Gen2 standard.
|
boolean |
usedSelectionMask(int index)
Returns whether to use the Selection Mask item of the RFID UHF module of the Device.
|
ResultCode |
writeMemory(MemoryBank bank,
int offset,
java.lang.String data)
Device instructs to store data in a specific memory of RFID UHF tag of ISO18000-6c Gen2 standard.
|
public static final int MIN_SELECTION_MASK
public static final int MAX_SELECTION_MASK
public void destroy()
public ResultCode getResultCode()
public boolean isBarcodeEnabled()
public boolean isRfidEnabled()
public void connectDevice(Device device)
device
- The class implemented by inheriting from Device.public void disconnectDevice()
public ConnectionState getState()
public ActionState getAction()
public java.lang.String getFirmwareVersion()
public java.lang.String getRFModuleVersion()
public PowerRange getPowerGainRange()
public void setEventListener(AsReaderEventListener listener)
listener
- Instance of AsReaderEventListener to receive events fired by instances of the AsReader class.public void removeEventListener(AsReaderEventListener listener)
listener
- Instance of AsReaderEventListener to receive events fired by instances of the AsReader class.public ResultCode inventory()
public ResultCode readMemory(MemoryBank bank, int offset, int length)
bank
- The MemoryBank enumeration that specifies the Bank for reading memory.offset
- An integer specifying the starting address to start reading from the specified bank. Unit is WORD.length
- An integer that specifies the length of data to read from the specified start address. Unit is WORD.public ResultCode writeMemory(MemoryBank bank, int offset, java.lang.String data)
bank
- The MemoryBank enumeration that specifies the Bank for writing memory.offset
- An integer specifying the starting address to start writing from the specified bank. Unit is WORD.data
- An Hex type string that specifies the data to be stored in memory from the specified start address. Data must be specified in WORD units (4 characters).public ResultCode lock(LockParam param)
public ResultCode unlock(LockParam param)
param
- An instance of LockParam that specifies the unlock area ofpublic ResultCode permaLock(LockParam param)
param
- An instance of LockParam that specifies a permanent lock area for tag memory.public ResultCode kill(java.lang.String killPassword)
killPassword
- Hex type string that specifies the Kill Password set in the tag.public ResultCode stop()
public ResultCode defaultParameter()
public ResultCode saveParameter()
public BuzzerState getBuzzer() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setBuzzer(BuzzerState state) throws AsReaderException
state
- BuzzerState specifying state of buzzerAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public ResultCode startVibrator(int milliseconds)
milliseconds
- Integer specifying operation time(millisecond)public ResultCode startBuzzer(int milliseconds)
milliseconds
- Integer specifying operation time(millisecond)public VibratorState getVibratorState() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setVibratorState(VibratorState state) throws AsReaderException
state
- VibratorState specifying state of vibratorAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public boolean getContinuousMode() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setContinuousMode(boolean enabled) throws AsReaderException
enabled
- Boolean specifying whether the RFID UHF module will continue to perform Inventory operations.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getPowerGain() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setPowerGain(int power) throws AsReaderException
power
- An integer specifying the antenna output of the RFID UHF module. The setting unit is dBm × 10.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getOperationTime() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setOperationTime(int time) throws AsReaderException
time
- An integer specifying the operation time of the RFID UHF module. The unit of operation time is millisecond (ms).AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getInventoryTime() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setInventoryTime(int time) throws AsReaderException
time
- An integer that specifies the Inventory time of the RFID UHF module. Inventory Time is in milliseconds (ms).AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getIdleTime() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setIdleTime(int time) throws AsReaderException
time
- An integer that specifies the Inventory idle time for the RFID UHF module. Idle Time is in milliseconds (ms).AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getAutoOffTime() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setAutoOffTime(int time) throws AsReaderException
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.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getSleepTime() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setSleepTime(int time) throws AsReaderException
time
- Integer representing the time in milliseconds.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public java.lang.String getAccessPassword() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setAccessPassword(java.lang.String password) throws AsReaderException
password
- String that indicates access password storedAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public QuerySession getQuerySession() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setQuerySession(QuerySession session) throws AsReaderException
session
- QuerySession enumeration that specifies the Session of the tag to read from the RFID UHF module.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public QueryTarget getQueryTarget() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setQueryTarget(QueryTarget target) throws AsReaderException
target
- QueryTarget enumeration type that specifies the state of the Target of the tag to be read by the RFID UHF module.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public SelectMaskParam getSelectionMask(int index) throws AsReaderException
index
- Integer specifying the radix of the item item. The Selection Mask has eight Selection Mask items from 0 to 7.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setSelectionMask(int index, SelectMaskParam param) throws AsReaderException
index
- Integer specifying the radix of the item item. The Selection Mask has eight Selection Mask items from 0 to 7.param
- Instance of SelectMaskParam that specifies the specified Selection Mask item.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public boolean usedSelectionMask(int index) throws AsReaderException
index
- Integer specifying the radix of the item. The Selection Mask has eight Selection Mask items from 0 to 7.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void removeSelectionMask(int index) throws AsReaderException
index
- Mask index parameterAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void clearSelectionMask() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public QuerySL getQuerySL() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setQuerySL(QuerySL sl) throws AsReaderException
sl
- QuerySL enumeration type that specifies the state of the Select Flag of the tag that the RFID UHF module will read.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getLinkProfile() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setLinkProfile(int value) throws AsReaderException
value
- Index of link profileAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getDefaultLinkProfile() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setDefaultLinkProfile(int value) throws AsReaderException
value
- Index of link profileAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public AlgorithmType getAlgorithm() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setAlgorithm(AlgorithmType type) throws AsReaderException
type
- AlgorithmType enumeration specifying the algorithm.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getQValue() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setQValue(int value) throws AsReaderException
value
- Integer that specifies the starting Q value of the algorithm. The Q value range can be set from 0 to 15.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getMaxQ() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setMaxQ(int value) throws AsReaderException
value
- Integer that specifies the maximum Q value of the Q algorithm. The Max Q must be greater than or equal to Start Q and Min QAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getMinQ() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setMinQ(int value) throws AsReaderException
value
- Integer that specifies the minimum Q value of the Q algorithm. The Min Q must be less than or equal to Start Q and Max QAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public java.lang.String getSerialNumber() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getBatteryStatus() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public boolean getReportRSSI() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setReportRSSI(boolean enabled) throws AsReaderException
enabled
- Boolean specifying whether to pass additional RSSI and Phase to the result of the operation.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void clearEpcMask() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int getEpcMaskCount() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void addEpcMask(int offset, int length, java.lang.String mask) throws AsReaderException
offset
- Sets the initial address of Mask in bit unit. It must be 16bit or larger.length
- Sets the length of the Mask in bit unit.mask
- Sets the Mask value as Character string in HEX form.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void addEpcMask(SelectMaskEpcParam param) throws AsReaderException
param
- SelectMaskEpcParam specifying EPC mask parametersAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public SelectMaskEpcParam getEpcMask(int index) throws AsReaderException
index
- Integer specifying where Memory EPC Mask is saved.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setEpcMaskMatchMode(boolean enabled) throws AsReaderException
enabled
- Boolean specifying matching mode.AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public boolean getEpcMaskMatchMode() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public int[] getLbtMask() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public LbtItem[] getLbt() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setLbt(LbtItem[] table) throws AsReaderException
table
- Array of LbtItemAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public java.lang.String getLbtFreq(int slot) throws AsReaderException
slot
- Integer specifying the slotAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public ResultCode startDecode()
public ResultCode stopDecode()
public boolean setBarcodeParam(ParamValue value)
value
- ParamValue that specifies the parameter names and values of the barcode module to be set.public boolean setBarcodeParam(ParamValueList params)
params
- ParamValueList that specifies the parameter names and values of the barcode module to be set.public ParamValue getBarcodeParam(ParamName name)
name
- ParamName that specifies the parameter name of the barcode module to be read.public ParamValueList getBarcodeParam(ParamName[] names)
names
- List of ParamName that specifies the parameter name of the barcode module to be read.public java.nio.charset.Charset getCharset() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setCharset(java.nio.charset.Charset charset) throws AsReaderException
charset
- Charset to be used to encode the bytesAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public GlobalBandType getGlobalBand() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public MaskType getMaskType() throws AsReaderException
AsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public void setMaskType(MaskType type) throws AsReaderException
type
- MaskType enumeration that represents the mask typeAsReaderException
- AsReaderException is thrown if a failure occurs while setting data on the instrument or returning data.public ResultCode resetReader()