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
.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
.io
.BitBuffer
;
20 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.IntegerDeclaration
;
21 import org
.eclipse
.tracecompass
.ctf
.core
.event
.types
.StructDeclaration
;
22 import org
.eclipse
.tracecompass
.ctf
.core
.trace
.CTFStreamInputReader
;
23 import org
.eclipse
.tracecompass
.ctf
.core
.trace
.ICTFStream
;
26 * A lost event definition
28 * @author Matthew Khouzam
31 public class LostEventDeclaration
implements IEventDeclaration
{
38 public static final long LOST_EVENT_ID
= -1L;
41 * Gets a "lost" event. This is a synthetic event that is there to show that
42 * there should be something there.
44 public static final LostEventDeclaration INSTANCE
= new LostEventDeclaration();
46 private final StructDeclaration fFields
= new StructDeclaration(0);
48 private LostEventDeclaration() {
49 getFields().addField(CTFStrings
.LOST_EVENTS_FIELD
, IntegerDeclaration
.UINT_32B_DECL
);
50 getFields().addField(CTFStrings
.LOST_EVENTS_DURATION
, IntegerDeclaration
.UINT_64B_DECL
);
54 public EventDefinition
createDefinition(CTFStreamInputReader streamInputReader
, BitBuffer input
, long timestamp
) throws CTFException
{
59 public String
getName() {
60 return CTFStrings
.LOST_EVENT_NAME
;
64 public StructDeclaration
getFields() {
69 public StructDeclaration
getContext() {
82 public ICTFStream
getStream() {
87 public long getLogLevel() {
92 public Set
<String
> getCustomAttributes() {
93 return Collections
.<String
> emptySet();
97 public String
getCustomAttribute(String key
) {