Add value parser + use it for the gui

replaces eval which is used so far

Change-Id: Ie5ff8c82175786e233d52bc0faac4e72e3bc27e9
Reviewed-on: https://forge.frm2.tum.de/review/17271
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-02-08 08:53:30 +01:00
parent c146f477aa
commit 66503e8975
6 changed files with 297 additions and 20 deletions

View File

@ -150,7 +150,6 @@ class Value(object):
r = []
if self.t is not None:
r.append("timestamp=%r" % format_time(self.t))
print("Check 3")
if self.u is not None:
r.append('unit=%r' % self.u)
if self.e is not None:
@ -523,7 +522,8 @@ class Client(object):
datatype = self._getDescribingParameterData(module,
parameter)['datatype']
value = datatype.export_value(datatype.validate(value))
value = datatype.from_string(value)
value = datatype.export_value(value)
self.communicate('change', '%s:%s' % (module, parameter), value)
@property