# AsReader ## setEventListener Sets the AsReaderEventListener. > ⚠️ Warning > Before calling the method [`connectDevice(Device device)`](#connectdevice), you must > call `setEventListener(AsReaderEventListener listener)`. ```java public void setEventListener (AsReaderEventListener listener); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - listener - In - AsReaderEventListener - [AsReaderEventListener](AsReaderEventListener.md) object ``` **Sample Code**: ```java private AsReaderEventListener mAsReaderEventListener = new AsReaderEventListener() { @Override public void onStateChanged(AsReader asReader, ConnectionState connectionState) { } @Override public void onReadBarcode(AsReader asReader, BarcodeType barcodeType, String codeId, String barcode) { } @Override public void onActionChanged(AsReader asReader, ActionState actionState) { } @Override public void onCommandComplete(AsReader asReader, CommandType commandType) { } @Override public void onKeyEvent(AsReader asReader, KeyType keyType, KeyState keyState) { } @Override public void onExceptionOccurred(AsReader asReader, int code) { } @Override public void onReadTag(AsReader reader, ActionState action, String tag, float rssi, float phase, float frequency) { } @Override public void onAccessResult(AsReader reader, ResultCode code, ActionState action, String epc, String data, float rssi, float phase, float frequency) { } }; reader.setEventListener(mAsReaderEventListener); ``` --- ## removeEventListener Removes the AsReaderEventListener. ```java public void removeEventListener(AsReaderEventListener listener); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - listener - In - AsReaderEventListener - [AsReaderEventListener](AsReaderEventListener.md) object ``` **Sample Code**: ```java reader.removeEventListener(mAsReaderEventListener); ``` --- ## connectDevice Connects to the ASR-L251G. When this method is called, the connection status of the ASR-L251G is notified via the callback method [`onStateChanged`](AsReaderEventListener.md#onstatechanged). ```java public void connectDevice(Device device); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - device - In - Device - Device object ``` **Sample Code**: ```java Device device = new DeviceUsbCdc(Context); reader.connectDevice(device); ``` --- ## disconnectDevice Disconnects from the ASR-L251G. When this method is called, the connection status of the ASR-L251G is notified via the callback method [`onStateChanged`](AsReaderEventListener.md#onstatechanged). ```java public void disconnectDevice(); ``` **Sample Code**: ```java reader.disconnectDevice(); ``` --- ## getState Gets the connection status of the ASR-L251G. ```java public ConnectionState getState(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ConnectionState`](Enum.md#connectionstate) - Connection status ``` **Sample Code**: ```java ConnectionState state = reader.getState(); ``` --- ## getAction Gets the action status of the ASR-L251G. ```java public ActionState getAction(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ActionState`](Enum.md#actionstate) - Action status ``` **Sample Code**: ```java ActionState actionState = reader.getAction(); ``` --- ## getFirmwareVersion Gets the firmware version of the ASR-L251G. ```java public String getFirmwareVersion(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - String - Firmware version ``` **Sample Code**: ```java String firmwareVersion = reader.getFirmwareVersion(); ``` --- ## getBatteryStatus Gets the battery level of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public int getBatteryStatus() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - int - Battery level 0: 0-10%, 1: 10-25%, 2: 25-50%, 3: 50-75%, 4: 75-100% ``` **Sample Code**: ```java try { int battery = reader.getBatteryStatus(); } catch (AsReaderException e) { } ``` --- ## getSerialNumber Gets the serial number of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public String getSerialNumber() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - String - Serial number ``` **Sample Code**: ```java try { String serialNumber = reader.getSerialNumber(); } catch (AsReaderException e) { } ``` --- ## getVersion Gets the SDK version. ```java public String getVersion(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - String - SDK version ``` **Sample Code**: ```java String version = reader.getVersion(); ``` --- ## getRFModuleVersion Gets the firmware version of the RFID module. ```java public String getRFModuleVersion(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - String - Firmware version of the RFID module ``` **Sample Code**: ```java String moduleVersion = reader.getRFModuleVersion(); ``` --- ## getGlobalBand Gets the region information of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public GlobalBandType getGlobalBand() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`GlobalBandType`](Enum.md#globalbandtype) - Region information ``` **Sample Code**: ```java try { GlobalBandType globalBandType = reader.getGlobalBand(); } catch (AsReaderException e) { } ``` --- ## getSDKMessage Gets the message returned by the SDK. If the ASR-L251G enters a sleep state during connection and an error occurs on the device side, calling this method `getSDKMessage()` will return a message based on the error content. ```java public String getSDKMessage(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - String - Message returned from the SDK ``` **Sample Code**: ```java String message = reader.getSDKMessage(); ``` --- ## startDecode Starts barcode scanning. When this method is called, the callback method [`onReadBarcode`](AsReaderEventListener.md#onreadbarcode) receives the scanned barcode data, and the callback method [`onActionChanged`](AsReaderEventListener.md#onactionchanged) notifies the change in action status of the ASR-L251G. ```java public ResultCode startDecode(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The result of the method call, an enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.startDecode(); ``` --- ## stopDecode Barcodeスキャンを停止します。 本メソッドを呼び出すと、コールバックメソッド [`onActionChanged`](AsReaderEventListener.md#onactionchanged) でASR-L251Gのアクションステータスの変更が通知されます。 ## stopDecode Stops barcode scanning. ```java public ResultCode stopDecode(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The result of the method call, an enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.stopDecode(); ``` --- ## getBuzzer Gets the buzzer status of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public BuzzerState getBuzzer() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`BuzzerState`](Enum.md#buzzerstate) - Buzzer Status BuzzerState ``` **Sample Code**: ```java try { BuzzerState buzzerState = reader.getBuzzer(); } catch (AsReaderException e) { } ``` --- ## setBuzzer Sets the buzzer status of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public void setBuzzer(BuzzerState state) throws AsReaderException ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - state - In - [`BuzzerState`](Enum.md#buzzerstate) - Buzzer status, enumeration type BuzzerState ``` **Sample Code**: ```java try { reader.setBuzzer(BuzzerState.Off); } catch (AsReaderException e) { } ``` --- ## startBuzzer Starts buzzer playback. The buzzer sound will play for the specified buzzer time and then stop. ```java public ResultCode startBuzzer(int milliseconds); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - milliseconds - In - int - Buzzer time * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The result of the method call, an enumeration type ResultCode ``` **Sample Code**: ```java int milliseconds = 300; ResultCode code = reader.startBuzzer(milliseconds); ``` --- ## getVibratorState Gets the vibration status of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public VibratorState getVibratorState() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`VibratorState`](Enum.md#vibratorstate) - Vibration status, enumeration type VibratorState ``` **Sample Code**: ```java try { VibratorState vibratorState = reader.getVibratorState(); } catch (AsReaderException e) { } ``` --- ## setVibratorState Sets the vibration status of the ASR-L251G. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public void setVibratorState(VibratorState state) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - state - In - [`VibratorState`](Enum.md#vibratorstate) - Vibrator status, enumeration type VibratorState ``` **Sample Code**: ```java try { reader.setVibratorState(VibratorState.Off); } catch (AsReaderException e) { } ``` --- ## startVibrator Starts vibration. The vibration will operate for the specified time and then stop. ```java public ResultCode startVibrator(int milliseconds); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - milliseconds - In - int - Vibration time * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The result of the method call, an enumeration type ResultCode ``` **Sample Code**: ```java int milliseconds = 500; ResultCode code = reader.startVibrator(milliseconds); ``` --- ## setAutoOffTime Sets the auto off time of the ASR-L251G. If an error occurs when setting or retrieving data, `AsReaderException` will be thrown. ```java public void setAutoOffTime(int time) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - time - In - int - Auto off time ``` **Sample Code**: ```java try { reader.setAutoOffTime(5); } catch (AsReaderException e) { } ``` --- ## getAutoOffTime Gets the auto off time of the ASR-L251G. If an error occurs when setting or retrieving data, `AsReaderException` will be thrown. ```java public int getAutoOffTime() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - int - Auto off time ``` **Sample Code**: ```java try { int seconds = reader.getAutoOffTime(); } catch (AsReaderException e) { } ``` --- ## setSleepTime Sets the automatic sleep time of the ASR-L251G. If an error occurs when setting or retrieving data, `AsReaderException` will be thrown. > ⚠️ Warning > When connected and not executing inventory, the countdown for sleep time begins. ```java public void setSleepTime(int time) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - time - In - int - Automatic sleep time ``` **Sample Code**: ```java try { reader.setSleepTime(5); } catch (AsReaderException e) { } ``` --- ## getSleepTime Gets the automatic sleep time of the ASR-L251G. If an error occurs when setting or retrieving data, `AsReaderException` will be thrown. ```java public int getSleepTime() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - int - Automatic sleep time ``` **Sample Code**: ```java try { int seconds = reader.getSleepTime(); } catch (AsReaderException e) { } ``` --- ## setBarcodeParam Sets the on/off of barcode types. ```java public boolean setBarcodeParam(ParamValue value); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - value - In - [`ParamValue`](ParamValue.md) - On/off information of barcode types, ParamValue object * - Return Value - Out - boolean - true: Setting succeeded, false: Setting failed ``` **Sample Code**: ```java boolean isBarcodeParam = reader.setBarcodeParam(paramValue); ``` --- ## getBarcodeParam Gets the configuration information of the corresponding barcode type by barcode type name. ```java public ParamValue getBarcodeParam(ParamName name); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - name - In - [`ParamName`](Enum.md#paramname) - Barcode type, enumeration type ParamName * - Return Value - Out - [`ParamValue`](ParamValue.md) - On/off information of barcode types, ParamValue object ``` **Sample Code**: ```java ParamValue value = reader.getBarcodeParam(ParamName.Code39); ``` --- ## setBarcodeParam Sets the on/off of multiple barcode types. ```java public boolean setBarcodeParam(ParamValueList params); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - params - In - [`ParamValueList`](ParamValueList.md) - On/off list of barcode types, ParamValueList object * - Return Value - Out - boolean - true: Setting succeeded, false: Setting failed ``` **Sample Code**: ```java ParamValueList valueList = new ParamValueList(); int mVideoReverse = reader.getBarcodeParam(ParamName.VideoReverse).getValue(); ParamValue value = new ParamValue(ParamName.VideoReverse, mVideoReverse); valueList.add(value) boolean isBarcodeParam = reader.setBarcodeParam(valueList); ``` --- ## getBarcodeParam Gets the configurable barcode types and whether the corresponding barcode types can be scanned. ```java public ParamValueList getBarcodeParam(ParamName[] names); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - names - In - ParamName[] - Barcode type array * - Return Value - Out - [`ParamValueList`](ParamValueList.md) - Scannable barcode type list, ParamValueList object ``` **Sample Code**: ```java ParamName[] names = new ParamName[]{aramName.UPCA, ParamName.UPCE0, ParamName.UPCE1}; ParamValueList valueList = reader.getBarcodeParam(names); ``` --- ## setCharset Sets the character set of the SDK. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public void setCharset(Charset charset) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - charset - In - Charset - Character set ``` **Sample Code**: ```java try { Charset charset = Charset.forName("UTF-8"); reader.setCharset(charset); } catch (AsReaderException e) { } ``` --- ## getCharset Gets the character set of the SDK. If an error occurs when setting or retrieving data, AsReaderException will be thrown. ```java public Charset getCharset() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - Charset - Character set ``` **Sample Code**: ```java try { Charset charset = reader.getCharset(); } catch (AsReaderException e) { } ``` --- ## resetReader Resets the ASR-L251G device. ```java public ResultCode resetReader(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The command execution result of ASR-L251G, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.resetReader(); ``` --- ## getResultCode Gets the command execution result of ASR-L251G. ```java public ResultCode getResultCode(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - Command execution result, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.getResultCode(); ``` --- ## stop Stops the inventory of ASR-L251G. ```java public ResultCode stop(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - Command execution result, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.stop(); ``` --- ## defaultParameter Resets all parameter values of ASR-L251G to their default values. When this method is called, the running operation will be notified via the callback method [`onCommandComplete`](AsReaderEventListener.md#oncommandcomplete). ```java public ResultCode defaultParameter(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - Command execution result, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.defaultParameter(); ``` --- ## saveParameter Saves all parameters to ASR-L251G. When this method is called, the running operation will be notified via the callback method [`onCommandComplete`](AsReaderEventListener.md#oncommandcomplete). ```java public ResultCode saveParameter(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - The command execution result of ASR-L251G, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode code = reader.saveParameter(); ``` --- ## isBarcodeEnabled Gets whether the Barcode module is available. ```java public boolean isBarcodeEnabled(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - boolean - true: module available / false: module unavailable ``` **Sample Code**: ```java boolean enable = reader.isBarcodeEnabled(); ``` --- ## getPowerGainRange Gets the power output range of the RFID UHF module. ```java public PowerRange getPowerGainRange(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`PowerRange`](PowerRange.md) - Power output range, PowerRange object ``` **Sample Code**: ```java PowerRange powerGainRange = reader.getPowerGainRange(); ``` --- ## isRfidEnabled Gets whether the RFID module is available. ```java public boolean isRfidEnabled(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - boolean - true: module available / false: module unavailable ``` **Sample Code**: ```java boolean enable = reader.isRfidEnabled(); ``` --- ## inventory Starts RFID tag inventory. When this method is called, the callback method [`onReadTag`](AsReaderEventListener.md#onreadtag) will receive the data inventoried by ASR-L251G, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) will notify the action change of ASR-L251G. ```java public ResultCode inventory(); ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - [`ResultCode`](Enum.md#resultcode) - Method execution result, enumeration type ResultCode ``` **Sample Code**: ```java ResultCode resultcode = reader.inventory(); ``` --- ## getContinuousMode Gets whether the RFID module of ASR-L251G performs continuous reading. If an error occurs during setting or retrieval, AsReaderException will be thrown. ```java public boolean getContinuousMode() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - boolean - true: continuous reading / false: non-continuous reading ``` **Sample Code**: ```java try { boolean continuous = reader.getContinuousMode(); } catch (AsReaderException e) { } ``` --- ## setContinuousMode Sets whether the RFID module of ASR-L251G performs continuous reading. If an error occurs during setting or retrieval, AsReaderException will be thrown. ```java public void setContinuousMode(boolean enabled) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - enabled - In - boolean - true: continuous reading / false: non-continuous reading ``` **Sample Code**: ```java try { reader.setContinuousMode(true); } catch (AsReaderException e) { } ``` --- ## getPowerGain Gets the Power value used by ASR-L251G when reading with the RFID module. If an error occurs during setting or retrieval, AsReaderException will be thrown. ```java public int getPowerGain() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter Name - In/Out - Type - Description * - Return Value - Out - int - Power value ``` **Sample Code**: ```java try { int power = reader.getPowerGain(); } catch (AsReaderException e) { } ``` --- ## setPowerGain Sets the Power value used by the ASR-L251G RFID module when reading tags. If an error occurs during setting or retrieval, an `AsReaderException` will be thrown. ```java public void setPowerGain(int power) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - power - In - int - Power value ``` **Sample Code**: ```java try { reader.setPowerGain(10); } catch (AsReaderException e) { } ``` --- ## getReportRSSI Retrieves whether the ASR-L251G RFID module obtains RSSI data when reading tags. If an error occurs during setting or retrieval, an `AsReaderException` will be thrown. ```java public boolean getReportRSSI() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - boolean - `true`: RSSI data is retrieved; `false`: RSSI data is not retrieved ``` **Sample Code**: ```java try { boolean report = reader.getReportRSSI(); } catch (AsReaderException e) { } ``` --- ## setReportRSSI Specifies whether the ASR-L251G RFID module should obtain RSSI data when reading tags. If an error occurs during setting or retrieval, an `AsReaderException` will be thrown. ```java public void setReportRSSI (boolean enabled) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - enabled - In - bool - `true`: Retrieve RSSI data; `false`: Do not retrieve RSSI data ``` **Sample Code**: ```java try { reader.setReportRSSI(true); } catch (AsReaderException e) { } ``` --- ## getQuerySession Retrieves the Session value of the RFID module. If an error occurs during setting or retrieval, an `AsReaderException` will be thrown. ```java public QuerySession getQuerySession() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - [`QuerySession`](Enum.md#querysession) - A [`QuerySession`](Enum.md#querysession) object, enumeration type QuerySession ``` **Sample Code**: ```java try { QuerySession mQuerySession = reader.getQuerySession(); } catch (AsReaderException e) { } ``` --- ## setQuerySession Sets the Session value of the RFID module. If an error occurs during setting or retrieval, an `AsReaderException` will be thrown. ```java public void setQuerySession(QuerySession session) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - session - In - [`QuerySession`](Enum.md#querysession) - A [`QuerySession`](Enum.md#querysession) object, enumeration type QuerySession ``` **Sample Code**: ```java try { reader.setQuerySession(QuerySession.S0); } catch (AsReaderException e) { } ``` --- ## getQueryTarget Retrieves the Session Flag of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public QueryTarget getQueryTarget() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - [`QueryTarget`](Enum.md#querytarget) - [`QueryTarget`](Enum.md#querytarget) object, enumeration type QueryTarget ``` **Sample code**: ```java try { QueryTarget mQueryTarget = reader.getQueryTarget(); } catch (AsReaderException e) { } ``` --- ## setQueryTarget Sets the Session Flag of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public void setQueryTarget(QueryTarget target) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - target - In - [`QueryTarget`](Enum.md#querytarget) - [`QueryTarget`](Enum.md#querytarget) object, enumeration type QueryTarget ``` **Sample code**: ```java try { reader.setQueryTarget(QueryTarget.A); } catch (AsReaderException e) { } ``` --- ## getLinkProfile Retrieves the Link Profile value of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public int getLinkProfile() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - int - Link Profile value ``` **Sample code**: ```java try { int mLinkProfile = reader.getLinkProfile(); } catch (AsReaderException e) { } ``` --- ## setLinkProfile Sets the Link Profile value of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public void setLinkProfile(int value) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - value - In - int - Link Profile value ``` **Sample code**: ```java try { reader.setLinkProfile(1); } catch (AsReaderException e) { } ``` --- ## getMaskType Retrieves the Mask type of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public MaskType getMaskType () throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - [`MaskType`](Enum.md#masktype) - [`MaskType`](Enum.md#masktype) object, enumeration type MaskType ``` **Sample code**: ```java try { MaskType mMaskType = reader.getMaskType(); } catch (AsReaderException e) { } ``` --- ## setMaskType Sets the Mask type of the ASR-L251G RFID module. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public void setMaskType(MaskType type) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - type - In - [`MaskType`](Enum.md#masktype) - [`MaskType`](Enum.md#masktype) object, enumeration type MaskType ``` **Sample code**: ```java try { reader.setMaskType(MaskType.NoMask); } catch (AsReaderException e) { } ``` --- ## getOperationTime Retrieves the operation time value (in milliseconds) of the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public int getOperationTime() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - int - Operation time (ms) ``` **Sample code**: ```java try { int operationTime = reader.getOperationTime(); } catch (AsReaderException e) { } ``` --- ## setOperationTime Sets the operation time value (in milliseconds) for the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public void setOperationTime(int time) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - time - In - int - Operation time (ms) ``` **Sample code**: ```java try { reader.setOperationTime(300); } catch (AsReaderException e) { } ``` --- ## getIdleTime Retrieves the idle time value (in milliseconds) of the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public int getIdleTime() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - int - Idle time (ms) ``` **Sample code**: ```java try { int idleTime = reader.getIdleTime(); } catch (AsReaderException e) { } ``` --- ## setIdleTime Sets the idle time value (in milliseconds) for the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public void setIdleTime(int time) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - time - In - int - Idle time (ms) ``` **Sample code**: ```java try { reader.setIdleTime(100); } catch (AsReaderException e) { } ``` --- ## getSessionTargetInventory Retrieves whether the Session Target Inventory is enabled on the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public boolean getSessionTargetInventory() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - boolean - `true`: Enabled / `false`: Disabled ``` **Sample code**: ```java try { boolean enabled = reader.getSessionTargetInventory(); } catch (AsReaderException e) { } ``` --- ## setSessionTargetInventory Sets whether to enable Session Target Inventory on the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public void setSessionTargetInventory(boolean enabled) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - enabled - In - boolean - `true`: Enable / `false`: Disable ``` **Sample code**: ```java try { reader.setSessionTargetInventory(true); } catch (AsReaderException e) { } ``` --- ## getEpcMaskMatchMode Retrieves the EPC mask match mode used by the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public EpcMaskMatchMode getEpcMaskMatchMode() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - [`EpcMaskMatchMode`](Enum.md#epcmaskmatchmode) - EPC mask matching mode (enumeration type) ``` **Sample code**: ```java try { EpcMaskMatchMode mode = reader.getEpcMaskMatchMode(); } catch (AsReaderException e) { } ``` --- ## setEpcMaskMatchMode Sets the EPC mask match mode for the ASR-L251G RFID module. If an error occurs during setting or retrieval, an `AsReaderException` is thrown. ```java public void setEpcMaskMatchMode(EpcMaskMatchMode mode) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - mode - In - [`EpcMaskMatchMode`](Enum.md#epcmaskmatchmode) - EPC mask matching mode (enumeration type) ``` **Sample code**: ```java try { reader.setEpcMaskMatchMode(EpcMaskMatchMode.Normal); } catch (AsReaderException e) { } ``` --- ## getModeLeftLedOn Retrieves whether the LED of the **left Mode key** on the ASR-L251G is turned on. ```java public boolean getModeLeftLedOn(); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - boolean - true: LED is on false: LED is off ``` **Sample Code**: ```java boolean mode = reader.getModeLeftLedOn(); ``` --- ## setModeLeftLedOn Sets whether the LED of the **left Mode key** on the ASR-L251G is turned on. ```java public void setModeLeftLedOn(boolean isLeftOn); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - isLeftOn - In - boolean - true: LED on false: LED off ``` **Sample Code**: ```java reader.setModeLeftLedOn(true); ``` --- ## getModeRightLedOn Retrieves whether the LED of the **right Mode key** on the ASR-L251G is turned on. ```java public boolean getModeRightLedOn(); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - boolean - true: LED is on false: LED is off ``` **Sample Code**: ```java boolean mode = reader.getModeRightLedOn(); ``` --- ## setModeRightLedOn Sets whether the LED of the **right Mode key** on the ASR-L251G is turned on. ```java public void setModeRightLedOn(boolean isRightOn); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - isRightOn - In - boolean - true: LED on false: LED off ``` **Sample Code**: ```java reader.setModeRightLedOn(true); ``` --- --- ## readMemory Reads data from a specific memory bank of a tag. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the data read by the ASR-L251G, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode readMemory(MemoryBank bank, int offset, int length); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - bank - In - [`MemoryBank`](Enum.md#memorybank) - Tag memory bank (enum [`MemoryBank`](Enum.md#memorybank)) * - offset - In - int - Start address of the tag (unit: word) * - length - In - int - Length of the tag data (unit: word) * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum [`ResultCode`](Enum.md#resultcode)) ``` **Sample Code**: ```java int offset = 0; int length = 5; ResultCode resultCode = reader.readMemory(MemoryBank.EPC, offset, length); ``` --- ## writeMemory Writes data to a specific memory bank of a tag. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the data written by the ASR-L251G, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode writeMemory(MemoryBank bank, int offset, String data); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - bank - In - [`MemoryBank`](Enum.md#memorybank) - Tag memory bank (enum [`MemoryBank`](Enum.md#memorybank)) * - offset - In - int - Start address of the tag (unit: word) * - data - In - String - Data to write (hexadecimal string) * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java int offset = 0; String data = "3333"; ResultCode resultCode = reader.writeMemory(MemoryBank.EPC, offset, data); ``` --- ## lock Locks data in a specific area of the tag. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the locked tag data, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode lock(LockParam param); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - param - In - [`LockParam`](LockParam.md) - [`LockParam`](LockParam.md) object * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java boolean killPassword = true; boolean accessPassword = true; boolean epc = true; boolean tid = true; boolean user = true; LockParam param = new LockParam(killPassword, accessPassword, epc, tid, user); ResultCode resultCode = reader.lock(param); ``` --- ## unlock Unlocks a previously locked memory bank of a tag. After unlocking, the tag data can be modified using the default password. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the unlocked tag data, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode unlock(LockParam param); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - param - In - [`LockParam`](LockParam.md) - [`LockParam`](LockParam.md) object * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java boolean killPassword = true; boolean accessPassword = true; boolean epc = true; boolean tid = true; boolean user = true; LockParam param = new LockParam(killPassword, accessPassword, epc, tid, user); ResultCode resultCode = reader.unlock(param); ``` --- ## permaLock Permanently locks data in a specific memory bank of a tag. Once permanently locked, the tag data cannot be changed or unlocked. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the permanently locked tag data, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode permaLock(LockParam param); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - param - In - [`LockParam`](LockParam.md) - [`LockParam`](LockParam.md) object * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java boolean killPassword = true; boolean accessPassword = true; boolean epc = true; boolean tid = true; boolean user = true; LockParam param = new LockParam(killPassword, accessPassword, epc, tid, user); ResultCode resultCode = reader.permaLock(param); ``` --- ## kill Permanently disables a tag. Killed tags cannot be used anymore. When this method is called, the callback method [`onAccessResult`](AsReaderEventListener.md#onaccessresult) receives the killed tag data, and the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public ResultCode kill(String killPassword); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - killPassword - In - String - Kill password * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java String killPassword = "12345678"; ResultCode resultCode = reader.kill(killPassword); ``` --- ## setBarcodeMode Sets the ASR-L251G to barcode mode. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. > ⚠️ Note > When barcode mode is enabled, RFID commands cannot be executed. > When barcode mode is disabled, only RFID commands can be executed. ```java public ResultCode setBarcodeMode(boolean isBarcodeMode) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - isBarcodeMode - In - boolean - true: enable barcode mode, false: disable barcode mode * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java try { ResultCode resultCode = reader.setBarcodeMode(true); } catch (AsReaderException e) { } ``` --- ## startScanHW Activates the ASR-L251G laser. When this method is called, the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. > ⚠️ Note > Use this if a barcode scan fails due to a barcode configuration error. ```java public void startScanHW(); ``` **Sample Code**: ```java reader.startScanHW(); ``` --- ## stopScanHW Deactivates the ASR-L251G laser. When this method is called, the callback method [`onActionChange`](AsReaderEventListener.md#onactionchanged) notifies changes in the ASR-L251G's actions. ```java public void stopScanHW(); ``` **Sample Code**: ```java reader.stopScanHW(); ``` --- ## destroy Destroys the AsReader class instance and releases resources. ```java public void destroy(); ``` **Sample Code**: ```java reader.destroy(); ``` --- ## readRFMSensorTag Inventories temperature and humidity tags. When this method is called, the callback method [`onReadTagWithRFM`](AsReaderEventListener.md#onreadtag) notifies the inventoried sensor tag data. ```java ResultCode readRFMSensorTag(); ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - [`ResultCode`](Enum.md#resultcode) - Execution result of the method (enum ResultCode) ``` **Sample Code**: ```java reader.readRFMSensorTag(); ``` --- ## usedSelectionMask Checks whether the mask at a specified position is used. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public boolean usedSelectionMask(int index) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - index - In - int - Mask index * - Return value - Out - boolean - true: mask used, false: mask not used ``` **Sample Code**: ```java try { boolean isUsed = reader.usedSelectionMask(1); } catch (AsReaderException e) { } ``` --- ## removeSelectionMask Removes the selection mask at the specified index. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void removeSelectionMask(int index) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - index - In - int - Mask index ``` **Sample Code**: ```java try { reader.removeSelectionMask(1); } catch (AsReaderException e) { } ``` --- ## clearSelectionMask Removes all selection mask information. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void clearSelectionMask() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description ``` **Sample Code**: ```java try { reader.clearSelectionMask(); } catch (AsReaderException e) { } ``` --- ## getDefaultLinkProfile Gets the default link profile value of the ASR-L251G RFID module. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public int getDefaultLinkProfile() throws AsReaderException ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - int - Default link profile value ``` **Sample Code**: ```java try { int mLinkProfile = reader.getDefaultLinkProfile(); } catch (AsReaderException e) { } ``` --- ## setDefaultLinkProfile Sets the default link profile value of the ASR-L251G RFID module. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void setDefaultLinkProfile(int value) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - value - In - int - Default link profile value ``` **Sample Code**: ```java try { reader.setDefaultLinkProfile(1); } catch (AsReaderException e) { } ``` --- ## clearEpcMask Clears EPC mask data stored in the ASR-L251G memory bank. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void clearEpcMask() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description ``` **Sample Code**: ```java try { reader.clearEpcMask(); } catch (AsReaderException e) { } ``` --- ## getEpcMaskCount Gets the number of EPC masks stored in the ASR-L251G memory bank. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java int getEpcMaskCount() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return value - Out - int - Number of EPC masks ``` **Sample Code**: ```java try { int count = reader.getEpcMaskCount(); } catch (AsReaderException e) { } ``` --- ## addEpcMask Adds an EPC mask. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void addEpcMask(int offset, int length, String mask) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - offset - In - int - Start address of the mask (unit: bit) * - length - In - int - Length of the mask (unit: bit) * - mask - In - String - Mask value (hexadecimal string) ``` **Sample Code**: ```java try { int offset = 0; int length = 5; String mask = "3333"; reader.addEpcMask(offset, length, mask); } catch (AsReaderException e) { } ``` --- ## addEpcMask Adds an EPC mask in the form of a `SelectMaskEpcParam` object. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void addEpcMask(SelectMaskEpcParam param) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - param - In - SelectMaskEpcParam - `SelectMaskEpcParam` object ``` **Sample Code**: ```java try { int offset = 0; int length = 5; String mask = "3333"; SelectMaskEpcParam param = new SelectMaskEpcParam(offset, length, mask); reader.addEpcMask(param); } catch (AsReaderException e) { } ``` --- ## getEpcMask Gets an EPC mask in the form of a `SelectMaskEpcParam` object. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public SelectMaskEpcParam getEpcMask(int index) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - index - In - int - EPC mask index * - Return value - Out - [`SelectMaskEpcParam`](SelectMaskEpcParam.md) - `SelectMaskEpcParam` object ``` **Sample Code**: ```java try { SelectMaskEpcParam param = reader.getEpcMask(1); } catch (AsReaderException e) { } ``` --- ## setEpcMaskMatchMode Configures whether the ASR-L251G RFID module uses the EPC mask. An `AsReaderException` is thrown if an error occurs when setting or retrieving data. ```java public void setEpcMaskMatchMode(boolean enabled) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - enabled - In - boolean - true: use EPC mask false: do not use EPC mask ``` **Sample Code**: ```java try { reader.setEpcMaskMatchMode(true); } catch (AsReaderException e) { } ``` --- --- ## getEpcMaskMatchMode Retrieves whether the ASR-L251G RFID module uses the EPC MASK. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public boolean getEpcMaskMatchMode() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - boolean - true: EPC Mask is used false: EPC Mask is not used ``` **Sample Code**: ```java try { boolean mode = reader.getEpcMaskMatchMode(); } catch (AsReaderException e) { } ``` --- ## getLbtMask Retrieves the mask array of the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public int[] getLbtMask() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - int[] - Mask array ``` **Sample Code**: ```java try { int[] array = reader.getLbtMask(); } catch (AsReaderException e) { } ``` --- ## getLbt Retrieves the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public LbtItem[] getLbt() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - LbtItem[] - Array of [`LbtItem`](LbtItem.md) objects ``` **Sample Code**: ```java try { LbtItem[] array = reader.getLbt(); } catch (AsReaderException e) { } ``` --- ## setLbt Sets the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public void setLbt(LbtItem[] table) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - table - In - LbtItem[] - Array of [`LbtItem`](LbtItem.md) objects ``` **Sample Code**: ```java try { LbtItem[] table= new LbtItem[3]; reader.setLbt(table); } catch (AsReaderException e) { } ``` --- ## getLbtFreq Retrieves frequency information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public String getLbtFreq(int slot) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - slot - In - int - Position in the LBT frequency table * - Return - Out - String - Frequency information ``` **Sample Code**: ```java try { String lbtFreq = reader.getLbtFreq(1); } catch (AsReaderException e) { } ``` --- --- ## getEpcMaskMatchMode Retrieves whether the ASR-L251G RFID module uses the EPC MASK. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public boolean getEpcMaskMatchMode() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - boolean - true: EPC Mask is used false: EPC Mask is not used ``` **Sample Code**: ```java try { boolean mode = reader.getEpcMaskMatchMode(); } catch (AsReaderException e) { } ``` --- ## getLbtMask Retrieves the mask array of the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public int[] getLbtMask() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - int[] - Mask array ``` **Sample Code**: ```java try { int[] array = reader.getLbtMask(); } catch (AsReaderException e) { } ``` --- ## getLbt Retrieves the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public LbtItem[] getLbt() throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - Return - Out - LbtItem[] - Array of [`LbtItem`](LbtItem.md) objects ``` **Sample Code**: ```java try { LbtItem[] array = reader.getLbt(); } catch (AsReaderException e) { } ``` --- ## setLbt Sets the frequency table information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public void setLbt(LbtItem[] table) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - table - In - LbtItem[] - Array of [`LbtItem`](LbtItem.md) objects ``` **Sample Code**: ```java try { LbtItem[] table= new LbtItem[3]; reader.setLbt(table); } catch (AsReaderException e) { } ``` --- ## getLbtFreq Retrieves frequency information. If an error occurs during data setting or retrieval, an `AsReaderException` is thrown. ```java public String getLbtFreq(int slot) throws AsReaderException; ``` ```{list-table} :align: left :class: list-table * - Parameter - In/Out - Type - Description * - slot - In - int - Position in the LBT frequency table * - Return - Out - String - Frequency information ``` **Sample Code**: ```java try { String lbtFreq = reader.getLbtFreq(1); } catch (AsReaderException e) { } ```