public class BarcodeReader extends BaseReader
_baseDevice, _baseEngine, _baseTransport, _failCount, _firmwareVersion, _id, _isKeepAliveThreadAlive, _keepAliveRunnable, _keepAliveThread, _lastTime, _serialNumber, _triggerDisconnect, DEFAULT_BATTERY_CHECK_INTERVAL, RETRY_COUNT, TAG| Constructor and Description |
|---|
BarcodeReader(UnitechDevice device)
Constructs a new BarcodeReader object with the specified UnitechDevice.
|
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroys the BarcodeReader object.
|
static DeviceParam[] |
getDeviceSupportedParameters(DeviceType deviceType)
Get the supported parameters of the specified device model.
|
static EngineParam[] |
getEngineSupportedParameters(EngineModel engineModel)
Get the supported parameters of the specified engine model.
|
void |
getParameter(DeviceParamID deviceParamID,
IParameterEventListener listener)
Get a specific device parameter setting.
|
void |
getParameter(int id,
DeviceParamID deviceParamID,
IParameterEventListener listener)
Get a specific device parameter setting.
|
void |
getParameters(DeviceParamID[] deviceParamIDs,
IParameterEventListener delegate)
Get multiple device parameter settings.
|
void |
getParameters(int id,
DeviceParamID[] deviceParamIDs,
IParameterEventListener delegate)
Get multiple device parameter settings.
|
DeviceParamID[] |
getSupportedParameterIds()
Gets the supported parameter IDs of the device.
|
DeviceParam[] |
getSupportedParameters()
Gets the supported parameters of the device.
|
protected boolean |
initReader()
Initializes the reader.
|
void |
onTransportConnectStateChanged(ConnectState state,
java.lang.Object params)
This method is called when the connection state changes in the transport layer.
|
void |
setParameter(DeviceParam deviceParam,
IParameterEventListener listener)
Set a device parameter setting.
|
void |
setParameter(int id,
DeviceParam deviceParam,
IParameterEventListener listener)
Set a device parameter setting.
|
void |
setParameters(DeviceParam[] deviceParams,
IParameterEventListener delegate)
Set multiple device parameter settings.
|
void |
setParameters(int id,
DeviceParam[] deviceParams,
IParameterEventListener delegate)
Set multiple device parameter settings.
|
addListener, alive, checkError, checkError, clearListener, connect, disconnect, getAddress, getBaseEngine, getCheckBatteryInterval, getConnectState, getConnectType, getDeviceName, getDeviceType, getProtocol, getSerialNumber, getTransport, getVersion, removeListener, resetError, setCheckBatteryInterval, triggerBarcodeEvent, triggerBatteryPercentageChanged, triggerBatteryStateChanged, triggerConnectStateChanged, triggerNotificationEventpublic BarcodeReader(UnitechDevice device)
device - The UnitechDevice to associate with this BarcodeReader.public void destroy()
destroy in class BaseReaderpublic DeviceParamID[] getSupportedParameterIds()
public DeviceParam[] getSupportedParameters()
protected boolean initReader()
initReader in class BaseReaderpublic static DeviceParam[] getDeviceSupportedParameters(DeviceType deviceType) throws ReaderException
deviceType - The device model to get the supported parameters.ReaderException - If the device model is not supported.public static EngineParam[] getEngineSupportedParameters(EngineModel engineModel) throws ReaderException
engineModel - The engine model to get the supported parameters.ReaderException - If the engine model is not supported.public void onTransportConnectStateChanged(ConnectState state, java.lang.Object params)
onTransportConnectStateChanged in interface com.unitech.lib.event.ITransportEventListeneronTransportConnectStateChanged in class BaseReaderstate - The new connection state.params - Additional parameters associated with the state change event.public void getParameter(int id,
DeviceParamID deviceParamID,
IParameterEventListener listener)
id - The request ID. Default is 0.deviceParamID - The parameter ID.listener - The listener to receive the result.public void getParameter(DeviceParamID deviceParamID, IParameterEventListener listener)
deviceParamID - The parameter ID.listener - The listener to receive the result.public void setParameter(int id,
DeviceParam deviceParam,
IParameterEventListener listener)
id - The request ID. Default is 1.deviceParam - The parameter setting.listener - The listener to receive the result.public void setParameter(DeviceParam deviceParam, IParameterEventListener listener)
deviceParam - The parameter setting.listener - The listener to receive the result.public void getParameters(int id,
DeviceParamID[] deviceParamIDs,
IParameterEventListener delegate)
id - The request ID. Default is 0.deviceParamIDs - The parameter IDs.delegate - The listener to receive the result.public void getParameters(DeviceParamID[] deviceParamIDs, IParameterEventListener delegate)
deviceParamIDs - The parameter IDs.delegate - The listener to receive the result.public void setParameters(int id,
DeviceParam[] deviceParams,
IParameterEventListener delegate)
id - The request ID. Default is 1.deviceParams - The parameter settings.delegate - The listener to receive the result.public void setParameters(DeviceParam[] deviceParams, IParameterEventListener delegate)
deviceParams - The parameter settings.delegate - The listener to receive the result.