Главная » Оборудование » СПАРК-115Ф » Драйвер OPOS для СПАРК-115Ф » OPOS Driver for SPARK-115F Fiscal Printer Programmer’s Guide
Назад

OPOS Driver for SPARK-115F Fiscal Printer Programmer’s Guide

Номер статьи: 0000126

 Download Document

 

 

Overview

 

The driver operates with SPARK fiscal printer, implementing OPOS standard version 1.7.

 

Supported versions of SPARK

 

Parameter DeviceName in Open method should have the value “Spark”.

 

The driver uses the following registry keys

 

The driver setup will write the following keys and their values into registry:

Key

HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\FiscalPrinter\Spark

Value

Default = "SparkService2.FPSparkOPOSService"

 

 

 

OPOS service class name

Key

HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\FiscalPrinter\Spark\Settings\General

Value

NumDevices= "1"

 

 

 

Number of fiscal printers, installed in the system

Key

HKEY_LOCAL_MACHINE\SOFTWARE\OLEforRetail\ServiceOPOS\FiscalPrinter\Spark\Settings\1

 

 

 

Settings of the first fiscal printer in the system (Type of all values – REG_SZ)

Value

CashierID= "Cashier"

 

 

 

Cashier ID

Value

ENABLELOG= "1"

 

 

 

Enable or disable writing log

Value

EXTCFGFILE= "c:\Program Files\KKS\KKS FP Spark OPOS driver\extcfg.ini"

 

 

 

Path to the configuration file, specific for each application

Value

HLLOGFILE= " "

 

 

 

Path to the log file of the higher level (calls of OPOS methods). By default, the log will be written to the file:
<path to executable program file>\OPOS-Log\OPOS_HL_Log.log

Value

LLLOGFILE= " "

 

 

 

Path to the log file of the lower level (commands sent to fiscal printer). By default, the log will be written to the file:
<path to executable program file>\OPOS-Log\OPOS_LL_Log.log

Value

ENABLEDAILY= "0"

 

 

 

Enables writing to the separate daily log files. If the value of HLLOGFILE not set, then log will be written to the files:
<path to executable program file>\OPOS-Log\OPOShl-YYYY-MM-DD.log
and
<path to executable program file>\OPOS-Log\OPOSll-YYYY-MM-DD.log,
where YYYY – year, MM – month, DD – day of the log date.

Value

LIFETIMEDAILY = "0"

 

 

 

Number of days to keep the daily log. Default is 7 days. Allowable between 1 and 60 days.

Value

Password = "000000"

 

 

 

Fiscal printer access password

Value

Port= "1"

 

 

 

COM port number

Value

POSID= "1"

 

 

 

POS terminal ID number

Value

TranscodeTable= "1"

 

 

 

0 – printed text will be converted by code table win1251
1 – printed text will be converted by code table dos866

Value

USEEXTCFG= "1"

 

 

 

0 – Don't use configuration file, specific for each application
1 – Use configuration file, specific for each application

Value

OFDIPADDRESS= ""

 

 

 

URL or IP address of the server of operator of fiscal data (OFD)

Value

OFDPORT= ""

 

 

 

Port to OFD server

 

Configuration file, specific for each application

 

This is a typical ini-file, containing the sections with values described below.

Section

[VERSION]

 

 

 

File version.

 

Parameter MAJORVERSION=1

 

 

 

– major part of the version of configuration file;

 

Parameter MINORVERSION=0

 

 

 

– minor part of the version of configuration file

Section

[CORRESPONDENCE]

 

 

 

Information on the correspondence between payment media, used in the application, and those in the fiscal printer.

 

Parameter NUMENTRIES

 

 

 

Number of pairs of corresponding payment media. Number between 1 and 8.

 

Parameter ENTRY%dCLIENT

 

 

 

%d – number between 0 and NUMENTRIES-1

Descriptor of the payment media of the client application.

 

Parameter ENTRY%dSPARK

 

 

 

%d – number between 0 and NUMENTRIES-1

Descriptor of the payment media of SPARK.

Section

[SETTINGS]

 

Parameter EXTENDEDMODE

 

 

 

1 – enable extended mode;

0 – disable extended mode.

 

Parameter SPACELINEHANDLING

 

 

 

0 – all-blank lines, sent by parameter in PrintRecMessage, will be printed;

1 – all-blank lines, sent by parameter in PrintRecMessage, will not be printed.

 

Parameter HANDLEUNIFORMROWS

 

 

 

(for driver version 1.0.0.14 and higher)

1 – When method PrintRecMessage is called, with the parameter of a uniform line, consisting of one repeated character, the length of the line being bigger than printer line width, then "extra" characters will be truncated;

