Ejemplo n.º 1
0
def main():
    from tango import GreenMode
    from tango.server import run
    import logging
    logging.basicConfig(level=logging.DEBUG,
                        format='%(threadName)s %(asctime)s %(levelname)s %(name)s: %(message)s')

    run([FuelCell], green_mode=GreenMode.Gevent)
Ejemplo n.º 2
0
def main(args=None, **kwargs):
    run([TestDevice],
        verbose=True,
        msg_stream=sys.stdout,
        post_init_callback=init_callback,
        raises=False,
        args=args,
        **kwargs)
Ejemplo n.º 3
0
def main():

    from tango import GreenMode
    from tango.server import run

    run([
        PipeServer,
    ], green_mode=GreenMode.Gevent)
Ejemplo n.º 4
0
def main():
    import sys
    import logging
    from tango.server import run
    args = ['Vacuubrand'] + sys.argv[1:]
    fmt = '%(asctime)s %(threadName)s %(levelname)s %(name)s %(message)s'
    logging.basicConfig(level=logging.INFO, format=fmt)
    run((DCP3000, ), args=args)
Ejemplo n.º 5
0
def main():
    import sys
    import logging
    from tango import GreenMode
    from tango.server import run
    args = ['PFCU'] + sys.argv[1:]
    fmt = '%(asctime)s %(threadName)s %(levelname)s %(name)s %(message)s'
    logging.basicConfig(level=logging.INFO, format=fmt)
    run((PFCU,), args=args, green_mode=GreenMode.Asyncio)
Ejemplo n.º 6
0
def main():
    from tango import GreenMode
    from tango.server import run

    import logging
    fmt = '%(levelname)s %(asctime)-15s %(name)s: %(message)s'
    logging.basicConfig(format=fmt, level=logging.DEBUG)

    run([Multimeter], green_mode=GreenMode.Gevent)
Ejemplo n.º 7
0
def main(args=None, **kwargs):
    """."""
    devices = [TestDevice1, TestDevice2]
    run(devices,
        verbose=True,
        post_init_callback=init_callback,
        msg_stream=sys.stdout,
        args=args,
        **kwargs)
Ejemplo n.º 8
0
def main():
    from tango import GreenMode
    from tango.server import run

    import logging
    fmt='%(levelname)s %(asctime)-15s %(name)s: %(message)s'
    logging.basicConfig(format=fmt, level=logging.DEBUG)

    run([Multimeter], green_mode=GreenMode.Gevent)
Ejemplo n.º 9
0
def main():
    from tango import GreenMode
    from tango.server import run
    import logging
    logging.basicConfig(
        level=logging.DEBUG,
        format='%(threadName)s %(asctime)s %(levelname)s %(name)s: %(message)s'
    )

    run([FuelCell], green_mode=GreenMode.Gevent)
Ejemplo n.º 10
0
def main():
    import sys
    import logging
    from tango import GreenMode
    from tango.server import run

    args = ["Vacuubrand"] + sys.argv[1:]
    fmt = "%(asctime)s %(threadName)s %(levelname)s %(name)s %(message)s"
    logging.basicConfig(level=logging.INFO, format=fmt)
    run((DCP3000,), args=args, green_mode=GreenMode.Asyncio)
Ejemplo n.º 11
0
def main():
    if len(sys.argv) > 0:
        device_name = sys.argv[1]
        if device_name.isdigit():
            device_name = f"mid_d{device_name.zfill(4)}/elt/master"
        else:
            device_name = f"{device_name}/elt/master"
    else:
        device_name = "mid_dish_unset/elt/master"

    DishMaster = get_tango_server_class(device_name)
    run((DishMaster, ))
Ejemplo n.º 12
0
def main(args=None, **kwargs):
    """Run server."""
    # Initialise logging
    log_level = tango.LogLevel.LOG_INFO
    if len(sys.argv) > 2 and '-v' in sys.argv[2]:
        log_level = tango.LogLevel.LOG_DEBUG
    tango_logging.init(device_name='SDPSubarray', level=log_level)

    # Set default values for feature toggles.
    SDPSubarray.set_feature_toggle_default(FeatureToggle.CONFIG_DB, False)
    SDPSubarray.set_feature_toggle_default(FeatureToggle.CBF_OUTPUT_LINK,
                                           False)
    SDPSubarray.set_feature_toggle_default(FeatureToggle.AUTO_REGISTER, True)

    # If the feature is enabled, attempt to auto-register the device
    # with the tango db.
    if SDPSubarray.is_feature_active(FeatureToggle.AUTO_REGISTER):
        if len(sys.argv) > 1:
            # delete_device_server('*')
            devices = [
                'mid_sdp/elt/subarray_{:d}'.format(i + 1) for i in range(1)
            ]
            register(sys.argv[1], *devices)

    return run((SDPSubarray, ), args=args, **kwargs)
Ejemplo n.º 13
0
def main(args=None, **kwargs):
    return run({
        "SHG": SHG,
        "RingSHG": RingSHG,
        "LandauSHG": LandauSHG
    },
               args=args,
               **kwargs)
