Main Content

TCP Receive

Receive data over TCP network from a remote device

Since R2020b

  • TCP Receive block

Libraries:
Simulink Real-Time / IP

Description

The TCP Receive block receives data sent from a remote client device to a server application on a target computer.

Ports

Input

expand all

When Enable > 0, the block attempts to receive data sent to the remote device.

As a best practice, connect the Status output of a TCP configure block to the Enable input of the associated TCP Send and TCP Receive blocks.

Output

expand all

The parameter Receive width determines the maximum size of the data vector.

Data Types: uint8

To test whether the number of data items exceeds the width of the data output port, use this value.

Parameters

expand all

This parameter is read-only.

The block receives the list of IP address and port pairs from the TCP configuration blocks in the model.

Ports 1 through 1023 and 5500 through 5560 are reserved for Simulink Real-Time communications.

Programmatic Use

Block Parameter: socketAddPort

Maximum number of uint8 values that the block expects to receive from the client device.

Programmatic Use

Block Parameter: rcvWidth

Enter the base sample time or a multiple of the base sample time. -1 means that the sample time is inherited.

Programmatic Use

Block Parameter: sampleTime

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b