ctf: Introduce IEventDefinition
[deliverable/tracecompass.git] / ctf / org.eclipse.tracecompass.ctf.core / src / org / eclipse / tracecompass / internal / ctf / core / trace / NullPacketReader.java
CommitLineData
42f8feff
MK
1/*******************************************************************************
2 * Copyright (c) 2015 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
12
13package org.eclipse.tracecompass.internal.ctf.core.trace;
14
15import org.eclipse.jdt.annotation.NonNullByDefault;
16import org.eclipse.jdt.annotation.Nullable;
17import org.eclipse.tracecompass.ctf.core.CTFException;
42f8feff
MK
18import org.eclipse.tracecompass.ctf.core.event.types.ICompositeDefinition;
19import org.eclipse.tracecompass.ctf.core.trace.ICTFPacketDescriptor;
20import org.eclipse.tracecompass.ctf.core.trace.IPacketReader;
e8ece272 21import org.eclipse.tracecompass.internal.ctf.core.event.EventDefinition;
42f8feff
MK
22
23/**
24 * Null packet reader, used for unset packets
25 */
26@NonNullByDefault
27public final class NullPacketReader implements IPacketReader {
28
29 /**
30 * Instance of a null packet reader
31 */
32 public static final NullPacketReader INSTANCE = new NullPacketReader();
33
34 private NullPacketReader() { }
35
36 @Override
37 public int getCPU() {
38 return UNKNOWN_CPU;
39 }
40
41 @Override
42 public boolean hasMoreEvents() {
43 return false;
44 }
45
46 @Override
47 public @Nullable EventDefinition readNextEvent() throws CTFException {
48 return null;
49 }
50
51 @Override
52 public @Nullable ICTFPacketDescriptor getCurrentPacket() {
53 return null;
54 }
55
56 @Override
57 public @Nullable ICompositeDefinition getCurrentPacketEventHeader() {
58 return null;
59 }
60}
This page took 0.028919 seconds and 5 git commands to generate.