tmf.ui: Fix dead store in TimeAlignmentSynchronizer
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / event / IEventDeclaration.java
1 /*******************************************************************************
2 * Copyright (c) 2011-2014 Ericsson, Ecole Polytechnique de Montreal and others
3 *
4 * All rights reserved. This program and the accompanying materials are made
5 * 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: Matthew Khouzam - Initial API and implementation
10 *******************************************************************************/
11
12 package org.eclipse.tracecompass.ctf.core.event;
13
14 import java.util.Set;
15
16 import org.eclipse.jdt.annotation.NonNull;
17 import org.eclipse.tracecompass.ctf.core.CTFException;
18 import org.eclipse.tracecompass.ctf.core.event.io.BitBuffer;
19 import org.eclipse.tracecompass.ctf.core.event.types.StructDeclaration;
20 import org.eclipse.tracecompass.ctf.core.trace.CTFStreamInputReader;
21 import org.eclipse.tracecompass.ctf.core.trace.ICTFStream;
22 import org.eclipse.tracecompass.internal.ctf.core.trace.CTFStream;
23
24 /**
25 * Representation of one type of event. A bit like "int" or "long" but for trace
26 * events.
27 *
28 * @author Matthew Khouzam
29 */
30 public interface IEventDeclaration {
31
32 /**
33 * Id of events when not set
34 *
35 * @since 1.0
36 */
37 public static final long UNSET_EVENT_ID = -2L;
38
39 /**
40 * Creates an instance of EventDefinition corresponding to this declaration.
41 *
42 * @param streamInputReader
43 * The StreamInputReader for which this definition is created.
44 * @param input
45 * the bitbuffer input source
46 * @param timestamp
47 * The timestamp when the event was taken
48 * @return A new EventDefinition.
49 * @throws CTFException
50 * As a bitbuffer is used to read, it could have wrapped
51 * IOExceptions.
52 */
53 EventDefinition createDefinition(CTFStreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFException;
54
55 /**
56 * Gets the name of an event declaration
57 *
58 * @return the name
59 */
60 String getName();
61
62 /**
63 * Gets the fields of an event declaration
64 *
65 * @return fields the fields in {@link StructDeclaration} format
66 */
67 StructDeclaration getFields();
68
69 /**
70 * Gets the context of an event declaration
71 *
72 * @return context the fields in {@link StructDeclaration} format
73 */
74 StructDeclaration getContext();
75
76 /**
77 * Gets the id of an event declaration
78 *
79 * @return The EventDeclaration ID
80 */
81 Long getId();
82
83 /**
84 * Gets the {@link CTFStream} of an event declaration
85 *
86 * @return the stream
87 * @since 2.0
88 */
89 ICTFStream getStream();
90
91 /**
92 * What is the log level of this event?
93 *
94 * @return the log level.
95 */
96 long getLogLevel();
97
98 /**
99 * Get the {@link Set} of names of the custom CTF attributes.
100 *
101 * @return The set of custom attributes
102 */
103 @NonNull Set<@NonNull String> getCustomAttributes();
104
105 /**
106 * Get the value of a given CTF attribute.
107 *
108 * @param key
109 * The CTF attribute name
110 * @return the CTF attribute
111 */
112 String getCustomAttribute(String key);
113
114 }
This page took 0.048665 seconds and 5 git commands to generate.