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
|