Main Content

UDP Send

Send UDP message

Add-On Required: This feature requires the Embedded Coder Support Package for BeagleBone Black Hardware add-on.

  • UDP Send block

Libraries:
Embedded Coder Support Package for BeagleBone Black Hardware

Description

The UDP Send block transmits user datagram protocol (UDP) data to a remote host. The block transmits an input data vector as a UDP packet to a remote IP network port. The remote IP port number to which the block sends the UDP packets is tunable in the generated code.

Ports

Input

expand all

Specify the input data vector that the block transmits as a UDP packet.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean
Complex Number Support: Yes

Parameters

expand all

Specify the IP address or host name to which to send UDP packets. If you specify a host name, specify it as a string. To broadcast a UDP packet, specify '255.255.255.255'.

Specify the IP port number to which to send UDP packets. This parameter is tunable in the generated code but is not tunable during simulation.

On Linux®, to set the IP port number below 1024, run MATLAB® with root privileges. For example, at the Linux command line, enter sudo matlab.

Specify whether the block uses a local port number that the system assigns or that you specify by using the Local IP port parameter. For the system to assign the port number, select Automatically determine. If the receiving address expects UDP packets from a specific port number, select Specify via dialog and specify the port number by using the Local IP port parameter.

Specify the IP port number from which the block sends UDP packets. Use this parameter when the receiving address expects messages from a specific port number.

Parameter Dependencies

  • To enable this parameter, set Local IP port source to Specify via dialog.

Specify the size of the buffer, in bytes, that sends the UDP packets. Make the buffer large enough to avoid data loss caused by buffer overflows.

Extended Capabilities

expand all

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

Version History

Introduced in R2014b

See Also