Skip to content
Snippets Groups Projects
Commit b5856348 authored by Danilo Ferreira de Lima's avatar Danilo Ferreira de Lima
Browse files

Signal end of stream.

parent 4569f9bd
No related branches found
No related tags found
2 merge requests!59Interface CrystFEL with Karabo and allow automatic parameter tunning with rcrystfel,!53Train picker arbiter kernel
......@@ -63,6 +63,14 @@ class PickyBoi(PythonDevice):
.key("input")
.commit(),
BOOL_ELEMENT(expected)
.key("breakStreamAfterEnd")
.description("If active, end the output stream after the range of selected train IDs has been forwarded.")
.assignmentOptional()
.defaultValue(False)
.commit(),
UINT64_ELEMENT(expected)
.key("nextTrainToCatch")
.assignmentOptional()
......@@ -299,6 +307,9 @@ class PickyBoi(PythonDevice):
self.updateState(State.MONITORING)
else:
# past capture range
# if breakStreamAfterEnd is set, end the stream
if self.get("breakStreamAfterEnd"):
self.signalEndOfStream("output")
if self._remaining_trains:
# note: wouuld also get triggered by receiving the same train twice
self.log.ERROR(f"Missed some train(s): {self._remaining_trains}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment