Search in sources :

Example 1 with ListParameterInfoResponse

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

the class ParameterCatalogue method loadMetaParameters.

private void loadMetaParameters() {
    log.fine("Fetching available parameters");
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    yamcsClient.get("/mdb/" + instance + "/parameters?details", null).whenComplete((data, exc) -> {
        if (exc == null) {
            try {
                ListParameterInfoResponse response = ListParameterInfoResponse.parseFrom(data);
                processMetaParameters(response.getParameterList());
            } 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) ListParameterInfoResponse(org.yamcs.protobuf.Rest.ListParameterInfoResponse)

Aggregations

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