Zebra Technologies P1061668-001 manual How an Application Uses an Opos Control

Page 18

16

Kiosk Modifications of the OLE for Retail POS

How an Application Uses an OPOS Control

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 of 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 numbers 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.

Device Power Reporting Model

Kiosk Printer OPOS segments device power into two states:

ONLINE: The device is powered on and ready for use. This is the “operational” state.

OFF_OFFLINE: The device is either off or offline and the Service Object cannot distinguish these states.

Power reporting only occurs while the device is open, claimed (if the device is exclusive-use), and enabled.

P1061668-001 Rev. A

OPOS Driver User Guide

11/25/2013

Image 18
Contents Zebra Kiosk Opos Driver User Guide Page Contents Contents Who Should Use This Document Opos InformationEpson Fujitsu-ICL Microsoft OLE for Retail POS CommitteeCore Companies NCRDocument Conventions Icons UsedDocument Conventions Compatible Operating Systems Kiosk Opos Driver InstallationHardware Requirements Following sections describeBefore Installing the Opos Driver Installing the Opos DriverTo install the Kiosk Opos Driver List of available drivers appear Kiosk Opos Driver Installation Kiosk Opos Driver Installation Kiosk Opos Driver Installation Testing the Installation Zebra Opos Printer Service Object Test Tool appearsKiosk Opos Driver Installation Kiosk Modifications of the OLE for Retail POS OLE for Retail POS ControlsDevice Power Reporting Model How an Application Uses an Opos ControlSummary of Common Properties, Methods, and Events Common PropertiesCommon Methods Common EventsOpossuccess Use of DirectIO has one valid command entryDirectIO Method Direct I/O successfulExample STX Events POS Printer SummaryYES Specific PropertiesCapRecDwide Boolean Open CapRecBitmap Boolean OpenCapRecBold Boolean Open CapRecDwideDhigh Boolean OpenErrorString Open ErrorLevel Long OpenErrorStation Long Open CartridgeNotify Long Open CharacterSetJrnNearEnd Boolean JrnLetterQuality BooleanJrnEmpty Boolean JrnCartridgeState LongSlpLineWidth Long SlpLineCharsList String Open SlpLineHeight LongSlpLineSpacing Long SlpLetterQuality BooleanSpecific Methods General Information EventsESC #P Data Characters and Escape SequencesOne Shot Data Characters and Escape Sequences ESC #BPrint Mode Data Characters and Escape Sequences ESC #EESC #R ESC 2C Print Line Data Characters and Escape SequencesESC 1C ESC 3CNormal Restores printer characteristics toRight justify ESC rA Aligns following text at the right ESC NProperties MapMode Property CharacterSetList PropertyFontTypefaceList Property RecBarCodeRotationList PropertyRecLineWidth Property RecLineSpacing PropertyRecLinesToPaperCut Property RecSidewaysMaxChars PropertyMethods CutPaper MethodPrintBarCode Method One Dimensional Symbologies Two Dimensional SymbologiesPrintBitmap Method RotatePrint MethodSetBitmap Method Kiosk Modifications of the OLE for Retail POS Page Zebra Technologies Asia Pacific, LLC Zebra Technologies CorporationZebra Technologies Europe Limited ZIH Corp P1061668-001 Rev. a