Zebra CPCL Specifications Page 10

  • Download
  • Add to my manuals
  • Print
  • Page
    / 70
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 9
OPOS Information
OLE for Retail POS Controls
10
P1014152-002 Rev. A ZPL & CPCL Printer Driver for OPOS Application Programmer’s Guide 06/13/2011
OLE for Retail POS Controls
The goal of this document is to provide an overview and programming guide for the Zebra
ZPL & CPCL Printer Driver for OPOS driver implementation.
For full reference of OLE for Retail POS, please download the latest manual at:
http://www.nrf-arts.org/content/Unified-POS
How an Application Uses an OPOS Control
The first action the application must take on the Control is to call its Open method. The
parameter for this method selects a device name to associate with the Control. The Open
method performs the following steps:
Establishes a link to the device name that, in our case, is the Windows printer driver name.
Initializes the properties OpenResult, Claimed, DeviceEnabled, DataEventEnabled,
FreezeEvents, AutoDisable, DataCount, and BinaryConversion, as well as descriptions
and version number of the OPOS Control layers. Additional class-specific properties may
also be initialized.
Several applications may have an OPOS Control open at the same time. Therefore, after the
device is opened, the application will need to call the ClaimDevice method to gain exclusive
access to the device. The device must be claimed before the Control allows access to its
methods and properties. Claiming the device ensures that other applications do not interfere
with the use of the device. The application may call the ReleaseDevice method when the
device can be shared by other applications—for instance, at the end of a transaction.
Before using the device, the application must set the DeviceEnabled property to TRUE. This
value brings the device to an operational state, while FALSE disables the device.
After the application has finished using the device, the DeviceEnabled property should be set
to FALSE, then the ReleaseDevice method, and finally the Close method should be called to
release the device and associated resources. Before exiting, an application should close all
open OPOS Controls.
In summary, the application follows this general sequence:
Open method: Call to link the Control Object to the Service Object.
ClaimDevice method: Call to gain exclusive access to the device. Required for exclusive-
use devices; optional for some sharable devices.
DeviceEnabled property: Set to TRUE to make the device operational.
Use the device.
DeviceEnabled property: Set to FALSE to disable the device.
ReleaseDevice method: Call to release exclusive access to the device.
Close method: Call to release the Service Object from the Control Object.
Page view 9
1 2 ... 5 6 7 8 9 10 11 12 13 14 15 ... 69 70

Comments to this Manuals

No comments