allow to set exported properties in code

Actually, only property values set in the configuration can
be exported, as values equal to the default are not exported.
For this, the mechanism of overwriting properties by class attributes
has to be modified.

Change-Id: I4388d1fbb36393e863556fbbc8df800dd4800c87
Reviewed-on: https://forge.frm2.tum.de/review/c/sine2020/secop/playground/+/22161
Tested-by: JenkinsCodeReview <bjoern_pedersen@frm2.tum.de>
Reviewed-by: Markus Zolliker <markus.zolliker@psi.ch>
This commit is contained in:
2020-01-10 10:56:56 +01:00
parent 8466a159fe
commit 2d98fe8812
3 changed files with 17 additions and 25 deletions

View File

@ -127,8 +127,6 @@ class Main(Communicator):
class PpmsMixin(HasIodev, Module):
properties = {
'iodev': Attached(),
'general_stop': Property('respect general stop', datatype=BoolType(),
export=True, default=True)
}
pollerClass = Poller
@ -439,6 +437,11 @@ class Temp(PpmsMixin, Drivable):
14: [Status.ERROR, 'can not complete'],
15: [Status.ERROR, 'general failure'],
}
properties = {
'iodev': Attached(),
'general_stop': Property('respect general stop', datatype=BoolType(),
export=True, default=True)
}
channel = 'temp'
_stopped = False