Search in sources :

Example 1 with KeyValue

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

the class CommandingCatalogue method updateCommandComment.

public CompletableFuture<byte[]> updateCommandComment(String processor, CommandId cmdId, String newComment) {
    String instance = ManagementCatalogue.getCurrentYamcsInstance();
    YamcsClient yamcsClient = YamcsPlugin.getYamcsClient();
    KeyValue keyValue = KeyValue.newBuilder().setKey("Comment").setValue(newComment).build();
    UpdateCommandHistoryRequest request = UpdateCommandHistoryRequest.newBuilder().setCmdId(cmdId).addHistoryEntry(keyValue).build();
    return yamcsClient.post("/processors/" + instance + "/" + processor + "/commandhistory" + cmdId.getCommandName(), request);
}
Also used : YamcsClient(org.yamcs.studio.core.client.YamcsClient) KeyValue(org.yamcs.protobuf.Rest.UpdateCommandHistoryRequest.KeyValue) UpdateCommandHistoryRequest(org.yamcs.protobuf.Rest.UpdateCommandHistoryRequest)

Aggregations

UpdateCommandHistoryRequest (org.yamcs.protobuf.Rest.UpdateCommandHistoryRequest)1 KeyValue (org.yamcs.protobuf.Rest.UpdateCommandHistoryRequest.KeyValue)1 YamcsClient (org.yamcs.studio.core.client.YamcsClient)1