How to redirect Tornado / VXWorks shell output?

I recently worked on an embedded C / C ++ project using a shell in Tornado 2 to debug what happens in our bundle. The only problem with this approach is that it is a complex system and, as a result, has a fair bit of output. “Solemnly“ Tornado ”scrolls the window every time some new information arrives, which means that if you notice an error, it will quickly disappear from the place to see it. Each time you scroll up to see, the system adds an extra information, so the only way to view it is to turn off the hardware.

I would like to know if anyone has a way to redirect output from Tornado?

I was hoping there might be a way to register all of this from a small python application so that I can apply filters to incoming information. I tried to connect to the Tornado process, but the info window is not standard CEditCtrl, so extracting text this way is a dead end.

Any ideas anybody?

[Edit] I should have mentioned that we only work with Tornado 2.1.0, and upgrading to a later version is beyond my control.

[Edit2] The window in Tornado is "AfxFrameOrView42" according to WinID.

+3
source share
4 answers

here is another potential way:

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

all stdout , . , open, (, "host:/myfile.txt" - )

+5

- . 3 ( 6.x - 5.x):

(./.):
RECORD_TYPE (//): ,
RECORD_FILE: , .

? shConfig . "shConfig . :


-> ?shConfig
...
RECORD = off
RECORD_FILE = C:/test.txt
RECORD_TYPE = output
...

-> ?shConfig RECORD_TYPE all
-> ?shConfig RECORD_FILE myData.txt
-> ?shConfig RECORD on
Started recording commands in 'myData.txt'.
+3

, .

If you run a test by running it from the shell, for example, "runTest ()", you can use the redirection operator (>) to send the output of this function to a text file on your main machine.

 > runTest ()> mytestResults.txt

This will save any result that will run runTest in the mytestResults.txt file

If you want to display everything on the screen all the time, I will have to understand this more.

+1
source

rlogin vxWorks-target | tee redirected-output.txt

0
source

Source: https://habr.com/ru/post/1697245/


All Articles