UDP Receive
Receive UDP data from remote host
- Library:
Simulink Support Package for Apple iOS Devices / Communication
Description
The UDP Receive block receives user datagram protocol (UDP) data from a remote host. The block reads available UDP data from the socket buffer and outputs the data as a vector.
Ports
Output
Data
— UDP data received
numeric vector
UDP data received from a remote host, returned as a numeric vector. Set the data type of this output by using the Data type parameter.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
Size
— Size of received UDP packet
nonegative scalar
Size of received UDP packet, returned as a nonnegative scalar. While the block
waits for new data to arrive, this port outputs a 0
. When new data
arrives, this port value changes to the length of the received UDP packet.
Data Types: uint16
Parameters
Local IP port
— IP port number of local device
25000
(default) | integer from 1 to 65,535
Specify the IP port number of the local device. The local device is the iOS device that is running the model.
Data type
— Data type of output UDP packet
uint8
(default) | uint16
| unit32
| int8
| int16
| int32
| single
| double
Set the data type of the vector elements in the output. Match this data type with the data input used to create the UDP packets.
Data size (N)
— Size of output UDP packet
255
(default) | positive integer
Specify the number of data elements in each UDP packet. Match the data size used to create the UDP packets.
Sample time
— Sample time
0.01
(default) | nonnegative scalar
Specify how often this block reads the port buffer. Enter a value greater than zero.
Note
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2015a
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)