Skip to content

query_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_paramsT_query_data_code_2d_params🔗

Short description🔗

query_data_code_2d_paramsQueryDataCode2dParamsQueryDataCode2dParamsquery_data_code_2d_paramsT_query_data_code_2d_params — Get for a given 2D code model the names of the generic parameters or objects that can be used in the other 2D code operators.

Signature🔗

query_data_code_2d_params( datacode_2d DataCodeHandle, attribute.name QueryName, out attribute.value GenParamName )void QueryDataCode2dParams( const HTuple& DataCodeHandle, const HTuple& QueryName, HTuple* GenParamName )static void HOperatorSet.QueryDataCode2dParams( HTuple dataCodeHandle, HTuple queryName, out HTuple genParamName )def query_data_code_2d_params( data_code_handle: HHandle, query_name: str ) -> Sequence[str]

Herror T_query_data_code_2d_params( const Htuple DataCodeHandle, const Htuple QueryName, Htuple* GenParamName )

HTuple HDataCode2D::QueryDataCode2dParams( const HString& QueryName ) const

HTuple HDataCode2D::QueryDataCode2dParams( const char* QueryName ) const

HTuple HDataCode2D::QueryDataCode2dParams( const wchar_t* QueryName ) const (Windows only)

HTuple HDataCode2D.QueryDataCode2dParams( string queryName )

Description🔗

The operator query_data_code_2d_paramsQueryDataCode2dParams returns the names of the generic parameters that are supported by the 2D code operators set_data_code_2d_paramSetDataCode2dParam, get_data_code_2d_paramGetDataCode2dParam, find_data_code_2dFindDataCode2d, get_data_code_2d_resultsGetDataCode2dResults, and get_data_code_2d_objectsGetDataCode2dObjects.

For an explanation of the concept of the 2D code reader see the introduction of chapter Identification / Data Code.

The parameter QueryNamequeryNamequery_name is used to select the desired parameter group:

The returned parameter list depends only on the type of the 2D code and not on the current state of the model or its results.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

DataCodeHandledataCodeHandledata_code_handle (input_control) datacode_2d → (handle)HTuple (HHandle)HDataCode2D, HTuple (IntPtr)HHandleHtuple (handle)

Handle of the 2D code model.

QueryNamequeryNamequery_name (input_control) attribute.name → (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of the parameter group.

Default: 'get_result_params'"get_result_params"
List of values: 'find_params', 'get_model_params', 'get_result_objects', 'get_result_params', 'set_model_params', 'trained'"find_params", "get_model_params", "get_result_objects", "get_result_params", "set_model_params", "trained"

GenParamNamegenParamNamegen_param_name (output_control) attribute.value-array → (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

List containing the names of the supported generic parameters.

Example🔗

(HDevelop)

* This example demonstrates how the names of all available model parameters
* can be queried.  This is used to request first the settings of the
* untrained and then the settings of the trained model.

* Create a model for reading Data Matrix ECC 200 codes
create_data_code_2d_model ('Data Matrix ECC 200', [], [], DataCodeHandle)
* Query all the names of the generic parameters that can be passed to the
* operator get_data_code_2d_param to request the model
query_data_code_2d_params (DataCodeHandle, 'get_model_params', GenParamName)
* Request the current settings of the (untrained) model
get_data_code_2d_param(DataCodeHandle, GenParamName, ModelParams)

* Read a training image
read_image (Image, 'datacode/ecc200/ecc200_cpu_007')
* train the model with the symbol in the image
find_data_code_2d (Image, SymbolXLDs, DataCodeHandle, 'train', 'all', \
                   ResultHandles, DecodedDataStrings)
* Request the current settings of the (now trained) model
get_data_code_2d_param(DataCodeHandle, GenParamName, TrainedModelParams)
* Create a tuple that demonstrates the changings
ModelAdaption := GenParamName + ':   ' + ModelParams + '  ->  ' + \
                 TrainedModelParams

* Clear the model
clear_data_code_2d_model (DataCodeHandle)

Result🔗

The operator query_data_code_2d_paramsQueryDataCode2dParams returns the value 2 (H_MSG_TRUE) if the given parameters are correct. Otherwise, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

create_data_code_2d_modelCreateDataCode2dModel

Possible successors

get_data_code_2d_paramGetDataCode2dParam, get_data_code_2d_resultsGetDataCode2dResults, get_data_code_2d_objectsGetDataCode2dObjects

Module🔗

Data Code