Package com.manateeworks
Class MWParser
java.lang.Object
com.manateeworks.MWParser
Represents a static MWParser class with native parser.
\ifnot MWBSDK
Cognex Mobile Barcode SDK's easy API is preferred instead of this class and its associated legacy API.
Unless explicitly directed to use this class, all new applications should now only be using ReaderDevice.
Applications that use this API, may still use it, there is no need for migraton as it will be not removed
without further notice.
\endif
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intBasic return values for API functionsstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intBit mask identifiers for supported decoder typesstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final doublestatic final double -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intReturns version code of SDK Library.static StringMWPgetFormattedText(int parser_type, byte[] input) Get parsed result in form of 'formatted text', mainly suited for demonstration purpose.static StringMWPgetJSON(int parser_type, byte[] input) Get parsed result as JSON string, containing general info about parsed data, and fields array.static intReturns supported parsers in this library release.
-
Field Details
-
MWB_RT_OK
public static final int MWB_RT_OKBasic return values for API functions- See Also:
-
MWB_RT_FAIL
public static final int MWB_RT_FAIL- See Also:
-
MWB_RT_NOT_SUPPORTED
public static final int MWB_RT_NOT_SUPPORTED- See Also:
-
MWB_RT_BAD_PARAM
public static final int MWB_RT_BAD_PARAM- See Also:
-
MWP_PARSER_MASK_NONE
public static final int MWP_PARSER_MASK_NONEBit mask identifiers for supported decoder types- See Also:
-
MWP_PARSER_MASK_GS1
public static final int MWP_PARSER_MASK_GS1- See Also:
-
MWP_PARSER_MASK_IUID
public static final int MWP_PARSER_MASK_IUID- See Also:
-
MWP_PARSER_MASK_ISBT
public static final int MWP_PARSER_MASK_ISBT- See Also:
-
MWP_PARSER_MASK_AAMVA
public static final int MWP_PARSER_MASK_AAMVA- See Also:
-
MWP_PARSER_MASK_HIBC
public static final int MWP_PARSER_MASK_HIBC- See Also:
-
MWP_PARSER_MASK_SCM
public static final int MWP_PARSER_MASK_SCM- See Also:
-
UID_ERROR_INVALID_HEADER
public static final double UID_ERROR_INVALID_HEADER- See Also:
-
UID_ERROR_INVALID_FORMAT
public static final double UID_ERROR_INVALID_FORMAT- See Also:
-
UID_ERROR_INVALID_EI
public static final double UID_ERROR_INVALID_EI- See Also:
-
UID_ERROR_INVALID_CAGE
public static final double UID_ERROR_INVALID_CAGE- See Also:
-
UID_ERROR_INVALID_DUNS
public static final double UID_ERROR_INVALID_DUNS- See Also:
-
UID_ERROR_INVALID_DODAAC
public static final double UID_ERROR_INVALID_DODAAC- See Also:
-
UID_ERROR_INVALID_GS1COMP
public static final double UID_ERROR_INVALID_GS1COMP- See Also:
-
UID_ERROR_INVALID_PN
public static final double UID_ERROR_INVALID_PN- See Also:
-
UID_ERROR_INVALID_SN
public static final double UID_ERROR_INVALID_SN- See Also:
-
UID_ERROR_INVALID_UII
public static final double UID_ERROR_INVALID_UII- See Also:
-
UID_ERROR_INVALID_LOT
public static final double UID_ERROR_INVALID_LOT- See Also:
-
UID_ERROR_GS_MISSING
public static final double UID_ERROR_GS_MISSING- See Also:
-
UID_ERROR_RS_MISSING
public static final double UID_ERROR_RS_MISSING- See Also:
-
UID_ERROR_EOT_MISSING
public static final double UID_ERROR_EOT_MISSING- See Also:
-
UID_ERROR_NO_SN
public static final double UID_ERROR_NO_SN- See Also:
-
UID_ERROR_NO_EI
public static final double UID_ERROR_NO_EI- See Also:
-
UID_ERROR_NO_PN
public static final double UID_ERROR_NO_PN- See Also:
-
UID_ERROR_NO_LOT
public static final double UID_ERROR_NO_LOT- See Also:
-
UID_ERROR_DUPLICATE_DQ
public static final double UID_ERROR_DUPLICATE_DQ- See Also:
-
UID_ERROR_DUPLICATE_UII
public static final double UID_ERROR_DUPLICATE_UII- See Also:
-
UID_ERROR_DUPLICATE_LOT
public static final double UID_ERROR_DUPLICATE_LOT- See Also:
-
UID_ERROR_DUPLICATE_SN
public static final double UID_ERROR_DUPLICATE_SN- See Also:
-
UID_ERROR_DUPLICATE_EI
public static final double UID_ERROR_DUPLICATE_EI- See Also:
-
UID_ERROR_LOT_PN_CONFLICT
public static final double UID_ERROR_LOT_PN_CONFLICT- See Also:
-
UID_ERROR_MISSING_REQ
public static final double UID_ERROR_MISSING_REQ- See Also:
-
UID_ERROR_INVALID_IAC
public static final double UID_ERROR_INVALID_IAC- See Also:
-
UID_ERROR_INVALID_TEI
public static final double UID_ERROR_INVALID_TEI- See Also:
-
UID_WARN_EXTRA_CHARS
public static final double UID_WARN_EXTRA_CHARS- See Also:
-
UID_WARN_UNNEEDED_DATA
public static final double UID_WARN_UNNEEDED_DATA- See Also:
-
UID_WARN_SPACE_AROUND
public static final double UID_WARN_SPACE_AROUND- See Also:
-
UID_WARN_UNKNOWN_DQ
public static final double UID_WARN_UNKNOWN_DQ- See Also:
-
UID_WARN_OBSOLETE_FORMAT
public static final double UID_WARN_OBSOLETE_FORMAT- See Also:
-
SCM_ERROR_INVALID_FORMAT
public static final int SCM_ERROR_INVALID_FORMAT- See Also:
-
SCM_ERROR_INVALID_CODE
public static final int SCM_ERROR_INVALID_CODE- See Also:
-
SCM_ERROR_ELEMENT_NOT_FOUND
public static final int SCM_ERROR_ELEMENT_NOT_FOUND- See Also:
-
SCM_ERROR_CANT_ALLOCATE_MEMORY
public static final int SCM_ERROR_CANT_ALLOCATE_MEMORY- See Also:
-
SCM_WARNING_LENGTH_OUT_OF_BOUNDS
public static final int SCM_WARNING_LENGTH_OUT_OF_BOUNDS- See Also:
-
SCM_WARNING_FIELD_EXCEEDS_MAX_LENGTH
public static final int SCM_WARNING_FIELD_EXCEEDS_MAX_LENGTH- See Also:
-
SCM_WARNING_INVALID_TERMINATOR
public static final int SCM_WARNING_INVALID_TERMINATOR- See Also:
-
-
Constructor Details
-
MWParser
public MWParser()
-
-
Method Details
-
MWBgetLibVersion
public static int MWBgetLibVersion()Returns version code of SDK Library.- Returns:
- 32-bit version code in x.y.z format. Byte 3 (most significant byte): reserved (0) Byte 2: value x Byte 1: value y Byte 0 (least significant byte): value z
-
MWPgetSupportedParsers
public static int MWPgetSupportedParsers()Returns supported parsers in this library release.- Returns:
- 32-bit bit mask where each non-zero bit represents supported decoder according to MWP_PARSER_MASK_... values defined in MWParser.java file.
-
MWPgetFormattedText
Get parsed result in form of 'formatted text', mainly suited for demonstration purpose. It would return text with rows consisted of key/values pairs, like: (ABC) 123456, where ABC is a key, and 123456 is a value.- Parameters:
parser_type- Single parser type selector (MWP_PARSER_MASK_...)input- Input byte array from decoder (use MWResult.encryptedResult)- Returns:
- String with length greater than 0 Output formatted result null Parsing failed
-
MWPgetJSON
Get parsed result as JSON string, containing general info about parsed data, and fields array.- Parameters:
parser_type- Single parser type selector (MWP_PARSER_MASK_...)input- Input byte array from decoder (use MWResult.encryptedResult)- Returns:
- String with length greater than 0 Output JSON string null Parsing failed
-