Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
c08daf83
Commit
c08daf83
authored
3 years ago
by
Taya Snijder
Browse files
Options
Downloads
Patches
Plain Diff
removed startup.py
parent
60388948
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!18
Resolve #2021 "04 16 branched from master state bug fix"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devices/startup.py
+0
-37
0 additions, 37 deletions
devices/startup.py
with
0 additions
and
37 deletions
devices/startup.py
deleted
100644 → 0
+
0
−
37
View file @
60388948
#! /usr/bin/env python3
def
startup
(
device
:
str
,
force_restart
:
bool
):
'''
Start a LOFAR Tango device:
pcc = startup(device =
'
LTS/PCC/1
'
, force_restart = False)
'''
import
tango
proxy
=
tango
.
DeviceProxy
(
device
)
state
=
proxy
.
state
()
if
force_restart
is
True
:
print
(
"
Forcing device {} restart.
"
.
format
(
device
))
proxy
.
off
()
state
=
proxy
.
state
()
if
state
is
not
tango
.
_tango
.
DevState
.
OFF
:
print
(
"
Device {} cannot perform off although restart has been enforced, state = {}. Please investigate.
"
.
format
(
device
,
state
))
return
proxy
if
state
is
not
tango
.
_tango
.
DevState
.
OFF
:
print
(
"
Device {} is not in OFF state, cannot start it. state = {}
"
.
format
(
device
,
state
))
return
proxy
print
(
"
Device {} is in OFF, performing initialisation.
"
.
format
(
device
))
proxy
.
initialise
()
state
=
proxy
.
state
()
if
state
is
not
tango
.
_tango
.
DevState
.
STANDBY
:
print
(
"
Device {} cannot perform initialise, state = {}. Please investigate.
"
.
format
(
device
,
state
))
return
proxy
print
(
"
Device {} is in STANDBY, performing on.
"
.
format
(
device
))
proxy
.
on
()
state
=
proxy
.
state
()
if
state
is
not
tango
.
_tango
.
DevState
.
ON
:
print
(
"
Device {} cannot perform on, state = {}. Please investigate.
"
.
format
(
device
,
state
))
else
:
print
(
"
Device {} has successfully reached ON state.
"
.
format
(
device
))
return
proxy
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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