Library configuration
This must be the first call to the CliSiTef library. She has The objective is to configure the connection parameters with the server SiTef, and with Commercial Automation itself.
int ConfiguraIntSiTefInterativo (IPSiTef, IdStore, IdTerminal, Reserved)
int ConfiguraIntSiTefInterativoEx (IPSiTef, IdStore, IdTerminal, Reserved, AdditionalParameters)
ASCII Interface
ConfiguraIntSiTefInterativoA (Result, IPSiTef, IdLoja, IdTerminal, Reserved)
ConfiguraIntSiTefInterativoExA (Result, IPSiTef, StoreId, TerminalId, Reserved, AdditionalParameters)
Parameter | Type | Standard Interface | ASCII Interface | Description |
---|---|---|---|---|
Result | Output, by value | Not used | Fixed 6 | Contains the result of the response to the routine call. |
IPSiTef | Entry, by value | char * | Variable | Configures the name or IP address (in "." notation) of the SiTef server. |
IDStore | Entry, by value | char * | Fixed 8 | Identifies the store number within the network of commercial establishments. |
IdTerminal | Entry, by value | char * | Fixed 8 | Identifies the POS in front of the store. It has the format XXnnnnnn where XX corresponds to 2 alphabetic characters and nnnnnn to any 6 digits as long as the resulting number does not overlap the range 000900 to 000999 which is reserved for use by SiTef. |
Reserved | Entry, by value | char * | Fixed 6 | Must be passed with 0 |
Additional Parameters | Entry, by value | char * | Variable | Additional CliSiTef configuration parameters in the following format: [<Parameter_Name_1>=<Parameter_Value_1>;<Parameter_Name_2>=<Parameter_Value_2>] |
Important!
Each terminal must have a unique and fixed code per SiTef store. In this way, the commercial establishment must manage the codes used in such a way that there is never a repetition of terminals for a same store.
SiTef server does not allow two or more simultaneous connections using the same pair (store, terminal), dropping the connections previous ones, keeping only the last connection made; if perhaps the transaction that was in progress when the POS connection dropped duplicate was already in pending status (a sale for example), the SiTef immediately places it in Canc.POS status (Cancelled by the POS), or In other words, this will be cancelled; the terminal that is disconnected will receive the message "Sem conexao SiTef" with error code -5.
When the commercial establishment uses Pinpad to read cards and password entry and if the pair (store, terminal) is changed, this will result in new tables being loaded onto the pinpad every change. This is yet another reason for the terminal code to be fixed.
The configuration routines return one of the following values:
#
Table 2 - Return codes from configuration functionsValue | Description |
---|---|
0 | No error occurred |
1 | Invalid or unresolved IP address |
2 | Invalid store code |
3 | Invalid terminal code |
6 | Tcp/Ip initialization error |
7 | Lack of memory |
8 | Didn't find CliSiTef or it has problems |
9 | SiTef server configuration has been exceeded. |
10 | Access error in the CliSiTef folder (possible lack of writing permission) |
11 | Invalid data passed through automation. |
12 | Safe mode not active (possible lack of configuration on the SiTef server of the .cha file). |
13 | Invalid 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 her again.