Barcode Scanner SDK
Barcode decoder library
com.manateeworks.MWParser Class Reference

Represents a static MWParser class with native parser. More...

Static Public Member Functions

static native int MWBgetLibVersion ()
 Returns version code of SDK Library. More...
 
static native int MWPgetSupportedParsers ()
 Returns supported parsers in this library release. More...
 
static native String MWPgetFormattedText (int parser_type, byte[] input)
 Get parsed result in form of 'formatted text', mainly suited for demonstration purpose. More...
 
static native String MWPgetJSON (int parser_type, byte[] input)
 Get parsed result as JSON string, containing general info about parsed data, and fields array. More...
 

Static Public Attributes

static final int MWB_RT_OK = 0
 Basic return values for API functions.
 
static final int MWB_RT_FAIL = -1
 
static final int MWB_RT_NOT_SUPPORTED = -2
 
static final int MWB_RT_BAD_PARAM = -3
 
static final int MWP_PARSER_MASK_NONE = 0x00000000
 Bit mask identifiers for supported decoder types.
 
static final int MWP_PARSER_MASK_GS1 = 0x00000001
 
static final int MWP_PARSER_MASK_IUID = 0x00000002
 
static final int MWP_PARSER_MASK_ISBT = 0x00000004
 
static final int MWP_PARSER_MASK_AAMVA = 0x00000008
 
static final int MWP_PARSER_MASK_HIBC = 0x00000010
 
static final int MWP_PARSER_MASK_SCM = 0x00000020
 
static final double UID_ERROR_INVALID_HEADER = -1
 
static final double UID_ERROR_INVALID_FORMAT = -2
 
static final double UID_ERROR_INVALID_EI = -3.0
 
static final double UID_ERROR_INVALID_CAGE = -3.1
 
static final double UID_ERROR_INVALID_DUNS = -3.2
 
static final double UID_ERROR_INVALID_DODAAC = -3.3
 
static final double UID_ERROR_INVALID_GS1COMP = -3.4
 
static final double UID_ERROR_INVALID_PN = -4
 
static final double UID_ERROR_INVALID_SN = -5
 
static final double UID_ERROR_INVALID_UII = -6
 
static final double UID_ERROR_INVALID_LOT = -7
 
static final double UID_ERROR_GS_MISSING = -8
 
static final double UID_ERROR_RS_MISSING = -9
 
static final double UID_ERROR_EOT_MISSING = -10
 
static final double UID_ERROR_NO_SN = -11
 
static final double UID_ERROR_NO_EI = -12
 
static final double UID_ERROR_NO_PN = -13
 
static final double UID_ERROR_NO_LOT = -14
 
static final double UID_ERROR_DUPLICATE_DQ = -15
 
static final double UID_ERROR_DUPLICATE_UII = -16
 
static final double UID_ERROR_DUPLICATE_LOT = -17
 
static final double UID_ERROR_DUPLICATE_SN = -18
 
static final double UID_ERROR_DUPLICATE_EI = -19
 
static final double UID_ERROR_LOT_PN_CONFLICT = -20
 
static final double UID_ERROR_MISSING_REQ = -21
 
static final double UID_ERROR_INVALID_IAC = -22
 
static final double UID_ERROR_INVALID_TEI = -23
 
static final double UID_WARN_EXTRA_CHARS = 91
 
static final double UID_WARN_UNNEEDED_DATA = 92
 
static final double UID_WARN_SPACE_AROUND = 93
 
static final double UID_WARN_UNKNOWN_DQ = 94
 
static final double UID_WARN_OBSOLETE_FORMAT = 95
 
static final int SCM_ERROR_INVALID_FORMAT = -1
 
static final int SCM_ERROR_INVALID_CODE = -2
 
static final int SCM_ERROR_ELEMENT_NOT_FOUND = -3
 
static final int SCM_ERROR_CANT_ALLOCATE_MEMORY = -4
 
static final int SCM_WARNING_LENGTH_OUT_OF_BOUNDS = 1
 
static final int SCM_WARNING_FIELD_EXCEEDS_MAX_LENGTH = 2
 
static final int SCM_WARNING_INVALID_TERMINATOR = 3
 

Detailed Description

Represents a static MWParser class with native parser.

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.

Member Function Documentation

◆ MWBgetLibVersion()

static native int com.manateeworks.MWParser.MWBgetLibVersion ( )
static

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

◆ MWPgetFormattedText()

static native String com.manateeworks.MWParser.MWPgetFormattedText ( int  parser_type,
byte[]  input 
)
static

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_typeSingle parser type selector (MWP_PARSER_MASK_...)
inputInput byte array from decoder (use MWResult.encryptedResult)
Returns
String with length greater than 0 Output formatted result null Parsing failed

◆ MWPgetJSON()

static native String com.manateeworks.MWParser.MWPgetJSON ( int  parser_type,
byte[]  input 
)
static

Get parsed result as JSON string, containing general info about parsed data, and fields array.

Parameters
parser_typeSingle parser type selector (MWP_PARSER_MASK_...)
inputInput byte array from decoder (use MWResult.encryptedResult)
Returns
String with length greater than 0 Output JSON string null Parsing failed

◆ MWPgetSupportedParsers()

static native int com.manateeworks.MWParser.MWPgetSupportedParsers ( )
static

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.

The documentation for this class was generated from the following file: