Zebra Scanner SDK for Windows Scanner OPOS Driver Developer’s Guide (en)

ZEBRA SCANNER OPOS DRIVER
DEVELOPER’S GUIDE
ZEBRA SCANNER OPOS DRIVER
DEVELOPER’S GUIDE
72E-149783-06
Revision B
January 2020
No part of this publication may be reproduced or used in any form, or by any electrical or mechanical means, without permission in writing from Zebra. This includes electronic or mechanical means, such as photo copying, recording, or information storage and retrieval systems. The material in this manual is subject to change without notice.
The software is provided strictly on an “as is” basis. All software, including firmware, furnished to the user is on a licensed basis. Zebra grants to the user a non-transferable and non-exclusive license to use each software or firmware program delivered hereunder (licensed program) . Except as n oted below, such licen se may not b e assigned, sublicensed, or otherwise tran sfe rr e d by th e user without prior written consent of Zebra. No right to copy a licensed program in whole or in part is granted, except as permitted under copyright law. The user shall not modify , merge, or incorporate any for m or portion of a licensed program with other pro gram material, create a derivative work from a licensed program , or us e a li censed program in a network without written permission from Zebra. The user agrees to maintain Zebra’s copyright notice on the licensed programs delivered hereunder , and to include the same on any au thorized copies it m akes, in whole or in part. The user agrees not to decompile, disassemble, decode, or reverse engineer any licensed program delivered to the user or any portion thereof.
Zebra reserves the right to make changes to any software or product to improve reliability, function, or design. Zebra does not assume any product liability arising out of, or in connection with, the application or use of any
product, circuit, or application described herein. No license is granted, either expressly or by implication, estoppel, or otherwise under any Zebra Technologies
Corporation, intellectual property rights. An implied license only exists for equipment, circuits, and su bsystems contained in Zebra products.

Revision History

Changes to the original guide are listed below:
Change Date Description
-01 Rev A 5/2011 Initial release.
-02 Rev A 2/2012 64 Bit Updates.
-03 Rev A 4/2014 Added scale related information.
-04 Rev A 3/2015 Zebra Re-branding
-05 Rev A 5/2016 Software Re-branding
-06 Rev A 2/2019 Added:
-06 Rev B 1/2020 Replaced the IBM USB Hand-held with Full Scan Disable and IBM USB Table-top
iii
- IBM Table-top
- Direct IO, CheckHealth and Registry key information.
barcodes on page 2-2.
iv ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE

TABLE OF CONTENTS

Revision History.............................................................................................................................. iii
About This Guide
Introduction..................................................................................................................................... vii
Chapter Descriptions ...................................................................................................................... vii
Notational Conventions................................................................................................................... viii
Service Information......................................................................................................................... viii
Chapter 1: INTRODUCTION TO THE ZEBRA SCANNER OPOS DRIVER
Overview ........................................................................................................................................ 1-1
Zebra Scanner OPOS Driver Architecture ............................................................................... 1-2
Chapter 2: INSTALLATION & CONFIGURATION
Overview ........................................................................................................................................ 2-1
Configuration .................................................................................................................................. 2-1
Scanner Configuration Bar Codes ........................................................................................... 2-2
USB Communication Protocol ............................................................................................ 2-2
RS-232 Communication Protocol ....................................................................................... 2-2
Chapter 3: OPOS PROPERTIES, METHODS, EVENTS
Overview ........................................................................................................................................ 3-1
Deviations from OPOS Specifications ........................................................................................... 3-2
Supported Feature Set ................................................................................................................... 3-3
Properties ................................................................................................................................. 3-3
Methods ................................................................................................................................... 3-5
Events ...................................................................................................................................... 3-6
Zebra OPOS Driver Direct IO API .................................................................................................. 3-6
Action Attributes and Values For Use With RSM_ATTR_SET ...................................................... 3-8
vi ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE
Chapter 4: SCANNER OPOS SAMPLE APPLICATION
Overview ........................................................................................................................................ 4-1
OPOS Sample Application (Scanner OPOS Test Utility) ............................................................... 4-1
OPOS Test Utility Window Functionality ........................................................................................ 4-2
Viewing Bar Code Data ............................................................................................................ 4-6
Getting and Setting OPOS Properties ........................................................................................... 4-8
Creating a Custom OPOS Sample Application .............................................................................. 4-9
Return Value and Result Code ...................................................................................................... 4-9
Direct I/O ........................................................................................................................................ 4-9
Statistics Methods .......................................................................................................................... 4-9
Modified Claim Functionality .......................................................................................................... 4-10
Chapter 5: SCALE OPOS SAMPLE APPLICATION
Overview ........................................................................................................................................ 5-1
Scale OPOS Sample Application ................................................................................................... 5-1
Scale OPOS Sample Application Window Functionality ................................................................ 5-2
Retrieving Weight Data ............................................................................................................ 5-5
Retrieving Weight Data Asynchronously .................................................................................. 5-6
Getting and Setting OPOS Properties ........................................................................................... 5-7
Creating a Custom OPOS Sample Application .............................................................................. 5-8
Return Value and Result Code ...................................................................................................... 5-8
Direct I/O ........................................................................................................................................ 5-8
Statistics Methods .......................................................................................................................... 5-8
Modified Claim Functionality .......................................................................................................... 5-9
Chapter 6: SUPPORTED SYMBOLOGY TYPES VS. SCANNER MODE
Overview ........................................................................................................................................ 6-1
Supported Symbology Types vs. Scanner Mode ........................................................................... 6-1
Appendix A: WINDOWS REGISTRY KEYS for OPOS DRIVER
Overview ........................................................................................................................................ A-1
Index

ABOUT THIS GUIDE

Introduction

This guide provides information about the Zebra OPOS Driver which enables bar code data communication between any scanner and an OPOS compliant POS application via either a USB (IBM Hand-held and SNAPI) or RS-232 (Wincor-Nixdorf Mode B and SSI) connection.
The Zebra OPOS Driver also enables weight data communication between an MP6200 scanner and an OPOS compliant POS application via either a USB (IBM Hand-held, IBM Table-top and SNAPI) or RS-232 (SSI) connection.

Chapter Descriptions

Topics covered in this guide are as follows:
Chapter 1, INTRODUCTION TO THE ZEBRA SCANNER OPOS DRIVER provides an overview of the Zebra
OPOS Driver.
Chapter 2, INSTALLATION & CONFIGURATION describes specific installation instructions and settings to
configure the Zebra Scanner OPOS Driver on a host computer.
Chapter 3, OPOS PROPERTIES, METHODS, EVENTS provides information about the Zebra OPOS Driver
properties, methods, and even ts.
Chapter 4, SCANNER OPOS SAMPLE APPLICATION provides information about the Zebra OPOS Driver
properties, methods, and even ts.
Chapter 5, SCALE OPOS SAMPLE APPLICATION demonstrates all the OPOS operations available with a
connected Zebra scale.
Chapter 6, SUPPORTED SYMBOLOGY TYPES VS. SCANNER MODE provides information about the
sample application in the Zebra Scanner OPOS Driver suite.
viii ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE

Notational Conventions

The following conventions are used in this document:
Courier New font is used for code segments.
Italics are used to highlight:
Chapters and sections in this and related documents
Dialog box, window and screen names
Drop-down list and list box names
Screen field names
Check box and radio button names
File names
Directory names.
Bold text is used to highlight:
Parameter and option names
Icons on a screen
Key names on a keypad
Button names on a screen.
bullets (•) indicate:
Action items
Lists of alternatives
Lists of required steps that are not necessarily seq ue nt ial
Sequential lists (e.g., those that describe step-by-step procedures) appear as numbered lists.
Notes, caution and warning statements appear as follows:
NOTE This symbol indicates something of special interest or importance to the reader. Failure to read the note
will not result in physical harm to the reader, equipment or data.
CAUTION This symbol indicates that if this information is ignored, the possibility of data or material damage may
occur.
WARNING! This symbol indicates that if this information is ignored the possibility that serious personal

