analysis.os: introduce cpu and thread signals
[deliverable/tracecompass.git] / analysis / org.eclipse.tracecompass.analysis.os.linux.core / src / org / eclipse / tracecompass / analysis / os / linux / core / signals / TmfCpuSelectedSignal.java
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
12 import org.eclipse.tracecompass.tmf.core.signal.TmfSignal;
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 */
21 public class TmfCpuSelectedSignal extends TmfSignal {
22
23 private final int fCore;
24 private final String fHostId;
25
26 /**
27 * Constructor
28 *
29 * @param source
30 * the source
31 * @param core
32 * the core number
33 * @param trace
34 * the current trace that the cpu belongs to
35 */
36 public TmfCpuSelectedSignal(Object source, int core, ITmfTrace trace) {
37 super(source);
38 fCore = core;
39 fHostId = trace.getHostId();
40 }
41
42 /**
43 * Get the core
44 *
45 * @return the core number
46 */
47 public int getCore() {
48 return fCore;
49 }
50
51 /**
52 * Get the trace host id
53 *
54 * @return the trace host id
55 */
56 public String getHostId() {
57 return fHostId;
58 }
59 }
This page took 0.03158 seconds and 5 git commands to generate.