tmf.xml: Add support for peek() stack operation
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core.tests / test_xml_files / test_valid / test_state_values.xml
CommitLineData
8ab1a965
GB
1<?xml version="1.0" encoding="UTF-8"?>
2<!-- ***************************************************************************
3* Copyright (c) 2016 École Polytechnique de Montréal
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 * Geneviève Bastien - 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.attributes" version="1">
17
18 <!-- Test to see that state values are updated or modified depending on the requested state change -->
19 <eventHandler eventName="entry">
20 <stateChange>
21 <stateAttribute type="constant" value="update" />
22 <stateAttribute type="eventField" value="cpu" />
23 <stateValue type="string" value="UNKNOWN" />
24 </stateChange>
25 <stateChange>
26 <stateAttribute type="constant" value="modify" />
27 <stateAttribute type="eventField" value="cpu" />
28 <stateValue type="string" value="UNKNOWN" />
29 </stateChange>
d64a8ad1
JCK
30 <stateChange>
31 <stateAttribute type="constant" value="stack"/>
32 <stateValue stack="push" type="eventField" value="timestamp" />
33 </stateChange>
8ab1a965
GB
34 </eventHandler>
35 <eventHandler eventName="exit">
36 <stateChange>
37 <stateAttribute type="constant" value="update" />
38 <stateAttribute type="eventField" value="cpu" />
39 <stateValue type="eventField" value="curState" update="true" />
40 </stateChange>
41 <stateChange>
42 <stateAttribute type="constant" value="update" />
43 <stateAttribute type="eventField" value="cpu" />
44 <stateValue type="null" />
45 </stateChange>
46 <stateChange>
47 <stateAttribute type="constant" value="modify" />
48 <stateAttribute type="eventField" value="cpu" />
49 <stateValue type="eventField" value="curState" />
50 </stateChange>
d64a8ad1
JCK
51 <stateChange>
52 <if>
53 <condition>
54 <stateValue type="long" stack="peek" >
55 <stateAttribute type="constant" value="stack" />
56 </stateValue>
57 <stateValue type="long" value="5" />
58 </condition>
59 </if>
60 <then>
61 <stateAttribute type="constant" value="stack"/>
62 <stateValue stack="pop" type="long"/>
63 </then>
64 </stateChange>
8ab1a965
GB
65 </eventHandler>
66 </stateProvider>
67</tmfxml>
This page took 0.026723 seconds and 5 git commands to generate.