Пример #1
0
def worker_multiplexer(queue_multiplexer, queue_notifier):
    global shutdown

    def debug(*args, **kwargs):
        print(args, kwargs)

    multiplexer = Multiplexer(queue_notifier)
    while not shutdown:
        pycmd = queue_multiplexer.get()
        getattr(multiplexer, pycmd["command"], debug)(*pycmd["args"])
Пример #2
0
    logging.basicConfig(filename=os.path.join(LOG_FOLDER,
                                              DATE_FILENAME + '.log'),
                        level=logging.INFO)
    logging.info('start mppmon')

    #store_iv_curve(iv_curve_sample.curve, z.number_to_words(5), datetime.datetime.now())

    try:
        t = bkload.IvTracer(private.COMPORT)
    except Exception, e:
        print(e)
        logging.error(e)
        raise SystemExit(0)

    try:
        mp = Multiplexer()
        mp.ChannelsOff()
    except Exception, e:
        print(e)
        logging.error(e)
        raise SystemExit(0)

    for k in cfg.sweep_settings.keys():
        p = cfg.sweep_settings[k]
        if p['enabled']:
            mp.SelectChannel(p['channel'])
            d = t.measure_iv(p['points'], p['sweeptime'] / p['points'])
            store_iv_curve(d, z.number_to_words(p['channel'] + 1),
                           datetime.datetime.now())