ScSymbologySettings Struct Reference

Public Member Functions

ScSymbology sc_symbology_settings_get_symbology (ScSymbologySettings const *settings)
 
void sc_symbology_settings_retain (ScSymbologySettings *settings)
 
void sc_symbology_settings_release (ScSymbologySettings *settings)
 
Enable/Disable Decoding
ScBool sc_symbology_settings_is_enabled (ScSymbologySettings const *settings)
 
void sc_symbology_settings_set_enabled (ScSymbologySettings *settings, ScBool enabled)
 
ScBool sc_symbology_settings_is_color_inverted_enabled (ScSymbologySettings const *settings)
 
void sc_symbology_settings_set_color_inverted_enabled (ScSymbologySettings *settings, ScBool enabled)
 
Checksums
ScChecksums sc_symbology_settings_get_checksums (ScSymbologySettings const *settings)
 
void sc_symbology_settings_set_checksums (ScSymbologySettings *settings, ScChecksums checksums)
 
Extensions
ScBool sc_symbology_settings_is_extension_enabled (ScSymbologySettings const *settings, char const *extension)
 
void sc_symbology_settings_set_extension_enabled (ScSymbologySettings *settings, char const *extension, ScBool enabled)
 
char ** sc_symbology_settings_get_enabled_extensions (ScSymbologySettings *settings)
 
Control Length of Decoded Barcodes
void sc_symbology_settings_set_active_symbol_counts (ScSymbologySettings *settings, uint16_t const *active_counts, uint16_t num_counts)
 
void sc_symbology_settings_get_active_symbol_counts (ScSymbologySettings *settings, uint16_t **active_counts, uint16_t *num_counts)
 

Detailed Description

Contains symbology-specific settings.

Examples:
CommandLineBarcodeScannerImageProcessingSample.c.

Member Function Documentation

ScSymbology sc_symbology_settings_get_symbology ( ScSymbologySettings const *  settings)

Get symbology of the symbology settings object.

Parameters
settingsThe settings object. Must not be null.
Returns
The symbology of the symbology settings object.
Since
4.6.0
void sc_symbology_settings_retain ( ScSymbologySettings settings)

Increase reference count of barcode symbology settings by one.

Parameters
settingsThe settings object. Must not be null.
Since
4.6.0
void sc_symbology_settings_release ( ScSymbologySettings settings)

Decrease reference count of barcode symbology settings by one.

When the reference count drops to zero, the symbology settings object is deallocated.

Parameters
settingsThe settings object. May be null.
Since
4.6.0
ScBool sc_symbology_settings_is_enabled ( ScSymbologySettings const *  settings)

Determine whether decoding of this symbology is enabled.

By default decoding of all symbologies is disabled. To enable decoding of a symbology, use sc_symbology_settings_set_enabled(). It is advised to only enable symbologies that are required by the application as every enabled symbology adds processing overhead.

This function only enables decoding of dark codes on bright background. If color-inverted (bright on dark) codes for this symbology are required, enable them using sc_symbology_settings_set_color_inverted_enabled()

Parameters
settingsThe settings object. Must not be null.
Returns
returns true when decoding of codes of this symbology is enabled, false otherwise.
Since
4.6.0
void sc_symbology_settings_set_enabled ( ScSymbologySettings settings,
ScBool  enabled 
)

Enable/disable decoding of this symbology.

This function only enables/disables decoding of dark codes on bright background. If color- inverted (bright on dark) codes for this symbology are required, enable them using sc_symbology_settings_set_color_inverted_enabled()

Parameters
settingsThe settings object. Must not be null.
enabledWhether to enable decoding of this symbology.
Since
4.6.0
ScBool sc_symbology_settings_is_color_inverted_enabled ( ScSymbologySettings const *  settings)

Determine whether color-inverted decoding of this symbology is enabled.

By default color-inverted decoding of all symbologies is disabled. To enable decoding of use sc_symbology_settings_set_color_inverted_enabled(). It is advised to only enable symbologies that are required by the application as every enabled symbology adds processing overhead.

Parameters
settingsThe settings object. Must not be null.
Returns
True when decoding of codes of this symbology is enabled, false otherwise.
Since
4.6.0
void sc_symbology_settings_set_color_inverted_enabled ( ScSymbologySettings settings,
ScBool  enabled 
)

