Go to documentation repository
The library is designed for integration of POS software (working on Windows) with the POS PSIM system. It hides code of providing TCP/IP communication from programmers. For example, it's possible to resend data to network using TCP/IP protocol by some modifications of program code if there is code of data sending to receipt printer. Library provides COM object which is possible to use from some space supporting COM technology (e.g. Visual Basic, Delphi, 1S).
Attention!
It's required to register the regsvr32.exe poslib.dll library previously.
Application (for VB.NET):
Create object:
Dim pos As Object
pos = CreateObject("Poslib.Net")
Start process of connection setup:
Dim port As System.UInt32
port = Convert.ToUInt32("5000")
pos.Open(ip, port)
Used method:
HRESULT Open(BSTR ip_address,DWORD port) - is called at the beginning of working with library, initiates connection setup
Send text:
pos.Send("Test!" & vbNewLine)
Used method:
HRESULT Send(BSTR str);
Close connection:
pos.Close()
Used method:
When calling the Open method, the library is connecting using TCP/IP and restoring connection if it was lost. All callings are asynchronous and they don't have an impact to the main flow. Data are sending from a separate flow. All used methods are thread-safe.
When calling the Send method, data will be send if connection established and won't be send if connection lost. There is no any confirmation of successful/failed data sending.
It's required to specify type of TCP/IP connection and enter a port number specified as method of Open function on the settings panel of the POS terminal object of the POS PSIM system.