SiTef - Simplified interface with the application

Library configuration

This should be the first call to the CliSiTef library. It aims to configure the parameters of connection with the SiTef server, and with Commercial Automation itself.

int ConfiguraIntSiTefInterativo (IPSiTef, IdStore, IdTerminal, Reserved)
int ConfiguraIntSiTefInterativoEx (IPSiTef, IdStore, IdTerminal, Reserved,
Additional Parameters)

Interface ASCII#

ConfiguraIntSiTefInterativoA (Result, IPSiTef, IdStore, IdTerminal, Reserved)
ConfiguraIntSiTefInterativoExA (Result, IPSiTef, IdStore, IdTerminal, Reserved,
AdditionalParameters)
ParâmetroTipoInterface PadrãoInterface ASCIIDescrição
ResultadoSaída, por favorNão UsadoFixo 6Contém o resultado de resposta à chamada da rotina.
IPSiTefEntrada, por favorchar *VariávelConfigura o nome ou endereço IP (em notação “.”) do servidor SiTef.
IdLojaEntrada, por favorchar *Fixo 8Identifica o número da loja perante a rede de estabelecimentos comerciais.
IdTerminalEntrada, por favorchar *Fixo 8Identifica o pdv perante a loja. Possui o formato XXnnnnnn onde XX corresponde a 2 caracteres alfabéticos e nnnnnn 6 dígitos quaisquer desde que o número resultante não sobreponha a faixa 000900 a 000999 que é reservada para uso pelo SiTef.
ReservadoEntrada, por favorchar *Fixo 6Deve ser passado com 0
ParametrosAdicionaisEntrada, por favorchar *VariávelParâmetros adicionais de configuração da CliSiTef no seguinte Formato:[<Nome_Parametro_1>=<Valor_Parametro_1>;<Nome_Parametro_2>=<Valor_Parametro_2>]

Important! Each terminal must have a unique and fixed code per SiTef store. Therefore, the commercial establishment must manage the codes used so that there is never a repetition of terminals for the same store.

The SiTef server does not allow two or more simultaneous connections using the same pair (store, terminal), dropping previous connections, keeping only the last connection made; if perhaps the transaction that was in progress when the connection dropped due to a duplicate POS was already in a pending state (a sale for example), SiTef immediately places it in Canc.POS (Cancelled by POS) status, that is, this will be cancelled; the terminal that is disconnected will receive the message “No SiTef connection” with the error -5.

When the commercial establishment uses Pinpad to read cards and enter passwords and if the pair (store, terminal) is changed, this will result in new tables being loaded onto the pinpad with each change. This is another one reason for the terminal code to be fixed.


The configuration routines return one of the following values:

ValueDescription
0No error occurred
1Invalid or unresolved IP address
2Invalid store code
3Invalid terminal code
6Tcp/Ip initialization error
7Lack of memory
8Didn't find CliSiTef or it has problems
9SiTef server configuration has been exceeded.
10Access error in the CliSiTef folder (possible lack of writing permission)
11Invalid data passed through automation.
12Safe mode not active (possible lack of configuration on the SiTef server of the .cha file).
13Invalid DLL path (the full library path is too long).

Note: during the automation lifecycle, if there is no change in the function's input parameters, then there is no need to call it again.


1.1 General special settings#

Certain general settings (valid for all transactions) of CliSiTef can be passed through the parameter “ParametersAdditional” of the routine SetsUpIntSiTefInteractiveEx. The format of this field is as follows:

[<Functionality>;<Functionality>;...]

Next, we describe the functionalities provided in this field.


Note: only the main settings will be highlighted in this item. For a detailed description of all available options, see the document “CliSiTef – List of Additional Parameters”.


FunctionalityDescription
MultiplosCupons=1Indicates that the POS is able to receive more than one receipt per transaction. In the case of transactions with more than one receipt, such as cell phone recharge transactions or bill payments with credit or debit cards, the cell phone recharge or bill payment receipt will be delivered separately from the credit or debit EFT receipt.
PortaPinPad=<Porta PinPad>Defines the port to which the shared pinpad is connected.
Example:
Windows: [PortaPinPad=1]
Linux: [PortaPinPad=/dev/ttyS0]
LojaECF=<Num Loja>Tax store number (Maximum size: 20)
CaixaECF=<Num Caixa>Tax box number (Maximum size: 20)
NumeroSerieECF=<Serie ECF>ECF Serial Number (Max Size: 20)

1.2 Additional Automation/Establishment information#

The ParmsClient configuration allows commercial automation to configure information common to all transactions exchanged with the SiTef server.

Format:

[ParmsClient=Id1=Valor1;Id2=Valor2;Id3=Valor3;...;IdN=ValorN]

where:

<ParmsClient=> = Data identifier prefix.

<IdN> = Field identifier, as defined in the table below.

<ValorN> = Field value.

IdFormatMeaning
1NumericCNPJ of the establishment/store.
2NumericCNPJ of the company that developed commercial automation
3NumericCNPJ of the establishment/store
4NumericCNPJ Facilitator (Van)

Example of how to send data to CliSiTef:

[ParmsClient=1=31406434895111;2=12523654185985]

Where:

  • 1 (CNPJ of the Establishment) with the value 31406434895111.

  • 2 (CNPJ of the commercial automation company) with the value 12523654185985.


Note: this parameter should not be used for sub-acquiring purposes (soft descriptor). To this end, see the document “CliSiTef - Sub-Acquiring Information (Soft Descriptor)”


1.3 Floating point#

How automation tells CliSiTef that it knows how to handle floating point fields

Treating fields with Floating Point requires a procedure performed in conjunction with automation.

For Clisitef to carry out this procedure, which will be described below, the automation must inform Clisitef that it is able to handle it. To do this, the automation must pass the string below in the parameter “ParametersAdditional” when executing the ConfiguraIntSiTefInterativoEx function.

[TrataPontoFlutuante=1]

If this parameter is omitted and SiTef requests field collection with Floating Point, CliSiTef will request the automation, the message is displayed: "Floating Point not Supported by POS".

Procedure in “married operation” with automation#

How automation tells CliSiTef that it knows how to handle floating point fields

The treatment of fields with Floating Point requires a procedure carried out in conjunction with the automation.

For Clisitef to carry out this procedure, which will be described below, the automation must inform Clisitef that it is able to handle it. To do this, the automation must pass the string below in the “ParametersAdditionals” parameter when executing the ConfiguraIntSiTefInterativoEx function.

[TrataPontoFlutuante=1]

If this parameter is omitted and SiTef requests field collection with Floating Point, CliSiTef will request the automation, the message is displayed: "Floating Point not Supported by POS".

Procedure in “married operation” with automation#

If it was informed in the Configuration, to support the Floating Point feature, as described above, CliSiTef, through Command 0 in conjunction with the FieldType 2470, informs the Automation of the number of decimal places in the Buffer parameter, so that it can Format your screens before displaying them to the operator (See Screen Examples on the next page). Only after this “pact” with Automation, CliSiTef will send the floating point field collection command (through commands 34 or 30) as per the examples below

Parameters ContinueSiTefInteractive Function: CliSiTef ======= -> PDV
CommandFieldType
0No
Gym2470
Examples of number of decimal placesBuffer
Lunch weight in grams with 2 boxes2
otal of the Fuel Pump in reais with 3 houses3

• In the example where the number of decimal places entered was 2, shortly afterwards, CliSitef will request the command

• In the example where the number of decimal places entered was 3, shortly afterwards, CliSitef will request the command 34: