有没有办法以programmaticaly模拟操纵杆信号? [英] Is there a way to emulate joystick signals programmaticaly?

查看:93
本文介绍了有没有办法以programmaticaly模拟操纵杆信号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天!我有一个与vJoy相关的具有挑战性的任务我认为:创建虚拟设备然后模拟信号(操纵杆API)是否真实?我的意思是我没有真正的物理设备,但我必须以编程方式发送信号(例如,有一个操纵杆或xbox游戏手柄打开)。任何帮助都非常感谢



我尝试过:



我我试图调查vJoy SDK,但我已经丢失了)

Good day! I have a challenging task related to vJoy I suppose: is it real to create a virtual device and then emulate signals (joystick API)? I mean I have no real physical device but I have to send signals programmatically (like there is a joystick or xbox gamepad switched on for instance). Any help is higly appreciated

What I have tried:

I have tried to investigate vJoy SDK but I have been lost there)

推荐答案

如果您已经知道或有权访问操纵杆协议的完整规范,您可以跳过步骤1 &安培; 2.



1.找到一种方法将操纵杆或控制器正确连接到一个串口,如果必须,可以获得PCI卡。

2.运行连接到(新安装?)PCI卡串口的监听程序,并获取用于模拟器的操纵杆输出。

3.编写串口设备驱动程序或使用可用的几个仿真器之一(free&
If you already know or have access to the full specification of your joystick's protocol you can skip steps 1 & 2.

1. Find a way to connect your joystick or controller to one a serial port correctly, get a PCI card if you have to.
2. Run a listener program connected to the (newly installed?) PCI card's serial port and get the joy stick's output to use for your emulator.
3. Write a serial device driver or use one of the several emulators available (free &


)。在堆栈溢出时搜索 faking-an-rs232-serial-port

这是推荐免费的:

com0com - 使用已签名的驱动程序(旧版本)

和a非自由的

COM端口数据仿真器

4.写一个操纵杆数据泵程序连接到串行线的一端,另一端连接到你的实际测试程序。

5.测试......
). Search for faking-an-rs232-serial-port on stack overflow.
Here is a recommended free one:
com0com - With Signed Driver (old version)
and a non-free one
COM PORT DATA EMULATOR
4. Write a joystick data pump program to connect to one end of your serial line and the other connected to your actual test program.
5. Test...

在一天结束时,Windows上的Windows和应用程序正在消息队列中运行。循环并在那里处理消息...

所以你需要做的就是从你的应用程序(操纵杆模拟器)向你的应用程序(使用操纵杆)发送与操纵杆相关的消息......

操纵杆通知消息(Windows ) [ ^ ]
At the end of the day Windows and applications on Windows are running around the message queue. Looping over it and processing the messages there...
So all you need to do is sending joystick related messages to you application (the one uses joystick) from your application (the joystick emulator)...
Joystick Notification Messages (Windows)[^]


这篇关于有没有办法以programmaticaly模拟操纵杆信号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