如何重定向Tornado / VXWorks shell输出? [英] How do I redirect Tornado / VXWorks shell output?

查看:273
本文介绍了如何重定向Tornado / VXWorks shell输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近我一直在使用Tornado 2中的shell来处理一个嵌入式C / C ++项目,作为调试工具包中发生的一切。这种方法的唯一问题是它是一个复杂的系统,因此产生了相当的输出。每当一些新的信息到达时,龙卷风有助于滚动窗口,这意味着如果您发现错误,则它会很快消失。每次你向上滚动看看,系统会添加更多的信息,所以唯一的方法来查看它是断开硬件。



我很想知道是否有人有一种方法可以重定向Tornado的输出?



我希望可能有一种方法可以从一个小的python应用程序记录所有这些,以便我可以将过滤器应用于传入信息。我尝试连接到龙卷风进程,但是具有信息的窗口不是标准的CEditCtrl,所以提取出的文本是一个死胡同。



任何想法任何人?



我应该提到我们只运行Tornado 2.1.0并升级到更新版本超出我的控制。



[Edit2] 根据WinID,Tornado中有关的窗口是AfxFrameOrView42。

$ b $

 
- > saveFd =打开(myfile.txt,0x102,0777)
- > oldFd = ioGlobalStdGet(1)
- > ioGlobalStdSet(1,saveFd)
- > runmytest()

- > ioGlobalStdSet(1,oldFd)

这将重定向所有 stdout活动你打开的文件
您可能必须使用打开的文件名来播放,以使其在主机上写入(例如使用host:/myfile.txt或类似的东西)


I've been working on an embedded C/C++ project recently using the shell in Tornado 2 as a way of debugging what's going on in our kit. The only problem with this approach is that it's a complicated system and as a result, has a fair bit of output. Tornado 'helpfully' scrolls the window every time some new information arrives which means that if you spot an error, it disappears out of site too quickly to see. Each time you scroll up to look, the system adds more information, so the only way to view it is to disconnect the hardware.

I'd love to know if anyone has a way of redirecting the output from Tornado?

I was hoping there might be a way to log it all from a small python app so that I can apply filters to the incoming information. I've tried connecting into the Tornado process, but the window with the information isn't a standard CEditCtrl so extracting the text that way was a dead end.

Any ideas anyone?

[Edit] I should have mentioned that we're only running Tornado 2.1.0 and upgrading to a more recent version is beyond my control.

[Edit2] The window in question in Tornado is an 'AfxFrameOrView42' according to WinID.

解决方案

here is another potential way:

-> saveFd = open("myfile.txt",0x102, 0777 )
-> oldFd = ioGlobalStdGet(1)
-> ioGlobalStdSet(1, saveFd)
-> runmytest()
...
-> ioGlobalStdSet(1, oldFd)

this will redirect all stdout activity to the file you opened. You might have to play around with the file name of the open to make it write on the host (e.g. use "host:/myfile.txt" or something like this)

这篇关于如何重定向Tornado / VXWorks shell输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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