Search in sources :

Example 1 with PVConnectionInfo

use of org.yamcs.studio.css.core.pvmanager.PVConnectionInfo in project yamcs-studio by yamcs.

the class PVCatalogue method register.

public synchronized void register(YamcsPVReader pvReader) {
    pvReadersById.put(pvReader.getId(), pvReader);
    // Report current connection state
    boolean connected = YamcsPlugin.getYamcsClient().isConnected();
    ParameterInfo p = ParameterCatalogue.getInstance().getParameterInfo(pvReader.getId());
    pvReader.processConnectionInfo(new PVConnectionInfo(connected, p));
    // Register (pending) websocket request
    NamedObjectList idList = pvReader.toNamedObjectList();
    ParameterCatalogue.getInstance().subscribeParameters(idList);
}
Also used : PVConnectionInfo(org.yamcs.studio.css.core.pvmanager.PVConnectionInfo) NamedObjectList(org.yamcs.protobuf.Yamcs.NamedObjectList) ParameterInfo(org.yamcs.protobuf.Mdb.ParameterInfo)

Example 2 with PVConnectionInfo

use of org.yamcs.studio.css.core.pvmanager.PVConnectionInfo in project yamcs-studio by yamcs.

the class PVCatalogue method reportConnectionState.

private void reportConnectionState() {
    boolean connected = YamcsPlugin.getYamcsClient().isConnected();
    pvReadersById.forEach((id, pvReader) -> {
        ParameterInfo p = ParameterCatalogue.getInstance().getParameterInfo(id);
        pvReader.processConnectionInfo(new PVConnectionInfo(connected, p));
    });
}
Also used : PVConnectionInfo(org.yamcs.studio.css.core.pvmanager.PVConnectionInfo) ParameterInfo(org.yamcs.protobuf.Mdb.ParameterInfo)

Example 3 with PVConnectionInfo

use of org.yamcs.studio.css.core.pvmanager.PVConnectionInfo in project yamcs-studio by yamcs.

the class PVCatalogue method mdbUpdated.

@Override
public void mdbUpdated() {
    pvReadersById.forEach((id, pvReader) -> {
        ParameterInfo parameter = ParameterCatalogue.getInstance().getParameterInfo(id);
        if (log.isLoggable(Level.FINER)) {
            log.finer(String.format("Signaling %s --> %s", id, parameter));
        }
        pvReader.processConnectionInfo(new PVConnectionInfo(true, parameter));
    });
}
Also used : PVConnectionInfo(org.yamcs.studio.css.core.pvmanager.PVConnectionInfo) ParameterInfo(org.yamcs.protobuf.Mdb.ParameterInfo)

Aggregations

ParameterInfo (org.yamcs.protobuf.Mdb.ParameterInfo)3 PVConnectionInfo (org.yamcs.studio.css.core.pvmanager.PVConnectionInfo)3 NamedObjectList (org.yamcs.protobuf.Yamcs.NamedObjectList)1