I'm trying to use QspyView and I'm having issues with displaying the records correctly. I would like to just print out the time stamp and all other data interpreted as ascii. This is an example of the procedure that I'm using:
Also, do I have to copy this procedure for each other record type (ie rec70 .... 80) or can they be grouped together somehow was one procedure? I'm also noticing that the QSpyView is displaystrange characters on the screen such as a box with a dot inside of it. Is that a <CR><LF>?
I'm basically trying to display all data that is show in the regular QSPY window in the QSPYView window.
thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's not clear from your post how your "record-procedure" is failing. The backslas just after the format xxxa* looks suspicious. (The backslash is used to coniue a Tcl command on the next line, but you have put everyting in one line.) Are you getting the right timestamp?
Regarding the other "record-procedures", the answer is yes, you need a separate procedure for every user record type (application-specific record), with the names rec70, rec71, ... .
I suppose that you get garbage characters in the text view, because you incorrectly scan the binary data coming from the target. Obviously, the data must be scanned with exactly the same format as it is produced. You need to figure this out based on how the user records are produced in the target. Only you know this, because these are application-specific records made up by you. (Just remeber that every field you generate in the target has a 1-byte "format" information).
--MMS
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've decided that it might be best to just view the records from the qspy window and use the qspyview window to send/inject data to the target. It would be NICE to be able to display the dictionary in qspyview and even better to just select a signal name when generating an event rather then having to figure out the actual number from the signal name using the saved dictionary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm trying to use QspyView and I'm having issues with displaying the records correctly. I would like to just print out the time stamp and all other data interpreted as ascii. This is an example of the procedure that I'm using:
proc ::qspy::rec70 {} { ;# QS_USER
variable thePkt
variable theFmt
binary scan $thePkt xx$theFmt(tstamp)xxxa* \ tstamp stat
dispTxt [format "%010u %s" $tstamp $stat]
}
Also, do I have to copy this procedure for each other record type (ie rec70 .... 80) or can they be grouped together somehow was one procedure? I'm also noticing that the QSpyView is displaystrange characters on the screen such as a box with a dot inside of it. Is that a <CR><LF>?
I'm basically trying to display all data that is show in the regular QSPY window in the QSPYView window.
thanks
It's not clear from your post how your "record-procedure" is failing. The backslas just after the format
xxxa*
looks suspicious. (The backslash is used to coniue a Tcl command on the next line, but you have put everyting in one line.) Are you getting the right timestamp?Regarding the other "record-procedures", the answer is yes, you need a separate procedure for every user record type (application-specific record), with the names
rec70
,rec71
, ... .I suppose that you get garbage characters in the text view, because you incorrectly scan the binary data coming from the target. Obviously, the data must be scanned with exactly the same format as it is produced. You need to figure this out based on how the user records are produced in the target. Only you know this, because these are application-specific records made up by you. (Just remeber that every field you generate in the target has a 1-byte "format" information).
--MMS
I've decided that it might be best to just view the records from the qspy window and use the qspyview window to send/inject data to the target. It would be NICE to be able to display the dictionary in qspyview and even better to just select a signal name when generating an event rather then having to figure out the actual number from the signal name using the saved dictionary.
Yes, it would be nice to use symbolic names from the code to talk to the target.
It is not supported just yet...
But it should be relatively straightforward with the Tcl associative arrays (to provide the mapping from symbolic signal names to numeric values).
Please let me know if you figure this out. Otherwise, it must wait a bit until the next release of QSPY.
--MMS