ADApp/pluginSrc/NDPluginDriver.cpp
void NDPluginDriver::processCallbacks(NDArray *pArray)
{
    int arrayCounter;
    int i, dimsChanged;
    int size;
    NDAttribute *pAttribute;
    int colorMode=NDColorModeMono, bayerPattern=NDBayerRGGB;
    
    pAttribute = pArray->pAttributeList->find("ColorMode");
    if (pAttribute) pAttribute->getValue(NDAttrInt32, &colorMode);
    pAttribute = pArray->pAttributeList->find("BayerPattern");
    if (pAttribute) pAttribute->getValue(NDAttrInt32, &bayerPattern);
    
    getIntegerParam(NDArrayCounter, &arrayCounter);
    arrayCounter++;
    setIntegerParam(NDArrayCounter, arrayCounter);
    setIntegerParam(NDNDimensions, pArray->ndims);
    setIntegerParam(NDDataType, pArray->dataType);
    setIntegerParam(NDColorMode, colorMode);
    setIntegerParam(NDBayerPattern, bayerPattern);
    setIntegerParam(NDUniqueId, pArray->uniqueId);
    setTimeStamp(&pArray->epicsTS);
    setDoubleParam(NDTimeStamp, pArray->timeStamp);
    setIntegerParam(NDEpicsTSSec, pArray->epicsTS.secPastEpoch);
    setIntegerParam(NDEpicsTSNsec, pArray->epicsTS.nsec);
    /* See if the array dimensions have changed.  If so then do callbacks on them. */
    for (i=0, dimsChanged=0; i<ND_ARRAY_MAX_DIMS; i++) {
        size = (int)pArray->dims[i].size;
        if (i >= pArray->ndims) size = 0;
        if (size != this->dimsPrev[i]) {
            this->dimsPrev[i] = size;
            dimsChanged = 1;
        }
    }
    if (dimsChanged) {
        doCallbacksInt32Array(this->dimsPrev, ND_ARRAY_MAX_DIMS, NDDimensions, 0);
    }
}
/** Method that is normally called at the beginning of the processCallbacks
  * method in derived classes.
  * \param[in] pArray  The NDArray from the callback.
  *
  * This method takes care of some bookkeeping for callbacks, updating parameters
  * from data in the class and in the NDArray.  It does asynInt32Array callbacks
  * for the dimensions array if the dimensions of the NDArray data have changed. */
Method that is normally called at the beginning of the processCallbacks
method in derived classes.
\param[in] pArray  The NDArray from the callback.

This method takes care of some bookkeeping for callbacks, updating parameters
from data in the class and in the NDArray.  It does asynInt32Array callbacks
for the dimensions array if the dimensions of the NDArray data have changed.
Method that is normally called at the beginning of the processCallbacks method in derived classes . \ param [ in ] pArray The NDArray from the callback . This method takes care of some bookkeeping for callbacks updating parameters from data in the class and in the NDArray . It does asynInt32Array callbacks for the dimensions array if the dimensions of the NDArray data have changed .
void NDPluginDriver::processCallbacks(NDArray *pArray)
{
    int arrayCounter;
    int i, dimsChanged;
    int size;
    NDAttribute *pAttribute;
    int colorMode=NDColorModeMono, bayerPattern=NDBayerRGGB;
    pAttribute = pArray->pAttributeList->find("ColorMode");
    if (pAttribute) pAttribute->getValue(NDAttrInt32, &colorMode);
    pAttribute = pArray->pAttributeList->find("BayerPattern");
    if (pAttribute) pAttribute->getValue(NDAttrInt32, &bayerPattern);
    getIntegerParam(NDArrayCounter, &arrayCounter);
    arrayCounter++;
    setIntegerParam(NDArrayCounter, arrayCounter);
    setIntegerParam(NDNDimensions, pArray->ndims);
    setIntegerParam(NDDataType, pArray->dataType);
    setIntegerParam(NDColorMode, colorMode);
    setIntegerParam(NDBayerPattern, bayerPattern);
    setIntegerParam(NDUniqueId, pArray->uniqueId);
    setTimeStamp(&pArray->epicsTS);
    setDoubleParam(NDTimeStamp, pArray->timeStamp);
    setIntegerParam(NDEpicsTSSec, pArray->epicsTS.secPastEpoch);
    setIntegerParam(NDEpicsTSNsec, pArray->epicsTS.nsec);
    for (i=0, dimsChanged=0; i<ND_ARRAY_MAX_DIMS; i++) {
        size = (int)pArray->dims[i].size;
        if (i >= pArray->ndims) size = 0;
        if (size != this->dimsPrev[i]) {
            this->dimsPrev[i] = size;
            dimsChanged = 1;
        }
    }
    if (dimsChanged) {
        doCallbacksInt32Array(this->dimsPrev, ND_ARRAY_MAX_DIMS, NDDimensions, 0);
    }
}
void NDPluginDriver :: processCallbacks ( NDArray * pArray ) { int arrayCounter ; int i , dimsChanged ; int size ; NDAttribute * pAttribute ; int colorMode = NDColorModeMono , bayerPattern = NDBayerRGGB ; pAttribute = pArray -> pAttributeList -> find ( " " ) ; if ( pAttribute ) pAttribute -> getValue ( NDAttrInt32 , & colorMode ) ; pAttribute = pArray -> pAttributeList -> find ( " " ) ; if ( pAttribute ) pAttribute -> getValue ( NDAttrInt32 , & bayerPattern ) ; getIntegerParam ( NDArrayCounter , & arrayCounter ) ; arrayCounter ++ ; setIntegerParam ( NDArrayCounter , arrayCounter ) ; setIntegerParam ( NDNDimensions , pArray -> ndims ) ; setIntegerParam ( NDDataType , pArray -> dataType ) ; setIntegerParam ( NDColorMode , colorMode ) ; setIntegerParam ( NDBayerPattern , bayerPattern ) ; setIntegerParam ( NDUniqueId , pArray -> uniqueId ) ; setTimeStamp ( & pArray -> epicsTS ) ; setDoubleParam ( NDTimeStamp , pArray -> timeStamp ) ; setIntegerParam ( NDEpicsTSSec , pArray -> epicsTS . secPastEpoch ) ; setIntegerParam ( NDEpicsTSNsec , pArray -> epicsTS . nsec ) ; for ( i = 0 , dimsChanged = 0 ; i < ND_ARRAY_MAX_DIMS ; i ++ ) { size = ( int ) pArray -> dims [ i ] . size ; if ( i >= pArray -> ndims ) size = 0 ; if ( size != this -> dimsPrev [ i ] ) { this -> dimsPrev [ i ] = size ; dimsChanged = 1 ; } } if ( dimsChanged ) { doCallbacksInt32Array ( this -> dimsPrev , ND_ARRAY_MAX_DIMS , NDDimensions , 0 ) ; } }
Method that is normally called at the beginning of the processCallbacks
 method in derived classes.
Method that is normally called at the beginning of the processCallbacks method in derived classes .
/* See if the array dimensions have changed.  If so then do callbacks on them. */