Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
rpc2tango-bridge
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs
ds
rpc2tango-bridge
Commits
6c99c80e
Commit
6c99c80e
authored
3 years ago
by
Claudio Scafuri
Browse files
Options
Downloads
Patches
Plain Diff
python script to fix format and events for sip
parent
442d4b9d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
etc/fixevents.py
+38
-0
38 additions, 0 deletions
etc/fixevents.py
with
38 additions
and
0 deletions
etc/fixevents.py
0 → 100644
+
38
−
0
View file @
6c99c80e
#fix format of pressure readings
#.C.S. 2019
#
from
tango
import
*
sip120
=
DeviceProxy
(
'
rpcbridge/rpc2tangobridge/sip120
'
)
sip400
=
DeviceProxy
(
'
rpcbridge/rpc2tangobridge/sip400
'
)
sip120attrlist
=
sip120
.
get_attribute_list
()
for
att
in
sip120attrlist
:
attconf
=
sip120
.
get_attribute_config
(
att
)
attconf
.
format
=
'
%6.2e
'
attconf
.
events
.
arch_event
.
archive_rel_change
=
'
20
'
attconf
.
events
.
arch_event
.
archive_period
=
'
360000
'
attconf
.
events
.
ch_event
.
rel_change
=
'
10
'
try
:
sip120
.
set_attribute_config
(
attconf
)
sip120
.
poll_attribute
(
att
,
3000
)
except
:
print
(
'
fail for %s
'
,
att
)
pass
sip400attrlist
=
sip400
.
get_attribute_list
()
for
att
in
sip400attrlist
:
attconf
=
sip400
.
get_attribute_config
(
att
)
attconf
.
format
=
'
%6.2e
'
attconf
.
events
.
arch_event
.
archive_rel_change
=
'
20
'
attconf
.
events
.
arch_event
.
archive_period
=
'
360000
'
attconf
.
events
.
ch_event
.
rel_change
=
'
10
'
try
:
sip400
.
set_attribute_config
(
attconf
)
sip400
.
poll_attribute
(
att
,
3000
)
except
:
print
(
'
fail for %s
'
,
att
)
pass
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment