1 /*******************************************************************************
2 * Copyright (c) 2013, 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
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
.TmfNanoTimestamp
;
20 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.TmfTimeRange
;
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
28 public class CtfTmfLostEvent
extends CtfTmfEvent
implements ITmfLostEvent
{
30 private final TmfTimeRange fTimeRange
;
31 private final long fNbLost
;
34 * Constructor. Only {@link CtfTmfEventFactory} should call this.
39 * The rank of the event in the trace
41 * The event's payload (fields). In case this event has some.
43 * The name of the trace file from which this event comes
45 * The CPU on which this event happened
47 * The CTF Event Declaration object that created this event
49 * The time range of lost events indicated by this one
51 * The number of lost events in the range
53 CtfTmfLostEvent(CtfTmfTrace trace
,
57 IEventDeclaration declaration
,
58 TmfTimeRange timeRange
,
60 @NonNull EventDefinition def
) {
62 * Only the factory should call this method, the case to
63 * (CtfTmfTimestamp) should be safe.
65 super(trace
, rank
, (TmfNanoTimestamp
) timeRange
.getStartTime(), fileName
, cpu
, declaration
, def
);
66 fTimeRange
= timeRange
;
71 public TmfTimeRange
getTimeRange() {
76 public long getNbLostEvents() {