Search in sources :

Example 1 with ListContainerInfoResponse

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

the class ContainerCatalogue method loadContainers.

private void loadContainers() {
    log.fine("Fetching available Containers");
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    yamcsClient.get("/mdb/" + instance + "/containers", null).whenComplete((data, exc) -> {
        try {
            ListContainerInfoResponse response = ListContainerInfoResponse.parseFrom(data);
            processContainers(response.getContainerList());
        } catch (InvalidProtocolBufferException e) {
            log.log(Level.SEVERE, "Failed to decode server response", e);
        }
    });
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient) InvalidProtocolBufferException(com.google.protobuf.InvalidProtocolBufferException) ListContainerInfoResponse(org.yamcs.protobuf.Rest.ListContainerInfoResponse)

Aggregations

InvalidProtocolBufferException (com.google.protobuf.InvalidProtocolBufferException)1 ListContainerInfoResponse (org.yamcs.protobuf.Rest.ListContainerInfoResponse)1 YamcsClient (org.yamcs.studio.core.client.YamcsClient)1