Remove all existing @since annotations
[deliverable/tracecompass.git] / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / ctf / core / event / IEventDeclaration.java
CommitLineData
8e964be1 1/*******************************************************************************
ed902a2b 2 * Copyright (c) 2011-2014 Ericsson, Ecole Polytechnique de Montreal and others
8e964be1
MK
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
f357bcd4 12package org.eclipse.tracecompass.ctf.core.event;
8e964be1
MK
13
14import java.util.Set;
15
a4fa4e36 16import org.eclipse.jdt.annotation.NonNull;
453a59f0 17import org.eclipse.tracecompass.ctf.core.CTFReaderException;
f357bcd4
AM
18import org.eclipse.tracecompass.ctf.core.event.io.BitBuffer;
19import org.eclipse.tracecompass.ctf.core.event.types.StructDeclaration;
f357bcd4
AM
20import org.eclipse.tracecompass.ctf.core.trace.CTFStream;
21import org.eclipse.tracecompass.ctf.core.trace.CTFStreamInputReader;
8e964be1
MK
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
8e964be1
MK
28 */
29public 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.
a4fa4e36
MK
36 * @param input
37 * the bitbuffer input source
38 * @param timestamp
39 * The timestamp when the event was taken
8e964be1 40 * @return A new EventDefinition.
a4fa4e36
MK
41 * @throws CTFReaderException
42 * As a bitbuffer is used to read, it could have wrapped
43 * IOExceptions.
8e964be1 44 */
d84419e1 45 EventDefinition createDefinition(CTFStreamInputReader streamInputReader, @NonNull BitBuffer input, long timestamp) throws CTFReaderException;
8e964be1
MK
46
47 /**
48 * Gets the name of an event declaration
49 *
50 * @return the name
51 */
3e2618e9 52 String getName();
8e964be1
MK
53
54 /**
55 * Gets the fields of an event declaration
56 *
57 * @return fields the fields in {@link StructDeclaration} format
58 */
3e2618e9 59 StructDeclaration getFields();
8e964be1
MK
60
61 /**
62 * Gets the context of an event declaration
63 *
64 * @return context the fields in {@link StructDeclaration} format
65 */
3e2618e9 66 StructDeclaration getContext();
8e964be1
MK
67
68 /**
69 * Gets the id of an event declaration
70 *
71 * @return The EventDeclaration ID
72 */
3e2618e9 73 Long getId();
8e964be1
MK
74
75 /**
d84419e1 76 * Gets the {@link CTFStream} of an event declaration
8e964be1
MK
77 *
78 * @return the stream
8e964be1 79 */
d84419e1 80 CTFStream getStream();
8e964be1
MK
81
82 /**
83 * What is the log level of this event?
84 *
85 * @return the log level.
8e964be1 86 */
3e2618e9 87 long getLogLevel();
8e964be1
MK
88
89 /**
90 * Get the {@link Set} of names of the custom CTF attributes.
91 *
92 * @return The set of custom attributes
8e964be1 93 */
3e2618e9 94 Set<String> getCustomAttributes();
8e964be1
MK
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
8e964be1 102 */
3e2618e9 103 String getCustomAttribute(String key);
8e964be1
MK
104
105}
This page took 0.063433 seconds and 5 git commands to generate.