- Create two UDP objects, one for sending data to PC2 and another for receiving from PC1 and configure them accordingly.
- Define callback functions for sending and receiving data.
- Ensure that the UDP objects are cleared to avoid leaving open connections.
Is it possible to send and receive UDP packets in one GUI concurrently or one GUI able to communicate with multiple UDPport ?
3 次查看(过去 30 天)
显示 更早的评论
I have implemented an application using GUIDE to send and capture UDP packets over network.I have assigned (sending)PC1 by '10.90.1.37' ip and 4001 port, (reciving)PC2 by '10.90.1.249' ip and 4002 port .I want my application to to send and capture UDP packets packets parallely. Currently my application is able to perform either send or recive.I dont have much idea on instrumentation toolbox. So please help me out in completing my application which can do both task.
Thanks in advance.
0 个评论
回答(1 个)
Narvik
2024-1-23
Hi,
To implement an application using GUIDE to send and capture UDP packets simultaneously, you need to set up two different UDP objects: one for sending and the other for receiving UDP packets.
Below is a general overview of what you have to do:
Make sure that all the appropriate callback functions are defined and the UDP objects are initialized when the application starts.
Refer to “udpport” function for creation, configuration and setting up callback functions from the documentation link below: https://www.mathworks.com/help/instrument/udpport.html
Refer to the following documentation for more information on UDP interface:
Hope this helps!
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!