com.unitech.lib.device

## Interface IDeviceEventListener

- All Known Implementing Classes:
    HT730Reader, RG768Reader, RP902Reader

      public interface IDeviceEventListener

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `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)` The BaseTransport instance associated with the BaseReader instance is called when the connection state of the Device changes.
    `void` | `onTemperatureState(double temperature, java.lang.Object params)` Called to report the temperature state of the Device.

- - ### Method Detail

    - #### onStateChanged

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

      The BaseTransport instance associated with the BaseReader instance is called when the connection state of the Device changes.
      Parameters:
        `state` - A ConnectState enumeration indicating the connection status with the Device.
        `params` - If the event is accompanied by additional information, a non-null value is passed to the instance.

    - #### onActionChanged

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

      Called when the operational state of the Device.
      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

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

      Called to report the battery state of the Device.
      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

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

    - #### onKeyEvent

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

      Called to report the key type and state of the Device.
      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

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

      Called to notify the state of the Device.
      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

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

      Called to report the temperature state of the Device.
      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.