Search in sources :

Example 1 with ListTagsResponse

use of org.yamcs.protobuf.Rest.ListTagsResponse in project yamcs-studio by yamcs.

the class ArchiveIndexReceiver method getTag.

public void getTag(TimeInterval interval) {
    if (receiving) {
        log.info("Already receiving data");
        return;
    }
    ArchiveCatalogue catalogue = ArchiveCatalogue.getInstance();
    catalogue.listTags(interval).whenComplete((data, exc) -> {
        if (exc == null) {
            try {
                ListTagsResponse response = ListTagsResponse.parseFrom(data);
                archiveView.receiveTags(response.getTagList());
                archiveView.receiveTagsFinished();
            } catch (InvalidProtocolBufferException e) {
                log.log(Level.SEVERE, "Failed to decode server message", e);
            }
        }
        receiving = false;
    });
}
Also used : ListTagsResponse(org.yamcs.protobuf.Rest.ListTagsResponse) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) ArchiveCatalogue(org.yamcs.studio.core.model.ArchiveCatalogue)

Aggregations

InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 ListTagsResponse (org.yamcs.protobuf.Rest.ListTagsResponse)1 ArchiveCatalogue (org.yamcs.studio.core.model.ArchiveCatalogue)1