ADApp/pvaDriverSrc/pvaDriver.cpp
asynStatus pvaDriver::writeOctet(asynUser *pasynUser, const char *value, size_t nChars, size_t *nActual)
{
  int function = pasynUser->reason;
  asynStatus status = asynSuccess;
  const char *functionName = "writeOctet";

  // Set the parameter in the parameter library.
  status = (asynStatus)setStringParam(function, (char *)value);
  if (status != asynSuccess) return(status);

  if (function == PVAPvName){
     m_pvName = value;
     status = connectPv();
  } 
  else if (function < FIRST_PVA_DRIVER_PARAM) {
      /* If this parameter belongs to a base class call its method */
      status = ADDriver::writeOctet(pasynUser, value, nChars, nActual);
  }

  // Do callbacks so higher layers see any changes
  callParamCallbacks();

  if (status){
    epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize,
                  "%s:%s: status=%d, function=%d, value=%s",
                  driverName, functionName, status, function, value);
  } else {
    asynPrint(pasynUser, ASYN_TRACEIO_DRIVER,
              "%s:%s: function=%d, value=%s\n",
              driverName, functionName, function, value);
  }
  *nActual = nChars;
  return status;
}
/** Called when asyn clients call pasynOctet->write().
  * This function performs actions for some parameters, including AttributesFile.
  * 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 Address of the string to write.
  * \param[in] nChars Number of characters to write.
  * \param[out] nActual Number of characters actually written. */
Called when asyn clients call pasynOctet->write().
This function performs actions for some parameters, including AttributesFile.
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 Address of the string to write.
\param[in] nChars Number of characters to write.
\param[out] nActual Number of characters actually written.
Called when asyn clients call pasynOctet - > write () . This function performs actions for some parameters including AttributesFile . 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 Address of the string to write . \ param [ in ] nChars Number of characters to write . \ param [ out ] nActual Number of characters actually written .
asynStatus pvaDriver::writeOctet(asynUser *pasynUser, const char *value, size_t nChars, size_t *nActual)
{
  int function = pasynUser->reason;
  asynStatus status = asynSuccess;
  const char *functionName = "writeOctet";
  status = (asynStatus)setStringParam(function, (char *)value);
  if (status != asynSuccess) return(status);
  if (function == PVAPvName){
     m_pvName = value;
     status = connectPv();
  } 
  else if (function < FIRST_PVA_DRIVER_PARAM) {
      status = ADDriver::writeOctet(pasynUser, value, nChars, nActual);
  }
  callParamCallbacks();
  if (status){
    epicsSnprintf(pasynUser->errorMessage, pasynUser->errorMessageSize,
                  "%s:%s: status=%d, function=%d, value=%s",
                  driverName, functionName, status, function, value);
  } else {
    asynPrint(pasynUser, ASYN_TRACEIO_DRIVER,
              "%s:%s: function=%d, value=%s\n",
              driverName, functionName, function, value);
  }
  *nActual = nChars;
  return status;
}
asynStatus pvaDriver :: writeOctet ( asynUser * pasynUser , const char * value , size_t nChars , size_t * nActual ) { int function = pasynUser -> reason ; asynStatus status = asynSuccess ; const char * functionName = " " ; status = ( asynStatus ) setStringParam ( function , ( char * ) value ) ; if ( status != asynSuccess ) return ( status ) ; if ( function == PVAPvName ) { m_pvName = value ; status = connectPv ( ) ; } else if ( function < FIRST_PVA_DRIVER_PARAM ) { status = ADDriver :: writeOctet ( pasynUser , value , nChars , nActual ) ; } callParamCallbacks ( ) ; if ( status ) { epicsSnprintf ( pasynUser -> errorMessage , pasynUser -> errorMessageSize , " " , driverName , functionName , status , function , value ) ; } else { asynPrint ( pasynUser , ASYN_TRACEIO_DRIVER , " \n " , driverName , functionName , function , value ) ; } * nActual = nChars ; return status ; }
Called when asyn clients call pasynOctet->write().
Called when asyn clients call pasynOctet - > write () .
// Set the parameter in the parameter library. /* If this parameter belongs to a base class call its method */ // Do callbacks so higher layers see any changes