如何重定向Tornado / VXWorks shell输出? [英] How do I redirect Tornado / VXWorks shell output?
问题描述
我很想知道是否有人有一种方法可以重定向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屋!