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: | RE: AreaDetector 2-5, NDPluginDriver |
From: | Mark Rivers <[email protected]> |
To: | "'Madden, Timothy J.'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Tue, 22 May 2018 17:41:58 +0000 |
Hi Tim, I see you have figured out the problem. But since I had already composed this message, and it might be useful in the future I am sending it anyway.
Ø
Also, I have seen other plugins like the FFT plugin, that do not call start(), but I assume they work. Ø
Am I supposed to call start? I have another plugin that only works if I call start. Yes, your plugin must call start. What version of ADCore are you using? The FFT plugin does call start, per this commit from 2 years ago: ********************** commit 73f73ffb5be190d67990ef7a1b4a66bdd436e5f3 Author: Ulrik Kofoed Pedersen <[email protected]> Date: Mon Apr 4 22:14:01 2016 +0100 Calling plugins start method to startup thread ********************** This is the code that calls start in NDPluginFFT.cpp: ********************** /** Configuration command */ extern "C" int NDFFTConfigure(const char *portName, int queueSize, int blockingCallbacks, const char *NDArrayPort, int NDArrayAddr, int maxBuffers, size_t maxMemory, int priority, int stackSize, int maxThreads) { NDPluginFFT *pPlugin = new NDPluginFFT(portName, queueSize, blockingCallbacks, NDArrayPort, NDArrayAddr, maxBuffers, maxMemory, priority, stackSize, maxThreads); return pPlugin->start(); } ********************** I can think of 3 reasons that your plugin would not be getting callbacks: 1.
You have not called start() 2.
You have not enabled the plugin 3.
You have not correctly set the source port for the plugin to be your driver’s asyn port name. Ø
Is there a way to ask a driver how may plugins are waiting for NDArrays? Or to list listening plugins with something like asynReport? You can get that information with asynReport on the driver asyn port if you use details=3 or higher. epics> asynReport 3 SIM1 … genericPointer callback client address=0x614560, addr=-1, reason=41, userPvt=0x1e77000 genericPointer callback client address=0x614560, addr=-1, reason=41, userPvt=0x1fafce0 genericPointer callback client address=0x614560, addr=-1, reason=41, userPvt=0x2103840 genericPointer callback client address=0x614560, addr=-1, reason=41, userPvt=0x2174360 genericPointer callback client address=0x614560, addr=-1, reason=41, userPvt=0x21d18d0 This is a list of all the plugins that have registered for callbacks on the genericPointer interface with this driver. That is the interface that is used for NDArray callbacks. Unfortunately it does not have address to the port name, just the address in
userPvt. But at least you can see how many plugins have registered for callbacks.
Mark From: [email protected] [mailto:[email protected]]
On Behalf Of Madden, Timothy J. Dear Tech Talkers (or Mark): I am rather stuck in writing a plugin for AD, even though I have done about 20 of these. I am inheriting from NDPluginDriver, and the plugin never responds to NDArrays from the driver. The driver is working OK, as other plugins can get arrays from them. I call start() in the plugin constructor to start the plugin threads etc. The IOC console gives on startup: 2018/05/22 10:35:24.570 NDPluginDriver::start timeout waiting for plugin thread start event So it looks like the plugin is never starting up. Why would this happen? How to debug it? Very strange. Never seen this one before. I have been hacking on this for awhile. Is there a way to ask a driver how may plugins are waiting for NDArrays? Or to list listening plugins with something like asynReport? I stepped through the code with debugger, and I don't think my plugin is in the list of pClients the driver uses to pass arrays. Also, I have seen other plugins like the FFT plugin, that do not call start(), but I assume they work. Am I supposed to call start? I have another plugin that only works if I call start. Frustrated, Tim Madden |