tmf: Fix the actual end time of state system modules
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / uml2sd / TmfSyncSequenceDiagramEvent.java
CommitLineData
73005152 1/**********************************************************************
ed902a2b 2 * Copyright (c) 2011, 2014 Ericsson
13e157b1 3 *
73005152
BH
4 * All rights reserved. This program and the accompanying materials are
5 * made 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
13e157b1
MK
8 *
9 * Contributors:
73005152
BH
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
2bdf0193 12package org.eclipse.tracecompass.tmf.core.uml2sd;
73005152 13
2bdf0193
AM
14import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
15import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
73005152
BH
16
17/**
73005152 18 * <p>
df0b8ff4 19 * A basic implementation of ITmfSyncSequenceDiagramEvent.
73005152 20 * </p>
6256d8ad 21 *
df0b8ff4
BH
22 * @version 1.0
23 * @author Bernd Hufmann
73005152
BH
24 */
25public class TmfSyncSequenceDiagramEvent implements ITmfSyncSequenceDiagramEvent {
26
27 // ------------------------------------------------------------------------
28 // Attributes
29 // ------------------------------------------------------------------------
df0b8ff4
BH
30 /**
31 * The start time of the sequence diagram event (i.e. time when signal was sent).
32 */
cab6c8ff 33 private final ITmfTimestamp fStartTime;
df0b8ff4
BH
34 /**
35 * The name of the sender of the signal.
36 */
cab6c8ff 37 private final String fSender;
df0b8ff4
BH
38 /**
39 * The name of the receiver of the signal.
40 */
cab6c8ff 41 private final String fReceiver;
df0b8ff4
BH
42 /**
43 * The name of the signal
44 */
cab6c8ff 45 private final String fName;
13e157b1 46
73005152
BH
47 // ------------------------------------------------------------------------
48 // Constructors
df0b8ff4
BH
49 // ------------------------------------------------------------------------
50 /**
51 * Constructor
6256d8ad 52 *
df0b8ff4
BH
53 * @param startEvent The start event (on sender side).
54 * @param sender The name of sender of signal.
55 * @param receiver The Name of receiver of signal.
56 * @param name - The signal name
6256d8ad 57 */
58b21093 58 public TmfSyncSequenceDiagramEvent(ITmfEvent startEvent, String sender, String receiver, String name) {
73005152 59
13e157b1 60 if ((startEvent == null) || (sender == null) || (receiver == null) || (name == null)) {
73005152
BH
61 throw new IllegalArgumentException("TmfSyncSequenceDiagramEvent constructor: " + //$NON-NLS-1$
62 (startEvent == null ? ", startEvent=null" : "") + //$NON-NLS-1$ //$NON-NLS-2$
63 (sender == null ? ", sender=null" : "") + //$NON-NLS-1$ //$NON-NLS-2$
64 (receiver == null ? ", receiver=null" : "") + //$NON-NLS-1$ //$NON-NLS-2$
65 (name == null ? ", name=null" : "")); //$NON-NLS-1$ //$NON-NLS-2$
66 }
67
4593bd5b 68 fStartTime = startEvent.getTimestamp();
73005152
BH
69
70 fSender = sender;
71 fReceiver = receiver;
13e157b1 72
73005152
BH
73 fName = name;
74 }
75
76 // ------------------------------------------------------------------------
77 // Operations
13e157b1 78 // ------------------------------------------------------------------------
11252342 79
73005152
BH
80 @Override
81 public String getSender() {
82 return fSender;
83 }
84
73005152
BH
85 @Override
86 public String getReceiver() {
87 return fReceiver;
88 }
89
73005152
BH
90 @Override
91 public String getName() {
92 return fName;
93 }
94
73005152 95 @Override
4df4581d 96 public ITmfTimestamp getStartTime() {
73005152
BH
97 return fStartTime;
98 }
99}
This page took 0.094481 seconds and 5 git commands to generate.