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

📄 datadoclib.html

📁 vxworks相关论文
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<html><head><!-- /vobs/wpwr/docs/tornado-api/project/dataDocLib.html - generated by refgen from /vobs/wpwr/host/resource/tcl/app-config/Project/dataDocLib.tcl --> <title> dataDocLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.html"><i>Tornado API Reference :  Project Database Library</i></a></p></blockquote><h1>dataDocLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>dataDocLib</strong> - TCL library for the project facilities dataDoc engine</p></blockquote><h4>TCL PROCEDURES</h4><blockquote><p><p><b><a href="./dataDocLib.html#docWalk">docWalk</a></b>  -  walk a document<br><b><a href="./dataDocLib.html#mxrDataDocCreate">mxrDataDocCreate</a></b>  -  create a module xref document<br><b><a href="./dataDocLib.html#mxrTcGet">mxrTcGet</a></b>  -  get the toolchain associated with an MxrDoc<br><b><a href="./dataDocLib.html#mxrSupertree">mxrSupertree</a></b>  -  recursively, what modules call a given set of modules<br><b><a href="./dataDocLib.html#mxrSubtree">mxrSubtree</a></b>  -  recursively, what modules are called by a given set of modules<br><b><a href="./dataDocLib.html#mxrSizeGet">mxrSizeGet</a></b>  -  return the size of a set of modules<br><b><a href="./dataDocLib.html#mxrDocValidate">mxrDocValidate</a></b>  -  test for duplicate symbol names and other bugs<br><b><a href="./dataDocLib.html#cxrDataDocCreate">cxrDataDocCreate</a></b>  -  create a component xref document from .cdf files<br><b><a href="./dataDocLib.html#cxrSupertree">cxrSupertree</a></b>  -  what components require a given set of components<br><b><a href="./dataDocLib.html#cxrSubtree">cxrSubtree</a></b>  -  what components are required by a given set of components<br><b><a href="./dataDocLib.html#cxrSubfolders">cxrSubfolders</a></b>  -  find everything under a given folder recursivly<br><b><a href="./dataDocLib.html#cxrSizeGet">cxrSizeGet</a></b>  -  get the size of a set of components<br><b><a href="./dataDocLib.html#modAnalyze">modAnalyze</a></b>  -  analyze archives and/or object modules<br><b><a href="./dataDocLib.html#modTrace">modTrace</a></b>  -  trace module dependencies<br><b><a href="./dataDocLib.html#modSubtree">modSubtree</a></b>  -  find (recursivley) all modules called by a set of modules<br><b><a href="./dataDocLib.html#modSupertree">modSupertree</a></b>  -  find (recursivley) all modules that call a set of modules<br><b><a href="./dataDocLib.html#modCalledBy">modCalledBy</a></b>  -  find all modules that call a given set of modules<br><b><a href="./dataDocLib.html#modCalls">modCalls</a></b>  -  find all modules that are called by a given set of modules<br><b><a href="./dataDocLib.html#modInfo">modInfo</a></b>  -  get info about module relationships<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library contains the TCL API for accessing the configurationengine's dependency database.To use the procedures in this libary, you must first"source <b>cmpScriptLib.tcl</b>" into the wtxtcl interpreter.At the lowest level, the database isan in-memory object database. Each object is identified by a string name, which must be uniquewithin the dataBase.Each object can have a set of properties and a set of associationswith other objects. The set of allowed object types, properties, andassociations are defined by a schema.<p>There are two schemas supported; MxrDoc (Module xref), and CxrDoc(Component xref). More schemas can be added later.The MxrDoc schema is quite simple. It supports only two typesof objects; Module and Symbol. The associations are also quite simple,a Module can have an association with a symbol of type "imports","exports", or "declares" (that last is for common block symbols).A symbol can have the corresponding association with a module oftype "importedBy", "exportedBy", or "declaredBy".The properties of a module are it's textSize,dataSize, and bssSize. The properties of a symbol are it's size, whichis only valid if the symbol is a common block symbol.The "import" command imports the output of "nm" to populate thedatabase. The "importSize" command imports the output of "size" tofinish populating the database.The CxrDoc schema is more complicated, and not covered here.The Tornado API guide has a section on component creation whichdescribes the CxrDoc schema in more detail.<p>This library provides a set of high-level routines foreach schema. These routines can compute, for example,the modules called by a given module. These high-levelroutines are built on top of lower level routines.The simplest API to module xref information is provided by the mod*routines in this library. If you are just looking for a simple way toanalyze module dependencies, then you don't need to read or understandthe rest of the discussion below - just skip to the mod* librarymanual pages.To use any other procedure in the library, you'll first need to understandthe low-level dataDoc interface described below.<p>The low-level interface for dataDoc's does not depend onthe schema. It allows one to ask; given a set of objects, what are it'sproperties and with what other objects is it associated?Before describing the interface, lets define some more terminology.A DataDoc is a database (MxrDoc or CxrDoc). A DataSet is a collectionof objects in the database. DataDoc's and DataSet's can be created,deleted, and queried using the following API:<p></blockquote><h4>DATADOC API</h4><blockquote><p><p>docCreate <i>SchemaName</i> -> <i>DataDocument</i><p>Creates a data document object that utilizes the specifiedschema.  The document will support the object types, attributes,and relations described by the schema. For example, to createan MxrDoc database, one could do "set d [docCreate MxrDoc]".<p><i>DataDocument</i> import <i>FileName</i><p>Reads an ASCII file containing descriptions of Data Objects. AllData Object instances, and their attribute/association properties,will be created and placed in the data document.For example, "$d import <i>FileName</i>".<p><i>DataDocument</i> types -> {DObject TypeNames}<p>Returns a tcl a list of names of all the types of objects supported bythe data document.<p><i>DataDocument</i> instances [TypeName] -> {DObject Instance Names}<p>Returns a tcl list of object "id names" for all the instances, ofthe specified type, contained within the document.  If a TypeNamewas not specified then the "id names" for all instances willbe returned.<p><i>DataDocument</i> setCreate -> <i>DObjectSet</i><p>Creates a set object, and associates with the given document.A set object can be used to perform queries on any object inthe document that it is associated with.<p>A DObjectSet can handle the following method calls from TCL.<p><i>DObjectSet</i> = {DObject Instances Names}<p>Assigns objects to the set.  Queries can then be performed on thoseobjects using the other methods for <i>DObjectSet</i>.<p>A <i>DObjectSet</i> can also be used in TCL as a set.  Tcl lists can beassigned to the set, removing duplicates from the list. Set do notperserve any order to their elements.<p><i>DObjectSet</i> instances [type] -> {DObject Names}<p>Returns a TCL list of all the items that are in the set that arenames of objects in the document.<p><i>DObjectSet</i> contents -> {Object Names}<p>Returns a TCL list of the contents of the set. Names will appear inthe list regardless of whether they are or are not the names of objectsin the document.<p><i>DObjectSet</i> properties -> {Property Names}<p>Returns a TCL list of all property names for all the objectscontained in the set.  Duplicate property names are not eliminatedfrom the list (a SET can be used to eliminate duplicates).<p><i>DObjectSet</i> get <i>propertyName</i> -> {Property Values}<p>Returns a TCL list of the value of a given property for all theobjects in the set that support that property.<p><i>DObjectSet</i> types -> {DObject Type Names}<p>Returns list of the type name for every object that is in the set.Duplicate of a type name will appear when their is more than oneobject of that type in the set.<p><i>DObjectSet</i> setCreate -> <i>DObjectSet</i><p>Creates an empty <i>DObjectSet</i> that is bound to the same datadocument as the original set.<p></blockquote><h4>DATADOC SET OPERATIONS</h4><blockquote><p><p>The syntax is <i>DObjectSet</i> <i>BinaryOp</i> <i>Tcl List</i> -> <i>Tcl List</i><p><i>DObjectSet</i> - {Object Names} -> {List}Set difference<p><i>DObjectSet</i> + {Object Names} -> {List}Set union<p><i>DObjectSet</i> & {Object Names} -> {List}Set intersection<p><i>DObjectSet</i> ^ {Object Names} -> {List}Set symmetric difference (XOR)<p></blockquote><h4>EXAMPLES</h4><blockquote><p>suppose I have a file called "foo.nm", which is the output of"nm" on an archive. To find all symbols defined in the archive:<pre>set d [docCreate MxrDoc]   ;# create an empty database$d import foo.nm           ;# import nm outputset s [$d setCreate]       ;# create a set$s = [$d instances Module] ;# $s = all modules in database$s = "[$s get exports] [$s get declares]" ;# all exported and;# common block symbolsputs "exported symbols = [$s instances]" ;# print result$s delete                  ;# delete the set</pre>Suppose I want to find all undefined symbols in a set of modules:<pre>set s [$d setCreate]       ;# create a set$s =  \&lt;some set of modules\&gt;set defined "[$s get exports] [$s get declares]" ;# all exported syms$s = [$s get imports]      ;# all imported syms$s = [$s - $defined]       ;# remove all exported symsputs "undefined symbols = [$s instances]" ;# print result$s delete                  ;# delete the set</pre>Of course lots of other examples can be found by reading thesource code for the TCL routines provided by this library.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dataDocLib.html#top">dataDocLib</a></b><hr><a name="docWalk"></a><p align=right><a href="rtnIndex.html"><i>Project Database Library :  Tcl Procedures</i></a></p></blockquote><h1>docWalk</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>docWalk</strong> - walk a document</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>Recall that all dataDoc's contain objects and associations betweenthem. This forms a graph.This routine walks the object graph starting withan initial set of nodes and visits the next set of nodes accordingto the TCL proc <i>query</i>. It continues visiting new nodes untilsuch a time as no new nodes are visited.<p>This is really a support routine for other high-level recursive queries.For example, if you want to know "what modules will be draggedin by dependancy if I drag in <b>fooLib.o</b>", then you want to performa recursive walk of the MxrDoc. In fact, the routines modSubtreeand mxrSubtree are built on top of docWalk (for the recursion),and mxrUses (for the walk).<p>The routine <i>query</i> should must be a TCL proc that takes as inputa DataSet and a 2nd optional argument which is proc-specific. Itshould return a list of node-names that are to be vistied next.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top><td align=left><b>inputSet</b> </td><td align=left> - </td><td align=left> DataSet of objects</tr><tr valign=top><td align=left><b>query</b> </td><td align=left> - </td><td align=left> TCL proc that performs the graph walk</tr><tr valign=top><td align=left><b>arg</b> </td><td align=left> - </td><td align=left> (optional) argument to pass to query  </tr><tr valign=top><td align=left></tr></tr></table><p></blockquote><h4>RETURNS</h4><blockquote><p>the set of node visited during the graph walk</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./dataDocLib.html#top">dataDocLib</a></b><hr><a name="mxrDataDocCreate"></a><p align=right><a href="rtnIndex.html"><i>Project Database Library :  Tcl Procedures</i></a></p></blockquote><h1>mxrDataDocCreate</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote>  <p><strong>mxrDataDocCreate</strong> - create a module xref document</p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine creates an mxrDoc from a set of object modules andarchives. It runs the "nm" and "size" commands corresponding tothe toolchain specified, and imports these into a new MxrDoc.This routine will fail if the object files and archives are notcompatible with the given toolchain. The toolchain must beof the form ::tc_<i>CPUTOOL</i> (e.g., ::tc_PPC604gnu).<p>Note: If you source <b>cmpScriptLib.tcl</b>, you can call "mxrDocCreate $hProj"to get the MxrDoc associated with a given project handle.mxrDocCreate is actually built on top of mxrDataDocCreate.<p></blockquote><h4>PARAMETERS</h4><blockquote><p><table><tr valign=top>

⌨️ 快捷键说明

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