Commit | Line | Data |
---|---|---|
5179fc01 | 1 | /******************************************************************************* |
ec34bf48 | 2 | * Copyright (c) 2012, 2015 Ericsson |
6256d8ad | 3 | * |
5179fc01 FC |
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 | |
6256d8ad | 8 | * |
5179fc01 FC |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.core.event; |
5179fc01 | 14 | |
bd54d363 | 15 | import org.eclipse.core.runtime.IAdaptable; |
baafe54c | 16 | import org.eclipse.jdt.annotation.NonNull; |
2bdf0193 AM |
17 | import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; |
18 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; | |
4c564a2d | 19 | |
5179fc01 | 20 | /** |
f7703ed6 | 21 | * The generic event structure in TMF. In its canonical form, an event has: |
4c564a2d | 22 | * <ul> |
a4fa4e36 MK |
23 | * <li>a parent trace |
24 | * <li>a rank (order within the trace) | |
25 | * <li>a timestamp | |
a4fa4e36 MK |
26 | * <li>a type |
27 | * <li>a content (payload) | |
4c564a2d | 28 | * </ul> |
6256d8ad | 29 | * |
b9e37ffd FC |
30 | * @author Francois Chouinard |
31 | * | |
d337369a FC |
32 | * @see ITmfTimestamp |
33 | * @see ITmfEventType | |
f7703ed6 | 34 | * @see ITmfEventField |
d337369a | 35 | * @see TmfEvent |
4c564a2d | 36 | */ |
bd54d363 | 37 | public interface ITmfEvent extends IAdaptable { |
4c564a2d | 38 | |
a4115405 FC |
39 | // ------------------------------------------------------------------------ |
40 | // Getters | |
41 | // ------------------------------------------------------------------------ | |
4c564a2d FC |
42 | |
43 | /** | |
44 | * @return the trace that 'owns' the event | |
45 | */ | |
ca5b04ad | 46 | @NonNull ITmfTrace getTrace(); |
4c564a2d FC |
47 | |
48 | /** | |
49 | * @return the event rank within the parent trace | |
50 | */ | |
57a2a5ca | 51 | long getRank(); |
5179fc01 FC |
52 | |
53 | /** | |
54 | * @return the event timestamp | |
55 | */ | |
cbf0057c | 56 | @NonNull ITmfTimestamp getTimestamp(); |
5179fc01 | 57 | |
4c564a2d FC |
58 | /** |
59 | * @return the event type | |
60 | */ | |
57a2a5ca | 61 | ITmfEventType getType(); |
4c564a2d FC |
62 | |
63 | /** | |
64 | * @return the event content | |
65 | */ | |
57a2a5ca | 66 | ITmfEventField getContent(); |
5c3d072d MK |
67 | |
68 | /** | |
69 | * Gets the name of the event | |
70 | * | |
71 | * @return the name of the event, same as getType().getName() | |
72 | * @since 1.0 | |
73 | */ | |
74 | String getName(); | |
5179fc01 | 75 | } |