Table of Contents

Class KeyboardBarCodeScanner

Namespace
Acuit.Pinpoint.BarCodeScanning
Assembly
Acuit.Pinpoint.BarCodeScanning.dll

A bar code scanner that looks like a keyboard to Windows.

public class KeyboardBarCodeScanner : StreamingBarCodeScanner, IConnectedDevice, IHealthCheck, IDisposable, IAsyncDisposable, IBarCodeScanner, IBarCodeScannerRaw
Inheritance
KeyboardBarCodeScanner
Implements
Inherited Members

Constructors

KeyboardBarCodeScanner(IErrorHandler, ILogger<KeyboardBarCodeScanner>, ITimeService)

Initializes a new instance of the KeyboardBarCodeScanner class.

public KeyboardBarCodeScanner(IErrorHandler errorHandler, ILogger<KeyboardBarCodeScanner> logger, ITimeService timeService)

Parameters

errorHandler IErrorHandler

The error handler to use for unexpected background errors.

logger ILogger<KeyboardBarCodeScanner>

An optional logger. If this is null, no logging will occur.

timeService ITimeService

The time service.

Remarks

The InputManager associated with the current thread when this constructor runs is used to capture input, so KeyboardBarCodeScanner objects should be created on the main application user interface thread.

Exceptions

ArgumentNullException

errorHandler is null.

ArgumentNullException

timeService is null.

Properties

TranslateHoneywell4820ControlCharacters

Gets or sets whether to translate special keys that the Honeywell 4820i Industrial Cordless Area Imager sends for certain control characters.

public bool TranslateHoneywell4820ControlCharacters { get; set; }

Property Value

bool

Remarks

When bar codes contain certain control characters (i.e., outside of the normal printable ASCII character range), the Honeywell 4820i Industrial Cordless Area Imager will send special keys instead. When this property is true, these special keys will be translated to the appropriate control characters so that bar codes will be properly decoded.

TranslateMotorolaSymbolDS4208ControlCharacters

Gets or sets whether to translate special keys that the Motorola/Symbol DS4208 Digital Scanner sends for certain control characters.

public bool TranslateMotorolaSymbolDS4208ControlCharacters { get; set; }

Property Value

bool

Remarks

When bar codes contain certain control characters (i.e., outside of the normal printable ASCII character range), the Motorola/Symbol DS4208 Digital Scanner will send special keys instead. When this property is true, these special keys will be translated to the appropriate control characters so that bar codes will be properly decoded.

See "ASCII Character Set for USB", table 5-2, "USB Prefix/Suffix Values" on page 5-20 of the DS4208 Digital Scanner Product Reference Guide for more information.

Methods

DoConnectAndGetStreamAsync(CancellationToken)

Connects to the device and gets the Stream to use to communication with the bar code scanner.

protected override Task<Stream> DoConnectAndGetStreamAsync(CancellationToken cancellationToken)

Parameters

cancellationToken CancellationToken

The cancellation token, which indicates that the connection attempt should be aborted.

Returns

Task<Stream>

A task that represents the asynchronous operation. The value of its Result property contains the stream.

Remarks

This might be called from any thread, but it and DoDisconnectAsync(CancellationToken) will never be called concurrently.

Exceptions

Exception

The connection could not be established.

OnBarCodeScanned(BarCodeScanEventArgs)

Raises the BarCodeScanned event.

protected override void OnBarCodeScanned(BarCodeScanEventArgs e)

Parameters

e BarCodeScanEventArgs

The event data.