ImageScanner Class (POS for .NET v1.12 SDK Documentation)

2/27/2008

Defines the programmatic interface for a UPOS Image Scanner device.

Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)

Syntax

'Declaration
Public MustInherit Class ImageScanner
    Inherits PosCommon
public abstract class ImageScanner : PosCommon
public ref class ImageScanner abstract : public PosCommon
public abstract class ImageScanner extends PosCommon
public abstract class ImageScanner extends PosCommon

Remarks

The Image Scanner has the capability of reading a single frame of image data in self-initiated scanning sessions. The Image Scanner may also have one or more of the following capabilities:

  • Reads encoded data from a label.

  • Reads low-resolution video streams for aiming purposes.

  • The host can control the Illumination mode.

  • The host can control the Aiming mode.

  • The host can start and stop a scanning session.

Programming Model

The Image Scanner follows the general Device Input Model for event-driven input:

  • Frames of image data is received from the device and a DataEvent event is queued in response.

  • If the AutoDisable property is true and the Image Scanner is in Decode or Still Image mode, the device automatically disables itself when a DataEvent event is queued. The AutoDisable property is not available in the Low-Resolution Video mode.

  • If the DataEventEnabled property is true and other event delivery requirements are met, queued DataEvent events are delivered to the application. Just before an event is delivered, data is copied into corresponding properties and additional DataEvent events are disabled by setting DataEventEnabled property to false. This causes later input data to be queued while the application processes the current input and its associated properties. When the application has finished processing the current input and is ready for more data, it re-enables events by setting the DataEventEnabled property to true.

  • If an error occurs while collecting or processing input, one or more ErrorEvent events are queued. These ErrorEvent events are delivered to the application when the DataEventEnabled property is true and other event delivery requirements are met.

  • The DataCount property may be read to obtain the total number of queued DataEvent events.

  • All queued input may be deleted by calling ClearInput method. For more information, see the ClearInput method.

  • All data properties that are populated as a result of raising a DataEvent event or an ErrorEvent event may be reset to their default values by calling the ClearInputProperties method. Image Scanners that also decode labels are implemented as a Hydra Devices. Services are supported for both a Scanner device and an Image Scanner device.

  • When a frame of image data yields decode data, a DataEvent event is queued by the Scanner service object and the scanned data is put into the ScanData property. If the application has set the DecodeData property to true, the data is decoded and put into the ScanDataLabel and ScanDataType properties.

Device Sharing

The Image Scanner is an exclusive-use device, as follows:

  • The application must claim the device before the application enables it.

  • The application must claim and enable the device before the device begins reading input.

Platforms

The ImageScanner class requires POS for .NET version 1.11 or later versions.

Inheritance Hierarchy

System.Object
   Microsoft.PointOfService.PosDevice
     Microsoft.PointOfService.PosCommon
      Microsoft.PointOfService.ImageScanner
         Microsoft.PointOfService.BasicServiceObjects.ImageScannerBasic

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread-safe. Any instance members are not guaranteed to be thread-safe.

See Also

Reference

ImageScanner Members
Microsoft.PointOfService Namespace