diff --git a/pdbApp/demo.cpp b/pdbApp/demo.cpp index c5030d1..b25fb15 100644 --- a/pdbApp/demo.cpp +++ b/pdbApp/demo.cpp @@ -57,6 +57,30 @@ long process_spin(waveformRecord *prec) return 0; } +long process_repeat(waveformRecord *prec) +{ + long ret; + if(prec->ftvl!=menuFtypeULONG) { + recGblSetSevr(prec, READ_ALARM, INVALID_ALARM); + return S_db_badDbrtype; + } + + epicsUInt32 iv=0; + if(!!(ret = dbGetLink(&prec->inp, DBF_ULONG, &iv, NULL, NULL))) { + recGblSetSevr(prec, READ_ALARM, INVALID_ALARM); + return ret; + } + + epicsUInt32 *val = (epicsUInt32*)prec->bptr; + for(size_t i=0, N=prec->nelm; inord = iv; + + return 0; +} + long process_utag(longinRecord *prec) { long status = dbGetLink(&prec->inp, DBR_LONG, &prec->val, 0, 0); @@ -80,11 +104,13 @@ struct dset5 }; dset5 devWfPDBDemo = {5,0,0,&init_spin,0,&process_spin}; +dset5 devWfPDBDemoRepeat = {5,0,0,0,0,&process_repeat}; dset5 devLoPDBUTag = {5,0,0,0,0,&process_utag}; } // namespace extern "C" { epicsExportAddress(dset, devWfPDBDemo); +epicsExportAddress(dset, devWfPDBDemoRepeat); epicsExportAddress(dset, devLoPDBUTag); } diff --git a/pdbApp/qsrv-new.dbd b/pdbApp/qsrv-new.dbd index 7ac8602..107bacf 100644 --- a/pdbApp/qsrv-new.dbd +++ b/pdbApp/qsrv-new.dbd @@ -7,6 +7,7 @@ link("pva", "lsetPVA") # from demo.cpp device(waveform, CONSTANT, devWfPDBDemo, "QSRV Demo") +device(waveform, CONSTANT, devWfPDBDemoRepeat, "QSRV Demo Replicate") device(longin, CONSTANT, devLoPDBUTag, "QSRV Set UTag") # from imagedemo.c function(QSRV_image_demo) diff --git a/pdbApp/qsrv-old.dbd b/pdbApp/qsrv-old.dbd index 05b9edd..d3cc488 100644 --- a/pdbApp/qsrv-old.dbd +++ b/pdbApp/qsrv-old.dbd @@ -6,6 +6,7 @@ registrar(installPVAAddLinkHook) # from demo.cpp device(waveform, CONSTANT, devWfPDBDemo, "QSRV Demo") +device(waveform, CONSTANT, devWfPDBDemoRepeat, "QSRV Demo Replicate") device(longin, CONSTANT, devLoPDBUTag, "QSRV Set UTag") # from imagedemo.c function(QSRV_image_demo)