Search in sources :

Example 1 with YamcsClient

use of org.yamcs.studio.core.client.YamcsClient in project yamcs-studio by yamcs.

the class ArchiveCatalogue method createTag.

public CompletableFuture<byte[]> createTag(CreateTagRequest request) {
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    return yamcsClient.post("/archive/" + instance + "/tags", request);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient)

Example 2 with YamcsClient

use of org.yamcs.studio.core.client.YamcsClient in project yamcs-studio by yamcs.

the class ArchiveCatalogue method downloadIndexes.

public CompletableFuture<Void> downloadIndexes(TimeInterval interval, BulkRestDataReceiver receiver) {
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    URLBuilder urlb = new URLBuilder("/archive/" + instance + "/indexes");
    urlb.setParam("filter", Arrays.asList("tm", "pp", "commands", "completeness"));
    if (interval.hasStart())
        urlb.setParam("start", interval.getStartUTC());
    if (interval.hasStop())
        urlb.setParam("stop", interval.getStopUTC());
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    return yamcsClient.streamGet(urlb.toString(), null, receiver);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient) URLBuilder(org.yamcs.studio.core.client.URLBuilder)

Example 3 with YamcsClient

use of org.yamcs.studio.core.client.YamcsClient in project yamcs-studio by yamcs.

the class ArchiveCatalogue method downloadCommands.

public CompletableFuture<Void> downloadCommands(TimeInterval interval, BulkRestDataReceiver receiver) {
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    URLBuilder urlb = new URLBuilder("/archive/" + instance + "/downloads/commands");
    if (interval.hasStart())
        urlb.setParam("start", interval.getStartUTC());
    if (interval.hasStop())
        urlb.setParam("stop", interval.getStopUTC());
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    return yamcsClient.streamGet(urlb.toString(), null, receiver);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient) URLBuilder(org.yamcs.studio.core.client.URLBuilder)

Example 4 with YamcsClient

use of org.yamcs.studio.core.client.YamcsClient in project yamcs-studio by yamcs.

the class ArchiveCatalogue method editTag.

public CompletableFuture<byte[]> editTag(long tagTime, int tagId, EditTagRequest request) {
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    return yamcsClient.put("/archive/" + instance + "/tags/" + tagTime + "/" + tagId, request);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient)

Example 5 with YamcsClient

use of org.yamcs.studio.core.client.YamcsClient in project yamcs-studio by yamcs.

the class CommandingCatalogue method sendCommand.

public CompletableFuture<byte[]> sendCommand(String processor, String commandName, IssueCommandRequest request) {
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    return yamcsClient.post("/processors/" + instance + "/" + processor + "/commands" + commandName, request);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient)

Aggregations

YamcsClient (org.yamcs.studio.core.client.YamcsClient)31 WebSocketRequest (org.yamcs.api.ws.WebSocketRequest)6 InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)4 URLBuilder (org.yamcs.studio.core.client.URLBuilder)3 YamcsConnectionProperties (org.yamcs.api.YamcsConnectionProperties)2 EditLinkRequest (org.yamcs.protobuf.Rest.EditLinkRequest)2 ArchiveCatalogue (org.yamcs.studio.core.model.ArchiveCatalogue)2 TimeCatalogue (org.yamcs.studio.core.model.TimeCatalogue)2 Calendar (java.util.Calendar)1 List (java.util.List)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 Composite (org.eclipse.swt.widgets.Composite)1 Control (org.eclipse.swt.widgets.Control)1 DateTime (org.eclipse.swt.widgets.DateTime)1