Share via


Scanner.ScanDataLabel Property (POS for .NET v1.12 SDK Documentation)

2/27/2008

Gets the decoded bar code label.

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

Syntax

'Declaration
Public MustOverride ReadOnly Property ScanDataLabel As Byte()
public abstract byte[] ScanDataLabel { get; }
public:
virtual property array<unsigned char>^ ScanDataLabel {
    array<unsigned char>^ get () abstract;
}
/** @property */
public abstract byte[] get_ScanDataLabel ()
public abstract function get ScanDataLabel () : byte[]

Remarks

When the DecodeData property is set to false, the ScanDataLabel property is typically set to an empty byte array.

When the DecodeData property is set to true, the Service Object decodes ScanData into ScanDataLabel as follows:

  • If present, scanner-generated symbology characters are removed.

  • If the label type contains a readable check digit (such as with UPC-A and EAN-13), then it must be present in ScanDataLabel. If the scanner does not return the check digit to the Service Object, then it is to be calculated and included.

  • If present for variable length bar codes, the length identification is removed.

For example, the EAN-13 bar code that appears printed as "5 018374 827715" on a label may be received from the scanner and put into ScanData as the following:

Received from scanner

ScanData

Comment

5018374827715

5018374827715

Complete bar code only.

501837482771<CR>

501837482771

Without check digit with carriage return.

F5018374827715<CR>

F5018374827715

With scanner-dependent symbology character and carriage return.

<STX>F5018374827715<ETX>

F5018374827715

With header, symbology character, and trailer.

For each of these cases (and any other variations), ScanDataLabel must always be set to the string "5018374827715", and ScanDataType must be set to EAN-13.

ScanDataLabel is set by the Service Object only before delivering the DataEvent event to the application.

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

Scanner Class
Scanner Members
Microsoft.PointOfService Namespace
Scanner.DecodeData Property
Scanner.ScanData Property
DataEvent