Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LimaGroup
Lima2
Commits
2871bc2a
Commit
2871bc2a
authored
May 18, 2022
by
Alejandro Homs Puron
Committed by
Generic Bliss account for Control Software
May 19, 2022
Browse files
[CLIENT] Add processing is_finished
parent
b2a79dc4
Pipeline
#75359
passed with stages
in 9 minutes and 23 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tango/py/Lima2/Client/Detector.py
View file @
2871bc2a
...
...
@@ -685,16 +685,10 @@ class Detector:
return
[
data_array
.
decode_devencoded_image
(
dev
.
getFrame
(
frame_idx
))
for
dev
in
self
.
__devs
][
0
]
def
isFinished
(
self
,
nb_frames
):
"""" Returns True if all counters are equal to nb_frames """
# Finished when all counters are equal to nb_frames
def
countersFinished
(
c
):
return
not
self
.
__has_roi_counters
or
c
.
nb_frames_counters
==
nb_frames
def
savingFinished
(
c
):
not_finished
=
[
n
for
n
in
self
.
__names
if
n
.
endswith
(
'saved'
)
and
getattr
(
c
,
n
)
!=
nb_frames
]
return
not
not_finished
return
all
([
countersFinished
(
c
)
and
savingFinished
(
c
)
for
c
in
self
.
counters
])
def
isFinished
(
self
):
"""" Returns True if all processing instances are finished """
return
all
([
dev
.
is_finished
for
dev
in
self
.
__devs
])
def
_eraseProcessing
(
self
,
uuid
):
[
recv
.
erasePipeline
(
str
(
uuid
))
for
recv
in
self
.
__recvs
]
...
...
@@ -952,7 +946,7 @@ def test_acquisition_states(device, args, config):
print
(
f
'nb_frames_xferred=
{
device
.
nb_frames_xferred
}
'
)
print
(
f
'Counters=
{
proc
.
counters
}
'
)
# Wait for the end of the processing
while
not
proc
.
isFinished
(
device
.
nb_frames_xferred
):
while
not
proc
.
isFinished
():
print
(
f
'Counters=
{
proc
.
counters
}
'
)
gevent
.
sleep
(
0.1
)
print
(
f
'Counters=
{
proc
.
counters
}
'
)
...
...
Write
Preview
Supports
Markdown
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