RecAPI
Classes | Typedefs | Enumerations | Functions
BAR Recognition Engine Module
Recognition Engines having own functions

Barcode recognition module. More...

Classes

struct   BAR_INFO
  Barcode information. More...

Typedefs

typedef BAR_TYPE LPBAR_TYPE
  Pointer to a BAR_TYPE.
typedef enum BAR_ENA  BAR_ENA
  Barcode enabling.
typedef BAR_ENA LPBAR_ENA
  Pointer to a BAR_ENA type variable.
typedef const BAR_ENA LPCBAR_ENA
  Const pointer to a BAR_ENA type variable.

Enumerations

enum   BAR_TYPE {
  BAR_EAN = 0,
  BAR_UPC_A = 2,
  BAR_UPC_E,
  BAR_ITF,
  BAR_C39 = 6,
  BAR_C39_EXT = 9,
  BAR_C128 = 10,
  BAR_CB = 12,
  BAR_POSTNET = 14,
  BAR_A2of5,
  BAR_UCC128,
  BAR_2of5,
  BAR_C93,
  BAR_PATCH,
  BAR_PDF417,
  BAR_PLANET,
  BAR_DMATRIX = 23,
  BAR_C39_NSS,
  BAR_QR = 26,
  BAR_MAT25,
  BAR_CODE11 = 30,
  BAR_ITAPOST25,
  BAR_MSI,
  BAR_BOOKLAND,
  BAR_ITF14,
  BAR_EAN14,
  BAR_SSCC18,
  BAR_DATABAR_LTD,
  BAR_DATABAR_EXP,
  BAR_4STATE_USPS,
  BAR_4STATE_AUSPOST,
  BAR_SIZE
}
  Barcode types. More...
enum   BAR_ENA {
  BAR_DISABLED = 0,
  BAR_ENABLED
}
  Barcode enabling. More...
enum   AUSPOST_ENC {
  AUSPOST_ENC_CHARACTER = 1,
  AUSPOST_ENC_NUMERIC,
  AUSPOST_ENC_RAW
}
  Australian Post barcode encoding methods. More...

Functions

RECERR RECAPIKRN  kRecSetBarTypes (int sid, LPCBAR_ENA pBarEna)
  Enabling barcode types.
RECERR RECAPIKRN  kRecGetBarTypes (int sid, LPBAR_ENA pBarEna)
  Getting the enabled barcode types.
RECERR RECAPIKRN  kRecGetAutoBarTypes (int sid, LPBAR_ENA pBarEna)
  Getting the set of barcode types for automatic barcode detection.
RECERR RECAPIKRN  kRecCheckBarTypes (int sid, LPCBAR_ENA pBarEnaIn, LPBAR_ENA pBarEnaOut, LPCBAR_ENA pBarEnaPrev)
  Checking enabled barcode types.
RECERR RECAPIKRN  kRecGetBarTypeName (BAR_TYPE Bartype, LPCSTR *pBarname)
  Getting the name of a barcode type.
RECERR RECAPIKRN  kRecGetBarInfo (BAR_TYPE BarCodeType, BAR_INFO *pBarInfo)
  Getting information of barcode.

BAR_INFO flag values

Possible values of BAR_INFO::BarFlags See also BAR_INFO.

#define  BF_BAR_1D   1
  1D barcode
#define  BF_BAR_2D   2
  2D barcode
#define  BF_BAR_POSTAL   4
  Postal barcode (different length lines)
#define  BF_BAR_OTHER   8
  Other barcode (Patch code)
#define  BF_BAR_DEPRECATED   0x1000
  Do not use this barcode!

Detailed Description

Barcode recognition module.

See the general description of BAR recognition module and its settings.


Typedef Documentation

typedef enum BAR_ENABAR_ENA

Barcode enabling.

This enum defines the possible values for the particular barcode type selection when the RM_BAR recognition module is used. See kRecSetBarTypes.


Enumeration Type Documentation

Australian Post barcode encoding methods.

Using the setting Kernel.Ocr.BAR.bar1D.4State.AusPost.CustomerEncoding it can be specified which encoding method was used in the barcode to be recognized.

Enumerator:
AUSPOST_ENC_CHARACTER 

Alphanumeric character set

AUSPOST_ENC_NUMERIC 

Numeric character set

AUSPOST_ENC_RAW 

Binary data (retrieved in 8-bit code words)

enum BAR_ENA

Barcode enabling.

This enum defines the possible values for the particular barcode type selection when the RM_BAR recognition module is used. See kRecSetBarTypes.

Enumerator:
BAR_DISABLED 

The particular barcode type is disabled.

BAR_ENABLED 

The particular barcode type is enabled.

enum BAR_TYPE

Barcode types.

List of barcode types supported by the RM_BAR recognition module.

