Search in sources :

Example 6 with TimeInterval

use of org.yamcs.studio.core.TimeInterval in project yamcs-studio by yamcs.

the class Prefs method getInterval.

public TimeInterval getInterval() {
    TimeInterval range;
    try {
        range = (TimeInterval) getObject(prefs, "archiveRange");
    } catch (ClassNotFoundException e) {
        // Keep this around for a while until we migrate prefs
        range = null;
    // to gson. TimeInterval was moved multiple times.
    }
    if (range == null) {
        long missionTime = TimeCatalogue.getInstance().getMissionTime(true);
        range = TimeInterval.starting(missionTime - 30 * 24 * 3600);
    }
    return range;
}
Also used : TimeInterval(org.yamcs.studio.core.TimeInterval)

Example 7 with TimeInterval

use of org.yamcs.studio.core.TimeInterval in project yamcs-studio by yamcs.

the class ArchiveView method receiveArchiveRecordsFinished.

public void receiveArchiveRecordsFinished() {
    TimeInterval interval = archivePanel.getRequestedDataInterval();
    new // FIXME new thread because currently RestClients syncs on the call thread causing deadlock
    Thread() {

        @Override
        public void run() {
            indexReceiver.getTag(interval);
        }
    }.start();
}
Also used : TimeInterval(org.yamcs.studio.core.TimeInterval)

Example 8 with TimeInterval

use of org.yamcs.studio.core.TimeInterval in project yamcs-studio by yamcs.

the class CreateReplayHandler method execute.

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    long missionTime = TimeCatalogue.getInstance().getMissionTime(true);
    missionTime -= 30 * 1000;
    TimeInterval interval = TimeInterval.starting(missionTime);
    Display.getDefault().asyncExec(() -> {
        CreateReplayDialog dialog = new CreateReplayDialog(Display.getCurrent().getActiveShell());
        dialog.initialize(interval);
        dialog.open();
    });
    return null;
}
Also used : TimeInterval(org.yamcs.studio.core.TimeInterval)

Aggregations

TimeInterval (org.yamcs.studio.core.TimeInterval)8 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)2 Calendar (java.util.Calendar)2 YamcsApiException (org.yamcs.api.YamcsApiException)2 ArchiveCatalogue (org.yamcs.studio.core.model.ArchiveCatalogue)2 TimeEncoding (org.yamcs.utils.TimeEncoding)2 Point (java.awt.Point)1 List (java.util.List)1 Level (java.util.logging.Level)1 Logger (java.util.logging.Logger)1 Action (org.eclipse.jface.action.Action)1 IAction (org.eclipse.jface.action.IAction)1 IMenuManager (org.eclipse.jface.action.IMenuManager)1 IDialogConstants (org.eclipse.jface.dialogs.IDialogConstants)1 MessageDialog (org.eclipse.jface.dialogs.MessageDialog)1 TitleAreaDialog (org.eclipse.jface.dialogs.TitleAreaDialog)1 SWT (org.eclipse.swt.SWT)1 GridData (org.eclipse.swt.layout.GridData)1 GridLayout (org.eclipse.swt.layout.GridLayout)1 RowLayout (org.eclipse.swt.layout.RowLayout)1