简体   繁体   English

硬件仿真

[英]Hardware Simulation

I'm working on a software project intended for recuperating old specific hardware, mostly for non-for-profit organizations and poor schools. 我正在开发一个用于恢复旧的特定硬件的软件项目,主要用于非营利组织和贫困学校。

I need a way to simulate old hardware so I can test the application before shipping it out. 我需要一种模拟旧硬件的方法,以便我可以在发布之前测试应用程序。

How can I do this? 我怎样才能做到这一点?

I'm not sure exactly what the question is asking for. 我不确定这个问题究竟是什么。 I think you are asking for a way to emulate certain HW? 我想你想要一种模仿某些硬件的方法?

If that is the case, I've used QEMU in the past, and it has worked great. 如果是这种情况,我过去使用过QEMU ,效果很好。 QEMU is an open source machine emulator and virtualizer. QEMU是一个开源机器模拟器和虚拟器。

Use virtual machines ? 使用虚拟机 Prepare the images reflecting (more or less) the state of the target machines (speed, hardware, etc). 准备反映(或多或少)目标机器状态(速度,硬件等)的图像。 And use them for testing the deployment? 并使用它们来测试部署?

您可能想要查看模拟器区域 ,模拟器是一个很好的谷歌搜索术语,您可能没有尝试过。

Well. 好。 If the old hardware is communicating via RS232, then write a class that wraps the RS232 commands and make the class inject the messages the old hardwares would respond. 如果旧硬件通过RS232进行通信,则编写一个包含RS232命令的类,并使类注入旧硬件将响应的消息。 In your program, work against that class instead of real rs232-port and just change instance to real rs232 before shipping. 在您的程序中,针对该类而不是真正的rs232端口工作,并在发货前将实例更改为真实的rs232。

I have done this succesfully in a project and it worked out really good and its not that complicated that you can think. 我已经在一个项目中成功完成了这项工作,并且它确实非常好,并且它并不是那么复杂,你可以想到。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM