Search in sources :

Example 1 with RowCommandQueueInfo

use of org.yamcs.studio.commanding.queue.QueuesTableModel.RowCommandQueueInfo in project yamcs-studio by yamcs.

the class CommandQueuesTableViewer method updateCommandQueueState.

private void updateCommandQueueState(CommandQueue commandQueue, QueueState newState) {
    /* only set new value if it differs from old one */
    if (!commandQueue.getState().equals(newState)) {
        commandQueue.setState(newState);
        CommandQueueInfo q = null;
        for (RowCommandQueueInfo rcqi : commandQueueView.currentQueuesModel.queues) {
            if (rcqi.cq == commandQueue)
                q = rcqi.commandQueueInfo;
        }
        // CommandQueueInfo q = queues.get(row);
        if (newState == QueueState.BLOCKED) {
            blockQueue(q);
        } else if (newState == QueueState.DISABLED) {
            disableQueue(q);
        } else if (newState == QueueState.ENABLED) {
            enableQueue(q);
        }
    }
}
Also used : CommandQueueInfo(org.yamcs.protobuf.Commanding.CommandQueueInfo) RowCommandQueueInfo(org.yamcs.studio.commanding.queue.QueuesTableModel.RowCommandQueueInfo) RowCommandQueueInfo(org.yamcs.studio.commanding.queue.QueuesTableModel.RowCommandQueueInfo)

Aggregations

CommandQueueInfo (org.yamcs.protobuf.Commanding.CommandQueueInfo)1 RowCommandQueueInfo (org.yamcs.studio.commanding.queue.QueuesTableModel.RowCommandQueueInfo)1