Commit | Line | Data |
---|---|---|
ff71e543 MK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2014 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials are | |
5 | * made available under the terms of the Eclipse Public License v1.0 which | |
6 | * accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | * | |
9 | * Contributors: | |
10 | * Matthew Khouzam - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
7ce90559 | 13 | package org.eclipse.tracecompass.btf.core.event; |
ff71e543 | 14 | |
2bdf0193 AM |
15 | import org.eclipse.tracecompass.tmf.core.event.ITmfEventField; |
16 | import org.eclipse.tracecompass.tmf.core.event.ITmfEventType; | |
17 | import org.eclipse.tracecompass.tmf.core.event.TmfEvent; | |
18 | import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; | |
19 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; | |
ff71e543 MK |
20 | |
21 | /** | |
22 | * A Btf event, basically a wrapper for the TmfEvent with the additional field | |
23 | * of "description" | |
24 | * | |
25 | * @author Matthew Khouzam | |
26 | */ | |
27 | public class BtfEvent extends TmfEvent { | |
28 | ||
29 | private final String fDescription; | |
30 | ||
31 | /** | |
32 | * Standard constructor. | |
33 | * | |
34 | * @param trace | |
35 | * the parent trace | |
36 | * @param rank | |
37 | * the event rank | |
38 | * @param timestamp | |
39 | * the event timestamp | |
40 | * @param source | |
41 | * the event source | |
42 | * @param type | |
43 | * the event type | |
44 | * @param description | |
45 | * a description of the type | |
46 | * @param content | |
47 | * the event content (payload) | |
48 | * @param reference | |
49 | * the event reference | |
50 | */ | |
51 | public BtfEvent(final ITmfTrace trace, long rank, final ITmfTimestamp timestamp, final String source, | |
52 | final ITmfEventType type, String description, final ITmfEventField content, final String reference) { | |
53 | super(trace, rank, timestamp, source, type, content, reference); | |
54 | fDescription = description; | |
55 | } | |
56 | ||
57 | /** | |
58 | * Gets a description | |
59 | * | |
60 | * @return the description | |
61 | */ | |
62 | public String getEventDescription() { | |
63 | return fDescription; | |
64 | } | |
65 | ||
66 | } |