Ejemplo n.º 14
0
def main(args=None, **kwargs):
    """Run the Tango SDP Master device server."""
    LOG.info('Starting %s', __service_id__)
    return run([SDPMasterDevice],
               verbose=True,
               msg_stream=sys.stdout,
               args=args,
               **kwargs)
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SubarrayNode.main) ENABLED START #
    """
    Runs the SubarrayNode.
    :param args: Arguments internal to TANGO
    :param kwargs: Arguments internal to TANGO
    :return: SubarrayNode TANGO object.
    """
    return run((SubarrayNode, ), args=args, **kwargs)
Ejemplo n.º 16
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SKAObsDevice.main) ENABLED START #
    """
    Main function of the SKAObsDevice module.

    :param args: None
    :param kwargs:
    """
    return run((SKAObsDevice,), args=args, **kwargs)
Ejemplo n.º 17
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SKAAlarmHandler.main) ENABLED START #
    """
    Main function of the SKAAlarmHandler module.
    :param args:
    :param kwargs:
    :return:
    """
    return run((SKAAlarmHandler, ), args=args, **kwargs)
def main(args=None, **kwargs):
    return run(
        {
            'ADAM6217': ADAM6217,
            'ADAM6224': ADAM6224,
            'ADAM6250': ADAM6250
        },
        args=args,
        **kwargs)
Ejemplo n.º 19
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(DishMaster.main) ENABLED START #
    """
    Runs the DishMaster.
    :param args: Arguments internal to TANGO
    :param kwargs: Arguments internal to TANGO
    :return: DishMaster TANGO object.
    """
    return run((DishMaster, ), args=args, **kwargs)
Ejemplo n.º 20
0
def main(argv=None):
    start_time = time.time()

    if argv is None:
        argv = sys.argv
    argv = list(argv)

    try:
        argv.remove('-n')
        new_server = True
    except ValueError:
        new_server = False

    try:
        # initialize logging as soon as possible
        initialize_logging(argv)

        # if querying list of instances, just return
        if len(argv) < 2 or argv[1] == '-?':
            util = tango.Util(argv)
            # no need since tango exits the process when it finds '-?'
            # (tango is not actually a library :-)
            return

        axes, axes_classes = __recreate(new_server=new_server)
        del axes

        util = tango.Util(argv)
        db = util.get_database()

    except tango.DevFailed:
        print traceback.format_exc()
        elog.exception(
            "Error in server initialization")
        sys.exit(0)

    klasses = [BlissAxisManager] + axes_classes

    dt = time.time() - start_time
    elog.info('server configured (took %6.3fs)' % dt)

    from tango import GreenMode
    from tango.server import run
    run(klasses, green_mode=GreenMode.Gevent)
Ejemplo n.º 21
0
def main(argv=None):
    start_time = time.time()

    if argv is None:
        argv = sys.argv
    argv = list(argv)

    try:
        argv.remove('-n')
        new_server = True
    except ValueError:
        new_server = False

    try:
        # initialize logging as soon as possible
        initialize_logging(argv)

        # if querying list of instances, just return
        if len(argv) < 2 or argv[1] == '-?':
            util = tango.Util(argv)
            # no need since tango exits the process when it finds '-?'
            # (tango is not actually a library :-)
            return

        axes, axes_classes = __recreate(new_server=new_server)
        del axes

        util = tango.Util(argv)
        db = util.get_database()

    except tango.DevFailed:
        print traceback.format_exc()
        elog.exception("Error in server initialization")
        sys.exit(0)

    klasses = [BlissAxisManager] + axes_classes

    dt = time.time() - start_time
    elog.info('server configured (took %6.3fs)' % dt)

    from tango import GreenMode
    from tango.server import run
    run(klasses, green_mode=GreenMode.Gevent)
Ejemplo n.º 22
0
def main(argv=None):
    from tango import GreenMode
    from tango.server import run

    if argv is None:
        argv = sys.argv
    argv = list(argv)

    try:
        argv.remove('-n')
        new_server = True
    except ValueError:
        new_server = False

    initialize_logging(argv)
    inputs, tango_input_classes   = recreate(new_server=new_server,typ='inputs')
    outputs, tango_output_classes = recreate(new_server=new_server,typ='outputs')
    loops, tango_loop_classes     = recreate(new_server=new_server,typ='ctrl_loops')
    tango_classes = tango_input_classes + tango_output_classes + tango_loop_classes
    run(tango_classes, args=argv, green_mode=GreenMode.Gevent)
Ejemplo n.º 23
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(MccsMasterLeafNode.main) ENABLED START #
    """
    Runs the MccsMasterLeafNode.

    :param args: Arguments internal to TANGO

    :param kwargs: Arguments internal to TANGO

    :return: An object of CompletedProcess class returned by the subprocess.
    """
    return run((MccsMasterLeafNode, ), args=args, **kwargs)
Ejemplo n.º 24
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SKATelState.main) ENABLED START #
    """
    Main function of the module

    :param args: None by default.

    :param kwargs:

    :return:
    """
    return run((SKATelState,), args=args, **kwargs)
