pcap: Move plugins to their own sub-directory
[deliverable/tracecompass.git] / org.eclipse.tracecompass.gdbtrace.core / src / org / eclipse / tracecompass / internal / gdbtrace / core / event / GdbTraceEvent.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 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 * Francois Chouinard - Initial API and implementation
11 * Patrick Tasse - Updated for TMF 2.0
12 *******************************************************************************/
13
14 package org.eclipse.tracecompass.internal.gdbtrace.core.event;
15
16 import org.eclipse.tracecompass.internal.gdbtrace.core.trace.GdbTrace;
17 import org.eclipse.tracecompass.tmf.core.event.ITmfEventType;
18 import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
19 import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
20 import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
21
22 /**
23 * GDB Trace implementation of TmfEvent
24 * @author Francois Chouinard
25 */
26 public class GdbTraceEvent extends TmfEvent {
27
28 // ------------------------------------------------------------------------
29 // Fields
30 // ------------------------------------------------------------------------
31
32 private final String fSource;
33 private final String fReference;
34
35 // ------------------------------------------------------------------------
36 // Constructors
37 // ------------------------------------------------------------------------
38
39 /**
40 * Default constructor
41 */
42 public GdbTraceEvent() {
43 super(null, ITmfContext.UNKNOWN_RANK, null, null, null);
44 fSource = null;
45 fReference = null;
46 }
47
48 /**
49 * Full constructor
50 *
51 * @param trace
52 * the parent trace
53 * @param timestamp
54 * the event timestamp
55 * @param source
56 * the event source
57 * @param type
58 * the event type
59 * @param content
60 * the event content
61 * @param reference
62 * the event reference
63 */
64 public GdbTraceEvent(GdbTrace trace, ITmfTimestamp timestamp, String source,
65 ITmfEventType type, GdbTraceEventContent content, String reference) {
66 super(trace, ITmfContext.UNKNOWN_RANK, timestamp, type, content);
67 fSource = source;
68 fReference = reference;
69 }
70
71 /**
72 * Return the event's source
73 *
74 * @return The event source
75 */
76 public String getSource() {
77 return fSource;
78 }
79
80 /**
81 * Return the event's reference
82 *
83 * @return The event reference
84 */
85 public String getReference() {
86 return fReference;
87 }
88
89 @Override
90 public GdbTraceEventContent getContent() {
91 /* We only allow GdbTraceEventContent at the constructor */
92 return (GdbTraceEventContent) super.getContent();
93 }
94
95 }
This page took 0.048587 seconds and 5 git commands to generate.