Search in sources :

Example 6 with CommandingCatalogue

use of org.yamcs.studio.core.model.CommandingCatalogue in project yamcs-studio by yamcs.

the class YamcsPlugin method start.

@Override
public void start(BundleContext context) throws Exception {
    super.start(context);
    plugin = this;
    TimeEncoding.setUp();
    yamcsClient = new YamcsClient(getProductString(), true);
    yamcsClient.addConnectionListener(new UIConnectionListener());
    ManagementCatalogue managementCatalogue = new ManagementCatalogue();
    catalogues.put(ManagementCatalogue.class, managementCatalogue);
    addYamcsConnectionListener(managementCatalogue);
    registerCatalogue(new TimeCatalogue());
    registerCatalogue(new ParameterCatalogue());
    registerCatalogue(new CommandingCatalogue());
    registerCatalogue(new AlarmCatalogue());
    registerCatalogue(new EventCatalogue());
    registerCatalogue(new LinkCatalogue());
    registerCatalogue(new ArchiveCatalogue());
}
Also used : ManagementCatalogue(org.yamcs.studio.core.model.ManagementCatalogue) YamcsClient(org.yamcs.studio.core.client.YamcsClient) TimeCatalogue(org.yamcs.studio.core.model.TimeCatalogue) ParameterCatalogue(org.yamcs.studio.core.model.ParameterCatalogue) AlarmCatalogue(org.yamcs.studio.core.model.AlarmCatalogue) EventCatalogue(org.yamcs.studio.core.model.EventCatalogue) CommandingCatalogue(org.yamcs.studio.core.model.CommandingCatalogue) LinkCatalogue(org.yamcs.studio.core.model.LinkCatalogue) ArchiveCatalogue(org.yamcs.studio.core.model.ArchiveCatalogue)

Example 7 with CommandingCatalogue

use of org.yamcs.studio.core.model.CommandingCatalogue in project yamcs-studio by yamcs.

the class Yamcs method issueCommand.

public static void issueCommand(String text) {
    ParseResult parsed = CommandParser.parseCommand(text);
    IssueCommandRequest.Builder req = IssueCommandRequest.newBuilder();
    req.setSequenceNumber(CommandingCatalogue.getInstance().getNextCommandClientId());
    req.setOrigin(CommandingCatalogue.getInstance().getCommandOrigin());
    req.addAllAssignment(parsed.getAssignments());
    CommandingCatalogue catalogue = CommandingCatalogue.getInstance();
    catalogue.sendCommand("realtime", parsed.getQualifiedName(), req.build());
}
Also used : ParseResult(org.yamcs.studio.commanding.CommandParser.ParseResult) CommandingCatalogue(org.yamcs.studio.core.model.CommandingCatalogue) IssueCommandRequest(org.yamcs.protobuf.Rest.IssueCommandRequest)

Aggregations

CommandingCatalogue (org.yamcs.studio.core.model.CommandingCatalogue)7 ExecutionException (org.eclipse.core.commands.ExecutionException)3 IssueCommandRequest (org.yamcs.protobuf.Rest.IssueCommandRequest)3 UnsupportedEncodingException (java.io.UnsupportedEncodingException)2 Iterator (java.util.Iterator)1 AbstractHandler (org.eclipse.core.commands.AbstractHandler)1 ExecutionEvent (org.eclipse.core.commands.ExecutionEvent)1 IInputValidator (org.eclipse.jface.dialogs.IInputValidator)1 InputDialog (org.eclipse.jface.dialogs.InputDialog)1 ISelection (org.eclipse.jface.viewers.ISelection)1 IStructuredSelection (org.eclipse.jface.viewers.IStructuredSelection)1 Window (org.eclipse.jface.window.Window)1 SWT (org.eclipse.swt.SWT)1 GridData (org.eclipse.swt.layout.GridData)1 Composite (org.eclipse.swt.widgets.Composite)1 Control (org.eclipse.swt.widgets.Control)1 Display (org.eclipse.swt.widgets.Display)1 MessageBox (org.eclipse.swt.widgets.MessageBox)1 Shell (org.eclipse.swt.widgets.Shell)1 HandlerUtil (org.eclipse.ui.handlers.HandlerUtil)1