Changes for dynamic link modificartion
This commit is contained in:
@@ -102,7 +102,7 @@ LOCAL long init_1771Ofe(struct aoRecord *prec)
|
||||
|
||||
if (prec->out.type != AB_IO){
|
||||
recGblRecordError(S_db_badField,(void *)prec,
|
||||
"devAiAb1771Ife (init_record) Illegal INP field");
|
||||
"devAoAb1771Ofe (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
/* set linear conversion slope*/
|
||||
@@ -134,7 +134,7 @@ LOCAL long init_1771Ofe(struct aoRecord *prec)
|
||||
if(drvStatus!=abSuccess) {
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,(void *)prec,
|
||||
"devAiAb1771Ife (init_record) startScan");
|
||||
"devAoAb1771Ofe (init_record) startScan");
|
||||
break;
|
||||
}
|
||||
/*wait for up to 3 seconds*/
|
||||
@@ -156,7 +156,7 @@ LOCAL long init_1771Ofe(struct aoRecord *prec)
|
||||
default:
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,(void *)prec,
|
||||
"devAiAb1771Ife (init_record) registerCard");
|
||||
"devAoAb1771Ofe (init_record) registerCard");
|
||||
break;
|
||||
}
|
||||
return(status);
|
||||
|
||||
+4
-13
@@ -51,9 +51,6 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <aiRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devAiSoft */
|
||||
static long init_record();
|
||||
@@ -84,18 +81,12 @@ static long init_record(pai)
|
||||
/* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pai->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pai->inp,DBF_DOUBLE,&pai->val))
|
||||
pai->udf = FALSE;
|
||||
|
||||
recGblInitConstantLink(&pai->inp,DBF_DOUBLE,&pai->val);
|
||||
pai->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
status = recGblInitFastInLink(&(pai->inp), (struct dbCommon *) pai,
|
||||
DBR_DOUBLE, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField, (void *)pai,
|
||||
@@ -113,7 +104,7 @@ static long read_ai(pai)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pai->inp), (void *) pai, &(pai->val));
|
||||
status = dbGetLink(&(pai->inp),DBR_DOUBLE, &(pai->val),0,0);
|
||||
|
||||
if (RTN_SUCCESS(status))
|
||||
pai->udf = FALSE;
|
||||
|
||||
@@ -51,9 +51,6 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <aiRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devAiSoftRaw */
|
||||
static long init_record();
|
||||
@@ -86,11 +83,11 @@ static long init_record(pai)
|
||||
switch (pai->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pai->inp,DBF_LONG,&pai->rval);
|
||||
pai->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
status = recGblInitFastInLink(&(pai->inp), (void *) pai, DBR_LONG, "RVAL");
|
||||
if(status) return(status);
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pai,
|
||||
@@ -105,7 +102,7 @@ static long read_ai(pai)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pai->inp),(void *)pai,&(pai->rval));
|
||||
status = dbGetLink(&(pai->inp),DBR_LONG,&(pai->rval),0,0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
+2
-7
@@ -80,12 +80,7 @@ struct aoRecord *pao;
|
||||
{
|
||||
|
||||
long status=0;
|
||||
|
||||
status = recGblInitFastOutLink(&(pao->out), (void *) pao, DBR_DOUBLE, "OVAL");
|
||||
|
||||
/* dont convert */
|
||||
if (status == 0) status = 2;
|
||||
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
@@ -95,7 +90,7 @@ static long write_ao(pao)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pao->out), (void *)pao, &(pao->oval));
|
||||
status = dbPutLink(&pao->out,DBR_DOUBLE, &pao->oval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -75,12 +75,7 @@ struct {
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
long status = 0L;
|
||||
|
||||
status = recGblInitFastOutLink(&(pao->out), (void *) pao, DBR_LONG, "RVAL");
|
||||
|
||||
return status;
|
||||
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_ao(pao)
|
||||
@@ -88,7 +83,7 @@ static long write_ao(pao)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pao->out), (void *)pao, &(pao->rval));
|
||||
status = dbPutLink(&pao->out,DBR_LONG,&pao->rval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
+4
-9
@@ -49,9 +49,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devBiSoft */
|
||||
static long init_record();
|
||||
@@ -81,14 +78,12 @@ static long init_record(pbi)
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK */
|
||||
switch (pbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pbi->inp,DBF_ENUM,&pbi->val))
|
||||
pbi->udf = FALSE;
|
||||
recGblInitConstantLink(&pbi->inp,DBF_ENUM,&pbi->val);
|
||||
pbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
status = recGblInitFastInLink(&(pbi->inp), (void *) pbi, DBR_USHORT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pbi,
|
||||
@@ -103,7 +98,7 @@ static long read_bi(pbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pbi->inp), (void *)pbi, &(pbi->val));
|
||||
status = dbGetLink(&pbi->inp, DBR_USHORT, &pbi->val,0,0);
|
||||
|
||||
if(RTN_SUCCESS(status)) pbi->udf=FALSE;
|
||||
|
||||
|
||||
@@ -50,9 +50,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devBiSoftRaw */
|
||||
static long init_record();
|
||||
@@ -83,14 +80,11 @@ static long init_record(pbi)
|
||||
switch (pbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pbi->inp,DBF_ULONG,&pbi->rval);
|
||||
pbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
status = recGblInitFastInLink(&(pbi->inp), (void *) pbi, DBR_ULONG, "RVAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pbi,
|
||||
@@ -105,7 +99,7 @@ static long read_bi(pbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pbi->inp), (void *)pbi, &(pbi->rval));
|
||||
status = dbGetLink(&pbi->inp, DBR_ULONG, &pbi->rval,0,0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
+2
-5
@@ -77,11 +77,8 @@ struct boRecord *pbo;
|
||||
|
||||
long status=0;
|
||||
|
||||
status = recGblInitFastOutLink(&(pbo->out), (void *) pbo, DBR_USHORT, "VAL");
|
||||
|
||||
/* dont convert */
|
||||
if (status == 0 ) status=2;
|
||||
|
||||
status=2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
@@ -91,7 +88,7 @@ static long write_bo(pbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pbo->out), (void *)pbo, &(pbo->val));
|
||||
status = dbPutLink(&pbo->out,DBR_USHORT,&pbo->val,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -75,8 +75,8 @@ static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblInitFastOutLink(&(pbo->out), (void *) pbo, DBR_LONG, "RVAL");
|
||||
|
||||
/*Don't convert*/
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
@@ -87,7 +87,7 @@ static long write_bo(pbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pbo->out), (void *)pbo, &(pbo->rval));
|
||||
status = dbPutLink(&pbo->out,DBR_LONG, &pbo->rval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
+3
-13
@@ -48,9 +48,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <eventRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devEventSoft */
|
||||
static long init_record();
|
||||
@@ -79,15 +76,11 @@ static long init_record(pevent)
|
||||
/* event.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pevent->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pevent->inp,DBF_USHORT,&pevent->val))
|
||||
pevent->udf = FALSE;
|
||||
recGblInitConstantLink(&pevent->inp,DBF_USHORT,&pevent->val);
|
||||
pevent->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pevent->inp), (void *) pevent, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -103,10 +96,7 @@ static long read_event(pevent)
|
||||
{
|
||||
long status,options=0,nRequest=1;
|
||||
|
||||
status = recGblGetLinkValue(&(pevent->inp),(void *)pevent,DBR_USHORT,&(pevent->val),
|
||||
&options,&nRequest);
|
||||
|
||||
status = dbGetLink(&pevent->inp,DBR_USHORT,&pevent->val,0,0);
|
||||
if(RTN_SUCCESS(status)) pevent->udf=FALSE;
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -81,14 +81,11 @@ static long init_record(phistogram)
|
||||
switch (phistogram->svl.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl);
|
||||
phistogram->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
status = recGblInitFastInLink(&phistogram->svl, phistogram, DBR_DOUBLE, "SGNL");
|
||||
|
||||
if (status != 0)
|
||||
return(status);
|
||||
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)phistogram,
|
||||
@@ -103,7 +100,7 @@ static long read_histogram(phistogram)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(phistogram->svl), (void *)phistogram, &(phistogram->sgnl));
|
||||
status = dbGetLink(&phistogram->svl,DBR_DOUBLE, &phistogram->sgnl,0,0);
|
||||
|
||||
return(0); /*add count*/
|
||||
}
|
||||
|
||||
+4
-13
@@ -47,9 +47,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <longinRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devLiSoft */
|
||||
static long init_record();
|
||||
@@ -78,16 +75,12 @@ static long init_record(plongin)
|
||||
/* longin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (plongin->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&plongin->inp,DBF_LONG,&plongin->val))
|
||||
plongin->udf = FALSE;
|
||||
recGblInitConstantLink(&plongin->inp,DBF_LONG,&plongin->val);
|
||||
plongin->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
status = recGblInitFastInLink(&(plongin->inp), (void *) plongin, DBR_LONG, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)plongin,
|
||||
@@ -102,9 +95,7 @@ static long read_longin(plongin)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(plongin->inp), (void *)plongin, &(plongin->val));
|
||||
|
||||
status = dbGetLink(&plongin->inp,DBR_LONG, &plongin->val,0,0);
|
||||
if(RTN_SUCCESS(status)) plongin->udf=FALSE;
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
+2
-7
@@ -71,12 +71,7 @@ struct {
|
||||
static long init_record(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
long status = 0L;
|
||||
|
||||
status = recGblInitFastOutLink(&(plongout->out), (void *) plongout, DBR_LONG, "VAL");
|
||||
|
||||
return(status);
|
||||
|
||||
return(0);
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_longout(plongout)
|
||||
@@ -84,7 +79,7 @@ static long write_longout(plongout)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(plongout->out), (void *)plongout, &(plongout->val));
|
||||
status = dbPutLink(&plongout->out,DBR_LONG, &plongout->val,1);
|
||||
|
||||
if (RTN_SUCCESS(status))
|
||||
plongout->udf=FALSE;
|
||||
|
||||
@@ -48,11 +48,6 @@
|
||||
#include <module_types.h>
|
||||
#include <mbbiDirectRecord.h>
|
||||
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
|
||||
/* Create the dset for devMbbiSoft */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
@@ -81,14 +76,12 @@ static long init_record(pmbbi)
|
||||
/* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val))
|
||||
pmbbi->udf = FALSE;
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val);
|
||||
pmbbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
status = recGblInitFastInLink(&(pmbbi->inp), (void *) pmbbi, DBR_USHORT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
@@ -103,9 +96,7 @@ static long read_mbbi(pmbbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pmbbi->inp), (void *)pmbbi, &(pmbbi->val));
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0);
|
||||
if (RTN_SUCCESS(status)) pmbbi->udf=FALSE;
|
||||
|
||||
return(2);
|
||||
}
|
||||
|
||||
@@ -47,11 +47,6 @@
|
||||
#include <module_types.h>
|
||||
#include <mbbiDirectRecord.h>
|
||||
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
|
||||
/* Create the dset for devMbbiDirectSoftRaw */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
@@ -81,12 +76,11 @@ static long init_record(pmbbi)
|
||||
switch (pmbbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ULONG,&pmbbi->rval);
|
||||
pmbbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
status = recGblInitFastInLink(&(pmbbi->inp), (void *) pmbbi, DBR_ULONG, "RVAL");
|
||||
if (status)
|
||||
return(status);
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
@@ -101,7 +95,7 @@ static long read_mbbi(pmbbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pmbbi->inp), (void *) pmbbi, &(pmbbi->rval));
|
||||
status = dbGetLink(&pmbbi->inp,DBR_LONG,&pmbbi->rval,0,0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
+3
-16
@@ -49,9 +49,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
|
||||
/* Create the dset for devMbbiSoft */
|
||||
@@ -80,17 +77,9 @@ static long init_record(pmbbi)
|
||||
long status;
|
||||
|
||||
if (pmbbi->inp.type == CONSTANT) {
|
||||
if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val))
|
||||
pmbbi->udf = FALSE;
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val);
|
||||
pmbbi->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbi->inp), (void *) pmbbi, DBR_USHORT, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -99,9 +88,7 @@ static long read_mbbi(pmbbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pmbbi->inp), (void *)pmbbi, &(pmbbi->val));
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0);
|
||||
if(RTN_SUCCESS(status)) pmbbi->udf=FALSE;
|
||||
|
||||
return(2);
|
||||
}
|
||||
|
||||
@@ -50,10 +50,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
|
||||
/* Create the dset for devMbbiSoftRaw */
|
||||
static long init_record();
|
||||
@@ -82,14 +78,8 @@ static long init_record(pmbbi)
|
||||
|
||||
if (pmbbi->inp.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ULONG,&pmbbi->rval);
|
||||
pmbbi->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbi->inp), (void *) pmbbi, DBR_ULONG, "RVAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -98,7 +88,6 @@ static long read_mbbi(pmbbi)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblGetFastLink(&(pmbbi->inp), (void *)pmbbi, &(pmbbi->rval));
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_LONG,&pmbbi->rval,0,0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -76,12 +76,8 @@ struct mbboDirectRecord *pmbbo;
|
||||
|
||||
long status = 0;
|
||||
|
||||
status = recGblInitFastOutLink(&(pmbbo->out), (void *) pmbbo, DBR_USHORT, "VAL");
|
||||
|
||||
/* dont convert */
|
||||
if (status == 0)
|
||||
status = 2;
|
||||
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
@@ -91,9 +87,7 @@ static long write_mbbo(pmbbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pmbbo->out), (void *)pmbbo, &(pmbbo->val));
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_USHORT,&pmbbo->val,1);
|
||||
if (RTN_SUCCESS(status)) pmbbo->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -75,13 +75,9 @@ struct mbboDirectRecord *pmbbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblInitFastOutLink(&(pmbbo->out), (void *) pmbbo, DBR_ULONG, "RVAL");
|
||||
|
||||
if (pmbbo->out.type != PV_LINK)
|
||||
status = 2;
|
||||
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
@@ -89,7 +85,6 @@ static long write_mbbo(pmbbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pmbbo->out), (void *)pmbbo, &(pmbbo->rval));
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_LONG, &pmbbo->rval,1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -79,11 +79,8 @@ struct mbboRecord *pmbbo;
|
||||
|
||||
long status=0;
|
||||
|
||||
status = recGblInitFastOutLink(&(pmbbo->out), (void *) pmbbo, DBR_USHORT, "VAL");
|
||||
|
||||
/* dont convert */
|
||||
if ( status == 0 ) status=2;
|
||||
|
||||
/*dont convert*/
|
||||
status=2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
@@ -93,9 +90,7 @@ static long write_mbbo(pmbbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pmbbo->out), (void *)pmbbo, &(pmbbo->val));
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_USHORT, &pmbbo->val,1);
|
||||
if(RTN_SUCCESS(status)) pmbbo->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ struct mbboRecord *pmbbo;
|
||||
|
||||
long status;
|
||||
|
||||
status = recGblInitFastOutLink(&(pmbbo->out), (void *) pmbbo, DBR_ULONG, "RVAL");
|
||||
/*dont convert*/
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
@@ -87,7 +87,6 @@ static long write_mbbo(pmbbo)
|
||||
{
|
||||
long status;
|
||||
|
||||
status = recGblPutFastLink(&(pmbbo->out), (void *)pmbbo, &(pmbbo->rval));
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_LONG, &pmbbo->rval,1);
|
||||
return(0);
|
||||
}
|
||||
|
||||
+4
-19
@@ -49,12 +49,8 @@
|
||||
#include <module_types.h>
|
||||
#include <pulseTrainRecord.h>
|
||||
|
||||
/* added for Channel Access Links */
|
||||
long dbCaAddOutlink();
|
||||
long dbCaPutLink();
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devPtSoft */
|
||||
static long init_record();
|
||||
static long write_pt();
|
||||
|
||||
struct {
|
||||
@@ -75,26 +71,15 @@ struct {
|
||||
static long init_record(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
|
||||
long status;
|
||||
|
||||
if (ppt->out.type == PV_LINK)
|
||||
status = dbCaAddOutlink(&(ppt->out), (void *) ppt, "VAL");
|
||||
else
|
||||
status = 0L;
|
||||
|
||||
return status;
|
||||
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_pt(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
long status,nRequest=1;
|
||||
|
||||
status = recGblPutLinkValue(&(ppt->out),(void *)ppt,DBR_SHORT,&(ppt->val),&nRequest);
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&(ppt->out),DBR_SHORT,&(ppt->val),1);
|
||||
if(RTN_SUCCESS(status)) ppt->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
+2
-10
@@ -49,9 +49,6 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <subArrayRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
static int sizeofTypes[] = {MAX_STRING_SIZE,1,1,2,2,4,4,4,8,2};
|
||||
|
||||
@@ -85,11 +82,7 @@ static long init_record(psa)
|
||||
psa->nord = 0;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(psa->inp), (void *) psa, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -103,14 +96,13 @@ static long init_record(psa)
|
||||
static long read_sa(psa)
|
||||
struct subArrayRecord *psa;
|
||||
{
|
||||
long status,ecount,options=0,nRequest;
|
||||
long status,ecount,nRequest;
|
||||
|
||||
if ((psa->indx + psa->nelm) < psa->malm)
|
||||
nRequest= psa->indx + psa->nelm;
|
||||
else
|
||||
nRequest=psa->malm;
|
||||
status = recGblGetLinkValue(&(psa->inp),(void *)psa,psa->ftvl,
|
||||
psa->bptr, &options,&nRequest);
|
||||
status = dbGetLink(&psa->inp,psa->ftvl,psa->bptr, 0,&nRequest);
|
||||
if ((nRequest - psa->indx) > 0)
|
||||
{
|
||||
if (psa->nelm > (nRequest - psa->indx))
|
||||
|
||||
+4
-15
@@ -47,10 +47,6 @@
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <stringinRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
|
||||
/* Create the dset for devSiSoft */
|
||||
static long init_record();
|
||||
@@ -79,15 +75,11 @@ static long init_record(pstringin)
|
||||
/* stringin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pstringin->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pstringin->inp,DBF_STRING,pstringin->val))
|
||||
pstringin->udf = FALSE;
|
||||
recGblInitConstantLink(&pstringin->inp,DBF_STRING,pstringin->val);
|
||||
pstringin->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pstringin->inp), (void *) pstringin, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -101,12 +93,9 @@ static long init_record(pstringin)
|
||||
static long read_stringin(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
long status,options=0,nRequest=1;
|
||||
|
||||
status = recGblGetLinkValue(&(pstringin->inp),(void *)pstringin,DBR_STRING,pstringin->val,
|
||||
&options,&nRequest);
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pstringin->inp,DBR_STRING,pstringin->val,0,0);
|
||||
if(RTN_SUCCESS(status)) pstringin->udf=FALSE;
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
+4
-18
@@ -47,12 +47,8 @@
|
||||
#include <module_types.h>
|
||||
#include <stringoutRecord.h>
|
||||
|
||||
/* added for Channel Access Links */
|
||||
long dbCaAddOutlink();
|
||||
long dbCaPutLink();
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devSoSoft */
|
||||
static long init_record();
|
||||
static long write_stringout();
|
||||
|
||||
struct {
|
||||
@@ -74,25 +70,15 @@ struct {
|
||||
static long init_record(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
|
||||
long status;
|
||||
|
||||
if (pstringout->out.type == PV_LINK)
|
||||
status = dbCaAddOutlink(&(pstringout->out), (void *) pstringout, "VAL");
|
||||
else
|
||||
status = 0L;
|
||||
|
||||
return status;
|
||||
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_stringout(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
long status,nRequest=1;
|
||||
long status;
|
||||
|
||||
status = recGblPutLinkValue(&(pstringout->out),(void *)pstringout,DBR_STRING,pstringout->val,
|
||||
&nRequest);
|
||||
status = dbPutLink(&pstringout->out,DBR_STRING,pstringout->val,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
+3
-11
@@ -49,9 +49,6 @@
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <waveformRecord.h>
|
||||
/* Added for Channel Access Links */
|
||||
long dbCaAddInlink();
|
||||
long dbCaGetLink();
|
||||
|
||||
/* Create the dset for devWfSoft */
|
||||
static long init_record();
|
||||
@@ -83,11 +80,7 @@ static long init_record(pwf)
|
||||
pwf->nord = 0;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pwf->inp), (void *) pwf, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -101,12 +94,11 @@ static long init_record(pwf)
|
||||
static long read_wf(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
long status,options=0,nRequest;
|
||||
long status,nRequest;
|
||||
|
||||
nRequest=pwf->nelm;
|
||||
status = recGblGetLinkValue(&(pwf->inp),(void *)pwf,pwf->ftvl,pwf->bptr,
|
||||
&options,&nRequest);
|
||||
/*If recGblGetLinkValue got no values leave things as they were*/
|
||||
status = dbGetLink(&pwf->inp,pwf->ftvl,pwf->bptr, 0,&nRequest);
|
||||
/*If dbGetLink got no values leave things as they were*/
|
||||
if(nRequest>0) pwf->nord = nRequest;
|
||||
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user