Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tracecompass-dev] Analysis: state provider for events with multiple extra fields


I have created a custom text parser that generates (among others)
events of the type "battery_data" with a number of extra fields (such
as "type", "capacity" and "voltage").
I have also created a state provider that interprets these events and
also a visualization (xyView).
This is working fine but I could not manage to make the state provider
generic such that it would add all extra fields as leaves under a
given stateAttribute. Instead I have to define all individual
eventFields and maintain both the parser and the analysis when
additional fields are added:

<stateProvider version="0" id="com.draeger.tracing.s14">
    <eventHandler eventName="battery_data">
            <stateAttribute type="constant" value="battery" />
            <stateAttribute type="constant" value="type" />
            <stateValue type="eventField" forcedType="string" value="type" />
            <stateAttribute type="constant" value="battery" />
            <stateAttribute type="constant" value="capacity" />
            <stateValue type="eventField" forcedType="double"
value="capacity" />
            <stateAttribute type="constant" value="battery" />
            <stateAttribute type="constant" value="voltage" />
            <stateValue type="eventField" forcedType="double" value="voltage" />

Is there a way to add stateChanges all fields of an event in a more generic way?

Best regards,

Back to the top