tmf: Remove source and reference from ITmfEvent
[deliverable/tracecompass.git] / org.eclipse.tracecompass.btf.core / src / org / eclipse / tracecompass / btf / core / event / BtfEvent.java
CommitLineData
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 13package org.eclipse.tracecompass.btf.core.event;
ff71e543 14
2bdf0193
AM
15import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
16import org.eclipse.tracecompass.tmf.core.event.ITmfEventType;
17import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
18import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
19import 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 */
27public class BtfEvent extends TmfEvent {
28
29 private final String fDescription;
e1de2fd4
AM
30 private final String fSource;
31 private final String fReference;
ff71e543
MK
32
33 /**
34 * Standard constructor.
35 *
36 * @param trace
37 * the parent trace
38 * @param rank
39 * the event rank
40 * @param timestamp
41 * the event timestamp
42 * @param source
43 * the event source
44 * @param type
45 * the event type
46 * @param description
47 * a description of the type
48 * @param content
49 * the event content (payload)
50 * @param reference
51 * the event reference
52 */
e1de2fd4
AM
53 public BtfEvent(final ITmfTrace trace,
54 final long rank,
55 final ITmfTimestamp timestamp,
56 final String source,
57 final ITmfEventType type,
58 final String description,
59 final ITmfEventField content,
60 final String reference) {
61 super(trace, rank, timestamp, type, content);
ff71e543 62 fDescription = description;
e1de2fd4
AM
63 fSource = source;
64 fReference = reference;
ff71e543
MK
65 }
66
67 /**
68 * Gets a description
69 *
70 * @return the description
71 */
72 public String getEventDescription() {
73 return fDescription;
74 }
75
e1de2fd4
AM
76 /**
77 * Returns the source of this event.
78 *
79 * @return This event's source
80 */
81 public String getSource() {
82 return fSource;
83 }
84
85 /**
86 * Returns the reference of this event.
87 *
88 * @return This event's reference
89 */
90 public String getReference() {
91 return fReference;
92 }
ff71e543 93}
This page took 0.032486 seconds and 5 git commands to generate.