TCP Receive
Libraries:
Simulink Real-Time /
IP
Description
The TCP Receive block receives data sent from a remote client device to a server application on a Speedgoat® target computer.
Examples
Target to Development Computer Communication by Using TCP
Use TCP blocks to send data from the target computer to MATLAB running on the development computer.
Ports
Input
Enable — Allow data reception
integer
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
Data — Data that is received from the remote client
vector
The parameter Receive width determines the maximum size of the data vector.
Data Types: uint8
Length — Actual size of data vector
double
To test whether the number of data items exceeds the width of the data output port, use this value.
Parameters
Receive using — List of IP address and port pairs
x.x.x.x:y
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 |
Receive width — Maximum expected length of data vector
1–65504
Maximum number of uint8
values that the block expects
to receive from the client
device.
Programmatic Use
Block Parameter:
rcvWidth |
Sample time — Sample time of block
-1
(default) | numeric
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
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)