com.unitech.lib.pax

## Class PA768eReader

- java.lang.Object
- - com.unitech.lib.reader.BaseReader
  - - com.unitech.lib.pax.PA768eReader

- All Implemented Interfaces:
    com.unitech.lib.device.IDeviceEventListener, com.unitech.lib.device.IReader, com.unitech.lib.transport.event.IConnectStateEventListener

      public class PA768eReader
      extends BaseReader
      implements com.unitech.lib.device.IDeviceEventListener

- - ### Field Summary

    - ### Fields inherited from class com.unitech.lib.reader.BaseReader

      `_actionState, _baseDevice, _baseTransport, _baseUHF, _checkInterval, _failCount, _fwVersion, _isDisconnecting, _lastError, _serialNo, DEFAULT_BATTERY_CHECK_INTERVAL, mLastTime, RETRY_COUNT, TAG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PA768eReader(Context context)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `connect()` An instance of the BaseReader class tries to connect to the configured address
    `void` | `disconnect()` Causes an instance of the BaseReader class to disconnect from the connected device.
    `ResultCode` | `factoryReset()` Reset the device to factory default.
    `int` | `getAutoOffTime()` Returns the time which the instrument automatically turns off.
    `int[]` | `getAutoOffTimeList()` Returns the equipment supports auto off time list, the unit is minutes
    `int` | `getBatteryState()` Returns the battery state of the equipment.
    `BeeperState` | `getBeeper()` Returns the beeper operation status of the equipment.
    `DataFormat` | `getDataFormat()` Returns the data format setting of the equipment.
    `DataInfo` | `getDataInfo()` Returns the data info setting of the equipment.
    `DataRange` | `getDataRange()` Returns the data range setting of the equipment.
    `DataTerminator` | `getDataTerminator()` Returns the data terminator setting of the equipment.
    `FindDevice` | `getFindDevice()` Returns the find device status of the equipment.
    `OperatingMode` | `getOperatingMode()` Returns the operating mode status of the equipment.
    `PowerDutyLimitationMap` | `getPowerAndDutyLimitationMapInfo()` Returns the Power Duty Limitation Map setting of the equipment.
    `ReadMode` | `getReadMode()` Returns the read mode status of the equipment.
    `ScreenOffTime` | `getScreenOffTime()` Returns the time which the instrument automatically screen off.
    `SKUType` | `getSKU()` Returns the SKU type of the equipment.
    `double` | `getTemperature()` Returns the temperature of the equipment.
    `java.util.Date` | `getTime()` Returns the system time of the device.
    `VibratorState` | `getVibrator()` Returns the vibrator operation status of the equipment.
    `boolean` | `initReader()` Initializes an BaseReader instance after the BaseReader instance is associated with the device.
    `void` | `onActionChanged(ResultCode resultCode, ActionType actionType, java.lang.Object params)` Called when the operational state of the Device.
    `void` | `onBatteryState(int batteryState, java.lang.Object params)` Called to report the battery state of the Device.
    `void` | `onEvent(int sub, java.lang.Object data)`
    `void` | `onKeyEvent(KeyType keyType, KeyState keyState, java.lang.Object params)` Called to report the key type and state of the Device.
    `void` | `onNotificationState(NotificationState state, java.lang.Object params)` Called to notify the state of the Device.
    `void` | `onStateChanged(ConnectState state, java.lang.Object params)` Called when the connection state of the BaseTransport instance and the device changes.
    `void` | `onTemperatureState(double temperature, java.lang.Object params)` Called to report the temperature state of the Device.
    `void` | `powerCtrl(boolean enabled)`
    `void` | `setAutoOffTime(int time)` Sets the time which the equipment automatically turns off.
    `void` | `setBeeper(BeeperState state)` Sets the beeper operation status of the equipment.
    `void` | `setDataFormat(DataFormat dataFormat)` Sets the data format setting of the equipment.
    `void` | `setDataInfo(DataInfo dataInfo)` Sets the data info setting of the equipment.
    `void` | `setDataRange(DataRange dataRange)` Sets the data range setting of the equipment.
    `void` | `setDataTerminator(DataTerminator dataTerminator)` Sets the data terminator setting of the equipment.
    `void` | `setDisplayOutput(DisplayOutput displayOut)` Sets the display output setting of the equipment.
    `void` | `setDisplayTags(DisplayTags displayTags)` Sets the display tags setting of the equipment output.
    `void` | `setFindDevice(FindDevice mode)` Sets the find device status of the equipment.
    `void` | `setOperatingMode(OperatingMode mode)` Sets the operating mode status of the equipment.
    `void` | `setReadMode(ReadMode mode)` Sets the read mode status of the equipment.
    `void` | `setScreenOffTime(ScreenOffTime time)` Sets the time which the equipment automatically screen off.
    `void` | `setSoftWareScan(boolean softwareScan)` Sets the software scan setting of the equipment.
    `void` | `setTime(java.util.Date time)` Sets the system time of the instrument.
    `void` | `setVibrator(VibratorState state)` Sets the vibrator operation status of the equipment.

    - ### Methods inherited from class com.unitech.lib.reader.BaseReader

      `addListener, checkError, clearListener, destroy, getAction, getAddress, getCheckInterval, getConnectType, getDeviceName, getDeviceType, getLastError, getProtocol, getRfidUhf, getSerialNo, getState, getTransport, getVersion, listen, onReaderActionChanged, onReaderBatteryState, onReaderKeyChanged, onReaderNotificationState, onReaderStateChanged, onReaderTemperatureState, removeListener, resetError, setAction, setAddress, setCheckInterval, setDeviceName, setDeviceType, setLastError, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### PA768eReader

          public PA768eReader(Context context)
                       throws java.lang.Exception

      Throws:
        `java.lang.Exception`

  - ### Method Detail

    - #### connect

          public boolean connect()

      Description copied from class: `BaseReader`
      An instance of the BaseReader class tries to connect to the configured address
      Overrides:
        `connect` in class `BaseReader`
      Returns:
        Returns true if the connection attempt is successful, false on failure.

    - #### disconnect

          public void disconnect()

      Description copied from class: `BaseReader`
      Causes an instance of the BaseReader class to disconnect from the connected device.
      Overrides:
        `disconnect` in class `BaseReader`

    - #### initReader

          public boolean initReader()

      Description copied from class: `BaseReader`
      Initializes an BaseReader instance after the BaseReader instance is associated with the device.
      Specified by:
        `initReader` in class `BaseReader`
      Returns:
        Returns true if successful, false against failure

    - #### getBeeper

          public BeeperState getBeeper()
                                throws ReaderException

      Description copied from class: `BaseReader`
      Returns the beeper operation status of the equipment.
      Specified by:
        `getBeeper` in class `BaseReader`
      Returns:
        To specify the status of the equipment's beeper BeeperState enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setBeeper

          public void setBeeper(BeeperState state)
                         throws ReaderException

      Description copied from class: `BaseReader`
      Sets the beeper operation status of the equipment.
      Specified by:
        `setBeeper` in class `BaseReader`
      Parameters:
        `state` - To specify the status of the beeper BeeperState enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getVibrator

          public VibratorState getVibrator()
                                    throws ReaderException

      Description copied from class: `BaseReader`
      Returns the vibrator operation status of the equipment.
      Specified by:
        `getVibrator` in class `BaseReader`
      Returns:
        To specify the status of the equipment's vibrator VibratorState enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setVibrator

          public void setVibrator(VibratorState state)
                           throws ReaderException

      Description copied from class: `BaseReader`
      Sets the vibrator operation status of the equipment.
      Specified by:
        `setVibrator` in class `BaseReader`
      Parameters:
        `state` - To specify the status of the vibrator VibratorState enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getBatteryState

          public int getBatteryState()
                              throws ReaderException

      Description copied from class: `BaseReader`
      Returns the battery state of the equipment.
      Specified by:
        `getBatteryState` in class `BaseReader`
      Returns:
        To specify the status of the equipment's battery.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getTime

          public java.util.Date getTime()
                                 throws ReaderException

      Description copied from class: `BaseReader`
      Returns the system time of the device.
      Specified by:
        `getTime` in class `BaseReader`
      Returns:
        An instance of Date representing the current date and time on the device.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setTime

          public void setTime(java.util.Date time)
                       throws ReaderException

      Description copied from class: `BaseReader`
      Sets the system time of the instrument.
      Specified by:
        `setTime` in class `BaseReader`
      Parameters:
        `time` - An instance of Date representing the current date and time on the device.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getAutoOffTimeList

          public int[] getAutoOffTimeList()

      Description copied from class: `BaseReader`
      Returns the equipment supports auto off time list, the unit is minutes
      Specified by:
        `getAutoOffTimeList` in class `BaseReader`
      Returns:
        This is an integer list that indicates the time that the device supported auto off time.

    - #### getAutoOffTime

          public int getAutoOffTime()
                             throws ReaderException

      Description copied from class: `BaseReader`
      Returns the time which the instrument automatically turns off.
      Specified by:
        `getAutoOffTime` in class `BaseReader`
      Returns:
        This is an integer that indicates the time that the device is turned off automatically.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setAutoOffTime

          public void setAutoOffTime(int time)
                              throws ReaderException

      Description copied from class: `BaseReader`
      Sets the time which the equipment automatically turns off.
      Specified by:
        `setAutoOffTime` in class `BaseReader`
      Parameters:
        `time` - An integer that indicates how long the device will automatically turn itself off. The time unit is specified in minutes. If you set the time to 0, the instrument will not turn off automatically.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### factoryReset

          public ResultCode factoryReset()
                                  throws ReaderException

      Description copied from class: `BaseReader`
      Reset the device to factory default.
      Specified by:
        `factoryReset` in class `BaseReader`
      Returns:
        The ResultCode enumeration indicating the result of the method's operation.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getSKU

          public SKUType getSKU()
                         throws ReaderException

      Description copied from class: `BaseReader`
      Returns the SKU type of the equipment.
      Specified by:
        `getSKU` in class `BaseReader`
      Returns:
        An SKUType enumeration that indicates the SKU type of the device.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getTemperature

          public double getTemperature()
                                throws ReaderException

      Description copied from class: `BaseReader`
      Returns the temperature of the equipment.
      Specified by:
        `getTemperature` in class `BaseReader`
      Returns:
        The temperature of the device and the range is ~128 to 127.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getReadMode

          public ReadMode getReadMode()
                               throws ReaderException

      Description copied from class: `BaseReader`
      Returns the read mode status of the equipment.
      Specified by:
        `getReadMode` in class `BaseReader`
      Returns:
        To specify the status of the equipment's read mode ReadMode enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setReadMode

          public void setReadMode(ReadMode mode)
                           throws ReaderException

      Description copied from class: `BaseReader`
      Sets the read mode status of the equipment.
      Specified by:
        `setReadMode` in class `BaseReader`
      Parameters:
        `mode` - To specify the status of the read mode ReadMode enumeration.
      Throws:
        `ReaderException`

    - #### getFindDevice

          public FindDevice getFindDevice()
                                   throws ReaderException

      Description copied from class: `BaseReader`
      Returns the find device status of the equipment.
      Specified by:
        `getFindDevice` in class `BaseReader`
      Returns:
        To specify the status of the equipment's find device mode FindDevice class.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setFindDevice

          public void setFindDevice(FindDevice mode)
                             throws ReaderException

      Description copied from class: `BaseReader`
      Sets the find device status of the equipment.
      Specified by:
        `setFindDevice` in class `BaseReader`
      Parameters:
        `mode` - To specify the status of the find device FindDevice class.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getOperatingMode

          public OperatingMode getOperatingMode()
                                         throws ReaderException

      Description copied from class: `BaseReader`
      Returns the operating mode status of the equipment.
      Specified by:
        `getOperatingMode` in class `BaseReader`
      Returns:
        To specify the status of the equipment's operating mode OperatingMode enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setOperatingMode

          public void setOperatingMode(OperatingMode mode)
                                throws ReaderException

      Description copied from class: `BaseReader`
      Sets the operating mode status of the equipment.
      Specified by:
        `setOperatingMode` in class `BaseReader`
      Parameters:
        `mode` - To specify the status of the operating mode OperatingMode enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getDataFormat

          public DataFormat getDataFormat()
                                   throws ReaderException

      Description copied from class: `BaseReader`
      Returns the data format setting of the equipment.
      Specified by:
        `getDataFormat` in class `BaseReader`
      Returns:
        To specify the setting of the equipment's data format DataFormat enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setDataFormat

          public void setDataFormat(DataFormat dataFormat)
                             throws ReaderException

      Description copied from class: `BaseReader`
      Sets the data format setting of the equipment.
      Specified by:
        `setDataFormat` in class `BaseReader`
      Parameters:
        `dataFormat` - To specify the setting of the data format DataFormat enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getDataInfo

          public DataInfo getDataInfo()
                               throws ReaderException

      Description copied from class: `BaseReader`
      Returns the data info setting of the equipment.
      Specified by:
        `getDataInfo` in class `BaseReader`
      Returns:
        To specify the setting of the equipment's data info DataInfo enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setDataInfo

          public void setDataInfo(DataInfo dataInfo)
                           throws ReaderException

      Description copied from class: `BaseReader`
      Sets the data info setting of the equipment.
      Specified by:
        `setDataInfo` in class `BaseReader`
      Parameters:
        `dataInfo` - To specify the setting of the data info DataInfo enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getDataRange

          public DataRange getDataRange()
                                 throws ReaderException

      Description copied from class: `BaseReader`
      Returns the data range setting of the equipment.
      Specified by:
        `getDataRange` in class `BaseReader`
      Returns:
        To specify the setting of the equipment's data range DataRange enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setDataRange

          public void setDataRange(DataRange dataRange)
                            throws ReaderException

      Description copied from class: `BaseReader`
      Sets the data range setting of the equipment.
      Specified by:
        `setDataRange` in class `BaseReader`
      Parameters:
        `dataRange` - To specify the setting of the data range DataRange enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getDataTerminator

          public DataTerminator getDataTerminator()
                                           throws ReaderException

      Description copied from class: `BaseReader`
      Returns the data terminator setting of the equipment.
      Specified by:
        `getDataTerminator` in class `BaseReader`
      Returns:
        To specify the setting of the equipment's data terminator DataTerminator enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setDataTerminator

          public void setDataTerminator(DataTerminator dataTerminator)
                                 throws ReaderException

      Description copied from class: `BaseReader`
      Sets the data terminator setting of the equipment.
      Specified by:
        `setDataTerminator` in class `BaseReader`
      Parameters:
        `dataTerminator` - To specify the setting of the data terminator DataTerminator enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getPowerAndDutyLimitationMapInfo

          public PowerDutyLimitationMap getPowerAndDutyLimitationMapInfo()

      Description copied from class: `BaseReader`
      Returns the Power Duty Limitation Map setting of the equipment.
      Specified by:
        `getPowerAndDutyLimitationMapInfo` in class `BaseReader`
      Returns:
        To specify the setting of the equipment's Power Duty Limitation Map.

    - #### setSoftWareScan

          public void setSoftWareScan(boolean softwareScan)

      Description copied from class: `BaseReader`
      Sets the software scan setting of the equipment.
      Specified by:
        `setSoftWareScan` in class `BaseReader`
      Parameters:
        `softwareScan` - To specify the setting of the software scan SoftWareScan enumeration.

    - #### setDisplayTags

          public void setDisplayTags(DisplayTags displayTags)

      Description copied from class: `BaseReader`
      Sets the display tags setting of the equipment output.
      Specified by:
        `setDisplayTags` in class `BaseReader`
      Parameters:
        `displayTags` - To specify the setting of the display tags DisplayTags enumeration.

    - #### setDisplayOutput

          public void setDisplayOutput(DisplayOutput displayOut)
                                throws ReaderException

      Description copied from class: `BaseReader`
      Sets the display output setting of the equipment.
      Specified by:
        `setDisplayOutput` in class `BaseReader`
      Parameters:
        `displayOut` - To specify the setting of the display output DisplayOutput enumeration.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### getScreenOffTime

          public ScreenOffTime getScreenOffTime()
                                         throws ReaderException

      Description copied from class: `BaseReader`
      Returns the time which the instrument automatically screen off.
      Specified by:
        `getScreenOffTime` in class `BaseReader`
      Returns:
        This is an integer that indicates the time that the device is screen off automatically.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### setScreenOffTime

          public void setScreenOffTime(ScreenOffTime time)
                                throws ReaderException

      Description copied from class: `BaseReader`
      Sets the time which the equipment automatically screen off.
      Specified by:
        `setScreenOffTime` in class `BaseReader`
      Parameters:
        `time` - It indicates how long the device will automatically screen off. The time is specified in minutes and seconds. If you set the minutes to 0 and seconds to 0, the instrument will not screen off automatically.
      Throws:
        `ReaderException` - An ReaderException exception is thrown if a failure occurs while setting data on the instrument or returning data.

    - #### onStateChanged

          public void onStateChanged(ConnectState state,
                                     java.lang.Object params)

      Description copied from class: `BaseReader`
      Called when the connection state of the BaseTransport instance and the device changes.
      Specified by:
        `onStateChanged` in interface `com.unitech.lib.device.IDeviceEventListener`
      Specified by:
        `onStateChanged` in interface `com.unitech.lib.transport.event.IConnectStateEventListener`
      Specified by:
        `onStateChanged` in class `BaseReader`
      Parameters:
        `state` - A ConnectState enumeration that indicates the device and its connection status.
        `params` - This parameter is used to transmit additional information that is generated

    - #### onActionChanged

          public void onActionChanged(ResultCode resultCode,
                                      ActionType actionType,
                                      java.lang.Object params)

      Description copied from interface: `com.unitech.lib.device.IDeviceEventListener`
      Called when the operational state of the Device.
      Specified by:
        `onActionChanged` in interface `com.unitech.lib.device.IDeviceEventListener`
      Parameters:
        `resultCode` - ResultCode enumeration type indicating the operation result of the Device.
        `actionType` - An ActionType enumeration indicating the device's operational state.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### onBatteryState

          public void onBatteryState(int batteryState,
                                     java.lang.Object params)

      Description copied from interface: `com.unitech.lib.device.IDeviceEventListener`
      Called to report the battery state of the Device.
      Specified by:
        `onBatteryState` in interface `com.unitech.lib.device.IDeviceEventListener`
      Parameters:
        `batteryState` - An integer representing the battery state of the Device.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### onEvent

          public void onEvent(int sub,
                              java.lang.Object data)

      Specified by:
        `onEvent` in interface `com.unitech.lib.device.IDeviceEventListener`

    - #### onKeyEvent

          public void onKeyEvent(KeyType keyType,
                                 KeyState keyState,
                                 java.lang.Object params)

      Description copied from interface: `com.unitech.lib.device.IDeviceEventListener`
      Called to report the key type and state of the Device.
      Specified by:
        `onKeyEvent` in interface `com.unitech.lib.device.IDeviceEventListener`
      Parameters:
        `keyType` - An KeyType enum indicating the Device's Trigger Event.
        `keyState` - An KeyState enum indicating the Device's Key Event.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### onNotificationState

          public void onNotificationState(NotificationState state,
                                          java.lang.Object params)

      Description copied from interface: `com.unitech.lib.device.IDeviceEventListener`
      Called to notify the state of the Device.
      Specified by:
        `onNotificationState` in interface `com.unitech.lib.device.IDeviceEventListener`
      Parameters:
        `state` - A NotificationState enumeration indicating the notification status with the Device.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### onTemperatureState

          public void onTemperatureState(double temperature,
                                         java.lang.Object params)

      Description copied from interface: `com.unitech.lib.device.IDeviceEventListener`
      Called to report the temperature state of the Device.
      Specified by:
        `onTemperatureState` in interface `com.unitech.lib.device.IDeviceEventListener`
      Parameters:
        `temperature` - An double representing the temperature state of the Device.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### powerCtrl

          public void powerCtrl(boolean enabled)
                         throws java.lang.Exception

      Throws:
        `java.lang.Exception`