0 – All characters will be printed, split into 2 lines.

This parameter is used only in extended mode (EXTENDEDMODE = 1).

Section

[MODE]

 

Parameter SPARK800

 

 

 

1 – use fiscal printer model SPARK-800

0 – use other models.

Section

[INIT]

 

 

 

Actions performed at the driver initiation (for driver version 1.0.0.20 and higher).

 

 

 

1 – Payment media properties should be programmed at driver initiation;

0 – Don't program, disregard the parameters, described below.

 

 

 

In all parameters described below, [%N] should be replaced by the number of a relevant payment media (allowable 1 thru 8).

 

Parameter PM[%N]DOPROGRAMMING

 

 

 

Programming properties of the payment media number [%N]

Value: 1 – program; 0 – don't program.

 

Parameter PM[%N]CODEPAGE

 

 

 

Code page to set the name text of the payment media number [%N]

Value: 1 – code page DOS 866; 0 – code page Windows 1251.

 

Parameter PM[%N]NAME

 

 

 

Name text of the payment media number [%N]

Value: text line up to 14 characters.

 

Parameter PM[%N]CARD

 

 

 

Defines if the payment media number [%N] is a card (for card it is required to send supplementary data by calling method DirectIO)

Value: 1 – is a card; 0 – not a card media (cash or other)

 

Parameter PM[%N]OPENDRAWER

 

 

 

Defines if the cash drawer is opened at tendering by media number [%N]

Value: 1 – open drawer; 0 – don't open.

 

Parameter PM[%N]ENABLECHANGE

 

 

 

Enable or prohibit entering tender amount for payment media number [%N]

Value: 1 – enabled; 0 – prohibited.

 

Parameter PM[%N]CHECKTOTAL

 

 

 

Enable or prohibit accounting of total amount for payment media number [%N] into total cash in drawer for daily X / Z report. Payment media 1 thru 7 are defaulted to 0, only payment media No 8 (CASH) have this parameter set to 1 as default.

Value: 1 – enabled; 0 – prohibited.

 

 

 

(For driver version 1.0.0.43 and higher).

 

Parameter PROGRAMTAXES

 

 

 

Defines, if tax rates should to be programmed mandatory at day opening.

Value: 1 – should be programmed; 0 – not necessary.

 

Parameter TAXFILENAME

 

 

 

Name of file containing data for tax rates and tax chains. File data format:

It is plain text file, code page win1251.

Lines 1~4 are tax rates.

Lines 5~12 are tax chains, according to SPARK chain format.

 

Special features of driver methods

 

Method PrintRecTotal

 

One of the following lines should be set as a parameter Description, equal to the number of the payment media:
"1","2","3","4","5","6","7","8".

 

Non-supported properties

 

Properties CapXXX, returning False

CapAdditionalHeader

CapAdditionalLines

CapAdditionalTrailer

CapAmountNotPaid

CapChangeDue

CapCheckTotal

CapCoverSensor 

CapDoubleWidth

CapDuplicateReceipt

CapFiscalReceiptStation

CapFixedOutput

CapItemList

CapMultiContractor

CapOnlyVoidLastItem

CapOrderAdjustmentFirst

CapPackageAdjustment

CapPercentAdjustment

CapPostPreLine

CapPowerLossReport

CapReceiptNotPaid

CapRemainingFiscalMemory

CapSetCurrency

CapSetStoreFiscalID

CapSetTrailer

CapSlpEmptySensor

CapSlpFiscalDocument

CapSlpFullSlip

CapSlpNearEndSensor

CapSlpPresent

CapSlpValidation

CapTotalizerType

CapTrainingMode

CapValidateJournal

 

Non-supported methods

BeginFiscalDocument

BeginFixedOutput

BeginInsertion

BeginItemList

BeginRemoval

BeginTraining

EndFiscalDocument

EndFixedOutput

EndInsertion

EndItemList

EndRemoval

EndTraining

GetTotalizer

PrintDuplicateReceipt

PrintFiscalDocumentLine

PrintFixedOutput

PrintPeriodicTotalsReport

PrintPowerLossReport

PrintRecItemFuel

PrintRecItemFuelVoid

PrintRecMessage

PrintRecNotPaid

PrintRecPackageAdjustment

PrintRecPackageAdjustVoid

PrintRecSubtotalAdjustVoid

PrintRecTaxID

PrintReport

SetCurrency

SetStoreFiscalID

SetTrailerLine

VerifyItem

 

Non-supported parameters of method GetData

FPTR_GD_CURRENT_TOTAL

FPTR_GD_GRAND_TOTAL

FPTR_GD_NOT_PAID

