How can I receive Ethernet Data

20 次查看(过去 30 天)
I am working on a project in which I can acquire the data from my Development Board through Ethernet Interface using UDP. In order to receive the data at my PC, I have developed a C program using Winsock. However I want to receive the data directly at Matlab without the need to use the C program. I have tried using UDP receive Matlab utility however I was not successful. Can any one guide me regarding my problem?

采纳的回答

Greg
Greg 2017-1-25
Purchase the Instrument Control toolbox and use the UDP() function. It works beautifully.
  4 个评论
Habib Khan
Habib Khan 2017-1-26
Sorry a typo. I meant Toolbox instead.
Greg
Greg 2017-1-26
编辑:Greg 2017-1-26
I'm not 100% sure what you mean precisely by "streaming" but I assume you at least want some level of automated datagram reading.
Check the documentation for the udp() function. Specifically, the DatagramReceivedFcn and BytesAvailableFcnMode properties. You can set those up in a way to automatically do whatever you want (i.e., the code in DatagramReceivedFcn) when a condition is met (number of bytes arrive, a terminator arrives, etc., which is your BytesAvailableFcnMode).

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Hardware Discovery and Setup 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by