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 | 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 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: Help developing AD plugin |
From: | Mark Rivers via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Marco A. Barra Montevechi Filho" <marco.filho at lnls.br>, "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Cc: | SWC <swc at lnls.br> |
Date: | Wed, 16 Aug 2023 20:56:31 +0000 |
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 Hi all, we are developing a geometric restoration plugin here at Sirius for areaDetector 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. |