import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler;
import org.eclipse.tracecompass.tmf.core.signal.TmfTimestampFormatUpdateSignal;
import org.eclipse.tracecompass.tmf.core.statesystem.ITmfAnalysisModuleWithStateSystems;
-import org.eclipse.tracecompass.tmf.core.statesystem.TmfStateSystemAnalysisModule;
import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;
import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace;
for (ITmfAnalysisModuleWithStateSystems module : modules) {
/* Just schedule the module, the data will be filled when available */
module.schedule();
- if (module instanceof TmfStateSystemAnalysisModule) {
- // TODO: add this method to ITmfAnalysisModuleWithStateSystems
- ((TmfStateSystemAnalysisModule) module).waitForInitialization();
+ if (!module.waitForInitialization()) {
+ continue;
}
for (ITmfStateSystem ss : module.getStateSystems()) {
traceEntry.addChild(new StateSystemEntry(ss));
!interval.getStateValue().isNull();
stateEntry = new StateEntry(ss.getAttributeName(quark), quark, ss.getFullAttributePath(quark),
interval.getStateValue(),
- new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE),
- new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE),
+ TmfTimestamp.fromNanos(interval.getStartTime()),
+ TmfTimestamp.fromNanos(interval.getEndTime()),
modified);
// update children first to know if parent is really needed
}
} else {
stateEntry.update(interval.getStateValue(),
- new TmfTimestamp(interval.getStartTime(), ITmfTimestamp.NANOSECOND_SCALE),
- new TmfTimestamp(interval.getEndTime(), ITmfTimestamp.NANOSECOND_SCALE));
+ TmfTimestamp.fromNanos(interval.getStartTime()),
+ TmfTimestamp.fromNanos(interval.getEndTime()));
// update children recursively
updateStateEntries(ss, fullState, stateEntry, quark, timestamp);
private final int fQuark;
private final String fFullPath;
- private @NonNull TmfTimestamp fStart;
- private @NonNull TmfTimestamp fEnd;
+ private @NonNull ITmfTimestamp fStart;
+ private @NonNull ITmfTimestamp fEnd;
private ITmfStateValue fValue;
private boolean fModified;
private boolean fOutOfRange = false;
- public StateEntry(String name, int quark, String fullPath, ITmfStateValue value, @NonNull TmfTimestamp start, @NonNull TmfTimestamp end, boolean modified) {
+ public StateEntry(String name, int quark, String fullPath, ITmfStateValue value, @NonNull ITmfTimestamp start, @NonNull ITmfTimestamp end, boolean modified) {
super(name);
fQuark = quark;
fFullPath = fullPath;
return fModified;
}
- public void update(ITmfStateValue value, @NonNull TmfTimestamp start, @NonNull TmfTimestamp end) {
+ public void update(ITmfStateValue value, @NonNull ITmfTimestamp start, @NonNull ITmfTimestamp end) {
fModified = false;
fOutOfRange = false;
if (!start.equals(fStart)) {