[
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
|
Hi!
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">
<stateChange>
<stateAttribute type="constant" value="battery" />
<stateAttribute type="constant" value="type" />
<stateValue type="eventField" forcedType="string" value="type" />
</stateChange>
<stateChange>
<stateAttribute type="constant" value="battery" />
<stateAttribute type="constant" value="capacity" />
<stateValue type="eventField" forcedType="double"
value="capacity" />
</stateChange>
<stateChange>
<stateAttribute type="constant" value="battery" />
<stateAttribute type="constant" value="voltage" />
<stateValue type="eventField" forcedType="double" value="voltage" />
</stateChange>
[...]
</eventHandler>
</stateProvider>
Is there a way to add stateChanges all fields of an event in a more generic way?
Best regards,
Florian.