Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tempus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
karaboDevices
tempus
Commits
84f68191
Commit
84f68191
authored
3 months ago
by
Andrea Parenti
Committed by
Jonathan Correa Magdalena
3 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Refactor / 8
parent
840b88e7
No related branches found
No related tags found
2 merge requests
!2
Draft: Feat/p8003
,
!1
First version
Pipeline
#162681
passed
3 months ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tempus/Tempus.py
+6
-7
6 additions, 7 deletions
src/tempus/Tempus.py
with
6 additions
and
7 deletions
src/tempus/Tempus.py
+
6
−
7
View file @
84f68191
...
@@ -72,7 +72,6 @@ class Tempus(Device):
...
@@ -72,7 +72,6 @@ class Tempus(Device):
super
().
__init__
(
configuration
)
super
().
__init__
(
configuration
)
self
.
background_task
=
None
self
.
background_task
=
None
self
.
monitor_task
=
background
(
self
.
_monitor
())
self
.
monitor_task
=
background
(
self
.
_monitor
())
self
.
ARGS
=
[
f
"
root@
{
self
.
controllerIp
}
"
,
"
python3
"
]
self
.
client
=
None
self
.
client
=
None
self
.
channel
=
None
self
.
channel
=
None
self
.
do_acquire
=
False
self
.
do_acquire
=
False
...
@@ -167,7 +166,7 @@ class Tempus(Device):
...
@@ -167,7 +166,7 @@ class Tempus(Device):
@Slot
(
@Slot
(
displayedName
=
"
Initialize
"
,
displayedName
=
"
Initialize
"
,
description
=
"
Run the initialization sequence. This will take about
"
description
=
"
Run the initialization sequence. This will take about
"
"
45 s
"
,
"
45 s
.
"
,
allowedStates
=
{
State
.
INIT
,
State
.
ON
})
allowedStates
=
{
State
.
INIT
,
State
.
ON
})
async
def
initialize
(
self
):
async
def
initialize
(
self
):
self
.
state
=
State
.
CHANGING
self
.
state
=
State
.
CHANGING
...
@@ -207,12 +206,12 @@ class Tempus(Device):
...
@@ -207,12 +206,12 @@ class Tempus(Device):
@Slot
(
@Slot
(
displayedName
=
"
Reset Fast-Links
"
,
displayedName
=
"
Reset Fast-Links
"
,
description
=
"
Reset fast-links. This will take about 30 s
"
,
description
=
"
Reset fast-links. This will take about 30 s
.
"
,
allowedStates
=
{
State
.
ON
,
State
.
ACTIVE
})
allowedStates
=
{
State
.
ON
,
State
.
ACTIVE
})
async
def
resetFastLinks
(
self
):
async
def
resetFastLinks
(
self
):
self
.
state
=
State
.
CHANGING
self
.
state
=
State
.
CHANGING
self
.
commandLog
=
(
self
.
commandLog
=
(
"
Resetting fast-links:
\n
This will take about 30 s
"
)
"
Resetting fast-links:
\n
This will take about 30 s
.
"
)
self
.
background_task
=
background
(
self
.
_reset_fast_links
())
self
.
background_task
=
background
(
self
.
_reset_fast_links
())
async
def
_reset_fast_links
(
self
):
# XXX test
async
def
_reset_fast_links
(
self
):
# XXX test
...
@@ -235,8 +234,8 @@ class Tempus(Device):
...
@@ -235,8 +234,8 @@ class Tempus(Device):
@Slot
(
@Slot
(
displayedName
=
"
Configure
"
,
displayedName
=
"
Configure
"
,
description
=
"
Run the configuration sequence. This
can
take about
"
description
=
"
Run the configuration sequence. This
will
take about
"
"
45 s
"
,
"
45 s
.
"
,
allowedStates
=
{
State
.
ON
})
allowedStates
=
{
State
.
ON
})
async
def
configure
(
self
):
async
def
configure
(
self
):
self
.
state
=
State
.
CHANGING
self
.
state
=
State
.
CHANGING
...
@@ -245,7 +244,7 @@ class Tempus(Device):
...
@@ -245,7 +244,7 @@ class Tempus(Device):
"
Configuring TEMPUS:
\n
This will take about 45 s.
\n\n
"
)
"
Configuring TEMPUS:
\n
This will take about 45 s.
\n\n
"
)
self
.
background_task
=
background
(
self
.
_configure
())
self
.
background_task
=
background
(
self
.
_configure
())
async
def
_configure
(
self
):
async
def
_configure
(
self
):
# XXX test
try
:
try
:
await
self
.
send_command
(
await
self
.
send_command
(
f
"
exec(open(
'
{
self
.
CFG_DIR
}
/B3_timing_dacs.py
'
).read())
"
)
f
"
exec(open(
'
{
self
.
CFG_DIR
}
/B3_timing_dacs.py
'
).read())
"
)
...
...
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