Skip to content

Add possibility to enable stream for external use#3

Open
ovallcorba wants to merge 2 commits intoesrf-bliss:masterfrom
ovallcorba:alba_stream_without_puller
Open

Add possibility to enable stream for external use#3
ovallcorba wants to merge 2 commits intoesrf-bliss:masterfrom
ovallcorba:alba_stream_without_puller

Conversation

@ovallcorba
Copy link

Hi,

At ALBA we are studying to use the detector in saving_manage_mode to Hardware so the Filewriter interface of the detector is enabled and the files are generated by it. However, the scientists and the scientific data management group asked also to have the possibility to get the data via the Stream interface so they can perform a faster processing if necessary.

The plugin is disabling the Stream interface of the detector when enabling the hardware saving mode. To allow both interfaces I added the attribute stream_external_active that, when true, it is enabling the Stream interface without setting up any pullers/decompression tasks (since the zmq stream will be for "external" use). The idea is that this can only be set to true in saving_managed set to hardware. The logic is implemented in the Stream::setActive method so:

  • When saving_managed_mode is software, the stream_external_active is forced to false (in case it was true) and everything works as it is now in stream mode.
  • When the saving_managed_mode is hardware, if the stream_external_active is true, the stream interface is enabled and the method exited before setting up the puller/decompression. The plugin works as usual in filewriter mode but we will have also the stream interface enabled for external use.
  • When stream_external_active is enabled, the header detail will be configured (as it is done in this method for the software saving mode).

By default the stream_external_active attribute is set to false at start, so no changes from the current behaviour. It has been added as an attribute (and not property) to allow start/stop stream without restarting the server.

I was considering to add the possiblity to change the header_detail for this external stream with another attribute (e.g. stream_external_header) but I was wandering why not doing it in general for the software saving mode as well. Everything seems ready for lima to deal with this (the functions to change the level, the _get_global_header that configures the zmq stream considering the header_detail level, etc...) but I did not find any direct way to change it via the tango device.

I am just learning about lima and I tried to be consistent with the rest of the plugin code but any comment/advice from your side will be appreaciated.

Thanks!
Oriol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant