add ioClass to many module classes
+ add converted mb11_cfg.py Change-Id: Ic985fc16b5ce39caacbf1f3abd87b13b1e7c2da7
This commit is contained in:
@@ -45,6 +45,7 @@ class SR830_IO(StringIO):
|
||||
|
||||
|
||||
class StanfRes(HasIO, Readable):
|
||||
ioClass = SR830_IO
|
||||
def set_par(self, cmd, *args):
|
||||
"""
|
||||
Set parameter.
|
||||
|
||||
@@ -57,6 +57,7 @@ class IO(StringIO):
|
||||
|
||||
|
||||
class Power(HasIO, Readable):
|
||||
ioClass = IO
|
||||
value = Parameter(datatype=FloatRange(0,300,unit='W'))
|
||||
|
||||
def read_value(self):
|
||||
@@ -67,6 +68,7 @@ class Power(HasIO, Readable):
|
||||
|
||||
|
||||
class Output(HasIO, HasControlledBy, Writable):
|
||||
ioClass = IO
|
||||
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
||||
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||
p_value = Parameter('?', datatype=FloatRange(0,100,unit='%'), default=0)
|
||||
|
||||
@@ -68,6 +68,7 @@ class BridgeIO(StringIO):
|
||||
|
||||
|
||||
class Base(HasIO):
|
||||
ioClass = BridgeIO
|
||||
port = Property('modules port', IntRange(0, 15))
|
||||
|
||||
def communicate(self, command):
|
||||
|
||||
@@ -50,6 +50,7 @@ SOURCECMDS = {
|
||||
|
||||
|
||||
class SourceMeter(HasIO, Module):
|
||||
ioClass = K2601bIO
|
||||
export = False # export for tests only
|
||||
mode = Parameter('measurement mode', EnumType(off=0, current=1, voltage=2),
|
||||
readonly=False, export=False)
|
||||
@@ -107,6 +108,7 @@ class Resistivity(HasIO, Readable):
|
||||
|
||||
|
||||
class Current(HasIO, Writable):
|
||||
ioClass = K2601bIO
|
||||
sourcemeter = Attached()
|
||||
|
||||
value = Parameter('measured current', FloatRange(unit='A'))
|
||||
@@ -153,6 +155,7 @@ class Current(HasIO, Writable):
|
||||
|
||||
|
||||
class Voltage(HasIO, Writable):
|
||||
ioClass = K2601bIO
|
||||
sourcemeter = Attached()
|
||||
|
||||
value = Parameter('measured voltage', FloatRange(unit='V'))
|
||||
|
||||
@@ -64,6 +64,8 @@ def parse_result(reply):
|
||||
|
||||
|
||||
class LakeShoreIO(HasIO):
|
||||
ioClass = StringIO
|
||||
|
||||
def set_param(self, cmd, *args):
|
||||
args = [f'{a:g}' for a in args]
|
||||
if ' ' in cmd.strip():
|
||||
|
||||
@@ -67,6 +67,7 @@ class IO(StringIO):
|
||||
|
||||
|
||||
class MercuryChannel(HasIO):
|
||||
ioClass = IO
|
||||
slot = Property('comma separated slot id(s), e.g. DB6.T1', StringType())
|
||||
kind = '' #: used slot kind(s)
|
||||
slots = () #: dict[<kind>] of <slot>
|
||||
|
||||
@@ -114,6 +114,7 @@ class Main(Communicator):
|
||||
|
||||
class PpmsBase(HasIO, Readable):
|
||||
"""common base for all ppms modules"""
|
||||
ioClass = Main
|
||||
value = Parameter(needscfg=False)
|
||||
status = Parameter(datatype=StatusType(Readable, 'DISABLED'), needscfg=False)
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@ class PulseIO(StringIO):
|
||||
|
||||
|
||||
class Base(HasIO):
|
||||
ioClass = PulseIO
|
||||
|
||||
def set_source(self):
|
||||
"""
|
||||
|
||||
@@ -30,6 +30,7 @@ class IO(StringIO):
|
||||
|
||||
|
||||
class Power(HasIO, Readable):
|
||||
ioClass = IO
|
||||
value = Parameter(datatype=FloatRange(0,3300,unit='W'))
|
||||
voltage = Parameter('voltage', FloatRange(0,8, unit='V'))
|
||||
current = Parameter('current', FloatRange(0,400, unit='A'))
|
||||
@@ -41,6 +42,7 @@ class Power(HasIO, Readable):
|
||||
|
||||
|
||||
class Output(HasIO, Writable):
|
||||
ioClass = IO
|
||||
value = Parameter(datatype=FloatRange(0,100,unit='%'), default=0)
|
||||
target = Parameter(datatype=FloatRange(0,100,unit='%'))
|
||||
mode = Parameter('regulation mode', EnumType(voltage=1, current=2, both=3),
|
||||
|
||||
Reference in New Issue
Block a user