示例#1
0
def test_data_plugin_add(qapp):
    # Create test PyDMPlugin with mock protocol
    test_plug = PyDMPlugin
    test_plug.protocol = 'tst'
    # Check that adding this after import will be reflected in PyDMApp
    add_plugin(test_plug)
    assert isinstance(plugin_modules['tst'], test_plug)
    assert isinstance(qapp.plugins['tst'], test_plug)
示例#2
0
__all__ = ['SignalPlugin', 'SignalConnection', 'register_signal',
           'HappiPlugin', 'HappiConnection', 'HappiChannel',
           'register_client']
import logging

from pydm.data_plugins import add_plugin

from .core import SignalPlugin, SignalConnection, register_signal


logger = logging.getLogger(__name__)
add_plugin(SignalPlugin)

try:
    from .happi import (HappiPlugin, HappiConnection, HappiChannel,
                        register_client)
    add_plugin(HappiPlugin)
except ImportError:
    logger.warning("Unable to import HappiPlugin")
示例#3
0
def test_plugin():
    # Create test PyDMPlugin with mock protocol
    test_plug = PyDMPlugin
    test_plug.protocol = 'tst'
    add_plugin(test_plug)
    return test_plug
示例#4
0
__all__ = ['SignalPlugin', 'SignalConnection', 'register_signal']

from pydm.data_plugins import add_plugin

from .core import SignalPlugin, SignalConnection, register_signal

# Register SignalPlugin with PyDMApplication
add_plugin(SignalPlugin)