| <?xml version="1.0" encoding="UTF-8"?> |
| <tmfxml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:noNamespaceSchemaLocation="xmlDefinition.xsd"> |
| <!-- *************************************************************************** |
| * Copyright (c) 2015 Ericsson |
| * |
| * All rights reserved. This program and the accompanying materials are |
| * made available under the terms of the Eclipse Public License 2.0 which |
| * accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Jean-Christian Kouame - Initial API and implementation |
| *************************************************************************** --> |
| <pattern version="0" id="xml test pattern segment"> |
| <head> |
| <traceType id="org.eclipse.linuxtools.lttng2.kernel.tracetype" /> |
| <label value="xml test pattern segment" /> |
| </head> |
| |
| <!-- the pattern handler specifies the FSM that will be instanciated at the beginning of the analysis --> |
| <patternHandler initial="test"> |
| |
| <!-- CONDITIONS --> |
| |
| <!-- ACTIONS --> |
| <!-- Generate two segments --> |
| <action id="pattern segment test 1"> |
| <!-- Generate a pattern segment with the name 'test1'--> |
| <segment> |
| <segType segName="test1" /> |
| </segment> |
| </action> |
| <action id="pattern segment test 2"> |
| <!-- Generate a pattern segment with the name 'test2' and with three fields 'field1', 'field2' and 'field3'--> |
| <segment> |
| <segType segName="test2" /> |
| <segContent> |
| <segField name="field1" type="long"> |
| <stateValue type="eventField" value="testField"/> |
| </segField> |
| <segField name="field2" type="string" value="test"/> |
| <segField name="field3" type="int" value="1"/> |
| </segContent> |
| </segment> |
| </action> |
| |
| <!-- FSMs --> |
| |
| <!-- test fsm |
| Declare a test FSM that will go back and forth between 2 states |
| --> |
| <fsm id="test" multiple="true" initial="state1"> |
| <state id="state1"> |
| <transition event="test" target="state2" action="pattern segment test 1" /> |
| </state> |
| <state id="state2"> |
| <transition event="test1" target="state1" action="pattern segment test 2" /> |
| </state> |
| </fsm> |
| </patternHandler> |
| </pattern> |
| </tmfxml> |