ADApp/pluginSrc/NDPluginDriver.cpp
asynStatus NDPluginDriver::setArrayInterrupt(int enableCallbacks)
{
    asynStatus status = asynSuccess;
    static const char *functionName = "setArrayInterrupt";
    
    if (enableCallbacks && !this->asynGenericPointerInterruptPvt) {
        status = this->pasynGenericPointer->registerInterruptUser(
                    this->asynGenericPointerPvt, this->pasynUserGenericPointer,
                    ::driverCallback, this, &this->asynGenericPointerInterruptPvt);
        if (status != asynSuccess) {
            asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
                "%s::%s ERROR: Can't register for interrupt callbacks on detector port: %s\n",
                driverName, functionName, this->pasynUserGenericPointer->errorMessage);
            return(status);
        }
    } 
    if (!enableCallbacks && this->asynGenericPointerInterruptPvt) {
        if (this->asynGenericPointerInterruptPvt) {
            status = this->pasynGenericPointer->cancelInterruptUser(this->asynGenericPointerPvt, 
                            this->pasynUserGenericPointer, this->asynGenericPointerInterruptPvt);
            this->asynGenericPointerInterruptPvt = NULL;
            if (status != asynSuccess) {
                asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
                    "%s::%s ERROR: Can't unregister for interrupt callbacks on detector port: %s\n",
                    driverName, functionName, this->pasynUserGenericPointer->errorMessage);
                return(status);
            }
        }
    }
    return(asynSuccess);
}
/** Register or unregister to receive asynGenericPointer (NDArray) callbacks from the driver.
  * Note: this function must be called with the lock released, otherwise a deadlock can occur
  * in the call to cancelInterruptUser.
  * \param[in] enableCallbacks 1 to enable callbacks, 0 to disable callbacks */
Register or unregister to receive asynGenericPointer (NDArray) callbacks from the driver.
Note: this function must be called with the lock released, otherwise a deadlock can occur
in the call to cancelInterruptUser.
\param[in] enableCallbacks 1 to enable callbacks, 0 to disable callbacks
Register or unregister to receive asynGenericPointer ( NDArray ) callbacks from the driver . Note : this function must be called with the lock released otherwise a deadlock can occur in the call to cancelInterruptUser . \ param [ in ] enableCallbacks 1 to enable callbacks 0 to disable callbacks
asynStatus NDPluginDriver::setArrayInterrupt(int enableCallbacks)
{
    asynStatus status = asynSuccess;
    static const char *functionName = "setArrayInterrupt";
    if (enableCallbacks && !this->asynGenericPointerInterruptPvt) {
        status = this->pasynGenericPointer->registerInterruptUser(
                    this->asynGenericPointerPvt, this->pasynUserGenericPointer,
                    ::driverCallback, this, &this->asynGenericPointerInterruptPvt);
        if (status != asynSuccess) {
            asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
                "%s::%s ERROR: Can't register for interrupt callbacks on detector port: %s\n",
                driverName, functionName, this->pasynUserGenericPointer->errorMessage);
            return(status);
        }
    } 
    if (!enableCallbacks && this->asynGenericPointerInterruptPvt) {
        if (this->asynGenericPointerInterruptPvt) {
            status = this->pasynGenericPointer->cancelInterruptUser(this->asynGenericPointerPvt, 
                            this->pasynUserGenericPointer, this->asynGenericPointerInterruptPvt);
            this->asynGenericPointerInterruptPvt = NULL;
            if (status != asynSuccess) {
                asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
                    "%s::%s ERROR: Can't unregister for interrupt callbacks on detector port: %s\n",
                    driverName, functionName, this->pasynUserGenericPointer->errorMessage);
                return(status);
            }
        }
    }
    return(asynSuccess);
}
asynStatus NDPluginDriver :: setArrayInterrupt ( int enableCallbacks ) { asynStatus status = asynSuccess ; static const char * functionName = " " ; if ( enableCallbacks && ! this -> asynGenericPointerInterruptPvt ) { status = this -> pasynGenericPointer -> registerInterruptUser ( this -> asynGenericPointerPvt , this -> pasynUserGenericPointer , :: driverCallback , this , & this -> asynGenericPointerInterruptPvt ) ; if ( status != asynSuccess ) { asynPrint ( this -> pasynUserSelf , ASYN_TRACE_ERROR , " \n " , driverName , functionName , this -> pasynUserGenericPointer -> errorMessage ) ; return ( status ) ; } } if ( ! enableCallbacks && this -> asynGenericPointerInterruptPvt ) { if ( this -> asynGenericPointerInterruptPvt ) { status = this -> pasynGenericPointer -> cancelInterruptUser ( this -> asynGenericPointerPvt , this -> pasynUserGenericPointer , this -> asynGenericPointerInterruptPvt ) ; this -> asynGenericPointerInterruptPvt = NULL ; if ( status != asynSuccess ) { asynPrint ( this -> pasynUserSelf , ASYN_TRACE_ERROR , " \n " , driverName , functionName , this -> pasynUserGenericPointer -> errorMessage ) ; return ( status ) ; } } } return ( asynSuccess ) ; }
Register or unregister to receive asynGenericPointer (NDArray) callbacks from the driver.
Register or unregister to receive asynGenericPointer ( NDArray ) callbacks from the driver .