|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.honeywell.decodemanager.DecodeManager
public class DecodeManager
The DecodeManager is the entry point for the DecodeManager. This class
exposes all decode functionality.
DecodeManager provides three ways to configure the barcode:
1.Default configuration activity:
this way provide a easy-to-use activity for user to
configure the barcode property, user can utilize
getSymConfigActivityOpeartor()to obtain the SymConfigActivityOpeartor
instance. Following is the method
that SymConfigActivityOpeartor provide:
1. start();
2. addSymToConfigActivity(int
symbologyId);
3. removeSymFromConfigActivity(int
symbologyId);
4. removeAllSymFromConfigActivity();
5. restoreDefaultSymToConfigActivity();
6. getAllSymbologyId();
7. IsExistedInDefaultActivity(int
symbologyId);
Honeywell SDK provide sample that how to use this
way,please see the Sample DecodeSampleActivity to get more details.
this is the easiest way in three ways, However,this way provide
the default UI for the user,User can not modify the UI
style.
2.configuration classes:
this way provide classes to configure the barcode
property,for example,User can utilize SymbologyConfigCodabar class to
configure
the codabar property. Honeywell SDK provide sample that how to use this
way,please see the Sample DecodeSampleApi to get more details.
3.configuration API
this way provide API to configure the barcode property, for
example user can use enableSymbology(int symbologyId) to enable one
barcode
use setSymbologyConfig(SymbologyConfig symConfg) to configure the
options.This way is the most complex in the three ways.It is not
recommended.
Nested Class Summary | |
---|---|
class |
DecodeManager.SymConfigActivityOpeartor
The SymbologyConfigActivityOpeartor is used to operate the symbology configure activity. |
Field Summary | |
---|---|
static int |
MESSAGE_DECODER_COMPLETE
decode barcode finish. |
static int |
MESSAGE_DECODER_FAIL
fail to decode the barcode. |
static int |
MESSAGE_DECODER_READY
Deoode is ready,then user can decode symbology and configure symbology.if not ready and be used it will throw exception |
Constructor Summary | |
---|---|
DecodeManager(Context context,
Handler handler)
Default Constructor. |
Method Summary | |
---|---|
void |
cancelDecode()
This function is used to cancel a decode action. |
int |
disableSymbology(int symbologyID)
This function disables a specified symbology or all symbologies from decoding. |
void |
doDecode(int timeout)
This function is used to launch a decode action. |
int |
enableDecodeCenteringWindow(boolean enable)
This function is used to turn on/off center window feature. |
int |
enableSymbology(int symbologyID)
This function enables a specified symbology or all symbologies from decoding. |
java.lang.String |
getAPIRevision()
This method returns a string containing the Decoder.SO current revision information. |
byte |
getBarcodeAimID()
This method will retrieve the AIM ID of the last successful barcode decoded. |
byte |
getBarcodeAimModifier()
This method will retrieve the AIM Modifier of the last successful barcode decoded. |
byte[] |
getBarcodeByteData()
This function is used to get the barcode data in a byte array. |
byte |
getBarcodeCodeID()
This method will retrieve the code ID of the last successful barcode decoded. |
java.lang.String |
getBarcodeData()
This method will retrieve the data for the last successful decode. |
int |
getBarcodeLength()
This method will retrieve the length of the data for the last successful decode. |
int |
getCenteringWindowLimits(CenteringWindowLimits limits)
This function is used to get scan window limits for current engine. |
java.lang.String |
getControlLogicRevision()
This function returns a string containing the Dec Threads SOs current revision information. |
java.lang.String |
getDecoderRevision()
This method returns a string containing the Decoder Interface SOs current primary decoder library revision information. |
java.lang.String |
getDecThreadsRevison()
This method returns a string containing the DecThreads SOs current revision information. |
int |
getEngineID()
This function will return the ID of the image engine. |
java.lang.String |
getEngineSerialNumber()
This function will return the Serial Number of the scan engine. |
int |
getEngineType()
This functions returns the value indicating the engine type installed, either imager or laser. |
java.lang.String |
getErrorMessage(int error)
This function returns a string containing the description of the error corresponding to the input parameter error. |
int |
getImagerProperties(ImagerProperties imgProp)
This method returns the details of the installed engine. |
int |
getLastDecodeTime()
This method will retrieve the time in msecs that the last successful barcode decoded took. |
byte[] |
getLastImage(ImageAttributes imgAtt)
This function is used to retrieve the last image the decoder processed and the properties associated with that image. |
int |
getMaxMessageSize()
This function returns the size of the largest possible decode message that can be returned from the decoder. |
int |
getPSOCMajorRev()
This function will return the PSOC Major Revision information. |
int |
getPSOCMinorRev()
This function will return the PSOC Minor Revision information. |
java.lang.String |
getScanDriverRevison()
This function returns an string containing the Scan Driver KOs current revision information. |
java.lang.String |
getSecondaryDecoderRevision()
This method returns a string containing the Decoder Interface SOs current secondary decoder library revision information. |
int |
getSymbologyConfig(SymbologyConfig symConfig,
boolean defaultValues)
This method is used to read the configuration options for a given symbology. |
int |
getSymbologyMaxRange(int symbologyID)
This function is used retrieve the maximum range value for the specified symbology. |
int |
getSymbologyMinRange(int symbologyID)
This function is used retrieve the minimum range value for the specified symbology. |
DecodeManager.SymConfigActivityOpeartor |
getSymConfigActivityOpeartor()
get the SymbologyConfigActivityOpeartor object that is used to operate the symbology configure activity. |
DecodeManager.SymConfigActivityOpeartor |
getSymConfigActivityOperator()
get the SymbologyConfigActivityOpeartor object that is used to operate the symbology configure activity. |
void |
release()
Releases all of the DecodeManager resources. |
void |
reloadSymbology()
Reload symbology settings. |
int |
setDecodeAttemptLimit(int limit)
This method is used to set the maximum time in msec the decoder is allowed to decode a possible barcode for a given image.Not support now. |
int |
setDecodeCenteringWindow(CenteringWindow window)
This function is used to set scan window limits for current engine. |
int |
setDecodeSearchLimit(int limit)
This method is used to set the maximum time in msec the decoder is allowed to find a possible barcode for a given image. |
int |
setExposureMode(int mode)
This function is used to set the exposure mode to be used during scanning. |
int |
setLightMode(int mode)
This function is used to set the lights mode to be used during scanning. |
int |
setOCRTemplates(int templates)
This method is used to select which OCR templates will be used while attempting to decode OCR characters. |
int |
setOCRUserTemplate(int mode,
byte[] template)
This function is used to define the format of the user template that will be user during OCR decoding when the User Template is one of the templates enabled via the SetOCRTemplates method. |
int |
setProperty(int property,
int value)
This is a restricted API and users should not attempt to use it within their applications. |
int |
setScanMode(int mode)
This function is used to set the scan mode to be used by the decoder stack. |
int |
setSymbologyConfig(SymbologyConfig symConfg)
This function is used to configure the options for a given symbology. |
int |
setSymbologyConfigs(SymbologyConfigs symConfg)
This function is used to configure multi-symbologyConfig at the same time. |
int |
setSymbologyDefaults(int symbologyID)
This function is used to set the decode parameters for a given symbology to their default values. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MESSAGE_DECODER_COMPLETE
public static final int MESSAGE_DECODER_FAIL
public static final int MESSAGE_DECODER_READY
Constructor Detail |
---|
public DecodeManager(Context context, Handler handler)
context
- - Interface to global information about user application
environmenthandler
- - 1 It is used to receive the message of decode result - 2 It
is used to receive the message of status of decode,if it is
ready then user can decode symbology and configure symbology.
- 3 if null the user can not receive the message and can not
know when the decode is ready.Method Detail |
---|
public void release() throws java.io.IOException
java.io.IOException
public void reloadSymbology()
public DecodeManager.SymConfigActivityOpeartor getSymConfigActivityOpeartor()
public DecodeManager.SymConfigActivityOpeartor getSymConfigActivityOperator()
public java.lang.String getErrorMessage(int error) throws RemoteException
error
- A value returned from another API function call.Error code to
be translated
RemoteException
public int getMaxMessageSize() throws RemoteException
none
-
RemoteException
public int getEngineID() throws RemoteException
none
-
RemoteException
public int getEngineType() throws RemoteException
none
-
RemoteException
public java.lang.String getEngineSerialNumber() throws RemoteException
none
-
RemoteException
public java.lang.String getAPIRevision() throws RemoteException
none
-
RemoteException
public java.lang.String getDecoderRevision() throws RemoteException
none
-
RemoteException
public java.lang.String getSecondaryDecoderRevision() throws RemoteException
none
-
RemoteException
public java.lang.String getControlLogicRevision() throws RemoteException
none
-
RemoteException
public java.lang.String getDecThreadsRevison() throws RemoteException
none
-
RemoteException
public java.lang.String getScanDriverRevison() throws RemoteException
none
-
RemoteException
public int getPSOCMajorRev() throws RemoteException
none
-
RemoteException
public int getPSOCMinorRev() throws RemoteException
none
-
RemoteException
public int enableSymbology(int symbologyID) throws RemoteException
symbologyID
- One of the
com.honeywell.decodecommon.barcode.CommonDefine.SymbologyID
, eg SYM_CODE39. To enable all symbolgies at once, SYM_ALL
should be used as the SymID.
RemoteException
CommonDefine.SymbologyID
,
CommonDefine.ErrorCode
public int disableSymbology(int symbologyID) throws RemoteException
symbologyID
- One of the
com.honeywell.decodecommon.barcode.CommonDefine.SymbologyID
, eg SYM_CODE39. To disable all symbolgies at once, SYM_ALL
should be used as the SymID.
RemoteException
CommonDefine.SymbologyID
,
CommonDefine.ErrorCode
public int setSymbologyDefaults(int symbologyID) throws RemoteException
symbologyID
- One of the
com.honeywell.decodecommon.barcode.CommonDefine.SymbologyID
, eg SYM_CODE39. To disable all symbolgies at once, SYM_ALL
should be used as the SymID.
RemoteException
CommonDefine.SymbologyID
,
CommonDefine.ErrorCode
public int getSymbologyMinRange(int symbologyID) throws RemoteException
symbologyID
- One of the
com.honeywell.decodecommon.barcode.CommonDefine.SymbologyID
, eg SYM_CODE39.
RemoteException
CommonDefine.SymbologyID
,
CommonDefine.ErrorCode
public int getSymbologyMaxRange(int symbologyID) throws RemoteException
symbologyID
- One of the
com.honeywell.decodecommon.barcode.CommonDefine.SymbologyID
, eg SYM_CODE39.
RemoteException
CommonDefine.SymbologyID
,
CommonDefine.ErrorCode
public int getImagerProperties(ImagerProperties imgProp) throws RemoteException
imgProp
- This variable is used to store the imager's property.
RemoteException
CommonDefine.ErrorCode
,
ImagerProperties
public int setOCRTemplates(int templates) throws RemoteException
templates
- This value is a logical ORing of the various template option
bit fields.
RemoteException
CommonDefine.ErrorCode
public int setOCRUserTemplate(int mode, byte[] template) throws RemoteException
mode
- . @see com.honeywell.decodemanager.barcode.OCRModetemplate
- A byte array that contained hex values represents user
template.
RemoteException
CommonDefine.ErrorCode
public int getSymbologyConfig(SymbologyConfig symConfig, boolean defaultValues) throws RemoteException
symConfig
- A specified symbology's values. @see
com.honeywell.decodemanager.barcode.SymbologyConfigdefaultValues
- If true,current settings will return or default settings will
return.
RemoteException
SymbologyConfig
,
CommonDefine.ErrorCode
public int setSymbologyConfig(SymbologyConfig symConfg) throws RemoteException
symConfg
- A specified symbology's values. @see
com.honeywell.decodemanager.barcode.SymbologyConfig
RemoteException
SymbologyConfig
,
CommonDefine.ErrorCode
public int setSymbologyConfigs(SymbologyConfigs symConfg) throws RemoteException
symConfg
- A array of multi-symbologyConfig. @see
com.honeywell.decodemanager.SymbologyConfigs
RemoteException
SymbologyConfigs
,
CommonDefine.ErrorCode
public void doDecode(int timeout) throws RemoteException
timeout
- Maximum amount of time in milliseconds that the decoder may
use to attempt to find and decode a symbol.
RemoteException
public int setLightMode(int mode) throws RemoteException
mode
- Desired lights mode @see
com.honeywell.decodemanager.barcode.CommonDefine.LightsMode
RemoteException
CommonDefine.ErrorCode
public int setDecodeSearchLimit(int limit) throws RemoteException
limit
- The maximum time in msec.
RemoteException
CommonDefine.ErrorCode
public int setDecodeAttemptLimit(int limit) throws RemoteException
limit
- The maximum time in msec.
RemoteException
CommonDefine.ErrorCode
public byte getBarcodeCodeID() throws RemoteException
none
-
RemoteException
CommonDefine.ErrorCode
public byte getBarcodeAimID() throws RemoteException
none
-
RemoteException
CommonDefine.ErrorCode
public byte getBarcodeAimModifier() throws RemoteException
none
-
RemoteException
CommonDefine.ErrorCode
public int getBarcodeLength() throws RemoteException
none
-
RemoteException
CommonDefine.ErrorCode
public java.lang.String getBarcodeData() throws RemoteException
none
-
RemoteException
public int getLastDecodeTime() throws RemoteException
none
-
RemoteException
public byte[] getLastImage(ImageAttributes imgAtt) throws RemoteException
imgAtt
- properties associated with the returned image.
RemoteException
ImageAttributes
public int setExposureMode(int mode) throws RemoteException
mode
- Exposure mode value.@see
com.honeywell.decodemanager.barcode.CommonDefine.ExposureMode
RemoteException
CommonDefine.ErrorCode
public int setScanMode(int mode) throws RemoteException
mode
- Desired scanning mode. @see
com.honeywell.decodemanager.barcode.CommonDefine.ScanMode
RemoteException
CommonDefine.ErrorCode
public void cancelDecode() throws RemoteException
RemoteException
public byte[] getBarcodeByteData() throws RemoteException
RemoteException
public int setProperty(int property, int value) throws RemoteException
property
- Type for propertyvalue
- Value for property
RemoteException
public int getCenteringWindowLimits(CenteringWindowLimits limits) throws RemoteException
limits
- Contains window limits parameter
RemoteException
public int setDecodeCenteringWindow(CenteringWindow window) throws RemoteException
window
- Contains center window parameter
RemoteException
public int enableDecodeCenteringWindow(boolean enable) throws RemoteException
enable
- true turn on center window; false turn off center window;
RemoteException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |