Provide Properties with a description
useful für gui+auto generated docu Change-Id: I0a2f7dc4b3c745145dd4b03956d15d33731cf980 Reviewed-on: https://forge.frm2.tum.de/review/20949 Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de> Reviewed-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de> Tested-by: Enrico Faulhaber <enrico.faulhaber@frm2.tum.de>
This commit is contained in:
@ -33,12 +33,12 @@ from secop.modules import Drivable, Override, Parameter
|
||||
# test custom property (value.test can be changed in config file)
|
||||
from secop.properties import Property
|
||||
|
||||
Parameter.properties['test'] = Property(StringType(), default='', export=True)
|
||||
Parameter.properties['test'] = Property('A Property for testing purposes', StringType(), default='', export=True)
|
||||
|
||||
|
||||
class CryoBase(Drivable):
|
||||
properties = {
|
||||
'is_cryo': Property(BoolType(), default=True, export=True),
|
||||
'is_cryo': Property('private Flag if this is a cryostat', BoolType(), default=True, export=True),
|
||||
}
|
||||
|
||||
|
||||
|
@ -35,7 +35,7 @@ from secop.properties import Property
|
||||
|
||||
class Parameter(SECoP_Parameter):
|
||||
properties = {
|
||||
'test' : Property(StringType(), default='', mandatory=False, extname='test'),
|
||||
'test' : Property('A property for testing purposes', StringType(), default='', mandatory=False, extname='test'),
|
||||
}
|
||||
|
||||
PERSIST = 101
|
||||
@ -62,7 +62,8 @@ class Switch(Drivable):
|
||||
}
|
||||
|
||||
properties = {
|
||||
'description' : Property(StringType(), default='no description', mandatory=False, extname='description'),
|
||||
'description' : Property('The description of the Module', StringType(),
|
||||
default='no description', mandatory=False, extname='description'),
|
||||
}
|
||||
|
||||
def read_value(self):
|
||||
|
@ -101,7 +101,7 @@ class Temp(Drivable):
|
||||
class Lower(Communicator):
|
||||
"""Communicator returning a lowercase version of the request"""
|
||||
command = {
|
||||
'communicate': Command('lowercase a string', StringType(), StringType(), export='communicate'),
|
||||
'communicate': Command('lowercase a string', argument=StringType(), result=StringType(), export='communicate'),
|
||||
}
|
||||
def do_communicate(self, request):
|
||||
return unicode(request).lower()
|
||||
|
Reference in New Issue
Block a user