UDP Send
Send UDP data
Add-On Required: This feature requires the Embedded Coder Support Package for ARM Cortex-A Processors add-on.
Libraries:
Embedded Coder Support Package for ARM Cortex-A Processors
Description
The UDP Send block transmits user datagram protocol (UDP) data to a remote host.
Examples
Get Started with Embedded Coder Support Package for ARM Cortex-A Processors
Use Embedded Coder® Support Package for ARM® Cortex-A® Processors to run a Simulink® model on an ARM Cortex-A9 (QEMU) emulator.
Ports
Input
Input data signal, specified as a numeric vector. The block sends this data as UDP data to the remote IP address at the remote IP port.
Data Types: single
| double
| int8
| int16
| int32
| uint8
| uint16
| uint32
| Boolean
Parameters
To edit block parameters interactively, use the Property Inspector. From the Simulink® Toolstrip, on the Simulation tab, in the Prepare gallery, select Property Inspector.
To set the block parameter value programmatically, use
the set_param
function.
To get the block parameter value
programmatically, use the get_param
function.
Specify the IP address of the remote host to which you want to send UDP data. To
broadcast the UDP message, retain the default value
'255.255.255.255'
.
Programmatic Use
Block Parameter:
remoteURL
|
Specify the port number of the remote host to which you want to send UDP data. The port number must be an integer from 1 to 65,535.
Programmatic Use
Block Parameter:
remotePort
|
To enable the system automatically assign the local IP port number from which data
is sent, select Assign automatically
. To specify the local IP
port number using the Local IP port parameter, select
Specify via dialog
.
Programmatic Use
Block Parameter:
localPortSource
|
Specify the local IP port number of the application on the hardware board from which
you want to send the data. The port number can must be an integer from 1 to 65,535. The
default value, -1
assigns any randomly available port as the local IP
port.
If the receiving host accepts UDP data from a particular port number, set this parameter to that number.
To enable this parameter, set Local IP port source to
Specify via dialog
.
Programmatic Use
Block Parameter:
localPort
|
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Version History
Introduced in R2014b
See Also
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)