Ejemplo n.º 1
0
def test_load_all():
    dirver_list = [
        '33120A',
        'DPO4104B',
        'NetworkAnalyzer',
        'SR620',
        'AFG3102',
        'DSA875',
        'PSG',
        'TekAWG',
        'HP81110A',
        'RigolAWG',
        'TekAWG70000A',
        'wxAWG',
        'DG645',
        'IT6302',
        'RsFSL',
    ]
    for driver in dirver_list:
        Driver = loadDriver(driver)
        assert issubclass(Driver, BaseDriver)
Ejemplo n.º 2
0
async def start(args):
    dht = await getDHT()
    Driver = loadDriver(args.driver)
    info = dict(addr=args.address, model=args.model)
    if not args.no_visa:
        import visa
        try:
            rm = visa.ResourceManager()
        except:
            rm = visa.ResourceManager('@py')
        ins = rm.open_resource(args.address)
        info['ins'] = ins
    if args.store_config:
        buff = await dht.get(args.name + '_config')
        if buff is not None:
            info['config'] = pickle.loads(buff)
    dev = Driver(**info)
    if args.store_config:
        asyncio.ensure_future(save_config(dht, dev, args.name + '_config'))
    await mount(dev, args.name)
    await asyncio.sleep(1)
    print(title, dht.port, await dht.get(args.name))
Ejemplo n.º 3
0
def test_loadDriver():
    Driver = loadDriver('TekAWG')
    assert hasattr(Driver, 'create_waveform')
    Driver = loadDriver('PSG')
    assert Driver.support_models == ['E8257D', 'SMF100A', 'SMB100A', 'SGS100A']