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

Subject: Help developing AD plugin
From: "Marco A. Barra Montevechi Filho via Tech-talk" <tech-talk at aps.anl.gov>
To: "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov>
Cc: SWC <swc at lnls.br>
Date: Wed, 16 Aug 2023 20:39:02 +0000
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);

    NDArrayInfo info;
    NDArray *pOutput;
    (void)pArray->getInfo(&info);

    if(pArray->ndims!=2 || info.xSize==0 || info.ySize==0) {
        asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
                  "%s:: 2D non-empty expected",
                  this->portName);
        return;
    }
    switch(pArray->dataType) {
    case NDInt8:
    case NDUInt8:
    case NDInt16:
    case NDUInt16:
    case NDInt32:
    case NDUInt32:
    case NDFloat32:
    case NDFloat64:
        break;
    default:
        asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
                  "%s:: Unsupported type %u",
                  this->portName, (unsigned)pArray->dataType);
        return;
    }
    asynPrint(pasynUserSelf, ASYN_TRACE_FLOW, "%s: %s ndarray=%p\n", this->portName, __PRETTY_FUNCTION__, pArray);

    printf("a\n");
    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 Mark Rivers via Tech-talk

Navigate by Date:
Prev: FW: medm question of simDetectorIOC Mark Rivers via Tech-talk
Next: RE: Help developing AD plugin Mark Rivers 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  <20232024 
Navigate by Thread:
Prev: FW: medm question of simDetectorIOC Mark Rivers via Tech-talk
Next: RE: Help developing AD plugin Mark Rivers 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  <20232024 
ANJ, 16 Aug 2023 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·