sending UDP packets from simulink directly over network?

2 次查看(过去 30 天)
could we send UDP packets directly from simulink tool box over a wireless network to another computer?

回答(2 个)

Guy Rouleau
Guy Rouleau 2012-4-12
Yes... you did not ask, but in case you want to know how, I would suggest to use the "UDP Send" block:
  2 个评论
aida
aida 2012-4-13
could we send .mat file in normal type(ASCII) , then in other computer we won't need to unpack that and convert again ?
Walter Roberson
Walter Roberson 2012-4-13
No. .mat files are binary files which would be difficult to convert to meaningful text. You would end up having to interpret ("unpack") the text on the receiving end.
You would find it easier to send the variables one by one, converting each variable. But you are going to run into problems with handles, objects, cell arrays, structures, and everything except basic numeric arrays or character arrays. When you are working with character arrays, watch out for unicode, and for non-printable characters, and for characters that match your string delimiter.
I recommend that you rethink whether you are using UDP or TCP. If your converted data does not fit within a single 1514 character packet, then you will end up hacking TCP functionality on top of UDP.

请先登录,再进行评论。


Walter Roberson
Walter Roberson 2012-4-12
Simulink doesn't care what network hardware you are using. There isn't a "different udp" for wireless or local or wired-network: those are hardware details that are taken care of automatically.

类别

Help CenterFile Exchange 中查找有关 Modeling 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by