Documentation

xPCOpenTcpIpPort

Open TCP/IP connection to Simulink Real-Time system

Prototype

int xPCOpenTcpIpPort(const char *ipAddress, const char 
*ipPort);

Arguments

ipAddress

Enter the IP address of the target as a dotted decimal character string. For example, "192.168.0.10".

ipPort

Enter the associated IP port as a character string. For example, "22222".

Return

Returns a nonnegative integer that you can then use as the port value for a Simulink® Real-Time™ API function that requires it. If this operation fails, this function returns -1.

Description

The xPCOpenTcpIpPort function opens a connection to the TCP/IP location specified by the IP address. If xPCOpenTcpIpPort succeeds, it returns a nonnegative integer. Use this integer as the ipPort variable in the Simulink Real-Time API functions that require a port value. The global error number is also set, which you can get using xPCGetLastError.

Introduced before R2006a

Was this topic helpful?