tmf : fix the 'Not' condition in TmfXmlCondition
[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 <!-- ***************************************************************************
17 * The following represents the state of the attributes in the system after the
18 * analysis.
19 *
20 * n corresponds to a null state value
21 *
22 * Timestamp | 1 | 3 | 5 | 7 |
23 * -events and field value-
24 * ev.test | 10 20
25 * ev.test1 | 100 200
26 * -states-
27 * test | 1 0
28 * test1 | n 0 1
29 * checkpoint | 0 1 0
30 * or_three_operands | 1 0 1
31 * not_operand | 0 1 0
32 *
33 *************************************************************************** -->
34
35 <stateProvider id="test.xml.conditions" version="1">
36 <eventHandler eventName="test">
37 <stateChange>
38 <if>
39 <condition>
40 <field name="testField" />
41 <stateValue type="long" value="10" />
42 </condition>
43 </if>
44 <then>
45 <stateAttribute type="eventName" />
46 <stateValue type="long" value="1" />
47 </then>
48 <else>
49 <stateAttribute type="eventName" />
50 <stateValue type="long" value="0" />
51 </else>
52 </stateChange>
53 </eventHandler>
54 <eventHandler eventName="test1">
55 <stateChange>
56 <if>
57 <condition>
58 <field name="testField" />
59 <stateValue type="long" value="200" />
60 </condition>
61 </if>
62 <then>
63 <stateAttribute type="eventName" />
64 <stateValue type="long" value="1" />
65 </then>
66 <else>
67 <stateAttribute type="eventName" />
68 <stateValue type="long" value="0" />
69 </else>
70 </stateChange>
71 </eventHandler>
72 <eventHandler eventName="*">
73 <stateChange>
74 <if>
75 <condition>
76 <stateValue type="query">
77 <stateAttribute type="constant" value="test" />
78 </stateValue>
79 <stateValue type="query">
80 <stateAttribute type="constant" value="test1" />
81 </stateValue>
82 </condition>
83 </if>
84 <then>
85 <stateAttribute type="constant" value="checkpoint" />
86 <stateValue type="long" value="1" />
87 </then>
88 <else>
89 <stateAttribute type="constant" value="checkpoint" />
90 <stateValue type="long" value="0" />
91 </else>
92 </stateChange>
93 </eventHandler>
94 <eventHandler eventName="*">
95 <stateChange>
96 <if>
97 <and>
98 <condition>
99 <stateAttribute type="constant" value="test" />
100 <stateValue type="long" value="0" />
101 </condition>
102 <condition>
103 <stateAttribute type="constant" value="test1" />
104 <stateValue type="long" value="0" />
105 </condition>
106 <condition>
107 <stateAttribute type="constant" value="checkpoint" />
108 <stateValue type="long" value="1" />
109 </condition>
110 </and>
111 </if>
112 <then>
113 <stateAttribute type="constant" value="and_three_operands" />
114 <stateValue type="long" value="0" />
115 </then>
116 <else>
117 <stateAttribute type="constant" value="and_three_operands" />
118 <stateValue type="long" value="1" />
119 </else>
120 </stateChange>
121 </eventHandler>
122 <eventHandler eventName="*">
123 <stateChange>
124 <if>
125 <not>
126 <condition>
127 <stateAttribute type="constant" value="and_three_operands" />
128 <stateValue type="long" value="1" />
129 </condition>
130 </not>
131 </if>
132 <then>
133 <stateAttribute type="constant" value="not_operand" />
134 <stateValue type="long" value="1" />
135 </then>
136 <else>
137 <stateAttribute type="constant" value="not_operand" />
138 <stateValue type="long" value="0" />
139 </else>
140 </stateChange>
141 </eventHandler>
142 </stateProvider>
143 </tmfxml>
This page took 0.035604 seconds and 5 git commands to generate.