FASTApp/MPA3DetectorSrc/MPA3Detector.cpp
/** Called when asyn clients call pasynInt32->write().
  * This function performs actions for some parameters, including ADAcquire, ADColorMode, etc.
  * For all parameters it sets the value in the parameter library and calls any registered callbacks..
  * \param[in] pasynUser pasynUser structure that encodes the reason and address.
  * \param[in] value Value to write. */
Called when asyn clients call pasynInt32->write().
This function performs actions for some parameters, including ADAcquire, ADColorMode, etc.
For all parameters it sets the value in the parameter library and calls any registered callbacks
\param[in] pasynUser pasynUser structure that encodes the reason and address.
\param[in] value Value to write.
Called when asyn clients call pasynInt32 - > write () . This function performs actions for some parameters including ADAcquire ADColorMode etc . For all parameters it sets the value in the parameter library and calls any registered callbacks \ param [ in ] pasynUser pasynUser structure that encodes the reason and address . \ param [ in ] value Value to write .
asynStatus MPA3Detector::writeInt32(asynUser *pasynUser, epicsInt32 value)
{
    int function = pasynUser->reason;
    asynStatus status = asynSuccess;
    int enable;
    status = setIntegerParam(function, value);
    if (function == P_Acquire) {
        setAcquire(value);
    } else if (function == P_RunTimeEnable) {
      enable = (value)?1:0;
      sprintf(command,"rtprena=%d",enable);
      sendCommand(command);
    } else if (function == P_AutoIncrement) {
      enable = (value)?1:0;
      sprintf(command,"autoinc=%d",enable);
      sendCommand(command);
    } else if (function == P_AutoSave) {
      enable = (value)?1:0;
      sprintf(command,"savedata=%d",enable);
      sendCommand(command);
    } else {
        if (function < FIRST_MPA_DETECTOR_PARAM) status = asynNDArrayDriver::writeInt32(pasynUser, value);
    }
    callParamCallbacks();
    if (status)
        asynPrint(pasynUser, ASYN_TRACE_ERROR,
              "%s:writeInt32 error, status=%d function=%d, value=%d\n",
              driverName, status, function, value);
    else
        asynPrint(pasynUser, ASYN_TRACEIO_DRIVER,
              "%s:writeInt32: function=%d, value=%d\n",
              driverName, function, value);
    return status;
}
asynStatus MPA3Detector :: writeInt32 ( asynUser * pasynUser , epicsInt32 value ) { int function = pasynUser -> reason ; asynStatus status = asynSuccess ; int enable ; status = setIntegerParam ( function , value ) ; if ( function == P_Acquire ) { setAcquire ( value ) ; } else if ( function == P_RunTimeEnable ) { enable = ( value ) ? 1 : 0 ; sprintf ( command , " " , enable ) ; sendCommand ( command ) ; } else if ( function == P_AutoIncrement ) { enable = ( value ) ? 1 : 0 ; sprintf ( command , " " , enable ) ; sendCommand ( command ) ; } else if ( function == P_AutoSave ) { enable = ( value ) ? 1 : 0 ; sprintf ( command , " " , enable ) ; sendCommand ( command ) ; } else { if ( function < FIRST_MPA_DETECTOR_PARAM ) status = asynNDArrayDriver :: writeInt32 ( pasynUser , value ) ; } callParamCallbacks ( ) ; if ( status ) asynPrint ( pasynUser , ASYN_TRACE_ERROR , " \n " , driverName , status , function , value ) ; else asynPrint ( pasynUser , ASYN_TRACEIO_DRIVER , " \n " , driverName , function , value ) ; return status ; }
Called when asyn clients call pasynInt32->write().
Called when asyn clients call pasynInt32 - > write () .
/* Set the parameter and readback in the parameter library.  This may be overwritten when we read back the
     * status at the end, but that's OK */ /* Do callbacks before delay for MCP Acquire Active so higher layers see any changes */ /* If this parameter belongs to a base class call its method */ /* Do callbacks so higher layers see any changes */