Commit | Line | Data |
---|---|---|
1fc70883 MK |
1 | /******************************************************************************* |
2 | * Copyright (c) 2016 Ericsson | |
3 | * | |
4 | * All rights reserved. This program and the accompanying materials | |
5 | * are made available under the terms of the Eclipse Public License v1.0 | |
6 | * which accompanies this distribution, and is available at | |
7 | * http://www.eclipse.org/legal/epl-v10.html | |
8 | *******************************************************************************/ | |
9 | ||
10 | package org.eclipse.tracecompass.analysis.os.linux.core.signals; | |
11 | ||
ccc49be1 | 12 | import org.eclipse.tracecompass.tmf.core.signal.TmfTraceModelSignal; |
1fc70883 MK |
13 | import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; |
14 | ||
15 | /** | |
16 | * A signal to say a computer core was selected | |
17 | * | |
18 | * @author Matthew Khouzam | |
19 | * @since 2.0 | |
20 | */ | |
ccc49be1 | 21 | public class TmfCpuSelectedSignal extends TmfTraceModelSignal { |
1fc70883 MK |
22 | |
23 | private final int fCore; | |
1fc70883 MK |
24 | |
25 | /** | |
26 | * Constructor | |
27 | * | |
28 | * @param source | |
29 | * the source | |
30 | * @param core | |
8c684b48 | 31 | * the core number, -1 for all |
1fc70883 MK |
32 | * @param trace |
33 | * the current trace that the cpu belongs to | |
34 | */ | |
35 | public TmfCpuSelectedSignal(Object source, int core, ITmfTrace trace) { | |
ccc49be1 | 36 | super(source, 0, trace.getHostId()); |
1fc70883 | 37 | fCore = core; |
1fc70883 MK |
38 | } |
39 | ||
40 | /** | |
41 | * Get the core | |
42 | * | |
43 | * @return the core number | |
44 | */ | |
45 | public int getCore() { | |
46 | return fCore; | |
47 | } | |
1fc70883 | 48 | } |