public class Decoder
extends java.lang.Object
Constructor and Description |
---|
Decoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
callbackKeepGoing()
Callback used to stop decoding.
|
boolean |
callbackMultiRead()
Callback used for MultiRead (Shotgun).
|
void |
connectDecoderLibrary()
Method used to connect to the engine and initialize the API.
|
void |
disableSymbology(int symID)
Disables the passed in symbology ID.
|
void |
disconnectDecoderLibrary()
Method used to disconnect from the engine and deinitialize the API.
|
void |
enableSymbology(int symID)
Enables the passed in symbology ID.
|
java.lang.String |
getAPIRevision()
Retrieves the revision of the API.
|
byte |
getBarcodeAimID()
Gets the Barcode AimID when
waitForDecode(int) succeeds. |
byte |
getBarcodeAimModifier()
Gets the Barcode AimID when
waitForDecode(int) succeeds. |
byte[] |
getBarcodeByteData()
Gets the Barcode data when
waitForDecode(int) succeeds. |
byte |
getBarcodeCodeID()
Gets the Barcode CodeID when
waitForDecode(int) succeeds. |
java.lang.String |
getBarcodeData()
Gets the Barcode Data in string form when
waitForDecode(int) succeeds. |
int |
getBarcodeLength()
Gets the Barcode length when
waitForDecode(int) succeeds. |
java.lang.String |
getControlLogicRevision()
Retrieves the revision of the Decoder Control Logic.
|
void |
getDecodeOptions(DecodeOptions options)
Gets the decode options parameters.
|
java.lang.String |
getDecoderRevision()
Retrieves the revision of the Decoder.
|
void |
getDecodeWindow(DecodeWindowing.DecodeWindow window)
Retrieves the decode window parameters.
|
void |
getDecodeWindowLimits(DecodeWindowing.DecodeWindowLimits limits)
Retrieves the decode window parameter limits.
|
int |
getDecodeWindowMode()
Retrieves the current decode window mode setting
|
java.lang.String |
getDecThreadsRevision()
Deprecated.
Retrieves the revision of the Decoder Threading.
|
int |
getEngineID()
Retrieves the EngineID of the connected Engine.
|
java.lang.String |
getEngineSerialNumber()
Retrieves the serial number of the connected Engine.
|
int |
getEngineType()
Retrieves the engine type of the connected Engine.
|
java.lang.String |
getErrorMessage(int error)
Method used to get associated error message with an error code.
|
int |
getExposureMode()
Gets the exposure mode currently set to be used during scanning.
|
void |
getExposureSettings(int[] array)
Gets the current exposure settings for the image sensor.
|
int |
getImageHeight()
Gets the image height of the connected engine.
|
void |
getImagerProperties(ImagerProperties imgProp)
Retrieves the imager properties of the connected engine.
|
int |
getImageWidth()
Gets the image width of the connected engine.
|
void |
getIQImage(IQImagingProperties IQParams,
Bitmap bitmap)
Retrieves an IQ Image (intelligent imaging)
|
int |
getLastDecodeTime()
Gets the last decode time for a successful decode
|
byte[] |
getLastImage(ImageAttributes imgAtt)
Retrieves last image sent to the Decoder.
|
int |
getLightsMode()
Retrieves the current lights mode for scanning.
|
int |
getMaxMessageLength()
Retrieves the maximum message length capable of the Decoder.
|
int |
getOCRMode()
Gets the OCR Mode
|
int |
getOCRTemplates()
Gets the OCR active template configuration.
|
byte[] |
getOCRUserTemplate()
Gets the OCR User defined template.
|
void |
getPreviewFrame(Bitmap bitmap)
Gets a single frame (1/4 size) from the engine.
|
int |
getPSOCMajorRev()
Retrieves the Major revision of the PSOC of the connected Engine.
|
int |
getPSOCMinorRev()
Retrieves the Minor revision of the PSOC of the connected Engine.
|
java.lang.String |
getScanDriverRevision()
Retrieves the revision of the Scan Driver.
|
java.lang.String |
getSecondaryDecoderRevision()
Deprecated.
Secondary Decoder currently unsupported
|
int |
getShowDecodeWindow()
Retrieves the current show decode window setting.
|
void |
getSingleFrame(Bitmap bitmap)
Gets a single frame from the engine.
|
void |
getSymbologyConfig(SymbologyConfig symConfig)
Retrieves the current configuration of the passed in structure.
|
void |
getSymbologyConfigDefaults(SymbologyConfig symConfig)
Retrieves the default configuration of the passed in structure.
|
int |
getSymbologyMaxRange(int symID)
Retrieves the maximum range of the passed in symbology ID.
|
int |
getSymbologyMinRange(int symID)
Retrieves the minimum range of the passed in symbology ID.
|
void |
setDecodeAttemptLimit(int limit)
Sets the decode attempt limit (or the amount of time it will spend
decoding a particular image).
|
void |
setDecodeOptions(DecodeOptions options)
Sets the decode options parameters.
|
void |
setDecodeParameter(int menutag,
int value) |
void |
setDecoderListeners(DecoderListener observer)
Used to register the listeners
|
void |
setDecodeWindow(DecodeWindowing.DecodeWindow window)
Sets the decode window parameters.
|
void |
setDecodeWindowMode(int nMode)
Sets the decode window mode to be used.
|
void |
setExposureMode(int mode)
Sets the exposure mode to be used during scanning.
|
void |
setExposureSettings(int[] array)
Sets the current exposure settings for the image sensor.
|
void |
setLastImage(byte[] img,
int w,
int h)
Sets last image that will be sent to the Decoder.
|
void |
setLightsMode(int Mode)
Sets the lights mode for scanning.
|
void |
setOCRMode(int mode)
Sets the OCR Mode (used for enabling/disabling)
|
void |
setOCRTemplates(int template)
Sets the OCR template configuration (pre-defined).
|
void |
setOCRUserTemplate(byte[] template)
Sets the OCR User defined template.
|
void |
setShowDecodeWindow(int nMode)
Sets the show decode window setting.
|
void |
setSymbologyConfig(SymbologyConfig symConfig)
Sets the current configuration of the passed in structure.
|
void |
setSymbologyDefaults(int symID)
Sets the passed in symbology ID defaults.
|
void |
startScanning()
Starts scanning operation (image taking, not decoding).
|
void |
stopScanning()
Stops scanning operation (image taking, not decoding).
|
void |
waitForDecode(int dwTimeout)
Method used to start decoding.
|
void |
waitForDecodeTwo(int dwTimeout,
DecodeResult result)
Method to start decoding.
|
void |
waitMultipleDecode(int dwTimeout)
This function is used to read multiple symbols using a single function
call.
|
public void connectDecoderLibrary() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void setDecodeParameter(int menutag, int value)
public void disconnectDecoderLibrary() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getErrorMessage(int error) throws DecoderException
error
- - ResultId to get error message associatedDecoderException
- with appropriate error code and messagepublic int getMaxMessageLength() throws DecoderException
DecoderException
- with appropriate error code and messagepublic int getEngineID() throws DecoderException
DecoderException
- with appropriate error code and messagepublic int getPSOCMajorRev() throws DecoderException
DecoderException
- with appropriate error code and messagepublic int getPSOCMinorRev() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getEngineSerialNumber() throws DecoderException
DecoderException
- with appropriate error code and messagepublic int getEngineType() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getAPIRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getDecoderRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getSecondaryDecoderRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getControlLogicRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getDecThreadsRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic java.lang.String getScanDriverRevision() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void getImagerProperties(ImagerProperties imgProp) throws DecoderException
imgProp
- ImagerProperties structureDecoderException
- with appropriate error code and messagepublic byte[] getLastImage(ImageAttributes imgAtt) throws DecoderException
imgAtt
- to fillDecoderException
- with appropriate error code and messagepublic void setLastImage(byte[] img, int w, int h) throws DecoderException
img
- - RAW image arrayw
- - width of imageh
- - height of imageDecoderException
- with appropriate error code and messagepublic void getIQImage(IQImagingProperties IQParams, Bitmap bitmap) throws DecoderException
IQParams
- describing the location and parameters of the IQ image
to be retrievedbitmap
- returnedDecoderException
- with appropriate error code and messagepublic void setDecodeWindowMode(int nMode) throws DecoderException
nMode
- DecodeWindowMode setting (see DecodeWindowing.DecodeWindowMode
)DecoderException
public int getDecodeWindowMode() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void setDecodeWindow(DecodeWindowing.DecodeWindow window) throws DecoderException
window
- - DecodeWindow structure to be setDecoderException
- with appropriate error code and messagepublic void getDecodeWindow(DecodeWindowing.DecodeWindow window) throws DecoderException
window
- - DecodeWindow structure to be retrievedDecoderException
- with appropriate error code and messagepublic void getDecodeWindowLimits(DecodeWindowing.DecodeWindowLimits limits) throws DecoderException
limits
- - DecodeWindowLimits structure to be setDecoderException
- with appropriate error code and messagepublic void setShowDecodeWindow(int nMode) throws DecoderException
nMode
- - ShowDecodeWindowMode settingDecoderException
- with appropriate error code and messagepublic int getShowDecodeWindow() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void enableSymbology(int symID) throws DecoderException
symID
- - SymbologyID to be enabledDecoderException
- with appropriate error code and messagepublic void disableSymbology(int symID) throws DecoderException
symID
- - SymbologyID to be enabledDecoderException
- with appropriate error code and messagepublic void setSymbologyDefaults(int symID) throws DecoderException
symID
- - SymbologyID to be defaultedDecoderException
- with appropriate error code and messagepublic void setSymbologyConfig(SymbologyConfig symConfig) throws DecoderException
symConfig
- - SymbologyConfig to set.DecoderException
public void getSymbologyConfig(SymbologyConfig symConfig) throws DecoderException
symConfig
- - SymbologyConfig to retrieve.DecoderException
- with appropriate error code and messagepublic void getSymbologyConfigDefaults(SymbologyConfig symConfig) throws DecoderException
symConfig
- - SymbologyConfig to retrieve.DecoderException
- with appropriate error code and messagepublic int getSymbologyMinRange(int symID) throws DecoderException
symID
- - SymbologyID minimum range toDecoderException
- with appropriate error code and messagepublic int getSymbologyMaxRange(int symID) throws DecoderException
symID
- - SymbologyID maximum range toDecoderException
- with appropriate error code and messagepublic void setLightsMode(int Mode) throws DecoderException
Mode
- - LightsMode setting to setDecoderException
- with appropriate error code and messagepublic int getLightsMode() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void setDecodeAttemptLimit(int limit) throws DecoderException
limit
- - in millisecondsDecoderException
- with appropriate error code and messagepublic void setOCRTemplates(int template) throws DecoderException
template
- - OCRTemplates settingDecoderException
- with appropriate error code and messagepublic int getOCRTemplates() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void setOCRUserTemplate(byte[] template) throws DecoderException
template
- - byte array of the templateDecoderException
- with appropriate error code and messagepublic byte[] getOCRUserTemplate() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void setOCRMode(int mode) throws DecoderException
mode
- - OCRMode to setDecoderException
- with appropriate error code and messagepublic int getOCRMode() throws DecoderException
DecoderException
- with appropriate error code and messagepublic void waitForDecode(int dwTimeout) throws DecoderException
dwTimeout
- - timeout in milliseconds to automatically stop scanningDecoderException
public void waitForDecodeTwo(int dwTimeout, DecodeResult result) throws DecoderException
dwTimeout
- - length of time in milliseconds to timeoutresult
- - DecodeResult structureDecoderException
public void waitMultipleDecode(int dwTimeout) throws DecoderException
callbackMultiRead()
function to notify
the application data is available.
This function continues to find and decode symbols until the time
specified in the dwTimeout parameter has expired, or until one of the
callbackKeepGoing()
functions returns false.dwTimeout
- - length of time in milliseconds to timeoutDecoderException
public byte[] getBarcodeByteData() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public byte getBarcodeCodeID() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public byte getBarcodeAimID() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public byte getBarcodeAimModifier() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public int getBarcodeLength() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public java.lang.String getBarcodeData() throws DecoderException
waitForDecode(int)
succeeds.DecoderException
public int getLastDecodeTime() throws DecoderException
DecoderException
public void getSingleFrame(Bitmap bitmap) throws DecoderException
bitmap
- imageDecoderException
public void getPreviewFrame(Bitmap bitmap) throws DecoderException
bitmap
- imageDecoderException
public void startScanning() throws DecoderException
DecoderException
public void stopScanning() throws DecoderException
DecoderException
public int getImageWidth() throws DecoderException
DecoderException
public int getImageHeight() throws DecoderException
DecoderException
public void setExposureMode(int mode) throws DecoderException
mode
- to be set seeDecoderException
public int getExposureMode() throws DecoderException
DecoderException
public void setExposureSettings(int[] array) throws DecoderException
array
- of exposure settings to set [ExposureValues.ExposureSettings tag, Value]DecoderException
public void getExposureSettings(int[] array) throws DecoderException
array
- - [ExposureValues.ExposureSettings tag, Value] array to setDecoderException
public void getDecodeOptions(DecodeOptions options) throws DecoderException
options
- - DecodeOptions structure to be getDecoderException
- with appropriate error code and messagepublic void setDecodeOptions(DecodeOptions options) throws DecoderException
options
- - DecodeOptions structure to set. (By sending -1 parameter will be ignored)DecoderException
- with appropriate error code and messagepublic boolean callbackKeepGoing()
waitForDecode(int)
, waitForDecodeTwo(int, DecodeResult)
and waitMultipleDecode(int)
.public boolean callbackMultiRead()
waitMultipleDecode(int)
, the API calls this function when data is available
and can be retrieved.public void setDecoderListeners(DecoderListener observer)
observer
-