Cognex Mobile Barcode SDK
SDK for supporting communication with Cognex Barcode Reader devices
MWParser.h File Reference

Barcode Parser Library
Copyright (C) Cognex Corporation. More...

Go to the source code of this file.

Macros

#define UID_ERROR_INVALID_HEADER   -1
 
#define UID_ERROR_INVALID_FORMAT   -2
 
#define UID_ERROR_INVALID_EI   -3.0
 
#define UID_ERROR_INVALID_CAGE   -3.1
 
#define UID_ERROR_INVALID_DUNS   -3.2
 
#define UID_ERROR_INVALID_DODAAC   -3.3
 
#define UID_ERROR_INVALID_GS1COMP   -3.4
 
#define UID_ERROR_INVALID_PN   -4
 
#define UID_ERROR_INVALID_SN   -5
 
#define UID_ERROR_INVALID_UII   -6
 
#define UID_ERROR_INVALID_LOT   -7
 
#define UID_ERROR_GS_MISSING   -8
 
#define UID_ERROR_RS_MISSING   -9
 
#define UID_ERROR_EOT_MISSING   -10
 
#define UID_ERROR_NO_SN   -11
 
#define UID_ERROR_NO_EI   -12
 
#define UID_ERROR_NO_PN   -13
 
#define UID_ERROR_NO_LOT   -14
 
#define UID_ERROR_DUPLICATE_DQ   -15
 
#define UID_ERROR_DUPLICATE_UII   -16
 
#define UID_ERROR_DUPLICATE_LOT   -17
 
#define UID_ERROR_DUPLICATE_SN   -18
 
#define UID_ERROR_DUPLICATE_EI   -19
 
#define UID_ERROR_LOT_PN_CONFLICT   -20
 
#define UID_ERROR_MISSING_REQ   -21
 
#define UID_ERROR_INVALID_IAC   -22
 
#define UID_ERROR_INVALID_TEI   -23
 
#define UID_ERROR_NOT_ENOUGHT_MEMORY   -24
 
#define UID_WARN_EXTRA_CHARS   91
 
#define UID_WARN_UNNEEDED_DATA   92
 
#define UID_WARN_SPACE_AROUND   93
 
#define UID_WARN_UNKNOWN_DQ   94
 
#define UID_WARN_OBSOLETE_FORMAT   95
 
#define AAMVA_ERROR_INVALID_FORMAT   -1
 
#define AAMVA_ERROR_INVALID_HEADER   -2
 
#define AAMVA_ERROR_INVALID_IIN   -3
 
#define NOT_ENOUGHT_MEMORY   -4
 
#define AAMVA_ERROR_INVALID_JN   -5
 
#define AAMVA_ERROR_INVALID_NENTIRES   -6
 
#define AAMVA_WARNING_MISSING_MANDATORY_FIELDS   1
 
#define SCM_ERROR_INVALID_FORMAT   -1
 
#define SCM_ERROR_INVALID_CODE   -2
 
#define SCM_ERROR_ELEMENT_NOT_FOUND   -3
 
#define SCM_ERROR_CANT_ALLOCATE_MEMORY   -4
 
#define SCM_WARNING_LENGTH_OUT_OF_BOUNDS   1
 
#define SCM_WARNING_FIELD_EXCEEDS_MAX_LENGTH   2
 
#define SCM_WARNING_INVALID_TERMINATOR   3
 
Basic return values for API functions
#define MWP_RT_OK   0
 
#define MWP_RT_FAIL   -1
 
#define MWP_RT_NOT_SUPPORTED   -2
 
#define MWP_RT_BAD_PARAM   -3
 
#define MWP_RT_BAD_INPUT   -4
 
Bit mask identifiers for supported decoder types
#define MWP_PARSER_MASK_NONE   0x00000000u
 
#define MWP_PARSER_MASK_GS1   0x00000001u
 
#define MWP_PARSER_MASK_IUID   0x00000002u
 
#define MWP_PARSER_MASK_ISBT   0x00000004u
 
#define MWP_PARSER_MASK_AAMVA   0x00000008u
 
#define MWP_PARSER_MASK_HIBC   0x00000010u
 
#define MWP_PARSER_MASK_SCM   0x00000020u
 

Functions

unsigned int MWP_getSupportedParsers (void)
 Returns supported parsers in this library release. More...
 
int MWP_registerParser (const uint32_t parserMask, const char *userName, const char *key)
 
double MWP_getFormattedText (const int parser_type, const unsigned char *p_input, const int inputLength, unsigned char **pp_output)
 
double MWP_getJSON (const int parser_type, const unsigned char *p_input, const int inputLength, unsigned char **pp_output)
 

Detailed Description

Barcode Parser Library
Copyright (C) Cognex Corporation.

Cognex Mobile Barcode SDK's easy API is preferred instead of this header file and its associated legacy API. Unless explicitly directed to use this header/API, 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.

Function Documentation

◆ MWP_getSupportedParsers()

unsigned int MWP_getSupportedParsers ( void  )

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.h header file.