Documentation

xPCRegisterTarget

Register target with Simulink Real-Time API library

Prototype

int xPCRegisterTarget(int commType, const char *ipAddress, 
const char *ipPort, int comPort, int baudRate);

Arguments

commType

Specify the communication type between the development and target computers. The only value supported is COMMTYP_TCPIP.

Note

RS-232 communication type has been removed. Configure TCP/IP communication instead.

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

When called with TCP/IP parameters, the function returns the port number. If the function detects an error, it returns -1.

When called with RS-232 parameters, the function returns -1 and sets error status EINVCOMMTYP.

Description

The xPCRegisterTarget function works similarly to xPCOpenTcpIpPort, except that it does not try to open a connection to the target computer. In other words, calling xPCOpenTcpIpPort is equivalent to calling xPCRegisterTarget with the required parameters, followed by a call to xPCOpenConnection.

Use the constant COMMTYP_TCPIP for commType. The function ignores comPort and baudRate.

Introduced before R2006a

Was this topic helpful?