Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.apo.nmsu.edu/35m_operations/TUI/TUIMenu/LogWin.html
Дата изменения: Sat Sep 6 02:16:02 2014 Дата индексирования: Sat Apr 9 23:49:24 2016 Кодировка: Поисковые слова: lightning |
Log windows display messages from all "actors" (instruments, the TCC, the hub...) and allow you to send commands. Controls along the top allow you to filter out unwanted garbage or highlight messages of particular interest. Logged messages include a TAI timestamp.
Filtering allows you to hide the messages you don't want to see.
Press the "Filter:" button to enable filtering. This will show the following filtering controls. The first menu controls severity; all messages with at least this severity are shown. The next control allows you to show selected additional messages.
Common tasks:
Notes:
"+ Custom" supports user-defined filters expressed as python lambda expressions: lambda x: test
where x is a LogEntry, which is displayed if test evaluates to True. Attributes of a LogEntry include:
Examples:
lambda x: x.actor == "tcc" and ("Off" in x.msgStr or "Bore" in x.msgStr)
The keywords field is low-level representation of keyword-value data in the message. It is tricky to use, but I provided a brief overview here. For more details see the documentation about an opscore.protocols.messages.Keywords and opscore.protocols.messages.Keyword in the Trac wiki; a good place to start is Ops/Parsing.
The keywords field is a collection of Keyword objects. Each Keyword object represents one keyword in the message; it has a name field (the name of the keyword, with the original case, as a string) and a values field (a sequence of 0 or more string values; note that the values have not been validated and so have not been converted to their final type).
lambda x: x.actor == "sop" and "gotoFieldState" in x.keywords
lambda x: "airTemp" in x.keywords and float(x.keywords["airTemp"].values[0]) < -10.0
To find a particular bit of text, type something into the Find: box and hit <return> to search from the most recent message (or the selection, if any), backwards in time. You can also type ctrl-<return> to search forwards.
Notes:
Highlighting allows you color-code messages of particular interest. You may also play a sound cue when a highlighted message comes in, which is useful for keeping track of rare occurrances (but potentially maddening for frequent hits). To enable highlighting, press the Highlight:
button. This shows the various highlight controls, which I hope are self-explanatory.
Warning: you can only highlight messages you can see! Be sure you aren't filtering out messages you want to hightlight!
Notes:
All Filter, Find and Highlight text entry boxes accept regular expressions (just one for Text; a set of space-separated regular expressions for Actors and Commands). These are tcl regular expression, which are very much like python or perl regular expressions.
To send commands to an actor, type into the bottom field of the window. Normally you type the actor name (all lowercase), a space, and the command (which can be anything the actor understands), followed by <return> to send the command. For example "tcc show time<return>" will return the time from the TCC.
If you plan to send many messages to a particular actor, you may select the actor from the menu next to the command entry field. TUI will then automatically fill in that actor's name for you (though you can change it). Remember that you can also highlight replies from a particular actor or even filter out all other messages. This can be very handy for an intensive session with one instrument.
The command entry area also has command history. Use the up arrow to recall earlier commands; edit as desired and reissue with <return>. (If you issue the same command several times in a row, only the first is stored in the command history.)
If you change the filtering you may lose the oldest data in the log window. (This is because each log window has a finite-sized buffer for data and there is also a central repostory for log data that has its own finite size. Whenever you change the filter all data in the log window is replaced from the repository.)