EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

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 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
<== Date ==> <== Thread ==>

Subject: PVXS monitor - No dependence on MPMCFIFO workqueue
From: Eusebio Naif Al-Soliman Fuentes via Tech-talk <tech-talk at aps.anl.gov>
To: Tech Talk <tech-talk at aps.anl.gov>
Date: Mon, 15 Apr 2024 10:49:50 +0200
Hello everybody.
 
I have a question about the "monitor" function with PVXS.
 
Right now, the declaration of a MPMCFIFO workqueue is necessary to implement the "monitor" function. Then, there is a subscription to the PV we desire to monitor and, when an event is produced, it pushes the request to the workqueue.
 
However, what I'd like instead is to execute some code directly, something like this:
 

        for(auto n : range(optind, argc)) {

            ops.push_back(ctxt.monitor(argv[n])
                          .pvRequest(request)
                          .maskConnected(false)
                          .maskDisconnected(false)
                          .event([&workqueue](client::Subscription& mon)
                            {
                                // workqueue.push(mon.shared_from_this());

                                // Execute code here...
                            })
                          .exec());
        }

The problem is that the ".event()" requires a lambda function with a specific definition and it doesn't let me make calls to class methods or pass arguments to the lambda. Is there a way to do that?
 
The reason to do this is because my code requires time to be executed and the MPMCFIFO workqueue fills up quickly.
 
Thanks in advance, Eusebio.

--

Saludos/Best regards

University of Granada  

Eusebio Naif Al-Soliman Fuentes
MSc. Data Science and Computer Engineering

eunaif at correo.ugr.es


Replies:
Re: PVXS monitor - No dependence on MPMCFIFO workqueue Michael Davidsaver via Tech-talk

Navigate by Date:
Prev: Fw: Remote reset of MVME-2700 possible through serial console Arnold, Ned D. via Tech-talk
Next: Re: Readback of output variables in adsDriver Jure Varlec 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: Example of using a record field from an external IOC as an INPA link on a calcout record Mark Rivers via Tech-talk
Next: Re: PVXS monitor - No dependence on MPMCFIFO workqueue 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
ANJ, 15 Apr 2024 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·