1 /*******************************************************************************
2 * Copyright (c) 2013 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
10 * Alexandre Montplaisir - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ctf
.core
.event
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.tracecompass
.ctf
.core
.event
.EventDefinition
;
17 import org
.eclipse
.tracecompass
.ctf
.core
.event
.IEventDeclaration
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfLostEvent
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.TmfTimeRange
;
20 import org
.eclipse
.tracecompass
.tmf
.ctf
.core
.timestamp
.CtfTmfTimestamp
;
21 import org
.eclipse
.tracecompass
.tmf
.ctf
.core
.trace
.CtfTmfTrace
;
24 * An implementation of {@link ITmfLostEvent} for use in the CTF adaptor.
26 * @author Alexandre Montplaisir
29 public class CtfTmfLostEvent
extends CtfTmfEvent
implements ITmfLostEvent
{
31 private final TmfTimeRange fTimeRange
;
32 private final long fNbLost
;
35 * Constructor. Only {@link CtfTmfEventFactory} should call this.
40 * The rank of the event in the trace
42 * The event's payload (fields). In case this event has some.
44 * The name of the trace file from which this event comes
46 * The CPU on which this event happened
48 * The CTF Event Declaration object that created this event
50 * The time range of lost events indicated by this one
52 * The number of lost events in the range
54 CtfTmfLostEvent(CtfTmfTrace trace
,
58 IEventDeclaration declaration
,
59 TmfTimeRange timeRange
,
61 @NonNull EventDefinition def
) {
63 * Only the factory should call this method, the case to
64 * (CtfTmfTimestamp) should be safe.
66 super(trace
, rank
, (CtfTmfTimestamp
) timeRange
.getStartTime(), fileName
, cpu
, declaration
, def
);
67 fTimeRange
= timeRange
;
72 public TmfTimeRange
getTimeRange() {
77 public long getNbLostEvents() {