tmf : Add test suite for the pattern segment builder
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.analysis.xml.core.tests / test_xml_files / test_valid / test_pattern_segment.xml
CommitLineData
2fd6b087
JCK
1<?xml version="1.0" encoding="UTF-8"?>
2<tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3 xsi:noNamespaceSchemaLocation="xmlDefinition.xsd">
4<!-- ***************************************************************************
5* Copyright (c) 2015 Ericsson
6*
7* All rights reserved. This program and the accompanying materials are
8* made available under the terms of the Eclipse Public License v1.0 which
9* accompanies this distribution, and is available at
10* http://www.eclipse.org/legal/epl-v10.html
11*
12* Contributors:
13* Jean-Christian Kouame - Initial API and implementation
14*************************************************************************** -->
15<pattern version="0" id="xml test pattern segment">
16 <head>
17 <traceType id="org.eclipse.linuxtools.lttng2.kernel.tracetype" />
18 <label value="xml test pattern segment" />
19 </head>
20
21<!-- the pattern handler specifies the FSM that will be instanciated at the beginning of the analysis -->
22 <patternHandler initial="test">
23
24<!-- CONDITIONS -->
25
26<!-- ACTIONS -->
27<!-- Generate two segments -->
28 <action id="pattern segment test 1">
29<!-- Generate a pattern segment with the name 'test1'-->
30 <segment>
31 <segType segName="test1" />
32 </segment>
33 </action>
34 <action id="pattern segment test 2">
35<!-- Generate a pattern segment with the name 'test2' and with three fields 'field1', 'field2' and 'field2'-->
36 <segment>
37 <segType segName="test2" />
38 <segContent>
39 <segField name="field1" type="long" value="5"/>
40 <segField name="field2" type="string" value="test"/>
41 <segField name="field3" type="int" value="1"/>
42 </segContent>
43 </segment>
44 </action>
45
46<!-- FSMs -->
47
48<!-- test fsm
49 Declare a test FSM that that will generate two segments for each event received
50-->
51 <fsm id="test" multiple="false" initial="state">
52 <state id="state">
53<!-- The state will stay here forever-->
54 <transition target="state" action="pattern segment test 1:pattern segment test 2" />
55 </state>
56 </fsm>
57 </patternHandler>
58</pattern>
59</tmfxml>
This page took 0.026138 seconds and 5 git commands to generate.