XPS Unified Programmer’s Manual
7.2.1.137 OpenConnection
Name
OpenConnection – opens a socket to connect to TCP server (local).
Input tests
- Refer to section 7.1: “Input Tests Common to all XPS Functions”.
- Checks number of used sockets (Max = 100): if no free socket then the SocketID is
set to -1.
Description
This function opens a socket in a TCL script located in the “Scripts” directory of the
XPS controller.
The TCP/IP communication is configured as:
Local Host Address = 127.0.0.1
IP Port = 5001
This function returns a socket identifier to use for each function call. The socket
identifier is defined between 0 to 99. If the TCP/IP connection fails then the “SocketID”
value is –1.
Prototype
int OpenConnection(
int TimeOut,
int SocketID
)
Input parameters
TimeOut int Timeout in seconds used for each function
execution.
SocketID int Socket identifier used in each function.
Output parameters
None.
Return (In addition to the results of “Input Tests Common to all XPS
Functions”)
• 0: No error.
EDH0373En1023 — 01/18 210