FPTR_GD_MID_VOID

FPTR_GD_REFUND

FPTR_GD_REFUND_VOID

FPTR_GD_NUMB_CONFIG_BLOCK

FPTR_GD_NUMB_CURRENCY_BLOCK

FPTR_GD_NUMB_HDR_BLOCK

FPTR_GD_NUMB_RESET_BLOCK

FPTR_GD_NUMB_VAT_BLOCK

FPTR_GD_FISCAL_DOC

FPTR_GD_FISCAL_DOC_VOID

FPTR_GD_FISCAL_REC

FPTR_GD_FISCAL_REC_VOID

FPTR_GD_NONFISCAL_DOC

FPTR_GD_NONFISCAL_DOC_VOID

FPTR_GD_NONFISCAL_REC

FPTR_GD_RESTART

FPTR_GD_SIMP_INVOICE

FPTR_GD_TENDER

FPTR_GD_LINECOUNT

 

Description of the commends sent via method DirectIO

LONG DirectIO (LONG Command, LONG* pData, BSTR* pString);

 

Parameter Command may take 3 possible values:

1 –  DirectIO sends a command to a printer directly by parameter pString; pData returns the error code.

2 –  DirectIO sends additional information or driver settings

3 –  DirectIO sends additional information or driver settings to handle fiscal memory (FN)

 

Parameters pData and pString may take following possible combinations:

*pData = 1

 

pString transfers a card number, to be printed in the receipt at the following payment operation (PrintRecTotal)

*pData = 3

 

pString transfers a number of authorization document, to be printed in the receipt at the following payment operation (PrintRecTotal)

*pData = 5

.

pString is set to "1" to enable writing log; set to "0" to disable logging.

*pData = 7

 

pString transfers a name of an upper level log file.

*pData = 9

 

pString transfers a name of a lower level log file.

*pData = 11

 

pData returns the printer status byte.

 

For Command = 2 more values are allowed for pData:

*pData = 43

 

pData returns the extended printer error value.

*pData = 44

 

pData return the day ending flag. Parameter pString returns date and time of day opening, and the allowable length of day in hours.

*pData = 45

 

pString returns bytes PSTATUS and PPIOCD of the combined printer status.

*pData = 47

 

pString transfers customer's email address or telephone number. Printer won't check if data are correct or not.

*pData = 48

 

pString returns the number of subversion of printer firmware.

 

For Command = 3 more values are allowed for pData:

*pData = 101

 

pString returns the status of fiscal memory (FN) as а string in hexadecimal format.

*pData = 103

 

pString returns the status of information exchange of fiscal memory (FN) as a string in hexadecimal format.

*pData = 104

 

pString returns serial number of FN.

*pData = 201

 

pString returns the status of information exchange of fiscal memory (FN) as a string in hexadecimal format, and
pData returns data of information exchange (byte by byte): life phase status, current doc type, shift status, document data.

*pData = 210

 

pData returns the number of last fiscal document.

 

 

 

Extended function mode of the driver

Overview

For driver version 1.0.0.5 and higher

 

This extended mode is to support applications to print free text information in the fiscal receipt. This text is printed as sales item with null price.

 

Properties and methods supported in extended mode

 

This extended mode is to support applications to print free text information in the fiscal receipt. This text is printed as sales item with zero price.

 

In the extended mode following properties have specific values:

CapAdditionalLines = TRUE

MessageLength = 42

 

MessageLength is always equal to 42, for all models of fiscal printer. If the length of data for PrintRecMessage is bigger than 42 characters, it is split into two lines, each is printed as sales item with zero price.

 

Additionally, the following methods are supported

PrintRecMessage

 

Special features of extended mode

 

In the extended mode at driver initialization the following receipt settings are defaulted:

Item counter is printed

The "*" mark in printed with amount.

 

When the PrintRecTotal method is called, the payment commands are not immediately sent to the printer, but the transferred parameters are stored in the driver.

 

The strings passed by the parameter to the PrintRecMessage method and payment commands will be printed by the EndFiscalReceipt method.

 

The Description parameter passed to the PrintRecSubtotalAdjustment method is not ignored. The string transmitted through this parameter is printed on the receipt as a sales item with a zero price.

 

In extended mode, the PrinterState property after the PrintRecTotal method call always has the value FPTR_PS_FISCAL_RECEIPT_ENDING, regardless of whether the payment exceeds receipt total or not.

 

Within a fiscal transaction, maximum allowed are 8 calls of PrintRecTotal.

 

No more than 1024 calls of the PrintRecMessage function within one receipt.

 

The mode of tax chains is disabled.

 

Просмотры: 3344