Remove all existing @since annotations
[deliverable/tracecompass.git] / 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.CTFReaderException;
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.CTFStream;
21 import org.eclipse.tracecompass.ctf.core.trace.CTFStreamInputReader;
22
23 /**
24 * Representation of one type of event. A bit like "int" or "long" but for trace
25 * events.
26 *
27 * @author Matthew Khouzam
28 */
29 public interface IEventDeclaration {
30
31 /**
32 * Creates an instance of EventDefinition corresponding to this declaration.
33 *
34 * @param streamInputReader
35 * The StreamInputReader for which this definition is created.
36 * @param input
37 * the bitbuffer input source
38 * @param timestamp
39 * The timestamp when the event was taken
40 * @return A new EventDefinition.
41 * @throws CTFReaderException
42 * As a bitbuffer is used to read, it could have wrapped
43 * IOExceptions.
44 */
45 EventDefinition createDefinition(CTFStreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException;
46
47 /**
48 * Gets the name of an event declaration
49 *
50 * @return the name
51 */
52 String getName();
53
54 /**
55 * Gets the fields of an event declaration
56 *
57 * @return fields the fields in {@link StructDeclaration} format
58 */
59 StructDeclaration getFields();
60
61 /**
62 * Gets the context of an event declaration
63 *
64 * @return context the fields in {@link StructDeclaration} format
65 */
66 StructDeclaration getContext();
67
68 /**
69 * Gets the id of an event declaration
70 *
71 * @return The EventDeclaration ID
72 */
73 Long getId();
74
75 /**
76 * Gets the {@link CTFStream} of an event declaration
77 *
78 * @return the stream
79 */
80 CTFStream getStream();
81
82 /**
83 * What is the log level of this event?
84 *
85 * @return the log level.
86 */
87 long getLogLevel();
88
89 /**
90 * Get the {@link Set} of names of the custom CTF attributes.
91 *
92 * @return The set of custom attributes
93 */
94 Set<String> getCustomAttributes();
95
96 /**
97 * Get the value of a given CTF attribute.
98 *
99 * @param key
100 * The CTF attribute name
101 * @return the CTF attribute
102 */
103 String getCustomAttribute(String key);
104
105 }
This page took 0.034276 seconds and 5 git commands to generate.