trace/tracebuilder/com.nokia.tracebuilder.help/html/tasks/enumerations.htm
changeset 10 ed1c9f64298a
equal deleted inserted replaced
9:14dc2103a631 10:ed1c9f64298a
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
       
     2 <html>
       
     3 <head>
       
     4 <title>Adding and parsing Enumerations</title>
       
     5 <link href="../../book.css" type="text/css" rel="stylesheet"></head>
       
     6 <body>
       
     7 
       
     8 <h2>Adding and parsing Enumerations</h2>
       
     9 <p>Enumerations can also be used as trace parameters. When a enum value is 
       
    10 passed to trace function, it will be converted to a string when the trace is decoded. </p>
       
    11 <p>To add an Enumeration, do the following: </p>
       
    12 <ol>
       
    13 	<li>From the Trace Builder menu, select <b>Add Enum / Constant to Enum</b>.</li>
       
    14 	<li>Select an existing Enumeration name or define a new one by typing the 
       
    15 		name to the <b>Enum Name</b> field. </li>
       
    16 	<li>Type a name for a new Constant. </li>
       
    17 	<li>Type a value for this Constant. You can also specify it as a hexaecimal
       
    18 		value by selecting the <b>Hex ID</b> box.</li>
       
    19 	<li>Click <b>OK</b>. </li>
       
    20 </ol>
       
    21 <p><b>Note:</b> To use the created Enumeration values in traces, you must 
       
    22 <a href="addingparameters.htm">add them as a parameter</a>.</p>
       
    23 
       
    24 <h3>Parsing Enumerations from the source code</h3>
       
    25 <p>To parse an existing Enumeration from a source code, do the following: </p>
       
    26 <ol>
       
    27 	<li>Select the Enumeration name from the source code, for example: 
       
    28 		<p><img src="images/enumeration.png"></p></li>
       
    29 	<li>From the Trace Builder menu, select <b>Parse Enum</b>.</li>
       
    30 	<li>The Enumeration should now be visible in the Trace Builder tree view,
       
    31 		for example: <p><img src="images/enumerationparsed.png"></p> </li>
       
    32 </ol>
       
    33 <p>You can now use the Enumeration as a parameter in a trace. For more
       
    34 information, see <a href="addingparameters.htm">Adding parameters to existing
       
    35 traces</a>. </p>
       
    36 
       
    37 <div id="footer">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. 
       
    38 License: <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.</div>
       
    39 </body>
       
    40 </html>