Scanner.ScanData Property
2/27/2008
Gets a byte array of the data that is read from the scanner.
Namespace: Microsoft.PointOfService
Assembly: Microsoft.PointOfService (in microsoft.pointofservice.dll)
Syntax
'Declaration
Public MustOverride ReadOnly Property ScanData As Byte()
public abstract byte[] ScanData { get; }
public:
virtual property array<unsigned char>^ ScanData {
array<unsigned char>^ get () abstract;
}
/** @property */
public abstract byte[] get_ScanData ()
public abstract function get ScanData () : byte[]
Remarks
Scan data is generally in the format delivered from the scanner. Message header and trailer information are removed, however, because they contain no useful information for an application and are likely to be scanner-specific.
Common header information is a prefix character (such as an STX character). Common trailer information is a terminator character (such as an ETX or CR character) and a block check character if the scanner generates one.
ScanData should include a symbology character if the scanner returns one (for example, an ‘A’ for UPC-A). ScanData should also include check digits if the label contains them and the scanner returns them. (Notice that both symbology characters and check digits may be present, depending on the scanner configuration. The Scanner Service Object returns them if they are present, but does not generate or calculate them if they are absent.)
Some merchandise may be marked with a supplemental bar code. This bar code is typically put to the right side of the main bar code, and consists of two or five characters of additional information. If the scanner reads merchandise that contains both main and supplemental bar codes, the supplemental characters are appended to the main characters, and the result is delivered to the application as one label. Notice that a scanner may support a configuration that enables or disables the reading of supplemental codes.
Some merchandise may be marked with multiple labels, also known as multisymbol labels or tiered labels. These bar codes are typically arranged vertically, and may be of the same or different symbology. If the scanner reads merchandise that contains multiple labels, each bar code is delivered to the application as a separate label. This is necessary because of the current lack of standardization of these bar code types. One cannot determine all variations based on the individual bar code data. Therefore, the application must determine when a multiple label bar code has been read based on the data returned. Notice that a scanner may support reading of multiple labels.
ScanData 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
DataEvent
BarCodeSymbology Enumeration