Skip to content
This repository has been archived by the owner on Apr 26, 2021. It is now read-only.

Commit

Permalink
Extracting more attribute properties. (#8)
Browse files Browse the repository at this point in the history
* Extracting more attribute properties.
tango-simlib needs more attribute information to create SPECTRUM attributes and also for the attributes of type DevEnum we need to get the enum_labels list in order to configure the device with the valid values.

* Converting the vector into a list

The vector causes the utility to include a lot of backslash characters in the exported file.
  • Loading branch information
kmadisa authored and sergirubio committed May 23, 2018
1 parent e34760c commit 5029862
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions fandango/tango/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,28 @@ def cleandict(d):
if ac.description!='No description' else '')

attr.data_format = str(ac.data_format)
attr.max_dim_x = ac.max_dim_x
attr.max_dim_y = ac.max_dim_y
attr.data_type = str(PyTango.CmdArgType.values[ac.data_type])
attr.enum_labels = list(ac.enum_labels)
attr.writable = str(ac.writable)
attr.label,attr.min_alarm,attr.max_alarm = \
ac.label,ac.min_alarm,ac.max_alarm
attr.unit,attr.format = ac.unit,ac.format
attr.standard_unit,attr.display_unit = \
ac.standard_unit,ac.display_unit
attr.label = ac.label
attr.min_alarm = ac.min_alarm
attr.max_alarm = ac.max_alarm
attr.unit = ac.unit
attr.format = ac.format
attr.standard_unit = ac.standard_unit
attr.display_unit = ac.display_unit
attr.min_value = ac.min_value
attr.max_value = ac.max_value

attr.events.ch_event = fandango.obj2dict(ac.events.ch_event)
attr.events.arch_event = fandango.obj2dict(ac.events.arch_event)
attr.events.per_event = fandango.obj2dict(ac.events.per_event)
attr.alarms = fandango.obj2dict(ac.alarms)
attr.quality = str(v.quality)
attr.time = ctime2time(v.time)

if attr.data_format!='SCALAR':
attr.value = list(v.value
if v.value is not None and v.dim_x else [])
Expand Down

0 comments on commit 5029862

Please sign in to comment.