Enable/disable decoding of this symbology.

This function only enables/disables decoding of bright codes on dark background.

Parameters
settingsThe settings object. Must not be null.
enabledWhether to enable decoding of this symbology.
Since
4.6.0
ScChecksums sc_symbology_settings_get_checksums ( ScSymbologySettings const *  settings)

Get active optional checksums of this symbology.

This function returns a bit-field of active checksums. When a barcode has been decoded, the checksums returned are evaluated in addition to any mandatory checksum defined by the symbology specification. If any of the checksums matches, the code is returned as recognized, otherwise it is discarded.

Note that most symbologies do not allow any optional checksums.

Parameters
settingsthe settings object. Must not be null.
Returns
bit field of active checksums.
Since
4.6.0
void sc_symbology_settings_set_checksums ( ScSymbologySettings settings,
ScChecksums  checksums 
)

Set active optional checksums for this symbology.

This function allows to set additional checksums for this symbology.

Parameters
settingsThe settings object. Must not be null.
checksumsBit-wise combination of ScChecksum values.
See also
sc_symbology_settings_get_checksums
Since
4.6.0
ScBool sc_symbology_settings_is_extension_enabled ( ScSymbologySettings const *  settings,
char const *  extension 
)

Determine whether a certain extension is enabled for the symbology.

Extensions are custom features that are only supported by a small number of symbologies. For a list of supported extensions, consult Change the symbologies' default properties.

Parameters
settingsThe settings object. Must not be null.
extensionName of the extension.
Returns
True if the extension is enabled, false if not.

See Change the symbologies' default properties for a list of all available extensions.

Since
4.6.0
void sc_symbology_settings_set_extension_enabled ( ScSymbologySettings settings,
char const *  extension,
ScBool  enabled 
)

Activate/Deactivate a custom extension for the symbology.

Extensions are custom features that are only supported by a small number of symbologies. For a list of supported extensions, consult Change the symbologies' default properties.

Parameters
settingsThe settings object. Must not be null.
extensionName of the extension.
enabledWhether the extension should be enabled/disabled.
Since
4.6.0
char ** sc_symbology_settings_get_enabled_extensions ( ScSymbologySettings settings)

Get all enabled extensions for this symbology.

Parameters
settingsThe settings object. Must not be null.
Returns
A null-terminated array containing the enabled extensions. The array as well as the individual strings must be freed with sc_free once they are not used anymore.
Since
4.16.0
void sc_symbology_settings_set_active_symbol_counts ( ScSymbologySettings settings,
uint16_t const *  active_counts,
uint16_t  num_counts 
)

This function allows to control the length of barcodes to be decoded.

Call this function to enable decoding of long codes which can not be decoded with the default settings, or to optimize decoder performance for codes of certain lengths. This is useful when it is known that the application only requires scanning of particular barcode lengths.

The mapping from characters to symbols is symbology-specific. For some symbologies, the start and end characters are included, others include checksums characters in the symbol counts.

The active symbol count setting is ignored for fixed-size barcodes (the EAN and UPC family of codes) as well as 2d codes. For other symbologies, see Change the symbologies' default properties for a list of supported symbol counts, and Calculating Symbol Counts for Variable-Length Symbologies .

Symbol counts that are outside of the supported symbol count range are ignored.

Parameters
settingsThe settings object. Must not be null.
active_countsPointer to a non-empty array of active counts.
num_countsThe number of elements in active_counts.
Since
4.6.0
Examples:
CommandLineBarcodeScannerImageProcessingSample.c.
void sc_symbology_settings_get_active_symbol_counts ( ScSymbologySettings settings,
uint16_t **  active_counts,
uint16_t *  num_counts 
)

Retrieve the current active symbol counts of this symbology.

For a description of what active symbol counts are, refer to sc_symbology_settings_set_active_symbol_counts()

Parameters
settingsThe settings object. Must not be null.
active_countsPointer to array of active counts. When the function returns, the array contains the active symbol counts for this symbology. After use, the array must be freed with sc_free. Null may be passed for this argument in which case only num_counts will be set to the length of the active_counts array.
num_countsThe number of elements in active_counts. When the function returns, num_counts is set to the number of elements in active_counts. Must not be null.
See also
sc_symbology_settings_set_active_symbol_counts
Since
4.6.0

The documentation for this struct was generated from the following file: