⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 x-event3.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<dd><div class="Indent3"><a name="86187"> </a>event parameters 1 to 7. Event parameters are always printed as a name:value pair. </><br></dl></dl></dl></dl><dl class="margin"><dd><p class="Body"><a name="85906"> </a>For example, to print only event type and timestamp information, use the following option:</p><dl class="margin"><dd><pre class="Code2"><b><a name="86218">-format %n %t</a></b></pre></dl><dd><p class="Body"><a name="86219"> </a>The default format string (including backslashes escaping the open- and close-braces) is equivalent to the following:</p><dl class="margin"><dd><pre class="Code2"><b><a name="86026">-format %n %t \{ %1 %2 %3 %4 %5 %6 %7 \} %s </a></b></pre></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="84382">Coordinates Commands</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84383"> </a>To create a coordinates object, given an established event base, the command <b class="tclProc">wvCoordsCreate</b> is invoked with the following format:</p><dl class="margin"><dd><pre class="Code2"><b><a name="84387">wvCoordsCreate <i class="textVariable">coordsName</i> <i class="textVariable">ebHandle</i> <i class="textVariable">timeStamp</i> [<i class="textVariable">contextName</i>] [<i class="textVariable">eventType</i>]</a></b></pre></dl><dd><p class="Body"><a name="84389"> </a>The <i class="textVariable">ebHandle</i> argument is be the result of a previous <b class="tclProc">wvEventBaseLoad</b> command. The <i class="textVariable">coordsName</i> argument is user specified; it is used for subsequent commands on the coordinates object. The time stamp must be a real number between the limits indicated by the result of an <b class="symbol_lc">ebHandle</b><b class="command"> interval</b> operation. Optionally, the name of a context (one of the values returned by <b class="tclProc">ebHandle names</b>) can be supplied, and also an event type (the numeric value).</p><dd><p class="Body"><a name="84395"> </a>The command creates a new Tcl command, named after the <i class="textVariable">coordsName</i> given in the invocation, which represents the <b class="symbol_lc">WVCoords</b> object. It responds to the following commands, assuming <i class="textVariable">coordsName</i> is <b class="symbol_lc">cc</b>:</p></dl><dl class="margin"><dd><pre class="Code"><b><a name="84399">cc ++ </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85452"> </a>move forward one event.</div><br></dl></dl><dd><pre class="Code"><b><a name="84401">cc -- </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85453"> </a>move backward one event.</div><br></dl></dl><dd><pre class="Code"><b><a name="84403">cc * </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85454"> </a>return a description of the event currently referenced by the coordinates object.</div><br></dl></dl><dd><pre class="Code"><b><a name="84405">cc contextLock 0|[1 <i class="textVariable">contextName</i>] </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85455"> </a>If the second argument is 0, this command unlocks the coordinates object from any particular context. If it is 1, the third argument must be supplied and the command locks the coordinates object to the specified context.</div><br></dl></dl><dd><pre class="Code"><b><a name="84409">cc eventTypeLock 0|[1 <i class="textVariable">eventType</i>] </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="86457"> </a>If the second argument is 0, this command unlocks the coordinates object from any particular event type. If it is 1, the third argument must be supplied and the command locks the coordinates object to the specified event type (by full, upper-case name, as given in the event definition file). This would be, for example, <b class="symbol_UC">EVENT_SEMTAKE</b> rather than <b class="symbol_lc">semTake</b>.</div><br></dl></dl><dd><pre class="Code"><b><a name="84413">cc print </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85468"> </a>print out the internal indexing information or status of the coordinates object.</div><br></dl></dl><dd><pre class="Code"><b><a name="84415">cc timeSet <i class="textVariable">time</i> </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="85458"> </a>set the internal time of the coordinates object to the given value, then move it to the next valid event after that time.</div><br></dl></dl><dd><pre class="Code"><b><a name="87042">cc destroy </a></b></pre><dl class="margin"><dl class="margin"><dd><div class="Indent2"><a name="87044"> </a>remove the <b class="symbol_lc">cc</b> command and destroy the associated <b class="symbol_lc">WVCoords</b> object.</div><br></dl></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="87045">Typical (Simplified) Tcl Session</a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="84425"> </a>This section shows a typical session. User input is shown in bold. </p><dd><p class="Body"><a name="86485"> </a>The first command loads an event base, creating the command <b class="command">eb</b> and its associated context commands. The second command prints the names of all contexts. The third command uses the command form <b class="symbol_lc">eb.</b><i class="textVariable">contextName</i> with the <b class="symbol_lc">taskId</b> argument to find the task ID for <b class="task">tLogTask</b>. </p><dl class="margin"><dd><pre class="Code2"><b><a name="86499"></b><tt class="output">%</tt><b> wvEventBaseLoad "eventlog.wvr" eb </b><tt class="output">&lt;&lt;informational stuff during loading&gt;&gt; % </tt><b>eb names </b><tt class="output">INT3 INT6 tLogTask tWdbTask tTask1 idle %</tt><b> eb.tLogTask taskId </b><tt class="output">3567312</tt><b></a></b></pre></dl><dd><p class="Body"><a name="86514"> </a>The fourth command uses the <b class="command">names</b> command again, but assigns its result to the variable <b class="symbol_lc">cnames</b>. The fifth command shows the number of events in <b class="task">tLogTask</b>. </p><dl class="margin"><dd><pre class="Code2"><b><a name="86518"></b><tt class="output">%</tt><b> set cnames [eb names] </b><tt class="output">INT3 INT6 tLogTask tWdbTask tTask1 idle %</tt><b> eb.tLogTask events </b><tt class="output">514</tt><b></a></b></pre></dl><dd><p class="Body"><a name="86527"> </a>The sixth command iterates over all context names (using <b class="symbol_lc">$cnames</b>) and builds a command to print the number of events for each context, using <b class="tclProc">eval</b>.</p><dl class="margin"><dd><pre class="Code2"><b><a name="86531"></b><tt class="output">%</tt><b> foreach ctx $cnames { set cmd "eb.$ctx" ; eval $cmd events } </b><tt class="output">12 23 514 211 67 478</tt><b></a></b></pre></dl><dd><p class="Body"><a name="86548"> </a>The sixth command displays the interval that the event log covers. The seventh command illustrates the <i class="textVariable">N</i>th index command for a context, printing the third event in the <b class="task">INT6</b> context.</p><dl class="margin"><dd><pre class="Code2"><b><a name="86542"></b><tt class="output">% </tt><b>eb interval </b><tt class="output">0.000000 1.804050 % </tt><b>eb.INT6 3 </b><tt class="output">intEnt-6 0.0100023 {} </tt><b></a></b></pre></dl></dl></dl><font face="Helvetica, sans-serif" class="sans"><h4 class="H4"><i><a name="79990">Event Definition File Format </a></i></h4></font><dl class="margin"><dl class="margin"><dd><p class="Body"><a name="86553"> </a>Upon startup, the API library sources the Tcl script: </p><dl class="margin"><dd><pre class="Code2"><b><a name="86555"><i class="textVariable">installDir</i>/host/resource/tcl/app-config/WindView/database.tcl </a></b></pre></dl><dd><p class="Body"><a name="86909"> </a>It reads the first event in the event log (which must be <b class="symbol_UC">EVENT_CONFIG</b>) to determine which kernel is running on the target. It loads the appropriate event-description files for that kernel. The file defines all the events the parser can handle. It defines the event name and its binary format (the number and type of its arguments) and it also includes human-readable information regarding the nominal meaning of each argument. </p><dd><p class="Body"><a name="86564"> </a>The file format is free-form plain text; each entry is separated by at least one blank line. Comment lines begin with #. An entry defines a single event format and has the style: </p><dl class="margin"><dd><pre class="Code2"><b><a name="86568">wvEvent EVENT_NAME <i class="textVariable">value</i> {[-notimestamp] [-nosearch] [-name=<i class="textVariable">altName</i>]}{ <i class="textVariable">    argType</i> <i class="textVariable">argName     argType</i> <i class="textVariable">argName</i> [*] }</a></b></pre></dl><dd><p class="Body"><a name="86725"> </a>There can be between zero and seven arguments for a single event. The <i class="textVariable">value</i> is the 16-bit unsigned value (expressed in decimal) of the event-type. The <i class="textVariable">argType</i> field can be either <b class="symbol_UC">UINT32</b> for an unsigned 32-bit integer or <b class="symbol_UC">STRING</b> for a textual or binary block, whose length is always defined by the previous field, which must be of type <b class="symbol_UC">UINT32</b>. The <i class="textVariable">argName</i> field is the name with which the argument is displayed in the WindView GUI; it must start with a lower-case character. The optional asterisk indicates the object ID argument (the argument that contains the unique object ID). </p><dd><p class="Body"><a name="86584"> </a>The <b class="symbol_lc">-notimestamp</b> option indicates that the event has no time stamp when emitted by the target, requiring that one be added by synthesis at the host. The <b class="symbol_lc">-name</b> argument allows a more user-friendly name to be added, if required. The <b class="symbol_lc">-nosearch</b> option indicates that events of this type are not reported by searches in the GUI. </p><dd><p class="Body"><a name="86592"> </a>Two sample event, taken from the <b class="file">vxworks.e</b> file, are the following: </p><dl class="margin"><dd><pre class="Code2"><b><a name="86594">wvEvent EVENT_BEGIN 0 { -notimestamp -nosearch }|     UINT32 CPU     UINT32 bspSize     STRING bspName     UINT32 taskIdCurrent     UINT32 collectionMode     UINT32 revision }</a></b><dd> <b><a name="86602">wvEvent EVENT_SEMTAKE 10015 ( -name=semTake }{     UINT32 recurse     UINT32 semOwner      UINT32 semId *  }</a></b></pre></dl><dd><p class="Body"><a name="86609"> </a>This format allows user events to be given sophisticated descriptions. For information on instrumenting your own libraries with your own events, see <i class="title">Wind Technical Note #49: Instrumenting Libraries for Use with WindView</i>. </p></dl></dl><a name="foot"><hr></a><p class="navbar" align="right"><a href="index.html"><img border="0" alt="[Contents]" src="icons/contents.gif"></a><a href="x-event.html"><img border="0" alt="[Index]" src="icons/index.gif"></a><a href="x-event.html"><img border="0" alt="[Top]" src="icons/top.gif"></a><a href="x-event2.html"><img border="0" alt="[Prev]" src="icons/prev.gif"></a><a href="x-event4.html"><img border="0" alt="[Next]" src="icons/next.gif"></a></p></body></html><!---by WRS Documentation (), Wind River Systems, Inc.    conversion tool:  Quadralay WebWorks Publisher 4.0.11    template:         CSS Template, Jan 1998 - Jefro --->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -