TCP Write

Send TCP/IP packets to remote host over TCP/IP network

  • Library:
  • SoC Blockset / Processor I/O

Description

The TCP Write block sends TCP/IP packets to a remote host over a TCP/IP (Transmission Control Protocol/Internet Protocol) network.

Ports

Input

expand all

Input data, specified as a numeric vector. The block sends this data over a TCP/IP network to the remote host.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32

Output

expand all

Stream of TCP/IP packets sent to the remote host, returned as a numeric vector. The data type of the output is same as the input data received.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint32 | uint16

Parameters

expand all

To configure this block as a TCP/IP client or server, set this parameter to Client or Server, respectively.

When you set this parameter to Client, you must provide the remote IP address and remote IP port number of the TCP/IP server to which you want to send TCP/IP packets. Specify this information by using the Remote address and Remote port parameters.

When you set this parameter to Server, you must provide the local IP port number, which acts as the listening port of the TCP/IP server running in the hardware. Specify this information using the Local port parameter.

Specify the IP address of the remote server to which you want to send TCP/IP packets.

Dependencies

To enable this parameter, set the Network role parameter to Client.

Specify the port number of the remote server to which you want to send TCP/IP packets.

Dependencies

To enable this parameter, set the Network role parameter to Client.

When the Network role parameter is set to Client, specify the IP port number of the application from which you want to send TCP/IP packets. The default value -1, sets this IP port number to a random available port number and uses that port to send the packets.

When the Network role parameter is set to Server, this local port acts as the listing port of the TCP/IP server running in the hardware. In this case, specify a value from 1 to 65,535 for this parameter.

Byte order of the TCP/IP packets, specified as one of these values:

  • LittleEndian — Sets the byte order of TCP/IP packets to little endian.

  • BigEndian — Sets the byte order of TCP/IP packets to big endian.

Extended Capabilities

Introduced in R2019a