주요 콘텐츠

UDP Receive

Receive UDP packets over IP network

  • Raspberry Pi UDP Receive block

Libraries:
Raspberry Pi Blockset / Network

Description

The UDP Receive block receives UDP packets from a UDP host. Use the block for stateless and connectionless data exchange.

Your antivirus software or firewall might block UDP traffic. Configure the software to allow traffic from a specific IP port number.

Note

To generate code C/C++ code for this block, you must have an Embedded Coder® license.

Examples

Ports

Output

expand all

At each sample time, the block outputs the contents of a packet received as a data vector of the size that you specify in the Data size (elements) parameter.

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

At each sample time, the block outputs the number of data bytes in the received message.

Data Types: uint8

Parameters

expand all

Specify the port number of the application on which you want to receive the UDP message. Match the local port number with the remote port number of the sending host.

Select the data type in which the block receives data bytes from the sending host.

Specify the number of elements that you want to receive in each UDP packet.

Specify the frequency at which the scheduler calls the UDP Receive block, in seconds. Enter a value greater than zero. In real-time operation, setting this parameter to a smaller value reduces the likelihood of dropped UDP messages.

Extended Capabilities

expand all

Version History

Introduced in R2013a