Note:
Note that the barcode recognition modules are configured to recognize, by default, the following barcode types only: EAN, ITF, Code 39, Code 128 and Codabar. This setting can be changed with the kRecSetBarTypes function.
Barcode types BAR_EAN_SUPPL, BAR_ITF_CDT, BAR_C39_CDT, BAR_C39_SST, BAR_C39_FA, BAR_C128_CDT are removed from this enum. Of course, their support is not discontinued, but it is changed. See the topic Deprecated barcode types for more information.
Barcode type BAR_CB_NO_SST is not supported anymore.
See also the table of the barcode type combinations.
Enumerator:
BAR_EAN 

EAN 8/13. See also the setting Kernel.Ocr.BAR.bar1D.EAN.SUPPL.

BAR_UPC_A 

UPC-A. See also the setting Kernel.Ocr.BAR.bar1D.UPCA.SUPPL.

BAR_UPC_E 

UPC-E (6-digit). See also the setting Kernel.Ocr.BAR.bar1D.UPCE.SUPPL.

BAR_ITF 

ITF (Interleaved 2 of 5). See also the setting Kernel.Ocr.BAR.bar1D.ITF.CDX.

BAR_C39 

Code 39. See also the settings Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST, Kernel.Ocr.BAR.bar1D.C39.FA.

BAR_C39_EXT 

Code 39 Extended. The full ASCII character set is supported. See also the settings Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST.

BAR_C128 

Code 128. See also the setting Kernel.Ocr.BAR.bar1D.C128.CDT.

BAR_CB 

Codabar.

BAR_POSTNET 

Postnet code (US postal code).

BAR_A2of5 

Airline 2 of 5.

BAR_UCC128 

UCC/EAN Code 128. Includes SSCC-18 and EAN-14 as well.

BAR_2of5 

Code 2 of 5 Standard. See also the setting Kernel.Ocr.BAR.bar1D.2OF5.CDX.

BAR_C93 

Code 93. The full ASCII character set is supported.

BAR_PATCH 

Patch Code.

BAR_PDF417 

PDF417 (2D barcode).

BAR_PLANET 

Planet Code (US postal code).

BAR_DMATRIX 

Data Matrix (2D barcode).

BAR_C39_NSS 

Code 39 without start-stop characters.

BAR_QR 

QR Code (Quick Response) (2D barcode).

BAR_MAT25 

Matrix 2 of 5. See also the setting Kernel.Ocr.BAR.bar1D.M2OF5.CDX.

BAR_CODE11 

Code 11.

BAR_ITAPOST25 

Italian Postal 2 of 5 Code.

BAR_MSI 

Modified Plessey Code. See also the setting Kernel.Ocr.BAR.bar1D.MSI.CDX.

BAR_BOOKLAND 

Bookland EAN Code.

BAR_ITF14 

ITF 14 Code.

BAR_EAN14 

EAN-14 Code.

BAR_SSCC18 

SSCC18/EAN-18 Code.

BAR_DATABAR_LTD 

GS1 Databar Limited Code.

BAR_DATABAR_EXP 

GS1 Databar Expanded Code.

BAR_4STATE_USPS 

USPS 4-State Customer Barcode. (a.k.a. OneCode, Intelligent Mail).

BAR_4STATE_AUSPOST 

Australia Post 4-State Customer Barcode. See also the setting Kernel.Ocr.BAR.bar1D.4STATE.AUSPOST.CustomerEncoding.

BAR_SIZE 

Number of barcode types.


Function Documentation

RECERR RECAPIKRN kRecCheckBarTypes ( int  sid,
LPCBAR_ENA  pBarEnaIn,
LPBAR_ENA  pBarEnaOut,
LPCBAR_ENA  pBarEnaPrev 
)

Checking enabled barcode types.

The kRecCheckBarTypes function is used to check the enabled barcode type(s) for the RM_BAR recognition module. The function checks that the barcode type combination is correct and fixes it in the pBarEnaOut array by removing incompatible ones.

Parameters:
[in] sid Settings Collection ID.
[in] pBarEnaIn Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array will be checked whether they are incompatible with each other.
[out] pBarEnaOut Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array corresponding to the pBarEnaIn array are enabled/disabled in a correct combination. This parameter can be NULL.
[in] pBarEnaPrev Pointer of a BAR_ENA type array having BAR_SIZE elements. Using this array is useful for those applications where the user can select barcode types from a user interface. This array must contain the previous state of the barcode set. The function uses this array to learn which barcode is actually selected by the user. This information is used as a hint to keep this barcode selected in the pBarEnaOut array. This parameter can be NULL.
Return values:
RECERR See details in notes below.
Note:
To use this function simply for checking a barcode type combination without fixing it, set both pBarEnaOut and pBarEnaPrev to NULL.
The function works according to the table of the barcode type combinations.
The following barcode types are deprecated: BAR_EAN_SUPPL, BAR_ITF_CDT, BAR_C39_CDT, BAR_C39_SST, BAR_C39_FA, BAR_C128_CDT, BAR_CB_NO_SST. Enabling them results in the return value BAR_DEPRECATED_TYPE_ERR. If necessary use the following settings instead according to the type: Kernel.Ocr.BAR.bar1D.EAN.SUPPL, Kernel.Ocr.BAR.bar1D.ITF.CDX, Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST and Kernel.Ocr.BAR.bar1D.C128.CDT.
If the currently used barcode recognition module does not support one of the enabled barcode types, the return value of this function is BAR_NOTSUPPORTED_TYPE_ERR.
To get additional information about the return errors use the kRecGetLastError function. Its supplementary character string may help identify the problem. This function should be called immediately after the kRecCheckBarTypes function.
See also the module BAR.
The specification of this function in C# is:
 RECERR kRecCheckBarTypes(int sid, [In] BAR_ENA[] pBarEnaIn, [Out] BAR_ENA[] pBarEnaOut, [In] BAR_ENA[] pBarEnaPrev); 
