Receive UDP data from remote host
Simulink Support Package for Apple iOS Devices / Communication
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.
Data — UDP data received
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.
Size — Size of received UDP packet
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.
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) |
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.
Smaller values for Sample time require the processor to complete the same number of instructions in less time, which can cause task overruns.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2015a