Service Information

injury may occur.
If you have a problem using the equipment, contact your facility's technical or systems support. If there is a problem with the equipment, they will contact the Zebra Global Customer Support Center at:
www.zebra.com/support
.
CHAPTER 1 INTRODUCTION TO THE ZEBRA
SCANNER OPOS DRIVER

Overview

The Zebra OPOS Driver enables bar code data commu nication between any scanner an d an OPOS compliant
POS application via either a USB (IBM Hand-held, IBM Table-top, and SNAPI) or RS-232 (Wincor-Nixdorf
Mode B and SSI) connection. This driver provides an interface for reading bar code data, receiving events,
opening, claiming, and enabling/disabling the device in accordance with the UPOS committee's version 1.12
specification. The OPOS specification defines a two-layer open-driver software architecture between a POS
application running on a Microsoft Windows operating system and the physical POS hardware device.
The upper layer, known as the Common Control Object (CCO), is an ActiveX Control that the POS application uses to interact indirectly with the Zebra scanner. The CCO is unique to each POS device class (e.g., scanners, scales, printers) and is provided by the UPOS committee. To simplify development and integration, the Zebra Scanner SDK includes a Monroe CCO (a vendor-inde pendent scanne r CCO). The control object (.ocx) file is located in the corresponding scanner or scale \Bin folder.
The lower layer , known as the Service Object (SO), is an in-process OLE Automation Server (a DLL) and is used to interact directly with the POS device, in this case the scanner. The Service Object is unique to each specific vendor's POS device. The Zebra Scanner SDK contains the Zebra specific SO.
The Zebra OPOS Driver also enables weight data communication betwee n a scale equipp ed MP6200 scanner
and an OPOS compliant POS application via either a USB (IBM Table-top and SNAPI) or RS-232 (SSI)
connection. This driver provides an interface for reading weight data, receiving events, opening, claiming, and
enabling/disabling the device in accordance with the UPOS committee's version 1.13 specification.
1 - 2 ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE
Zebra Scanner OPOS Driver Architecture
Figure 1-1
For more information about OPOS, OPOS architecture, terminology, and programmer's guides, refer to:
Zebra Scanner OPOS Driver Architecture
UPOS Home Page (http://www.nrf-arts.org). Monroe Consulting Services, Inc. (http://www.monroecs.com/opos.htm).
CHAPTER 2 INSTALLATION &

CONFIGURATION

Overview

This chapter describes installation instructions and settings to configure the Zebra Scanner OPOS Driver on a
host computer.
For custom installation instructions, refer to the Zebra Scanner SDK for Windows Developer’s Guide
(p/n 72E-149784-xx).
NOTE OPOS components are installed by default with the standard Scanner SDK installation. If a custom
Scanner SDK installation is performed, the OPOS option must be selected to install the OPOS components.
Configuration
After a successful installation of the Zebra Scanner SDK with the OPOS driver, the following system registry
entries are created at:
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scanner\ZEBRA_SCANNER
or
HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\Scale\ZEBRA_SCALE
The Zebra Scanner OPOS Driver reads the registry entry above to retrieve required configurations, for
example baud rate for serial scanners, and scanner filtering rules to form the logical scanner defined by the
user.
See Appendix A, WINDOWS REGISTRY KEYS for OPOS DRIVER for description s of suppor te d r egi stry ke ys.
2 - 2 ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE
Scanner Configuration Bar Codes
Scan the Set All Defaults bar code below to return all parameters to the scanner's default values. Refer to the scanner's Product Reference Guide for default values.
Set All Defaults
Scan the appropriate bar code below to configure the scanner for either USB or RS-232 communication protocols.

USB Communication Protocol

RS-232 Communication Protocol

Wincor-Nixdorf RS-232 Mode B (Scanner only)
IBM USB Hand-held with Full Scan Disable
IBM USB Table-top
SSI
NOTE To configure serial communication settings refer to the Zebra Scanner SDK for Windows Developer’s
Guide (p/n 72E-149784-xx).
CHAPTER 3 OPOS PROPERTIES, METHODS,
EVENTS

Overview

The following steps depict the behavioral model of the OPOS driver and scanner.
1. The scanner reads encoded data from a label.
2. When the Control receives input, it queues a DataEvent.
3. If the AutoDisable property is TRUE, the Control is disabled when a DataEvent is queued.
4. The Control can deliver a queued DataEvent to the application when the DataEventEnabled property is
TRUE. Just before delivering this event, the Control copies the data into properties and disables further data events by setting the DataEventEnabled pr op e rty to FALSE. This causes the Control to queue subsequent input data while the application processes the current input and associated properties. When the application finishes the current input and is ready for more data, it re-enables events by setting DataEventEnabled to TRUE.
5. The Control queues an ErrorEvent (or events) if it encounters an error while gathering or processing input,
and delivers this to the application when the DataEventEnabled property is TRUE.
6. The DataCount property contains the number of DataEvents queued by the Control.
7. Call the ClearInput method to delete all input that the Control queued.
Scanned data is placed into the property ScanData. If the application sets the property DecodeData to TRUE,
the data is decoded into ScanDataLabel and ScanDataType.
The following steps depict the behavioral model of the OPOS driver and scale.
1. The user/OPOS application performs read weight operation scale.
2. When the ReadWeight method successfully returns a value, scale control returns the weight data to the
POS application.
3 - 2 ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE
Deviations from OPOS Specifications
The Zebra Scanner OPOS Driver includes several deviations from the OPOS specification for more flexibility. For example, the Claim method and Claimed property have significant deviations. According to the OPOS model, one control accesses only one physical device. The Zebra Scanner OPOS Driver allows access to multiple scanners simultaneously. Hence, a claim succeeds with one or more scanners. Also, several applications can share one scanner.
In addition to the Zebra Scanner OPOS Driver's architectural aspects, the following special behaviors occur:
When there is no scanner connected to a cordless base, Zebra Scanner OPOS Driver considers the cordless base a scanner. Therefore a claim succeeds with a cordless base.
In serial mode, a claim succeeds even when no scanner is connected to the port. In this case, it indicates the success of the port opening.
Since the Zebra Scanner OPOS Driver supports multiple scanners, it implements the OPOS retrieveStatistics method call with certain deviations.
When claiming multiple scanners, scanner details appear sequentially with comma separation. The order is the same for all scanner statistics.
When there are multiple scanners, OPOS schema validation can fail because some date fields contain comma-separated multiple dates.
Non-RSM scanners, including serial scanners in Wincor-Nixdorf RS-232 Mode B, do not provide Model Number and Serial number. These values appear as empty strings.
Supported Feature Set
This section describes the supported feature set per the OPOS specification.

Properties

OPOS PROPERTIES, METHODS, EVENTS 3 - 3
Table 3-1
AutoDisable 1.2 Boolean R/W Open Supported BinaryConversion 1.2 Int32 R/W Open Supported CapCompareFirmwareVersion 1.9 Boolean R Open Not supported CapPowerReporting 1.3 Int32 R Open Not supported CapStatisticsReporting 1.8 Boolean R Open Supported CapUpdateFirmware 1.9 Boolean R Open Not supported CapUpdateStatistics 1.8 Boolean R Open Supported CheckHealthText 1.0 String R Open Not supported. Always
Claimed 1.0 Boolean R/W Open Supported (see
DataCount 1.2 Int32 R Open Supported DataEventEnabled 1.0 Boolean R/W Open Supported
Common Properties
Property Version Ty pe Access May Use After
Comments on Zebra
Scanner Support
returns OPOS_E_ILLEGAL
Deviations from OPOS Specifications on page 3-2
)
DeviceEnabled 1.0 Boolean R/W Open & Claim Supported FreezeEvents 1.0 Boolean R/W Open Supported OpenResult 1.5 Int32 R n/a Supported PowerNotify 1.3 Int32 R/W Open Not supported. Always
returns OPOS_E_ILLEGAL
PowerState 1.3 Int32 R Open Supported ResultCode 1.0 Int32 R n/a Supported ResultCodeExtended 1.0 Int32 R Open Supported State 1.0 Int32 R n/a Supported ControlObjectDescription 1.0 Int32 R n/a Supported ControlObjectVersion 1.0 Int32 R n/a Supported ServiceObjectDescription 1.0 String R Open Supported
3 - 4 ZEBRA SCANNER OPOS DRIVER DEVELOPER’S GUIDE
Table 3-1
Common Properties (Continued)
Property Version Ty pe Access May Use After
Comments on Zebra
Scanner Support
ServiceObjectVersion 1.0 Int32 R Open Supported DeviceDescription 1.0 String R Open Supported DeviceName 1.0 String R Open Supported
Table 3-2
Scanner Specific Properties
Property Version Ty pe Access
May Use
After
Comments on Zebra
Scanner Support
DecodeData 1.2 Boolean R/W Open Supported ScanData 1.0 BSTR R Open Supported ScanDataLabel 1.2 BSTR R Open Supported ScanDataType 1.2 Int32 R Open Supported
Table 3-3
Scale Specific Properties
Property Version Ty pe Access
May Use
After
Comments on Zebra
Scanner Support
MaximumWeight 1.2 INT32 R Open Supported WeightUnits 1.0 INT32 R Open Supported AsyncMode 1.3 Boolean R/W Open Supported MaxDisplayTextChars 1.13 INT32 R Open Not supported TareWeight 1.3 INT32 R/W Open & Claim Not supported ScaleLiveWeight 1.9 INT32 R Open Not supported StatusNotify 1.9 INT32 R/W Open Not supported ZeroValid 1.13 Boolean R/W Open Supported CapDisplay 1.2 Boolean R Open Not supported CapDisplayText 1.3 Boolean R Open Not supported CapPriceCalculating 1.3 Boolean R Open Not supported CapTareWeight 1.3 Boolean R Open Not supported CapZeroScale 1.3 Boolean R Open Supported CapStatusUpdate 1.9 Boolean R Open Not supported
Methods
OPOS PROPERTIES, METHODS, EVENTS 3 - 5
Table 3-4
Open 1.0 n/a Supported Close 1.0 Open Supported ClaimDevice 1.0 Open Supported (see
ReleaseDevice 1.0 Open & Claim Supported CheckHealth 1.0 Open, Claim & Enable Supported ClearInput 1.0 Open & Claim Supported ClearInputProperties 1.10 Open & Claim Supported DirectIO 1.11 Open Supported.
compareFirmwareVersion 1.9 Open, Claim & Enable Not supported resetStatistic 1.8 Open, Claim & Enable Supported retrieveStatistics 1.8 Open, Claim & Enable Supported
Common Methods
Method Version May Use After Comments on Zebra Scanner Support
Specifications on page 3-2
See
Zebra OPOS Driver Direct IO API on
page 3-6
.
Deviations from OPOS
).
updateFirmware 1.9 Open, Claim & Enable Not supported updateStatistics 1.8 Open, Claim & Enable Supported
Table 3-5
DisplayText 1.3 Open, Claim & Enable Not supported ReadWeightReadWeight 1.3 Open, Claim & Enable Supported ZeroScale 1.3 Open, Claim & Enable Supported
Scale Specific Methods
Method Version May Use After Comments on Zebra Scanner Support
Loading...
+ 43 hidden pages