The specification of this function in Java is:
 int kRecCheckBarTypes(int sid, int[] pBarEnaIn, int[] pBarEnaOut, int[] pBarEnaPrev) 
RECERR RECAPIKRN kRecGetAutoBarTypes ( int  sid,
LPBAR_ENA  pBarEna 
)

Getting the set of barcode types for automatic barcode detection.

The kRecGetAutoBarTypes function inquires the set of barcode types of the RM_BAR recognition module for automatic barcode detection.

Parameters:
[in] sid Settings Collection ID.
[out] pBarEna Address of a buffer size of BAR_SIZE to receive the barcode type enable/disable array.
Return values:
RECERR
Note:
The kRecGetAutoBarTypes function gets the largest set of barcode types that can be used simultaneously for automatic detection. Use the returned buffer with kRecSetBarTypes to enable this set. The settings Kernel.OcrMgr.BarEnable1D2D and Kernel.OcrMgr.BarEnableC39C39EXT have an effect on the resulting set of barcodes.
The specification of this function in C# is:
 RECERR kRecGetAutoBarTypes(int sid, out BAR_ENA[] pBarEna); 
The specification of this function in Java is:
 int kRecGetAutoBarTypes(int sid, int[] pBarEna) 
RECERR RECAPIKRN kRecGetBarInfo ( BAR_TYPE  BarCodeType,
BAR_INFO pBarInfo 
)

Getting information of barcode.

The kRecGetBarInfo function gets information of the specified barcode type

Parameters:
[in] BarCodeType The barcode type inquired.
[out] pBarInfo Address of a pointer to the BAR_INFO structure.
Note:
The specification of this function in C# is:
 RECERR kRecGetBarInfo(BAR_TYPE BarType, out BAR_INFO BarInfo); 
The specification of this function in Java is:
 int kRecGetBarInfo(int BarCodeType, BAR_INFO pBarInfo) 
RECERR RECAPIKRN kRecGetBarTypeName ( BAR_TYPE  Bartype,
LPCSTR *  pBarname 
)

Getting the name of a barcode type.

The kRecGetBarTypeName function gets the full name string of the specified barcode type of the RM_BAR recognition module.

Parameters:
[in] Bartype The barcode type inquired.
[out] pBarname Address of a pointer to the name of the specified barcode.
Note:
Barcode type names are available in ASCII encoding. Use MultiByteToWideChar to convert to UTF-16 in Windows
The specification of this function in C# is:
 RECERR kRecGetBarTypeName(BAR_TYPE Bartype, out string pBarname); 
The specification of this function in Java is:
 int kRecGetBarTypeName(int Bartype, String[] pBarname) 
RECERR RECAPIKRN kRecGetBarTypes ( int  sid,
LPBAR_ENA  pBarEna 
)

Getting the enabled barcode types.

The kRecGetBarTypes function inquires the barcode types of the RM_BAR recognition module currently validated for recognition.

Parameters:
[in] sid Settings Collection ID.
[out] pBarEna Address of a buffer size of BAR_SIZE to receive the barcode type enable/disable array.
Return values:
RECERR
Note:
This function gets the value of the setting Kernel.OcrMgr.BarTypes. This setting can be changed by kRecSetBarTypes.
The specification of this function in C# is:
 RECERR kRecGetBarTypes(int sid, out BAR_ENA[] pBarEna); 
The specification of this function in Java is:
 int kRecGetBarTypes(int sid, int[] pBarEna) 
RECERR RECAPIKRN kRecSetBarTypes ( int  sid,
LPCBAR_ENA  pBarEna 
)

Enabling barcode types.

The kRecSetBarTypes function is used to specify the enabled barcode type(s) for the RM_BAR module.

Parameters:
[in] sid Settings Collection ID.
[in] pBarEna Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array variable corresponds to a BAR_TYPE barcode type, and their values represent the enabled/disabled status of the appropriate barcode type.
Return values:
RECERR
Note:
This function sets the value of the setting Kernel.OcrMgr.BarTypes. This setting can be retrieved by kRecGetBarTypes.
Not all barcode types are compatible! To check the barcode type combination to be enabled, use the kRecCheckBarTypes function. See that function also for the list of incompatible barcode type combinations.
See also the module BAR.
The specification of this function in C# is:
 RECERR kRecSetBarTypes(int sid, BAR_ENA[] pBarEna); 
The specification of this function in Java is:
 int kRecSetBarTypes(int sid, int[] pBarEna)