aboutsummaryrefslogtreecommitdiff
path: root/qolab/hardware/rf_generator/__init__.py
blob: 726dbb0fad913cdca3d4a7ceef779aa7ef3c8369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
from qolab.hardware.scpi import SCPIinstr
from qolab.hardware.basic import BasicInstrument

class RFGenerator(BasicInstrument):
    # Minimal set of methods to be implemented by a RFGenerator
    def __init__(self):
        BasicInstrument.__init__(self)
        self.config['Device type']='RFGenerator'
        self.config['Device model'] = 'Generic RF generator Without Hardware interface'
        self.config['FnamePrefix'] = 'rfgen'
        self.deviceProperties = ['FreqFixed', ]

class RFGeneratorSCPI(SCPIinstr, RFGenerator):
    """     
    Do not instantiate directly, use
    rm = pyvisa.ResourceManager()
    RFGeneratorSCPI(rm.open_resource('TCPIP::192.168.0.2::INSTR'))
    """
    def __init__(self, resource):
        SCPIinstr.__init__(self, resource)
        RFGenerator.__init__(self)
        self.config['DeviceId'] = str.strip(self.idn)

from .agilent_e8257d import AgilentE8257D