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