tmf : Add test suite for the XML conditions
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core.tests / test_xml_files / test_valid / test_conditions.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- ***************************************************************************
3 * Copyright (c) 2015 Ericsson
4 *
5 * All rights reserved. This program and the accompanying materials are
6 * made available under the terms of the Eclipse Public License v1.0 which
7 * accompanies this distribution, and is available at
8 * http://www.eclipse.org/legal/epl-v10.html
9 *
10 * Contributors:
11 * Jean-Christian Kouame - Initial API and implementation
12 *************************************************************************** -->
13 <tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
14 xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
15
16 <stateProvider id="test.xml.conditions" version="1">
17 <eventHandler eventName="test">
18 <stateChange>
19 <if>
20 <condition>
21 <field name="testField" />
22 <stateValue type="long" value="10" />
23 </condition>
24 </if>
25 <then>
26 <stateAttribute type="eventName" />
27 <stateValue type="long" value="1" />
28 </then>
29 <else>
30 <stateAttribute type="eventName" />
31 <stateValue type="long" value="0" />
32 </else>
33 </stateChange>
34 </eventHandler>
35 <eventHandler eventName="test1">
36 <stateChange>
37 <if>
38 <condition>
39 <field name="testField" />
40 <stateValue type="long" value="200" />
41 </condition>
42 </if>
43 <then>
44 <stateAttribute type="eventName" />
45 <stateValue type="long" value="1" />
46 </then>
47 <else>
48 <stateAttribute type="eventName" />
49 <stateValue type="long" value="0" />
50 </else>
51 </stateChange>
52 </eventHandler>
53 <eventHandler eventName="*">
54 <stateChange>
55 <if>
56 <condition>
57 <stateValue type="query">
58 <stateAttribute type="constant" value="test" />
59 </stateValue>
60 <stateValue type="query">
61 <stateAttribute type="constant" value="test1" />
62 </stateValue>
63 </condition>
64 </if>
65 <then>
66 <stateAttribute type="constant" value="checkpoint" />
67 <stateValue type="long" value="1" />
68 </then>
69 <else>
70 <stateAttribute type="constant" value="checkpoint" />
71 <stateValue type="long" value="0" />
72 </else>
73 </stateChange>
74 </eventHandler>
75 </stateProvider>
76 </tmfxml>
This page took 0.042103 seconds and 5 git commands to generate.