rename Param -> Parameter

Change-Id: Idcbc440b76219282a888172890673a4d74935dfd
Reviewed-on: https://forge.frm2.tum.de/review/18210
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
Enrico Faulhaber
2018-06-19 13:53:04 +02:00
parent 82caa33a5e
commit 22645b449b
11 changed files with 157 additions and 151 deletions

View File

@ -30,7 +30,7 @@ import math
from secop.lib.sequence import SequencerMixin, Step
from secop.datatypes import StringType, TupleOf, FloatRange, ArrayOf, StructOf
from secop.errors import DisabledError, ConfigError
from secop.modules import Param, Drivable
from secop.modules import Parameter, Drivable
class GarfieldMagnet(SequencerMixin, Drivable):
@ -47,30 +47,30 @@ class GarfieldMagnet(SequencerMixin, Drivable):
"""
parameters = {
'subdev_currentsource': Param('(bipolar) Powersupply', datatype=StringType(), readonly=True, export=False),
'subdev_enable': Param('Switch to set for on/off', datatype=StringType(), readonly=True, export=False),
'subdev_polswitch': Param('Switch to set for polarity', datatype=StringType(), readonly=True, export=False),
'subdev_symmetry': Param('Switch to read for symmetry', datatype=StringType(), readonly=True, export=False),
'userlimits': Param('User defined limits of device value',
'subdev_currentsource': Parameter('(bipolar) Powersupply', datatype=StringType(), readonly=True, export=False),
'subdev_enable': Parameter('Switch to set for on/off', datatype=StringType(), readonly=True, export=False),
'subdev_polswitch': Parameter('Switch to set for polarity', datatype=StringType(), readonly=True, export=False),
'subdev_symmetry': Parameter('Switch to read for symmetry', datatype=StringType(), readonly=True, export=False),
'userlimits': Parameter('User defined limits of device value',
unit='main', datatype=TupleOf(FloatRange(), FloatRange()),
default=(float('-Inf'), float('+Inf')), readonly=False, poll=10),
'abslimits': Param('Absolute limits of device value',
'abslimits': Parameter('Absolute limits of device value',
unit='main', datatype=TupleOf(FloatRange(), FloatRange()),
default=(-0.5, 0.5), poll=True,
),
'precision': Param('Precision of the device value (allowed deviation '
'precision': Parameter('Precision of the device value (allowed deviation '
'of stable values from target)',
unit='main', datatype=FloatRange(0.001), default=0.001, readonly=False,
),
'ramp': Param('Target rate of field change per minute', readonly=False,
'ramp': Parameter('Target rate of field change per minute', readonly=False,
unit='main/min', datatype=FloatRange(), default=1.0),
'calibration': Param('Coefficients for calibration '
'calibration': Parameter('Coefficients for calibration '
'function: [c0, c1, c2, c3, c4] calculates '
'B(I) = c0*I + c1*erf(c2*I) + c3*atan(c4*I)'
' in T', poll=1,
datatype=ArrayOf(FloatRange(), 5, 5),
default=(1.0, 0.0, 0.0, 0.0, 0.0)),
'calibrationtable': Param('Map of Coefficients for calibration per symmetry setting',
'calibrationtable': Parameter('Map of Coefficients for calibration per symmetry setting',
datatype=StructOf(symmetric=ArrayOf(FloatRange(), 5, 5),
short=ArrayOf(
FloatRange(), 5, 5),

View File

@ -41,7 +41,7 @@ from secop.datatypes import IntRange, FloatRange, StringType, TupleOf, \
ArrayOf, EnumType
from secop.errors import ConfigError, ProgrammingError, CommunicationError, \
HardwareError
from secop.modules import Param, Command, Override, Module, Readable, Drivable
from secop.modules import Parameter, Command, Override, Module, Readable, Drivable
#####
@ -159,14 +159,14 @@ class PyTangoDevice(Module):
"""
parameters = {
'comtries': Param('Maximum retries for communication',
'comtries': Parameter('Maximum retries for communication',
datatype=IntRange(1, 100), default=3, readonly=False,
group='communication'),
'comdelay': Param('Delay between retries', datatype=FloatRange(0),
'comdelay': Parameter('Delay between retries', datatype=FloatRange(0),
unit='s', default=0.1, readonly=False,
group='communication'),
'tangodevice': Param('Tango device name',
'tangodevice': Parameter('Tango device name',
datatype=StringType(), readonly=True,
# export=True, # for testing only
export=False,
@ -426,25 +426,25 @@ class AnalogOutput(PyTangoDevice, Drivable):
"""
parameters = {
'userlimits': Param('User defined limits of device value',
'userlimits': Parameter('User defined limits of device value',
datatype=TupleOf(FloatRange(), FloatRange()),
default=(float('-Inf'), float('+Inf')),
unit='main', readonly=False, poll=10,
),
'abslimits': Param('Absolute limits of device value',
'abslimits': Parameter('Absolute limits of device value',
datatype=TupleOf(FloatRange(), FloatRange()),
unit='main',
),
'precision': Param('Precision of the device value (allowed deviation '
'precision': Parameter('Precision of the device value (allowed deviation '
'of stable values from target)',
unit='main', datatype=FloatRange(1e-38),
readonly=False, group='stability',
),
'window': Param('Time window for checking stabilization if > 0',
'window': Parameter('Time window for checking stabilization if > 0',
unit='s', default=60.0, readonly=False,
datatype=FloatRange(0, 900), group='stability',
),
'timeout': Param('Timeout for waiting for a stable value (if > 0)',
'timeout': Parameter('Timeout for waiting for a stable value (if > 0)',
unit='s', default=60.0, readonly=False,
datatype=FloatRange(0, 900), group='stability',
),
@ -599,10 +599,10 @@ class Actuator(AnalogOutput):
# for secop: support the speed and ramp parameters
parameters = {
'speed': Param('The speed of changing the value',
'speed': Parameter('The speed of changing the value',
unit='main/s', readonly=False, datatype=FloatRange(0),
),
'ramp': Param('The speed of changing the value',
'ramp': Parameter('The speed of changing the value',
unit='main/min', readonly=False, datatype=FloatRange(0),
poll=30,
),
@ -639,13 +639,13 @@ class Motor(Actuator):
"""
parameters = {
'refpos': Param('Reference position',
'refpos': Parameter('Reference position',
datatype=FloatRange(), unit='main',
),
'accel': Param('Acceleration',
'accel': Parameter('Acceleration',
datatype=FloatRange(), readonly=False, unit='main/s^2',
),
'decel': Param('Deceleration',
'decel': Parameter('Deceleration',
datatype=FloatRange(), readonly=False, unit='main/s^2',
),
}
@ -679,24 +679,24 @@ class TemperatureController(Actuator):
"""
parameters = {
'p': Param('Proportional control Parameter', datatype=FloatRange(),
'p': Parameter('Proportional control Parameter', datatype=FloatRange(),
readonly=False, group='pid',
),
'i': Param('Integral control Parameter', datatype=FloatRange(),
'i': Parameter('Integral control Parameter', datatype=FloatRange(),
readonly=False, group='pid',
),
'd': Param('Derivative control Parameter', datatype=FloatRange(),
'd': Parameter('Derivative control Parameter', datatype=FloatRange(),
readonly=False, group='pid',
),
'pid': Param('pid control Parameters',
'pid': Parameter('pid control Parameters',
datatype=TupleOf(FloatRange(), FloatRange(), FloatRange()),
readonly=False, group='pid', poll=30,
),
'setpoint': Param('Current setpoint', datatype=FloatRange(), poll=1,
'setpoint': Parameter('Current setpoint', datatype=FloatRange(), poll=1,
),
'heateroutput': Param('Heater output', datatype=FloatRange(), poll=1,
'heateroutput': Parameter('Heater output', datatype=FloatRange(), poll=1,
),
'ramp': Param('Temperature ramp', unit='main/min',
'ramp': Parameter('Temperature ramp', unit='main/min',
datatype=FloatRange(), readonly=False, poll=30),
}
@ -754,11 +754,11 @@ class PowerSupply(Actuator):
"""
parameters = {
'ramp': Param('Current/voltage ramp', unit='main/min',
'ramp': Parameter('Current/voltage ramp', unit='main/min',
datatype=FloatRange(), readonly=False, poll=30,),
'voltage': Param('Actual voltage', unit='V',
'voltage': Parameter('Actual voltage', unit='V',
datatype=FloatRange(), poll=-5),
'current': Param('Actual current', unit='A',
'current': Parameter('Actual current', unit='A',
datatype=FloatRange(), poll=-5),
}
@ -792,7 +792,7 @@ class NamedDigitalInput(DigitalInput):
"""
parameters = {
'mapping': Param('A dictionary mapping state names to integers',
'mapping': Parameter('A dictionary mapping state names to integers',
datatype=StringType(), export=False), # XXX:!!!
}
@ -815,9 +815,9 @@ class PartialDigitalInput(NamedDigitalInput):
"""
parameters = {
'startbit': Param('Number of the first bit',
'startbit': Parameter('Number of the first bit',
datatype=IntRange(0), default=0),
'bitwidth': Param('Number of bits',
'bitwidth': Parameter('Number of bits',
datatype=IntRange(0), default=1),
}
@ -859,7 +859,7 @@ class NamedDigitalOutput(DigitalOutput):
"""
parameters = {
'mapping': Param('A dictionary mapping state names to integers',
'mapping': Parameter('A dictionary mapping state names to integers',
datatype=StringType(), export=False),
}
@ -885,9 +885,9 @@ class PartialDigitalOutput(NamedDigitalOutput):
"""
parameters = {
'startbit': Param('Number of the first bit',
'startbit': Parameter('Number of the first bit',
datatype=IntRange(0), default=0),
'bitwidth': Param('Number of bits',
'bitwidth': Parameter('Number of bits',
datatype=IntRange(0), default=1),
}
@ -916,13 +916,13 @@ class StringIO(PyTangoDevice, Module):
"""
parameters = {
'bustimeout': Param('Communication timeout',
'bustimeout': Parameter('Communication timeout',
datatype=FloatRange(), readonly=False,
unit='s', group='communication'),
'endofline': Param('End of line',
'endofline': Parameter('End of line',
datatype=StringType(), readonly=False,
group='communication'),
'startofline': Param('Start of line',
'startofline': Parameter('Start of line',
datatype=StringType(), readonly=False,
group='communication'),
}