You are correct than NumCapture=0 currently works in Stream mode, it will stream forever. It does not work in Capture mode where arrays are just stored in memory. That may be OK, since capturing more than 2^31 arrays into memory is unlikely to be needed any time soon.
-----Original Message-----
From: Jörn Dreyer <j.dreyer at hzdr.de>
Sent: Wednesday, October 11, 2023 3:02 AM
To: tech-talk at aps.anl.gov; Mark Rivers <rivers at cars.uchicago.edu>
Subject: Re: Question regarding ADPluginFile driver
Hi Mark,
I just tested the code as is. If I set ’ Capture (numCapture) to 0 it works as expected. It captures data into the file indefinitely.
That's exactly what I wanted to have. I just remembered that I sat it to 0 in the HDF5 plugin and this one complained about this setting.
Regards,
Jörn
Am Dienstag, 10. Oktober 2023, 19:17:17 CEST schrieb Mark Rivers:
> Hi Jörn,
>
> I am curious whether you might use NDPluginPva for sending the data via a stream over the network? That is a common thing to do.
>
> NDPluginFile does not currently have a mechanism for continuous streaming. A common workaround is to set NumCapture to a very large number, but that will eventually fail if the number of frames streamed is >2^31.
>
> From a quick look at the NDPluginFile code it seems that we could change the logic so that if NumCapture is 0 it will stream forever. It would require changes in the following lines so that the comparison with numCapture is only done if it is non-zero.
>
> https://github.com/areaDetector/ADCore/blob/076bd4543827798537fa486c00
> e334722e9889f4/ADApp/pluginSrc/NDPluginFile.cpp#L743
> https://github.com/areaDetector/ADCore/blob/076bd4543827798537fa486c00
> e334722e9889f4/ADApp/pluginSrc/NDPluginFile.cpp#L750
> https://github.com/areaDetector/ADCore/blob/076bd4543827798537fa486c00
> e334722e9889f4/ADApp/pluginSrc/NDPluginFile.cpp#L767
>
> I think that would be backwards compatible because NumCapture=0 currently does not do anything useful. If the user sets NumCapture=0 that might cause existing plugins to fail. But there is nothing preventing users from doing that now, e.g. the NumCapture record does not set DRVL=1.
>
> If you want to test this and issue a Pull Request I'll be happy to look at it.
>
> Mark
>
> -----Original Message-----
> From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of Jörn
> Dreyer via Tech-talk
> Sent: Tuesday, October 10, 2023 4:49 AM
> To: tech-talk at aps.anl.gov
> Subject: Question regarding ADPluginFile driver
>
> Hi,
>
> I am currently developing an ADPluginFile driver that will send the data via a stream over the network to a remote process for fast analysis. It can also store the data locally in various formats.
> For the network transfer I would like to be able to do continuous streaming without automatic limit by a defined number of events.
> Is that possible? Or can it be implemented within my code?
>
> Regards,
>
> Jörn
>
>
>
>
--
Dr. Jörn Dreyer
HIBEF DAQ + Controls
Institut für Strahlenpysik
Abt. FWKX
Tel: +49 351 260 3263
Fax: +49 351 260 123263
Helmholtz-Zentrum Dresden - Rossendorf e.V. (HZDR) Bautzner Landstr. 400 | 01328 Dresden | Germany
Tel: +49 (0) 351 260 1234
http://www.hzdr.de
Vorstand: Prof. Dr. Sebastian M. Schmidt, Dr. Diana Stiller
Vereinsregister: VR 1693 beim Amtsgericht Dresden
- References:
- Question regarding ADPluginFile driver Jörn Dreyer via Tech-talk
- RE: Question regarding ADPluginFile driver Mark Rivers via Tech-talk
- Re: Question regarding ADPluginFile driver Jörn Dreyer via Tech-talk
- Navigate by Date:
- Prev:
Re: DBRecord <-> PVRecord data exchange Ignacio Arriagada via Tech-talk
- Next:
Re: DBRecord <-> PVRecord data exchange Michael Davidsaver via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
- Navigate by Thread:
- Prev:
Re: Question regarding ADPluginFile driver Jörn Dreyer via Tech-talk
- Next:
Install EPICS on Raspberry pi and control motor 백호령 via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
<2023>
2024
|