Barcode reader object.
More...
Inherits INativeHandle, and IDictionary< Symbology, Base >.
|
static readonly TimeSpan | MaxTimeLimit = TimeSpan.FromMilliseconds(short.MaxValue) |
| Maximum time limit that may be specified.
|
|
|
virtual void | Dispose (bool disposing) |
| IDisposable helper function. More...
|
|
|
IntPtr | Handle [get] |
| Native Color filter handle. More...
|
|
bool | IsDisposed [get] |
| Tests if the native handle has already been disposed.
|
|
Readout | ReadoutMode [get, set] |
| Readout and search mode for barcodes in the image.
|
|
short | ReadoutStripeDistance [get, set] |
| Readout definition for the readout modes Ladder, Fence and FenceOrLadder.
|
|
short | OmniDirectionalReadoutStripeCount [get, set] |
| Number of readout stripes (only used in omni directional readout mode).
|
|
short | OmniDirectionalReadoutAngleCount [get, set] |
| Number of readout angles (only used in omni directional readout mode).
|
|
bool | CheckCodePosition [get, set] |
| Activates or deactivates the code position checks.
|
|
TimeSpan | TimeLimit [get, set] |
| upper limit for the amount of time the tool may take for a single run.
|
|
string | FileName [get] |
| Name of the file from which this reader was loaded (string.Empty if this reader was neither loaded nor saved since its construction). More...
|
|
ICollection< Symbology > | Keys [get] |
| Collection of keys in the configuration.
|
|
ICollection< Base > | Values [get] |
| Collection of values in the configuration.
|
|
int | Count [get] |
| Number of currently active configurations.
|
|
bool | IsReadOnly [get] |
| Read only flag
|
|
Base | this[Symbology sym] [get, set] |
| Access the currently configured symbologies. More...
|
|
Properties inherited from INativeHandle |
IntPtr | Handle [get] |
| The native handle of the object.
|
|
bool | IsDisposed [get] |
| Possibility to check whether the object has already been disposed of.
|
|
◆ ReaderConfig() [1/2]
Barcode reader initialization.
- Parameters
-
initMode | Initialization to read all or none. |
- Exceptions
-
OutOfMemoryException | if the process ran out of available reader configurations (currently a process may use no more than 1000 configurations); if your application runs out of configurations, dispose unused Reader objects |
◆ ReaderConfig() [2/2]
Load a reader configuration from disk.
- Parameters
-
fileName | File to load the configuration from. |
- Exceptions
-
FileNotFoundException | If the classifier file does not exist |
FileLoadException | If loading an existing classifier file failed |
ArgumentNullException | If fileName is null |
◆ Add() [1/3]
Adds a configuration to the dictionary.
- Parameters
-
◆ Add() [2/3]
Add default configuration for a Symbology.
- Parameters
-
◆ Add() [3/3]
Set a new barcode configuration for a given symbology. Set configuration to null to delete it.
- Parameters
-
sym | Symbology to set the configuration for. |
config | Configuration to set. |
- Exceptions
-
InvalidOperationException | when trying to set a configuration for the symbology "None" or when trying to set a configuration that does not match the selected symbology |
◆ Add< TConfig >()
void Add< TConfig > |
( |
TConfig |
config | ) |
|
Set a new barcode configuration. Effect is the same as if calling
Set(Symbology sym, Configuration.Base config)
with the corresponding symbology enumeration value.
- Template Parameters
-
TConfig | type of configuration to set |
- Parameters
-
- Type Constraints
-
TConfig | : | Configuration.Base | |
◆ Configuration< TConfig >()
TConfig Configuration< TConfig > |
( |
| ) |
|
Access one of the current configurations of the barcode reader. Trying to access a configuration that is not available will result in a return value of null.
- Template Parameters
-
- Returns
- currently set configuration or null
- Type Constraints
-
TConfig | : | Configuration.Base | |
◆ Contains()
Check if a given configuration is part of the dictionary.
- Parameters
-
item | configuration to check for |
- Returns
- true if the configuration was found, false otherwise
◆ ContainsKey()
Determines whether the dictionary contains a configuration for the given symbology.
- Parameters
-
key | symbology to check for |
- Returns
- true if the dictionary contains a configuration for the given symbology, false otherwise
◆ CopyTo()
void CopyTo |
( |
KeyValuePair< Symbology, Base >[] |
array, |
|
|
int |
arrayIndex |
|
) |
| |
Copy the current dictionary into an array.
- Parameters
-
array | array to copy to |
arrayIndex | start index in the array |
◆ Dispose()
virtual void Dispose |
( |
bool |
disposing | ) |
|
|
protectedvirtual |
IDisposable helper function.
- Parameters
-
◆ GetEnumerator()
Get dictionary enumerator.
- Returns
- IEnumerator<T> for this object.
◆ Remove() [1/2]
Remove a configuration.
- Parameters
-
item | configuration to remove |
- Returns
- true if the configuration was removes, false otherwise
◆ Remove() [2/2]
Remove the configuration for the given symbology.
- Parameters
-
sym | Symbology to remove from the current set of configurations. |
- Returns
- true if the symbology was previously set and is now removed; false if the symbology wasn't configured previously.
◆ Remove< TConfig >()
Remove the configuration for symbology. Effect is the same as if calling
Remove(Symbology sym)
with the corresponding symbology enum.
- Template Parameters
-
TConfig | configuration type to remove |
- Returns
- true if the symbology was previously set and is now removed; false if the symbology wasn't configured previously.
- Type Constraints
-
TConfig | : | Configuration.Base | |
◆ Save()
void Save |
( |
string |
fileName | ) |
|
Write the reader configuration to a file.
- Parameters
-
- Exceptions
-
ObjectDisposedException | If the reader has already been disposed |
ArgumentNullException | when fileName is null |
◆ TryGetValue()
Tries to get the configuration associated with the given symbology.
- Parameters
-
key | symbology for which to query |
value | configuration |
- Returns
- true if a configuration for the given symbology was found, false otherwise
◆ FileName
Name of the file from which this reader was loaded (string.Empty if this reader was neither loaded nor saved since its construction).
- Exceptions
-
ObjectDisposedException | If the reader has already been disposed |
◆ Handle
Native Color filter handle.
It is normally not necessary to work with this handle in CVB.Net. Note that using this handle in connection with the legacy CVB managed wrappers may actually be disruptive to your application.
Implements INativeHandle.
◆ this[Symbology sym]
Access the currently configured symbologies.
- Parameters
-
- Returns
- current configuration for the given symbology
- Exceptions
-
KeyNotFoundException | if no configuration for the queried symbology has been defined |
◆ ObjectDisposing
Raised when this object is about to be disposed via the IDisposable.Dispose method.
This event is raised right before this object is disposed. The dispose itself cannot be canceled.