UDP Send
Send UDP data to remote host
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 sends UDP (User Datagram Protocol) 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
Port_1 — Input data signal
numeric vector
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
Remote IP address ('255.255.255.255' for broadcast) — IP address of remote host
'255.255.255.255'
(default) | valid IP address
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
|
Remote IP port — IP port of remote host
25000
(default) | integer from 1 to 65,535
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
|
Local IP port source — Select local IP port source
Assign automatically
(default) | Specify via dialog
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
|
Local IP port — IP port on local host
-1
(default) | integer from 1 to 65,535
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)