Dev Center
Table of contents

Python API Reference - BarcodeReader License Methods

Method Description
init_license Reads product key and activates the SDK.
is_instance_valid Gets whether the instance is valid when charging by concurrent instances count.
set_device_friendly_name Sets a human-readable name that identifies the device.
set_max_concurrent_instance_count Sets the max concurrent instance count used for current device and process.
get_idle_instances_count Deprecated
init_license_from_server Deprecated
init_license_from_license_content Deprecated
output_license_to_string Deprecated
init_dls_connection_parameters Deprecated
init_license_from_dls Deprecated
init_lts_connection_parameters Deprecated
init_license_from_lts Deprecated

init_license

Reads product key and activates the SDK.

BarcodeReader.init_license(dbr_license)

Parameters

[in] dbr_license <str> : The license key.

Return Value

error <tuple> : error_code = error[0], error_message = error[1], if error_code != EnumErrorCode.DBR_OK, you can get the detailed error message by error_message.

is_instance_valid

Gets whether the instance is valid when charging by concurrent instances count.

BarcodeReader.is_instance_valid()

Return Value

Returns an int value indicating whether the instance is valid for running on concurrent instance mode.

  • 0: The instance is not valid for running on concurrent instance mode.
  • 1: The instance is valid for running on concurrent instance mode.

Remarks

This method is meaningful only when using a license charged by concurrent instances count.

set_device_friendly_name

Sets a human-readable name that identifies the device.

BarcodeReader.set_device_friendly_name(name)

Parameters

[in] name <str> : The device alias.

Return Value

error <int> : EnumErrorCode.

set_max_concurrent_instance_count

Sets the max concurrent instance count used for current device and process.

BarcodeReader.set_max_concurrent_instance_count(count_for_this_device, count_for_this_process = 0)

Parameters

[in] count_for_this_device The maximum number of concurrent instances that the current device can run.

[in] count_for_this_process Optional The maximum number of concurrent instances that the current process can run.

Code Snippet

license_key = 'YOUR-LICENSE-KEY'
BarcodeReader.set_max_concurrent_instance_count(1,1) # The count value should be set based on your purchased license count
BarcodeReader.init_license(license_key)
reader = BarcodeReader.get_instance()
# If no instance is available right away, the application will wait until one becomes available
if reader != None:
   # Add your code here to call decoding method, process barcode results and so on
   # ...
   # Recycle the instance to make it idle for other concurrent tasks
   reader.recycle()

get_idle_instances_count

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.get_idle_instances_count()

init_license_from_server

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.init_license_from_server(license_server, license_key)

init_license_from_license_content

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.init_license_from_license_content(license_key, license_content)

output_license_to_string

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.output_license_to_string()

init_dls_connection_parameters

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.init_dls_connection_parameters()

init_license_from_dls

Deprecated. It still works in this version but could be removed in the near future.

BarcodeReader.init_license_from_dls(dls_connection_parameters)

init_lts_connection_parameters

Deprecated. It still works in this version but could be removed in the near future.

init_license_from_lts

Deprecated. It still works in this version but could be removed in the near future.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

version 9.6.0

  • Latest version
  • Version 10.x
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +