使用C++
我是机械工程师的研究生。我的专业知识是最佳控制和建模,而不是网络协议通信,这是为了为我的论文运行一些实验所需的。任何帮助将不胜感激。
我有一个OpenHaptics应用程序,该应用程序迅速读取了从地貌触摸(以前是明智的幻影)中的6元素矢量。我需要使用UDP将其发送到目标系统(Speedgoat Target Machine),在该目标系统(Speedgoat Target Machine)中,我已经实现了运动和控制量工。
我知道这两台机器的IP地址和端口,因为我使用MATLAB运行(例如在厚糖浆中游泳)。
如何将UDP功能(发送/接收)添加到我的脚本中?在逻辑上复制在MATLAB上有效的过程:
[Windows]
7-doubles to 56-uint8 to udp-send(IP1:soket1)
[Speedgoat]
udp-receive(IP2:soket2) 56-uint8 to 7 doubles
然后可能相反...
[Speedgoat]
7-doubles to 56-uint8 to udp-send(IP2:soket3)
[windows]
udp-receive(IP1:soket4) 56-uint8 to 7 doubles
有些事情要确保端口存在并开放(照顾),并了解端口的配置(字节对齐,Little/big/big我知道它们应该是的,所以如果我需要设置它们,我可以回答这些问题。
I am a Mechanical Engineer graduate student. My expertise is on optimal control and modeling, not on network protocol communication, which happens to be needed to run some experiments for my thesis. Any help is greatly appreciated.
I have an OpenHaptics application that quickly reads the 6-element vector of doubles from a Geomagic Touch (Formerly Sensable Phantom). I need to send this using UDP to a target system (Speedgoat Target Machine) where I have implemented the motion and control argorithms.
I know the IP Address and Port of both machines, as I had this running using matlab (works like swimming in thick syrup).
How can I add a UDP functionality (send/receive) to my script? Replicating the process that works on Matlab logically reads like this:
[Windows]
7-doubles to 56-uint8 to udp-send(IP1:soket1)
[Speedgoat]
udp-receive(IP2:soket2) 56-uint8 to 7 doubles
Then the reverse is possible...
[Speedgoat]
7-doubles to 56-uint8 to udp-send(IP2:soket3)
[windows]
udp-receive(IP1:soket4) 56-uint8 to 7 doubles
There are things like ensuring ports exist and are open (taken care of), and understanding the configuration of the port (byte alignment, little/big endian) that I know that they should be, so if I need to set them I can answer those questions.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论