Search in sources :

Example 1 with NamedObjectList

use of org.yamcs.protobuf.Yamcs.NamedObjectList 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 NamedObjectList

use of org.yamcs.protobuf.Yamcs.NamedObjectList in project yamcs-studio by yamcs.

the class PVCatalogue method unregister.

public synchronized void unregister(YamcsPVReader pvReader) {
    pvReadersById.remove(pvReader.getId());
    NamedObjectList idList = pvReader.toNamedObjectList();
    ParameterCatalogue.getInstance().unsubscribeParameters(idList);
}
Also used : NamedObjectList(org.yamcs.protobuf.Yamcs.NamedObjectList)

Aggregations

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