Experimental Physics and Industrial Control System
|
Hi Marco,
Since you passed copyArray=false to endProcessCallbacks then it appears to me that the pArray you passed to that function must be NULL.
You should check the status return of NDArrayPool->copy() and you should print the value of the pOutput pointer returned from that function using the %p format.
Mark
From: Tech-talk <tech-talk-bounces at aps.anl.gov> On Behalf Of
Marco A. Barra Montevechi Filho via Tech-talk
Sent: Wednesday, August 16, 2023 3:39 PM
To: tech-talk at aps.anl.gov
Cc: SWC <swc at lnls.br>
Subject: Help developing AD plugin
Hi all, we are developing a geometric restoration plugin here at Sirius for areaDetector
Im using NDWarp as a base just because it seems to work as a good example. Also, im unfortunately bound to EPICS 3.15.6, AreaDetector R3-7.
Taking NDWarp as a base, i basically stripped everything between NDPluginWarp::processCallbacks and NDPluginWarp::endProcessCallbacks, so the code is what i append at the end of this e-mail: it should only copy the original array that comes to it and pass it
to the other connected plugins.
By compiling and running an IOC with this plugin, when i enable its callbacks i get the following message in my ioc shell:
2023/08/16 17:29:51.666 NDPluginDriver::endProcessCallbacks: Couldn't allocate output array. Further processing terminated.
Although i tried reading the source code, using gdb and recompiling ADCore by adding -g to USR_CXXFLAGS_Linux ad stepping into each function, etc. etc. i couldnt figure out what am i doing wrong. Am i passing a NULL array to NDPluginDriver::endProcessCallbacks?
Are there any hints about this?
Thanks in advance,
Marco
CODE PART:
NDPluginWarp::processCallbacks(NDArray
*pArray)
// pArray is borrowed reference. Caller will release()
NDPluginDriver::beginProcessCallbacks(pArray);
(void)pArray->getInfo(&info);
if(pArray->ndims!=2 || info.xSize==0 || info.ySize==0)
{
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s::
2D non-empty expected",
switch(pArray->dataType)
{
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
"%s::
Unsupported type %u",
this->portName,
(unsigned)pArray->dataType);
asynPrint(pasynUserSelf, ASYN_TRACE_FLOW,
"%s:
%s ndarray=%p\n",
this->portName,
__PRETTY_FUNCTION__, pArray);
this->pNDArrayPool->copy(pArray,
pOutput, true,
true,
true);
NDPluginDriver::endProcessCallbacks(pOutput,
false,
true);
}
Aviso Legal: Esta mensagem e seus anexos podem conter informações confidenciais e/ou de uso restrito. Observe atentamente seu conteúdo e considere eventual consulta ao remetente antes
de copiá-la, divulgá-la ou distribuí-la. Se você recebeu esta mensagem por engano, por favor avise o remetente e apague-a imediatamente.
Disclaimer: This email and its attachments may contain confidential and/or privileged information. Observe its content carefully and consider possible querying to the sender before
copying, disclosing or distributing it. If you have received this email by mistake, please notify the sender and delete it immediately.
|
- Replies:
- Re: Help developing AD plugin Marco A. Barra Montevechi Filho via Tech-talk
- References:
- Help developing AD plugin Marco A. Barra Montevechi Filho via Tech-talk
- Navigate by Date:
- Prev:
Help developing AD plugin Marco A. Barra Montevechi Filho via Tech-talk
- Next:
Re: Help developing AD plugin Marco A. Barra Montevechi Filho 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
2025
- Navigate by Thread:
- Prev:
Help developing AD plugin Marco A. Barra Montevechi Filho via Tech-talk
- Next:
Re: Help developing AD plugin Marco A. Barra Montevechi Filho 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
2025
|
ANJ, 16 Aug 2023 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
·
Download
·
Search
·
IRMIS
·
Talk
·
Documents
·
Links
·
Licensing
·
|