use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class YamcsPlugin method registerCatalogue.
private <T extends Catalogue> void registerCatalogue(T catalogue) {
catalogues.put(catalogue.getClass(), catalogue);
ManagementCatalogue managementCatalogue = getCatalogue(ManagementCatalogue.class);
managementCatalogue.addInstanceListener(catalogue);
addYamcsConnectionListener(catalogue);
}
use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class YamcsUIPlugin method updateGlobalProcessingState.
private void updateGlobalProcessingState(ClientInfo clientInfo) {
// TODO Not sure which one of this method or the previous would trigger first, and whether that's deterministic
// therefore, just have similar logic here.
IWorkbench workbench = PlatformUI.getWorkbench();
workbench.getDisplay().asyncExec(() -> {
if (clientInfo.getCurrentClient()) {
ManagementCatalogue catalogue = ManagementCatalogue.getInstance();
ProcessorInfo processorInfo = catalogue.getProcessorInfo(clientInfo.getProcessorName());
doUpdateGlobalProcessingState(workbench, processorInfo);
}
});
}
use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class ForwardHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ProcessorInfo processorInfo = ManagementCatalogue.getInstance().getCurrentProcessorInfo();
String newSpeed;
if (processorInfo.getReplayRequest().hasSpeed()) {
ReplaySpeed currentSpeed = processorInfo.getReplayRequest().getSpeed();
float speedValue = currentSpeed.getParam() * 2f;
if (speedValue > 17)
speedValue = 1.0f;
newSpeed = (speedValue == 0f ? 1f : speedValue) + "x";
} else {
newSpeed = "2x";
}
EditProcessorRequest req = EditProcessorRequest.newBuilder().setSpeed(newSpeed).build();
ManagementCatalogue catalogue = ManagementCatalogue.getInstance();
catalogue.editProcessorRequest(processorInfo.getInstance(), processorInfo.getName(), req);
return null;
}
use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class PauseHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ManagementCatalogue catalogue = ManagementCatalogue.getInstance();
ProcessorInfo processorInfo = catalogue.getCurrentProcessorInfo();
EditProcessorRequest req = EditProcessorRequest.newBuilder().setState("PAUSED").build();
catalogue.editProcessorRequest(processorInfo.getInstance(), processorInfo.getName(), req);
return null;
}
use of org.yamcs.studio.core.model.ManagementCatalogue in project yamcs-studio by yamcs.
the class PlayHandler method execute.
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
ManagementCatalogue catalogue = ManagementCatalogue.getInstance();
ProcessorInfo processorInfo = catalogue.getCurrentProcessorInfo();
EditProcessorRequest req = EditProcessorRequest.newBuilder().setState("RUNNING").build();
catalogue.editProcessorRequest(processorInfo.getInstance(), processorInfo.getName(), req);
return null;
}
Aggregations