FASTApp/MPA3DetectorSrc/MPA3Detector.cpp
/** Constructor for MPA3Detector; most parameters are simply passed to ADDriver::ADDriver.
  * After calling the base class constructor this method creates a thread to compute the simulated detector data,
  * and sets reasonable default values for parameters defined in this class, asynNDArrayDriver and ADDriver.
  * \param[in] portName The name of the asyn port driver to be created.
  * \param[in] numTimePoints The initial number of time points.
  * \param[in] dataType The initial data type (NDDataType_t) of the arrays that this driver will create.
  * \param[in] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is
  *            allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
  * \param[in] maxMemory The maximum amount of memory that the NDArrayPool for this driver is
  *            allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
  * \param[in] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
  * \param[in] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
  * \param[in] channelNum, this specifies which of the 4 different data arrays that we will use by default.
  */
Constructor for MPA3Detector; most parameters are simply passed to ADDriver::ADDriver.
After calling the base class constructor this method creates a thread to compute the simulated detector data,
and sets reasonable default values for parameters defined in this class, asynNDArrayDriver and ADDriver.
\param[in] portName The name of the asyn port driver to be created.
\param[in] numTimePoints The initial number of time points.
\param[in] dataType The initial data type (NDDataType_t) of the arrays that this driver will create.
\param[in] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is
allowed to allocate. Set this to -1 to allow an unlimited number of buffers.
\param[in] maxMemory The maximum amount of memory that the NDArrayPool for this driver is
allowed to allocate. Set this to -1 to allow an unlimited amount of memory.
\param[in] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
\param[in] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags.
\param[in] channelNum, this specifies which of the 4 different data arrays that we will use by default.
Constructor for MPA3Detector ; most parameters are simply passed to ADDriver :: ADDriver . After calling the base class constructor this method creates a thread to compute the simulated detector data and sets reasonable default values for parameters defined in this class asynNDArrayDriver and ADDriver . \ param [ in ] portName The name of the asyn port driver to be created . \ param [ in ] numTimePoints The initial number of time points . \ param [ in ] dataType The initial data type ( NDDataType_t ) of the arrays that this driver will create . \ param [ in ] maxBuffers The maximum number of NDArray buffers that the NDArrayPool for this driver is allowed to allocate . Set this to - 1 to allow an unlimited number of buffers . \ param [ in ] maxMemory The maximum amount of memory that the NDArrayPool for this driver is allowed to allocate . Set this to - 1 to allow an unlimited amount of memory . \ param [ in ] priority The thread priority for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags . \ param [ in ] stackSize The stack size for the asyn port driver thread if ASYN_CANBLOCK is set in asynFlags . \ param [ in ] channelNum this specifies which of the 4 different data arrays that we will use by default .
MPA3Detector::MPA3Detector(const char *portName, int numTimePoints, NDDataType_t dataType,
                               int maxBuffers, size_t maxMemory, int priority, int stackSize, int channelNum)
    : asynNDArrayDriver(portName, MAX_SIGNALS, maxBuffers, maxMemory,
               0, 0, 
               ASYN_CANBLOCK | ASYN_MULTIDEVICE, 
               1,                                
               priority, stackSize),
    uniqueId_(0), acquiring_(0)			   
{
    int status = asynSuccess;
    int ErrSet;
    const char *functionName = "MPA3Detector";
    this->channelNum = channelNum;
    hDLL = LoadLibrary("DMPA3.DLL");
    if(hDLL){
 Original entry points
 VOID APIENTRY RunCmd(int nDisplay, LPSTR Cmd)
        lpRun=(IMPARUNCMD)GetProcAddress(hDLL,"RunCmd");
 VOID APIENTRY Erase(int nSystem)
        lpErase=(IMPAERASE)GetProcAddress(hDLL,"Erase");
 VOID APIENTRY Halt(int nSystem)
        lpHalt=(IMPAHALT)GetProcAddress(hDLL,"Halt");
VOID APIENTRY Start(int nSystem)
         lpStart=(IMPASTART)GetProcAddress(hDLL,"Start");
 VOID APIENTRY NewSetting(int nDev) 
	lpNewSetting=(IMPANEWSET) GetProcAddress(hDLL,"NewSetting");
 int APIENTRY GetStatusData(ACQSTATUS *Status, int nDev) 
        lpStat=(IMPAGETSTATUS)GetProcAddress(hDLL,"GetStatusData");
 int APIENTRY GetStatus(int nDev)
	lpNewStat=(IMPANEWSTATUS)GetProcAddress(hDLL,"GetStatus");
 int APIENTRY GetSettingData(ACQSETTING *Setting, int nDisplay)
	lpSet=(IMPAGETSETTING)GetProcAddress(hDLL,"GetSettingData");
int APIENTRY GetDatSetting(DATSETTING *Defdat) 
	lpGetDatSet=(IMPAGETDATSET)GetProcAddress(hDLL,"GetDatSetting");
 int APIENTRY GetMP3Setting(ACQMP3 *Defmp3)
	lpGetMp3Set=(IMPAGETMP3SET)GetProcAddress(hDLL,"GetMP3Setting");
 additional entry points
 int APIENTRY LVGetCnt(double *cntp, int nDisplay);
lpCnt=(IMPAGETCNT)GetProcAddress(hDLL,"LVGetCnt");
 int APIENTRY LVGetRoi(unsigned long FAR *roip, int nDisplay);
lpRoi=(IMPAGETROI)GetProcAddress(hDLL,"LVGetRoi");
 int APIENTRY LVGetDat(unsigned long HUGE *datp, int nDisplay);
lpDat=(IMPAGETDAT)GetProcAddress(hDLL,"LVGetDat");
 int APIENTRY LVGetStr(char *strp, int nDisplay);
lpStr=(IMPAGETSTR)GetProcAddress(hDLL,"LVGetStr");
 UINT APIENTRY ServExec(HWND ClientWnd); Execute the Server MPA3.EXE
lpServ=(IMPASERVEXEC)GetProcAddress(hDLL,"ServExec");
 int APIENTRY DigInOut(int value, int enable); 
lpDigInOut=(IMPADIGINOUT)GetProcAddress(hDLL,"DigInOut");
 int APIENTRY DacOut(int value);  
lpDacOut=(IMPADACOUT)GetProcAddress(hDLL,"DacOut");
 VOID APIENTRY Continue(int nSystem); 
lpContinue=(IMPACONTINUE)GetProcAddress(hDLL,"Continue");
lpLVGetDat = (IMPALVGetDat)GetProcAddress(hDLL, "LVGetDat");
 Potential future entry points
 VOID APIENTRY StoreSettingData(ACQSETTING *Setting, int nDisplay);
 VOID APIENTRY StoreStatusData(ACQSTATUS *Status, int nDev);
 VOID APIENTRY StoreData(ACQDATA *Data, int nDisplay);
 int APIENTRY GetData(ACQDATA *Data, int nDisplay);
 long APIENTRY GetSpec(long i, int nDisplay);
 VOID APIENTRY SaveSetting(void);         
 VOID APIENTRY SaveData(int nDisplay, int all
 VOID APIENTRY GetBlock(long *hist, int start, int end, int step, int nDisplay);                           
 VOID APIENTRY StoreDefData(ACQDEF *Def);
 int APIENTRY GetDefData(ACQDEF *Def);	   
 VOID APIENTRY LoadData(int nDisplay, int all);     
 VOID APIENTRY NewData(void);             
 VOID APIENTRY HardwareDlg(int item);     
 VOID APIENTRY UnregisterClient(void);    
 VOID APIENTRY DestroyClient(void);       
 UINT APIENTRY ClientExec(HWND ServerWnd); Execute the Client MPANT.EXE
 VOID APIENTRY AddData(int nDisplay, int all);      
 VOID APIENTRY SubData(int nDisplay, int all);      
 VOID APIENTRY Smooth(int nDisplay);       
 int APIENTRY LVGetOneRoi(int nDisplay, int roinum, long *x1, long *x2);	
 int APIENTRY LVGetOneCnt(double *cntp, int nDisplay, int cntnum);
 VOID APIENTRY StoreMP3Setting(ACQMP3 *Defmp3);
 VOID APIENTRY StoreDatSetting(DATSETTING *Defdat);
 VOID APIENTRY StoreReplaySetting(REPLAYSETTING *Repldat);
 int APIENTRY GetReplaySetting(REPLAYSETTING *Repldat);
 int APIENTRY GetDatPtr(int nDisplay, long *xmax, long *ymax, LPSTR *pt);
 int APIENTRY ReleaseDatPtr(void);
 long APIENTRY GetSVal(int DspID, long xval);
 long APIENTRY GetRoiIndex(LPSTR roiname);
 int APIENTRY DeleteRoi(DWORD roiindex);
 int APIENTRY SelectRoi(DWORD roiindex);
 int APIENTRY GetRoiSum(DWORD roiindex, double *sum);
 int APIENTRY BytearrayToShortarray(short *Shortarray, char *Bytearray, int length);
 int APIENTRY LVGetRoinam(char *strp, int nDisplay);
 int APIENTRY LVGetSpecLength(int nDisplay);
 int APIENTRY LVGetDefData(LVACQDEF *Def);
 int APIENTRY LVGetDatSetting(LVDATSETTING *Defdat, LPSTR filename, LPSTR specfile, LPSTR command);
 int APIENTRY LVGetReplaySetting(LVREPLAYSETTING *Repldat, LPSTR filename);
 int APIENTRY LVGetProiDat(int roiid, int x0, int y0, int xdim, int ydim, double *roisum, int *datp);
 int APIENTRY LVGetRoiRect(int nDisplay, int roinum, int *x0, int *y0, int *xdim, int *ydim, int *xmax);
 int APIENTRY LVGetRroiDat(int nDisplay, int roinum, int x0, int y0, int xdim,  int ydim, int xmax, double *RoiSum, long *datp, double *area);
    }
    else { 
        printf("%s:%s Windows LoadLibray Failure\n",
	       driverName, functionName);
        return;
    }
	lastdata = (unsigned long *)calloc(1024 * 1024, sizeof(long));
     Initialize parameters
    ErrSet = (*lpNewStat)(0);
    ErrSet = (*lpStat)(&Status, 0);
        if (ErrSet) {
    if (NULL) {
        printf("%s:%s DLL getStatus Failure\n",
	       driverName, functionName);
        return;
    }
    PrintMpaStatus(&Status);
    getSettings();
    if (NULL) {
        printf("%s:%s DLL getSetting Failure\n",
	       driverName, functionName);
        return;
    }
    this->startEventId_ = epicsEventCreate(epicsEventEmpty);
    if (!this->startEventId_) {
        printf("%s:%s epicsEventCreate failure for start event\n",
            driverName, functionName);
        return;
    }
    this->stopEventId_ = epicsEventCreate(epicsEventEmpty);
    if (!this->stopEventId_) {
        printf("%s:%s epicsEventCreate failure for stop event\n",
            driverName, functionName);
        return;
    }
    createParam(mpaAcquireString,       asynParamInt32, &P_Acquire);
    createParam(mpaAutoIncrementString, asynParamInt32, &P_AutoIncrement);
    createParam(mpaAutoSaveString,      asynParamInt32, &P_AutoSave);
    createParam(mpaRunTimeEnableString, asynParamInt32, &P_RunTimeEnable);
    createParam(mpaFilenameString,      asynParamOctet,  &P_MPAFilename);
    createParam(mpaAcquireTimeString,   asynParamFloat64, &P_AcquireTime);
    createParam(mpaElapsedTimeString,   asynParamFloat64, &P_ElapsedTime);
    createParam(mpaTimeStepString,      asynParamFloat64, &P_TimeStep);
    createParam(mpaNumTimePointsString, asynParamInt32, &P_NumTimePoints);
    createParam(mpaPeriodString,        asynParamFloat64, &P_Period);
    createParam(mpaAmplitudeString,     asynParamFloat64, &P_Amplitude);
    createParam(mpaOffsetString,        asynParamFloat64, &P_Offset);
    createParam(mpaFrequencyString,     asynParamFloat64, &P_Frequency);
    createParam(mpaPhaseString,         asynParamFloat64, &P_Phase);
    createParam(mpaNoiseString,         asynParamFloat64, &P_Noise);
    createParam(mpaCommandString,       asynParamOctet,   &P_Command);
    createParam(mpaTotalRateString,     asynParamFloat64, &P_TotalRate);
    status |= setIntegerParam(P_NumTimePoints, numTimePoints);
    status |= setIntegerParam(NDDataType, dataType);
    status |= setDoubleParam(P_TimeStep, 0.001);
    status |= setDoubleParam(P_Amplitude, 1.0);
    status |= setDoubleParam(P_Offset,    0.0);
    status |= setDoubleParam(P_Period,    1.0);
    status |= setDoubleParam(P_Phase,     0.0);
    status |= setDoubleParam(P_Noise,     0.0);
    status |= setDoubleParam(P_TotalRate, 0.0);
    if (status) {
        printf("%s: unable to set parameters\n", functionName);
        return;
    }
    status = (epicsThreadCreate("mpaDetTask",
                                epicsThreadPriorityMedium,
                                epicsThreadGetStackSize(epicsThreadStackMedium),
                                (EPICSTHREADFUNC)mpaTaskC,
                                this) == NULL);
    if (status) {
        printf("%s:%s epicsThreadCreate failure for simulation task\n",
            driverName, functionName);
        return;
    }
    status = (epicsThreadCreate("mpaDetTaskBackground",
                                epicsThreadPriorityMedium,
                                epicsThreadGetStackSize(epicsThreadStackMedium),
                                (EPICSTHREADFUNC)mpaTaskCBackground,
                                this) == NULL);
    if (status) {
        printf("%s:%s epicsThreadCreate failure for simulation task\n",
            driverName, functionName);
        return;
    }
}
MPA3Detector :: MPA3Detector ( const char * portName , int numTimePoints , NDDataType_t dataType , int maxBuffers , size_t maxMemory , int priority , int stackSize , int channelNum ) : asynNDArrayDriver ( portName , MAX_SIGNALS , maxBuffers , maxMemory , 0 , 0 , ASYN_CANBLOCK | ASYN_MULTIDEVICE , 1 , priority , stackSize ) , uniqueId_ ( 0 ) , acquiring_ ( 0 ) { int status = asynSuccess ; int ErrSet ; const char * functionName = " " ; this -> channelNum = channelNum ; hDLL = LoadLibrary ( " " ) ; if ( hDLL ) { lpRun = ( IMPARUNCMD ) GetProcAddress ( hDLL , " " ) ; lpErase = ( IMPAERASE ) GetProcAddress ( hDLL , " " ) ; lpHalt = ( IMPAHALT ) GetProcAddress ( hDLL , " " ) ; lpStart = ( IMPASTART ) GetProcAddress ( hDLL , " " ) ; lpNewSetting = ( IMPANEWSET ) GetProcAddress ( hDLL , " " ) ; lpStat = ( IMPAGETSTATUS ) GetProcAddress ( hDLL , " " ) ; lpNewStat = ( IMPANEWSTATUS ) GetProcAddress ( hDLL , " " ) ; lpSet = ( IMPAGETSETTING ) GetProcAddress ( hDLL , " " ) ; lpGetDatSet = ( IMPAGETDATSET ) GetProcAddress ( hDLL , " " ) ; lpGetMp3Set = ( IMPAGETMP3SET ) GetProcAddress ( hDLL , " " ) ; lpCnt = ( IMPAGETCNT ) GetProcAddress ( hDLL , " " ) ; lpRoi = ( IMPAGETROI ) GetProcAddress ( hDLL , " " ) ; lpDat = ( IMPAGETDAT ) GetProcAddress ( hDLL , " " ) ; lpStr = ( IMPAGETSTR ) GetProcAddress ( hDLL , " " ) ; lpServ = ( IMPASERVEXEC ) GetProcAddress ( hDLL , " " ) ; lpDigInOut = ( IMPADIGINOUT ) GetProcAddress ( hDLL , " " ) ; lpDacOut = ( IMPADACOUT ) GetProcAddress ( hDLL , " " ) ; lpContinue = ( IMPACONTINUE ) GetProcAddress ( hDLL , " " ) ; lpLVGetDat = ( IMPALVGetDat ) GetProcAddress ( hDLL , " " ) ; } else { printf ( " \n " , driverName , functionName ) ; return ; } lastdata = ( unsigned long * ) calloc ( 1024 * 1024 , sizeof ( long ) ) ; ErrSet = ( * lpNewStat ) ( 0 ) ; ErrSet = ( * lpStat ) ( & Status , 0 ) ; if ( NULL ) { printf ( " \n " , driverName , functionName ) ; return ; } PrintMpaStatus ( & Status ) ; getSettings ( ) ; if ( NULL ) { printf ( " \n " , driverName , functionName ) ; return ; } this -> startEventId_ = epicsEventCreate ( epicsEventEmpty ) ; if ( ! this -> startEventId_ ) { printf ( " \n " , driverName , functionName ) ; return ; } this -> stopEventId_ = epicsEventCreate ( epicsEventEmpty ) ; if ( ! this -> stopEventId_ ) { printf ( " \n " , driverName , functionName ) ; return ; } createParam ( mpaAcquireString , asynParamInt32 , & P_Acquire ) ; createParam ( mpaAutoIncrementString , asynParamInt32 , & P_AutoIncrement ) ; createParam ( mpaAutoSaveString , asynParamInt32 , & P_AutoSave ) ; createParam ( mpaRunTimeEnableString , asynParamInt32 , & P_RunTimeEnable ) ; createParam ( mpaFilenameString , asynParamOctet , & P_MPAFilename ) ; createParam ( mpaAcquireTimeString , asynParamFloat64 , & P_AcquireTime ) ; createParam ( mpaElapsedTimeString , asynParamFloat64 , & P_ElapsedTime ) ; createParam ( mpaTimeStepString , asynParamFloat64 , & P_TimeStep ) ; createParam ( mpaNumTimePointsString , asynParamInt32 , & P_NumTimePoints ) ; createParam ( mpaPeriodString , asynParamFloat64 , & P_Period ) ; createParam ( mpaAmplitudeString , asynParamFloat64 , & P_Amplitude ) ; createParam ( mpaOffsetString , asynParamFloat64 , & P_Offset ) ; createParam ( mpaFrequencyString , asynParamFloat64 , & P_Frequency ) ; createParam ( mpaPhaseString , asynParamFloat64 , & P_Phase ) ; createParam ( mpaNoiseString , asynParamFloat64 , & P_Noise ) ; createParam ( mpaCommandString , asynParamOctet , & P_Command ) ; createParam ( mpaTotalRateString , asynParamFloat64 , & P_TotalRate ) ; status |= setIntegerParam ( P_NumTimePoints , numTimePoints ) ; status |= setIntegerParam ( NDDataType , dataType ) ; status |= setDoubleParam ( P_TimeStep , 0.001 ) ; status |= setDoubleParam ( P_Amplitude , 1.0 ) ; status |= setDoubleParam ( P_Offset , 0.0 ) ; status |= setDoubleParam ( P_Period , 1.0 ) ; status |= setDoubleParam ( P_Phase , 0.0 ) ; status |= setDoubleParam ( P_Noise , 0.0 ) ; status |= setDoubleParam ( P_TotalRate , 0.0 ) ; if ( status ) { printf ( " \n " , functionName ) ; return ; } status = ( epicsThreadCreate ( " " , epicsThreadPriorityMedium , epicsThreadGetStackSize ( epicsThreadStackMedium ) , ( EPICSTHREADFUNC ) mpaTaskC , this ) == NULL ) ; if ( status ) { printf ( " \n " , driverName , functionName ) ; return ; } status = ( epicsThreadCreate ( " " , epicsThreadPriorityMedium , epicsThreadGetStackSize ( epicsThreadStackMedium ) , ( EPICSTHREADFUNC ) mpaTaskCBackground , this ) == NULL ) ; if ( status ) { printf ( " \n " , driverName , functionName ) ; return ; } }
Constructor for MPA3Detector; most parameters are simply passed to ADDriver::ADDriver.
Constructor for MPA3Detector ; most parameters are simply passed to ADDriver :: ADDriver .
//    : asynNDArrayDriver(portName, MAX_SIGNALS, NUM_MPA_DETECTOR_PARAMS, maxBuffers, maxMemory, //               0, 0, /* No interfaces beyond those set in ADDriver.cpp */ //               ASYN_CANBLOCK | ASYN_MULTIDEVICE, /* asyn flags*/ //               1,                                /* autoConnect=1 */ //               priority, stackSize), //    uniqueId_(0), acquiring_(0) // AD > 3.0 change /* No interfaces beyond those set in ADDriver.cpp */ /* asyn flags*/ /* autoConnect=1 */ // // Original entry points // // VOID APIENTRY RunCmd(int nDisplay, LPSTR Cmd) // VOID APIENTRY Erase(int nSystem) // VOID APIENTRY Halt(int nSystem) //VOID APIENTRY Start(int nSystem) // VOID APIENTRY NewSetting(int nDev)  // int APIENTRY GetStatusData(ACQSTATUS *Status, int nDev)  // int APIENTRY GetStatus(int nDev) // int APIENTRY GetSettingData(ACQSETTING *Setting, int nDisplay) //int APIENTRY GetDatSetting(DATSETTING *Defdat)  // int APIENTRY GetMP3Setting(ACQMP3 *Defmp3) // // additional entry points // // int APIENTRY LVGetCnt(double *cntp, int nDisplay); // int APIENTRY LVGetRoi(unsigned long FAR *roip, int nDisplay); // int APIENTRY LVGetDat(unsigned long HUGE *datp, int nDisplay); // int APIENTRY LVGetStr(char *strp, int nDisplay); // UINT APIENTRY ServExec(HWND ClientWnd);// Execute the Server MPA3.EXE // int APIENTRY DigInOut(int value, int enable);  // int APIENTRY DacOut(int value);   // VOID APIENTRY Continue(int nSystem);  // // Potential future entry points // // VOID APIENTRY StoreSettingData(ACQSETTING *Setting, int nDisplay); // VOID APIENTRY StoreStatusData(ACQSTATUS *Status, int nDev); // VOID APIENTRY StoreData(ACQDATA *Data, int nDisplay); // int APIENTRY GetData(ACQDATA *Data, int nDisplay); // long APIENTRY GetSpec(long i, int nDisplay); // VOID APIENTRY SaveSetting(void);          // VOID APIENTRY SaveData(int nDisplay, int all // VOID APIENTRY GetBlock(long *hist, int start, int end, int step, int nDisplay);                            // VOID APIENTRY StoreDefData(ACQDEF *Def); // int APIENTRY GetDefData(ACQDEF *Def);	    // VOID APIENTRY LoadData(int nDisplay, int all);      // VOID APIENTRY NewData(void);              // VOID APIENTRY HardwareDlg(int item);      // VOID APIENTRY UnregisterClient(void);     // VOID APIENTRY DestroyClient(void);        // UINT APIENTRY ClientExec(HWND ServerWnd);// Execute the Client MPANT.EXE // VOID APIENTRY AddData(int nDisplay, int all);       // VOID APIENTRY SubData(int nDisplay, int all);       // VOID APIENTRY Smooth(int nDisplay);        // int APIENTRY LVGetOneRoi(int nDisplay, int roinum, long *x1, long *x2);	 // int APIENTRY LVGetOneCnt(double *cntp, int nDisplay, int cntnum); // VOID APIENTRY StoreMP3Setting(ACQMP3 *Defmp3); // VOID APIENTRY StoreDatSetting(DATSETTING *Defdat); // VOID APIENTRY StoreReplaySetting(REPLAYSETTING *Repldat); // int APIENTRY GetReplaySetting(REPLAYSETTING *Repldat); // int APIENTRY GetDatPtr(int nDisplay, long *xmax, long *ymax, LPSTR *pt); // int APIENTRY ReleaseDatPtr(void); // long APIENTRY GetSVal(int DspID, long xval); // long APIENTRY GetRoiIndex(LPSTR roiname); // int APIENTRY DeleteRoi(DWORD roiindex); // int APIENTRY SelectRoi(DWORD roiindex); // int APIENTRY GetRoiSum(DWORD roiindex, double *sum); // int APIENTRY BytearrayToShortarray(short *Shortarray, char *Bytearray, int length); // int APIENTRY LVGetRoinam(char *strp, int nDisplay); // int APIENTRY LVGetSpecLength(int nDisplay); // int APIENTRY LVGetDefData(LVACQDEF *Def); // int APIENTRY LVGetDatSetting(LVDATSETTING *Defdat, LPSTR filename, LPSTR specfile, LPSTR command); // int APIENTRY LVGetReplaySetting(LVREPLAYSETTING *Repldat, LPSTR filename); // int APIENTRY LVGetProiDat(int roiid, int x0, int y0, int xdim, int ydim, double *roisum, int *datp); // int APIENTRY LVGetRoiRect(int nDisplay, int roinum, int *x0, int *y0, int *xdim, int *ydim, int *xmax); // int APIENTRY LVGetRroiDat(int nDisplay, int roinum, int x0, int y0, int xdim, // int ydim, int xmax, double *RoiSum, long *datp, double *area); // Initialize parameters //    if (ErrSet) { /* Create the epicsEvents for signaling to the simulate task when acquisition starts and stops */ /* Create the thread that updates the images */ /* Create the thread that updates the images */