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
;
15 import org
.eclipse
.jdt
.annotation
.NonNull
;
16 import org
.eclipse
.linuxtools
.ctf
.core
.event
.EventDefinition
;
17 import org
.eclipse
.linuxtools
.ctf
.core
.event
.IEventDeclaration
;
18 import org
.eclipse
.tracecompass
.tmf
.core
.event
.ITmfLostEvent
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.timestamp
.TmfTimeRange
;
22 * An implementation of {@link ITmfLostEvent} for use in the CTF adaptor.
24 * @author Alexandre Montplaisir
27 public class CtfTmfLostEvent
extends CtfTmfEvent
implements ITmfLostEvent
{
29 private final TmfTimeRange fTimeRange
;
30 private final long fNbLost
;
33 * Constructor. Only {@link CtfTmfEventFactory} should call this.
38 * The rank of the event in the trace
40 * The event's payload (fields). In case this event has some.
42 * The name of the trace file from which this event comes
44 * The CPU on which this event happened
46 * The CTF Event Declaration object that created this event
48 * The time range of lost events indicated by this one
50 * The number of lost events in the range
52 CtfTmfLostEvent(CtfTmfTrace trace
,
56 IEventDeclaration declaration
,
57 TmfTimeRange timeRange
,
59 @NonNull EventDefinition def
) {
61 * Only the factory should call this method, the case to
62 * (CtfTmfTimestamp) should be safe.
64 super(trace
, rank
, (CtfTmfTimestamp
) timeRange
.getStartTime(), fileName
, cpu
, declaration
, def
);
65 fTimeRange
= timeRange
;
70 public TmfTimeRange
getTimeRange() {
75 public long getNbLostEvents() {