Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Question about creating XML stateProvider for custom trace format

Dear TraceCompass developers,

I would like to ask you for some help with creating an XML state provider.
Specifically, how to get an eventHandler to recognize an eventName.


The traces I am using are in CSV format, which I have parsed using the wizard.
To create a Gantt-chart of the events in this trace, I have then created a stateProvider.
I have managed to get this stateProvider to work by creating only events with the same name (the Trace Type as indicated in the wizard)
and then in each handler conditionally check for a different field, e.g.:

<eventHandler eventName="MyCustomTextTraceType">
<stateChange>
<if>
<condition>
<field name="someField"/>
<stateValue type="string" value="thisIsTheEventIWant"/>
</condition>
</if>
<then>
<stateAttribute type="constant" value="Foo"/>
<stateAttribute type="eventField" value="someOtherField"/>
<stateValue type="int" value="someOtherValue"/>
</then>
</stateChange>
</eventHandler>

(And this repeated for each possible value of "someField")

I would like to distinguish between the events as is done in the example in the user guide:

<eventHandler eventName="thisIsTheEventIWant">
<stateChange>
<stateAttribute type="constant" value="Foo"/>
<stateAttribute type="eventField" value="someOtherField"/>
<stateValue type="int" value="someOtherValue"/>
</stateChange>
</eventHandler>

It feels as if there should be a very simple solution here, just "tell" the stateProvider where to look for the eventName.
However, I have not managed to find this solution.
I would greatly appreciate any help.


Kind regards,

Robbert



Back to the top