Skip to main content

MdlocrInquireConstraint

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Inquire about a positional constraint of a Deep Learning OCR string model.

Syntax​

AIL_INT64 MdlocrInquireConstraint(
AIL_ID ContextDlocrId, //in
AIL_INT64 StringModelLabelOrIndex, //in
AIL_INT64 PositionInString, //in
AIL_INT64 InquireType, //in
void * UserVarPtr //out
)

Description​

This function allows you to inquire about a positional constraint of a Deep Learning OCR string model.

Parameters​

ContextDlocrId (in, AIL_ID)​

Specifies the identifier of the Deep Learning OCR context that contains the string model about which to inquire. The context must have been previously allocated on the system using MdlocrAlloc.

StringModelLabelOrIndex (in, AIL_INT64)​

Specifies the string model about which to inquire. Set this parameter to one of the values below:

For specifying the string model

ValueDescription
M_STRING_INDEXSpecifies to inquire about the string model by indicating its index.
M_STRING_LABELSpecifies to inquire about the string model by indicating its label.

PositionInString (in, AIL_INT64)​

Specifies the position of the character in the string model. Set this parameter to one of the values below:

For specifying the position in a string model

ValueDescription
M_DEFAULTSpecifies all positions that have not been manually constrained.
Value >= 0Specifies the position in the string model.

InquireType (in, AIL_INT64)​

Specifies the type of setting about which to inquire.

UserVarPtr *(out, void)​

Specifies the address in which to write the requested information. Since the MdlocrInquireConstraint function also returns the requested information, you can set this parameter to M_NULL.

Parameter Associations​

For inquiring about positional constraints in a string model​

The following InquireType parameter settings are used to inquire about positional constraints of a string model.


M_CHAR_LIST​

Inquires the list of expected characters (case sensitive). If M_CONSTRAINT_TYPE is set to M_ANY, this will return an empty string indicating all supported values are used.

ValueDescription
"CharList"Specifies the list of expected characters.

M_CONSTRAINT_TYPE​

Inquires the type of constraint applied to the position.

ValueDescription
M_ANYSpecifies any character.
M_DIGITSSpecifies any digit.
M_LETTERSSpecifies any letter.
M_LETTERS_LOWERCASESpecifies any lowercase letter.
M_LETTERS_UPPERCASESpecifies any uppercase letter.
M_CHAR_LISTSpecifies any character in a list passed to the ControlValuePtr parameter of MdlocrControlConstraint.
M_SAME_AS_DEFAULT_CONSTRAINT (default)Specifies to use the default constraint set usingMdlocrControlConstraint with its PositionInString set to M_DEFAULT and M_CONSTRAINT_TYPE set to the required constraint.

M_IS_OPTIONAL​

Inquires whether a position in a string model is optional.

ValueDescription
M_DEFAULT
M_FALSE (default)Specifies that the model position is not optional.
M_TRUESpecifies that the model position is optional.

Combination Constants — For inquiring the default value​

Optional.

Usage: You can add one of the following values to the above-mentioned values to get the default value of an inquire type (if supported), regardless of the current value of the inquire type.

M_DEFAULT​

Inquires the default value of the specified inquire type.

Combination Constants — For inquiring the size of a string​

Optional, cannot be used alone.

Usage: You can add one of the following values to the above-mentioned values to get the size of a string.

M_STRING_SIZE​

Inquires the number of characters in the string. This number accounts for every character, including the terminating null character. All strings have the terminating null character, even though you need not explicitly list it when specifying the string.

Combination Constants — For inquiring if an inquire type is supported​

Optional.

Usage: You can add one of the following values to the above-mentioned values to determine whether an inquire type is supported for the constraint currently being inquired.

M_HAS_DEFAULT​

Inquires whether the specified inquire type has a default value.

ValueDescription
M_FALSESpecifies that the inquire type does not have a default value.
M_TRUESpecifies that the inquire type has a default value.

M_SUPPORTED​

Inquires whether the specified inquire type is supported.

ValueDescription
M_FALSESpecifies that the inquire type is not supported.
M_TRUESpecifies that the inquire type is supported.

Combination Constants — For casting the requested information to the required data type​

Optional.

Usage: You can add one of the following values to the above-mentioned values to cast the requested information to the required data type.

M_TYPE_AIL_DOUBLE​

Casts the requested information to an AIL_DOUBLE.

M_TYPE_AIL_INT​

Casts the requested information to an AIL_INT.

M_TYPE_AIL_INT32​

Casts the requested information to an AIL_INT32.

M_TYPE_AIL_INT64​

Casts the requested information to an AIL_INT64.

M_TYPE_AIL_UINT8​

Casts the requested information to an AIL_UINT8.

Return Value​

Type: AIL_INT64

The returned value is the requested information, cast to an AIL_INT64. If the requested information does not fit into an AIL_INT64, this function will return M_NULLor truncate the information.

Copyright © 2026 Zebra Technologies.