Hi Mark,
We started trying to integrate this at DLS when Dectris were developing stream2 and asking for feedback. It didn't quite make it to production and has since been sitting idle as its not a priority for us right now, but the implementation would probably be a
good starting point for implementing it in ADEiger.
The key thing you are going to want to do is make use of the stream2 C library dectris have written to parse the cbor buffers from the detector, along with tinycbor. This is available here
we included it in our build by adding that repo as a submodule in the third_party directory here:
this will save a ton of effort because parsing cbor in C is very involved.
It is built into the eiger processor plugin here:
Specifically, the handle_rx_socket and handle_*_message functions is where we are using that library to parse the cbor buffer and access the fields:
This implementation was pretty close to what we needed. There is some subtlety left to figure out, for example the start/stop time fields which are an array of time and base frequency that we don't handle properly.
I hope this is useful!
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Mark Rivers via Tech-talk <tech-talk at aps.anl.gov>
Sent: 02 April 2025 20:54
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Stream2 support in ADEiger
Folks,
ADEiger needs to have support for the Stream2 interface that Dectris added in firmware 2022.1.
Does anyone know if some site has worked on this? There are no pull-requests for it in ADEiger on Github.
If not, I plan to work on it soon.
Thanks,
Mark
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt
by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail. Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom.
|