Ejemplo n.º 25
0
def main(argv=None):
    from tango import GreenMode
    from tango.server import run

    if argv is None:
        argv = sys.argv
    argv = list(argv)

    try:
        argv.remove('-n')
        new_server = True
    except ValueError:
        new_server = False

    initialize_logging(argv)
    inputs, tango_input_classes = recreate(new_server=new_server, typ='inputs')
    outputs, tango_output_classes = recreate(new_server=new_server,
                                             typ='outputs')
    loops, tango_loop_classes = recreate(new_server=new_server,
                                         typ='ctrl_loops')
    tango_classes = tango_input_classes + tango_output_classes + tango_loop_classes
    run(tango_classes, args=argv, green_mode=GreenMode.Gevent)
Ejemplo n.º 26
0
def main(args=None, **kwargs):
    from tango import GreenMode
    from tango.server import run
    kwargs['green_mode'] = GreenMode.Gevent

    args = list(sys.argv if args is None else args)
    args[0] = 'Bliss'

    if len(args) == 1:
        args.append('-?')

    if '-?' in args:
        klasses = Bliss,
    else:
        klasses = __initialize(args=args)

    return run(klasses, args=args, **kwargs)
Ejemplo n.º 27
0
def main(args=None, **kwargs):
    """Run server."""
    # Initialise logging
    log_level = tango.LogLevel.LOG_INFO
    if len(sys.argv) > 2 and '-v' in sys.argv[2]:
        log_level = tango.LogLevel.LOG_DEBUG
    tango_logging.init(device_name='SDPMaster', level=log_level)

    # Set default values for feature toggles.
    SDPMaster.set_feature_toggle_default(FeatureToggle.AUTO_REGISTER, True)

    # If the feature is enabled, attempt to auto-register the device
    # with the tango db.
    if SDPMaster.is_feature_active(FeatureToggle.AUTO_REGISTER):
        if len(sys.argv) > 1:
            # delete_device_server("*")
            register(sys.argv[1], 'mid_sdp/elt/master')

    return run((SDPMaster,), args=args, **kwargs)
Ejemplo n.º 28
0
def main(args=None, **kwargs):
    """Run server."""
    # PROTECTED REGION ID(SDPMaster.main) ENABLED START #
    # Set default values for feature toggles.
    SDPMaster.set_feature_toggle_default(FeatureToggle.AUTO_REGISTER, True)

    log_level = 'INFO'
    if len(sys.argv) > 2 and '-v' in sys.argv[2]:
        log_level = 'DEBUG'
    init_logger(log_level)

    # If the feature is enabled, attempt to auto-register the device
    # with the tango db.
    if SDPMaster.is_feature_active(FeatureToggle.AUTO_REGISTER):
        if len(sys.argv) > 1:
            # delete_device_server("*")
            register(sys.argv[1], 'mid_sdp/elt/master')

    return run((SDPMaster, ), args=args, **kwargs)
Ejemplo n.º 29
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(VccBand4.main) ENABLED START #
    return run((VccBand4, ), args=args, **kwargs)
Ejemplo n.º 30
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(FspVlbi.main) ENABLED START #
    return run((FspVlbi, ), args=args, **kwargs)
Ejemplo n.º 31
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SKACapability.main) ENABLED START #
    """Main function of the SKACapability module."""
    return run((SKACapability, ), args=args, **kwargs)
def main(args=None, **kwargs):
    """Start the subarray device server."""
    LOG.info('Starting SDP Subarray devices.')
    return run([SubarrayDevice], verbose=True, msg_stream=sys.stdout,
               args=args, **kwargs)
Ejemplo n.º 33
0
def main(args=None, **kwargs):
    # PROTECTED REGION ID(SKAMaster.main) ENABLED START #
    return run((SKAMaster, ), args=args, **kwargs)
Ejemplo n.º 34
0
def main(args=None, **kwargs):
    return run((Tile,), args=args, **kwargs)
def main(args=None, **kwargs):
    """Run the Tango SDP Master device server."""
    LOG.info('Starting %s', __service_id__)
    return run([SDPMasterDevice], verbose=True, msg_stream=sys.stdout,
               args=args, **kwargs)
def main(args=None, **kwargs):
    """Start the Processing Block device server."""
    LOG.info('Starting SDP PB devices.')
    return run([ProcessingBlockDevice], verbose=True, msg_stream=sys.stdout,
               args=args, **kwargs)
Ejemplo n.º 37
0
def main():
    from tango import GreenMode
    from tango.server import run
    run([NanoBpm,], green_mode=GreenMode.Gevent)
Ejemplo n.º 38
0
def main():
    from tango import GreenMode
    from tango.server import run
    run([LinkamDsc,], green_mode=GreenMode.Gevent)
def main(args=None, **kwargs):
    return run((LogTestDownStream, ), args=args, **kwargs)
Ejemplo n.º 40
0
def main(args=None,**kwargs) :
    from tango.server import run
    kwargs['green_mode'] = kwargs.get('green_mode', GreenMode.Gevent)
    return run((Multiplexer,),args=args,**kwargs)