1 /*******************************************************************************
2 * Copyright (c) 2015 Ericsson
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 *******************************************************************************/
12 package org
.eclipse
.tracecompass
.internal
.ctf
.core
.event
;
14 import java
.util
.Collections
;
17 import org
.eclipse
.tracecompass
.ctf
.core
.CTFException
;
18 import org
.eclipse
.tracecompass
.ctf
.core
.CTFStrings
;
19 import org
.eclipse
.tracecompass
.ctf
.core
.event
.IEventDeclaration
;
20 import org
.eclipse
.tracecompass
.ctf
.core
.event
.io
.BitBuffer
;
21 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.IntegerDeclaration
;
22 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.StructDeclaration
;
23 import org
.eclipse
.tracecompass
.ctf
.core
.trace
.CTFStreamInputReader
;
24 import org
.eclipse
.tracecompass
.ctf
.core
.trace
.ICTFStream
;
27 * A lost event definition
29 * @author Matthew Khouzam
32 public final class LostEventDeclaration
implements IEventDeclaration
{
39 public static final long LOST_EVENT_ID
= -1L;
42 * Gets a "lost" event. This is a synthetic event that is there to show that
43 * there should be something there.
45 public static final LostEventDeclaration INSTANCE
= new LostEventDeclaration();
47 private final StructDeclaration fFields
= new StructDeclaration(0);
49 private LostEventDeclaration() {
50 getFields().addField(CTFStrings
.LOST_EVENTS_FIELD
, IntegerDeclaration
.UINT_32B_DECL
);
51 getFields().addField(CTFStrings
.LOST_EVENTS_DURATION
, IntegerDeclaration
.UINT_64B_DECL
);
55 public EventDefinition
createDefinition(CTFStreamInputReader streamInputReader
, BitBuffer input
, long timestamp
) throws CTFException
{
60 public String
getName() {
61 return CTFStrings
.LOST_EVENT_NAME
;
65 public StructDeclaration
getFields() {
70 public StructDeclaration
getContext() {
83 public ICTFStream
getStream() {
88 public long getLogLevel() {
93 public Set
<String
> getCustomAttributes() {
94 return Collections
.<String
> emptySet();
98 public String
getCustomAttribute(String key
) {