UDP Send
R2026bSend UDP data
UDP Send block
To add a block to a model, double-click the canvas and start typing the block name. Then, select the block from the list.
Libraries:
Embedded Coder Support Package for ARM Cortex-A Processors
Description
Add-On Required: This feature requires the Embedded Coder Support Package for ARM Cortex-A Processors add-on.
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.
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- 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)
