Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
ds
4uhv
Commits
6f2afad4
Commit
6f2afad4
authored
Aug 23, 2021
by
Claudio Scafuri
💬
Browse files
script to set SR helperApplication property
parent
6306b1d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
etc/fixhelperapp.py
0 → 100644
View file @
6f2afad4
#!/usr/bin/python3
# fix helper application on a server/class
from
tango
import
*
appname
=
'FourUHV-gui'
#change!
#get tango Databse
db
=
Database
()
# get list of devicese form server/instance
instances
=
[
'4uhv-srv/vac_a02'
,
'4uhv-srv/vac_a04'
,
'4uhv-srv/vac_a10'
,
'4uhv-srv/vac_a12'
]
#instances=['4uhv-srv/vac_a02']
for
instance
in
instances
:
devlistraw
=
[]
devlistraw
=
db
.
get_device_class_list
(
instance
).
value_string
idx
=
0
devlist
=
[]
while
idx
<
len
(
devlistraw
)
-
2
:
# even indexes contains name of device, odd indexs name of class. last couple is for dserver
devlist
.
append
(
devlistraw
[
idx
])
idx
+=
2
for
devname
in
devlist
:
if
devname
.
find
(
'sippwr'
)
>
0
:
dev
=
DeviceProxy
(
devname
)
pp
=
DbDatum
(
'helperApplication'
)
fullappname
=
appname
+
' '
+
devname
pp
.
append
(
fullappname
)
#dev.put_property(pp)
print
(
fullappname
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment