odin-detector / odin-data

DAQ software libraries for capturing and storing data from parallel detector systems
https://odin-detector.github.io/odin-data/
Apache License 2.0
8 stars 9 forks source link

Implement ParameterTree for FR adapter #346

Closed GDYendell closed 1 month ago

GDYendell commented 3 months ago

This should just work with the new generic OdinDataAdapter. Check this.

GDYendell commented 2 months ago

@jsouter did you do this while working on https://github.com/DiamondLightSource/fastcs-odin/pull/33?

jsouter commented 2 months ago

I changed the templated odin_server.cfg files to use OdinDataAdapter instead FrameReceiverAdapter, no changes were required to odin-data's fastcs-dev branch. There's a few places where frame_receiver_adapter.py is broken (I think I got it to run by just changing self._endpoints to self._controller._endpoints, but I didn't properly check if it's functional besides that). I figured frame_receiver_adapter.py would be deleted.

GDYendell commented 2 months ago

That is pretty much all I did for the meta writer so that may be all that is required.

jsouter commented 2 months ago

Here is the diff of a branch I made that makes OdinDataController generic, and makes subclasses for FrameProcessorController and FrameReceiverController (which is actually an alias for the base OdinDataController), and FrameReceiver(/Processor)Adapter classes that use these controllers.

This would mean we could still use the existing odin_server.cfg's module paths without having to specify a frame_processor flag. If we'd rather keep fastcs-dev as it is, I can make a PR to just delete frame_receiver_adapter.py as OdinDataAdapter makes it redundant.

https://github.com/odin-detector/odin-data/compare/fastcs-dev...jsouter:odin-data:controllers

GDYendell commented 1 month ago

I think I would like to see that diff as PR to fastcs-dev for discussion.

Do we understand why the fr check is commented out, currently? @ajgdls?

jsouter commented 1 month ago

Okay, PR here https://github.com/odin-detector/odin-data/pull/362/files

ajgdls commented 1 month ago

The check was never implemented during development of the new version of the Odin data classes. What is commented out there is a stub which needs an implementation to check on availability of buffers from the FR. I'm not sure if it can simply be an exact copy of the previous version, which is why it was not copied over.

ajgdls commented 1 month ago

Oh sorry, for some context... In the previous version of the frame processor adapter, the FP adapter would connect to and check the number of free buffers according to the FR adapter. It would test this against a defined threshold and refuse to send the command to start writing if the check failed. The idea was to give prior warning if the system was being starved of buffers rather than allowing it to start and then potentially fail quickly.

GDYendell commented 1 month ago

Completed in #362. Added #364 for further work.