1 /*******************************************************************************
2 * Copyright (c) 2011, 2014 Ericsson, Ecole Polytechnique de Montreal and others
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
9 * Contributors: Matthew Khouzam - Initial API and implementation
10 * Contributors: Simon Marchi - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.ctf
.core
.trace
;
15 import java
.util
.List
;
18 import org
.eclipse
.jdt
.annotation
.NonNull
;
19 import org
.eclipse
.jdt
.annotation
.Nullable
;
20 import org
.eclipse
.tracecompass
.ctf
.core
.event
.IEventDeclaration
;
21 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.IDeclaration
;
22 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.StructDeclaration
;
23 import org
.eclipse
.tracecompass
.internal
.ctf
.core
.event
.EventDeclaration
;
26 * An _event stream_ can be divided into contiguous event packets of variable
27 * size. An event packet can contain a certain amount of padding at the end. The
28 * stream header is repeated at the beginning of each event packet. The
29 * rationale for the event stream design choices is explained in
30 * <a href="http://diamon.org/ctf/#specB" >Stream header rationale<a/>.
33 * The event stream header will therefore be referred to as the _event packet
34 * header_ throughout the rest of this document.
36 * @author Matthew Khouzam
37 * @author Efficios - Javadoc
40 public interface ICTFStream
{
43 * Gets the id of a stream
45 * @return id the id of a stream
51 * Is the id of a stream set
53 * @return If the ID is set or not
59 * @return is the event header set (timestamp and stuff) (see Ctf Spec)
61 boolean isEventHeaderSet();
65 * @return is the event context set (pid and stuff) (see Ctf Spec)
67 boolean isEventContextSet();
71 * @return Is the packet context set (see Ctf Spec)
73 boolean isPacketContextSet();
76 * Gets the event header declaration
78 * @return the event header declaration in declaration form
80 IDeclaration
getEventHeaderDeclaration();
84 * @return the event context declaration in structdeclaration form
86 StructDeclaration
getEventContextDecl();
90 * @return the packet context declaration in structdeclaration form
92 StructDeclaration
getPacketContextDecl();
96 * @return the set of all stream inputs for this stream
98 Set
<CTFStreamInput
> getStreamInputs();
102 * @return the parent trace
107 * Get all the event declarations in this stream.
109 * @return The event declarations for this stream
113 List
<@Nullable IEventDeclaration
> getEventDeclarations();
116 * Get the event declaration for a given ID.
119 * The ID, can be {@link EventDeclaration#UNSET_EVENT_ID}, or any
121 * @return The event declaration with the given ID for this stream, or
122 * 'null' if there are no declaration with this ID
123 * @throws IllegalArgumentException
124 * If the passed ID is invalid
127 IEventDeclaration
getEventDeclaration(int eventId
);
This page took 0.035572 seconds and 5 git commands to generate.