Adding and parsing Enumerations

Enumerations can also be used as trace parameters. When a enum value is passed to trace function, it will be converted to a string when the trace is decoded.

To add an Enumeration, do the following:

  1. From the Trace Builder menu, select Add Enum / Constant to Enum.
  2. Select an existing Enumeration name or define a new one by typing the name to the Enum Name field.
  3. Type a name for a new Constant.
  4. Type a value for this Constant. You can also specify it as a hexaecimal value by selecting the Hex ID box.
  5. Click OK.

Note: To use the created Enumeration values in traces, you must add them as a parameter.

Parsing Enumerations from the source code

To parse an existing Enumeration from a source code, do the following:

  1. Select the Enumeration name from the source code, for example:

  2. From the Trace Builder menu, select Parse Enum.
  3. The Enumeration should now be visible in the Trace Builder tree view, for example:

You can now use the Enumeration as a parameter in a trace. For more information, see Adding parameters to existing traces.