Changes for dynamic link modification
This commit is contained in:
@@ -131,9 +131,6 @@ static long init_record(paai,pass)
|
||||
recGblInitConstantLink(&paai->siml,DBF_USHORT,&paai->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(paai->siml), (void *) paai, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -147,9 +144,6 @@ static long init_record(paai,pass)
|
||||
case (CONSTANT) :
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(paai->siol), (void *) paai, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -317,8 +311,6 @@ static long readValue(paai)
|
||||
{
|
||||
long status;
|
||||
struct aaidset *pdset = (struct aaidset *) (paai->dset);
|
||||
long nRequest=1;
|
||||
long options=0;
|
||||
|
||||
|
||||
if (paai->pact == TRUE){
|
||||
@@ -326,8 +318,7 @@ static long readValue(paai)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetLinkValue(&(paai->siml),
|
||||
(void *)paai,DBR_ENUM,&(paai->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(paai->siml),DBR_ENUM,&(paai->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ recordtype(aai) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_BITS1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
@@ -63,13 +62,11 @@ recordtype(aai) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_HIST)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -131,9 +131,6 @@ static long init_record(paao,pass)
|
||||
recGblInitConstantLink(&paao->siml,DBF_USHORT,&paao->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(paao->siml), (void *) paao, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -147,9 +144,6 @@ static long init_record(paao,pass)
|
||||
case (CONSTANT) :
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(paao->siol), (void *) paao, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -314,8 +308,6 @@ static long writeValue(paao)
|
||||
{
|
||||
long status;
|
||||
struct aaodset *pdset = (struct aaodset *) (paao->dset);
|
||||
long nRequest=1;
|
||||
long options=0;
|
||||
|
||||
|
||||
if (paao->pact == TRUE){
|
||||
@@ -323,8 +315,7 @@ static long writeValue(paao)
|
||||
return(0);
|
||||
}
|
||||
|
||||
status=recGblGetLinkValue(&(paao->siml),
|
||||
(void *)paao,DBR_ENUM,&(paao->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(paao->siml),DBR_ENUM,&(paao->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ recordtype(aao) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_BITS1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
@@ -63,13 +62,11 @@ recordtype(aao) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_DISPLAY)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_HIST)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -165,19 +165,11 @@ static long init_record(void *precord,int pass)
|
||||
if (pai->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pai->siml,DBF_USHORT,&pai->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pai->siml), (void *) pai, DBR_ENUM, "SIMM");
|
||||
if (status) return(status);
|
||||
}
|
||||
|
||||
/* ai.siol must be a CONSTANT or a PV_LINK or a DB_LINK */
|
||||
if (pai->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pai->siol,DBF_DOUBLE,&pai->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pai->siol), (void *) pai, DBR_DOUBLE, "SVAL");
|
||||
if (status) return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (aidset *)(pai->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pai,"ai: init_record");
|
||||
@@ -455,7 +447,7 @@ static long readValue(aiRecord *pai)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblGetFastLink(&(pai->siml), (void *)pai, &(pai->simm));
|
||||
status = dbGetLink(&(pai->siml),DBR_USHORT,&(pai->simm),0,0);
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
@@ -465,7 +457,7 @@ static long readValue(aiRecord *pai)
|
||||
return(status);
|
||||
}
|
||||
if (pai->simm == YES){
|
||||
status = recGblGetFastLink(&(pai->siol), (void *)pai, &(pai->sval));
|
||||
status = dbGetLink(&(pai->siol),DBR_DOUBLE,&(pai->sval),0,0);
|
||||
if (status==0){
|
||||
pai->val=pai->sval;
|
||||
pai->udf=FALSE;
|
||||
|
||||
@@ -8,7 +8,6 @@ recordtype(ai) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(PREC,DBF_SHORT) {
|
||||
@@ -194,7 +193,6 @@ recordtype(ai) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_DOUBLE) {
|
||||
@@ -203,7 +201,6 @@ recordtype(ai) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -164,14 +164,6 @@ static long init_record(pao,pass)
|
||||
if (pao->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pao->siml,DBF_USHORT,&pao->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pao->siml), (void *) pao, DBR_ENUM, "SIMM");
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
status = recGblInitFastOutLink(&(pao->siol), (void *) pao, DBR_DOUBLE, "OVAL");
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
if(!(pdset = (struct aodset *)(pao->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pao,"ao: init_record");
|
||||
@@ -179,15 +171,8 @@ static long init_record(pao,pass)
|
||||
}
|
||||
/* get the initial value if dol is a constant*/
|
||||
if (pao->dol.type == CONSTANT) {
|
||||
if(recGblInitConstantLink(&pao->dol,DBF_DOUBLE,&pao->val))
|
||||
pao->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pao->dol), (void *) pao,
|
||||
DBR_DOUBLE, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
recGblInitConstantLink(&pao->dol,DBF_DOUBLE,&pao->val);
|
||||
pao->udf = FALSE;
|
||||
}
|
||||
|
||||
/* must have write_ao function defined */
|
||||
@@ -464,7 +449,7 @@ static void fetch_value(pao,pvalue)
|
||||
/* don't allow dbputs to val field */
|
||||
pao->val=pao->pval;
|
||||
|
||||
status = recGblGetFastLink(&pao->dol, (void *) pao, pvalue);
|
||||
status = dbGetLink(&pao->dol,DBR_DOUBLE,pvalue,0,0);
|
||||
pao->pact = save_pact;
|
||||
|
||||
if (status) {
|
||||
@@ -587,7 +572,7 @@ static long writeValue(pao)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblGetFastLink(&(pao->siml), (void *)pao, &(pao->simm));
|
||||
status = dbGetLink(&pao->siml,DBR_USHORT,&(pao->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -596,7 +581,7 @@ static long writeValue(pao)
|
||||
return(status);
|
||||
}
|
||||
if (pao->simm == YES){
|
||||
status = recGblPutFastLink(&(pao->siol), (void *)pao, &(pao->oval));
|
||||
status = dbPutLink(&(pao->siol),DBR_DOUBLE,&(pao->oval),1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(pao,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -15,7 +15,6 @@ recordtype(ao) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OROC,DBF_FLOAT) {
|
||||
@@ -26,7 +25,6 @@ recordtype(ao) {
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
@@ -244,13 +242,11 @@ recordtype(ao) {
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -136,21 +136,11 @@ static long init_record(pbi,pass)
|
||||
if (pbi->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pbi->siml,DBF_USHORT,&pbi->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pbi->siml), (void *) pbi, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* bi.siol must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
if (pbi->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pbi->siol,DBF_USHORT,&pbi->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pbi->siol), (void *) pbi, DBR_USHORT, "SVAL");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (struct bidset *)(pbi->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pbi,"bi: init_record");
|
||||
@@ -321,7 +311,7 @@ static long readValue(pbi)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblGetFastLink(&(pbi->siml), (void *)pbi, &(pbi->simm));
|
||||
status = dbGetLink(&(pbi->siml),DBR_USHORT, &(pbi->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -330,7 +320,7 @@ static long readValue(pbi)
|
||||
return(status);
|
||||
}
|
||||
if (pbi->simm == YES){
|
||||
status=recGblGetFastLink(&(pbi->siol), (void *)pbi, &(pbi->sval));
|
||||
status=dbGetLink(&(pbi->siol),DBR_USHORT,&(pbi->sval),0,0);
|
||||
if (status==0){
|
||||
pbi->val=pbi->sval;
|
||||
pbi->udf=FALSE;
|
||||
|
||||
@@ -3,7 +3,6 @@ recordtype(bi) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(VAL,DBF_ENUM) {
|
||||
@@ -73,7 +72,6 @@ recordtype(bi) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_USHORT) {
|
||||
@@ -82,7 +80,6 @@ recordtype(bi) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -190,16 +190,6 @@ static long init_record(pbo,pass)
|
||||
if (pbo->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pbo->siml,DBF_USHORT,&pbo->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pbo->siml), (void *) pbo, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* bo.siol */
|
||||
status = recGblInitFastOutLink(&(pbo->siol), (void *) pbo, DBR_USHORT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
if(!(pdset = (struct bodset *)(pbo->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pbo,"bo: init_record");
|
||||
@@ -212,19 +202,13 @@ static long init_record(pbo,pass)
|
||||
}
|
||||
/* get the initial value */
|
||||
if (pbo->dol.type == CONSTANT) {
|
||||
unsigned short ival;
|
||||
unsigned short ival = 0;
|
||||
|
||||
recGblInitConstantLink(&pbo->dol,DBF_USHORT,&ival);
|
||||
if (ival == 0) pbo->val = 0;
|
||||
else pbo->val = 1;
|
||||
pbo->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pbo->dol), (void *) pbo, DBR_USHORT, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
pcallback = (struct callback *)(calloc(1,sizeof(struct callback)));
|
||||
pbo->rpvt = (void *)pcallback;
|
||||
@@ -260,7 +244,7 @@ static long process(pbo)
|
||||
unsigned short val;
|
||||
|
||||
pbo->pact = TRUE;
|
||||
status = recGblGetFastLink(&pbo->dol, (void *) pbo, &val);
|
||||
status=dbGetLink(&pbo->dol,DBR_USHORT, &val,0,0);
|
||||
pbo->pact = FALSE;
|
||||
if(status==0){
|
||||
pbo->val = val;
|
||||
@@ -460,7 +444,7 @@ static long writeValue(pbo)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pbo->siml), (void *)pbo, &(pbo->simm));
|
||||
status=dbGetLink(&pbo->siml,DBR_USHORT, &pbo->simm,0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -469,7 +453,7 @@ static long writeValue(pbo)
|
||||
return(status);
|
||||
}
|
||||
if (pbo->simm == YES){
|
||||
status=recGblPutFastLink(&(pbo->siol), (void *)pbo, &(pbo->val));
|
||||
status=dbPutLink(&(pbo->siol),DBR_USHORT, &(pbo->val),1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(pbo,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -14,13 +14,11 @@ recordtype(bo) {
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(HIGH,DBF_FLOAT) {
|
||||
@@ -113,13 +111,11 @@ recordtype(bo) {
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -158,11 +158,6 @@ static long init_record(pcalc,pass)
|
||||
if (plink->type == CONSTANT) {
|
||||
recGblInitConstantLink(plink,DBF_DOUBLE,pvalue);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(plink, (void *) pcalc, DBR_DOUBLE, Fldnames[i]);
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
}
|
||||
status=postfix(pcalc->calc,rpbuf,&error_number);
|
||||
if(status){
|
||||
@@ -425,7 +420,7 @@ struct calcRecord *pcalc;
|
||||
|
||||
for(i=0, plink=&pcalc->inpa, pvalue=&pcalc->a; i<ARG_MAX; i++, plink++, pvalue++) {
|
||||
|
||||
status = recGblGetFastLink(plink, (void *)pcalc, pvalue);
|
||||
status = dbGetLink(plink,DBR_DOUBLE, pvalue,0,0);
|
||||
|
||||
if (!RTN_SUCCESS(status)) return(status);
|
||||
}
|
||||
|
||||
@@ -14,73 +14,61 @@ recordtype(calc) {
|
||||
field(INPA,DBF_INLINK) {
|
||||
prompt("Input A")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPB,DBF_INLINK) {
|
||||
prompt("Input B")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPC,DBF_INLINK) {
|
||||
prompt("Input C")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPD,DBF_INLINK) {
|
||||
prompt("Input D")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPE,DBF_INLINK) {
|
||||
prompt("Input E")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPF,DBF_INLINK) {
|
||||
prompt("Input F")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPG,DBF_INLINK) {
|
||||
prompt("Input G")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPH,DBF_INLINK) {
|
||||
prompt("Input H")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPI,DBF_INLINK) {
|
||||
prompt("Input I")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPJ,DBF_INLINK) {
|
||||
prompt("Input J")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPK,DBF_INLINK) {
|
||||
prompt("Input K")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPL,DBF_INLINK) {
|
||||
prompt("Input L")
|
||||
promptgroup(GUI_CALC)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
|
||||
@@ -143,7 +143,8 @@ static long init_record(pcompress,pass)
|
||||
return(0);
|
||||
}
|
||||
if(pcompress->wptr==NULL && pcompress->inp.type==DB_LINK) {
|
||||
struct dbAddr *pdbAddr = (struct dbAddr *)(pcompress->inp.value.db_link.pdbAddr);
|
||||
struct dbAddr *pdbAddr =
|
||||
(struct dbAddr *)(pcompress->inp.value.pv_link.pvt);
|
||||
|
||||
pcompress->wptr = (double *)calloc(pdbAddr->no_elements,sizeof(double));
|
||||
}
|
||||
@@ -165,13 +166,12 @@ static long process(pcompress)
|
||||
status=0;
|
||||
} else {
|
||||
struct dbAddr *pdbAddr =
|
||||
(struct dbAddr *)(pcompress->inp.value.db_link.pdbAddr);
|
||||
long options=0;
|
||||
(struct dbAddr *)(pcompress->inp.value.pv_link.pvt);
|
||||
long no_elements=pdbAddr->no_elements;
|
||||
int alg=pcompress->alg;
|
||||
|
||||
if(dbGetLink(&pcompress->inp.value.db_link,(struct dbCommon *)pcompress,
|
||||
DBF_DOUBLE,pcompress->wptr,&options,&no_elements)!=0){
|
||||
if(dbGetLink(&pcompress->inp,DBF_DOUBLE,
|
||||
pcompress->wptr,0,&no_elements)!=0){
|
||||
recGblSetSevr(pcompress,LINK_ALARM,INVALID_ALARM);
|
||||
}
|
||||
|
||||
@@ -436,7 +436,7 @@ long no_elements;
|
||||
double *psum;
|
||||
double multiplier;
|
||||
long inx=pcompress->inx;
|
||||
struct dbAddr *pdbAddr = (struct dbAddr *)(pcompress->inp.value.db_link.pdbAddr);
|
||||
struct dbAddr *pdbAddr = (struct dbAddr *)(pcompress->inp.value.pv_link.pvt);
|
||||
long ninp=pdbAddr->no_elements;
|
||||
long nuse,n;
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ recordtype(compress) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_COMPRESS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(RES,DBF_SHORT) {
|
||||
|
||||
@@ -84,32 +84,13 @@ static long init_record(pdfanout,pass)
|
||||
struct dfanoutRecord *pdfanout;
|
||||
int pass;
|
||||
{
|
||||
struct link *plink;
|
||||
long status=0;
|
||||
int i;
|
||||
|
||||
if (pass==0) return(0);
|
||||
|
||||
|
||||
plink = &pdfanout->outa;
|
||||
for (i=0; i<OUT_ARG_MAX; i++, plink++) {
|
||||
if (plink->type == PV_LINK) {
|
||||
status = dbCaAddOutlink(plink, (void *) pdfanout, Ofldnames[i]);
|
||||
if (status) return(status);
|
||||
}
|
||||
}
|
||||
|
||||
/* get the initial value dol is a constant*/
|
||||
if (pdfanout->dol.type == CONSTANT){
|
||||
if(recGblInitConstantLink(&pdfanout->dol,DBF_LONG,&pdfanout->val))
|
||||
pdfanout->udf=FALSE;
|
||||
recGblInitConstantLink(&pdfanout->dol,DBF_LONG,&pdfanout->val);
|
||||
pdfanout->udf=FALSE;
|
||||
}
|
||||
if (pdfanout->dol.type == PV_LINK)
|
||||
{
|
||||
status = dbCaAddInlink(&(pdfanout->dol), (void *) pdfanout, "VAL");
|
||||
if(status) return(status);
|
||||
} /* endif */
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -120,11 +101,8 @@ static long process(pdfanout)
|
||||
unsigned char pact=pdfanout->pact;
|
||||
|
||||
if (!pdfanout->pact && pdfanout->omsl == CLOSED_LOOP){
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
|
||||
status = recGblGetLinkValue(&(pdfanout->dol),(void *)pdfanout,
|
||||
DBR_LONG,&(pdfanout->val),&options,&nRequest);
|
||||
status = dbGetLink(&(pdfanout->dol),
|
||||
DBR_LONG,&(pdfanout->val),0,0);
|
||||
if(RTN_SUCCESS(status)) pdfanout->udf=FALSE;
|
||||
}
|
||||
|
||||
@@ -301,14 +279,11 @@ static long push_values(pdfanout)
|
||||
struct dfanoutRecord *pdfanout;
|
||||
{
|
||||
struct link *plink; /* structure of the link field */
|
||||
long nRequest=1;
|
||||
int i;
|
||||
long status;
|
||||
|
||||
for(i=0, plink=&(pdfanout->outa); i<OUT_ARG_MAX; i++, plink++) {
|
||||
nRequest=1;
|
||||
status=recGblPutLinkValue(plink,(void *)pdfanout,DBR_LONG,
|
||||
&(pdfanout->val),&nRequest);
|
||||
status=dbPutLink(plink,DBR_LONG,&(pdfanout->val),1);
|
||||
if (!RTN_SUCCESS(status)) return(-1);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -8,55 +8,46 @@ recordtype(dfanout) {
|
||||
field(OUTA,DBF_OUTLINK) {
|
||||
prompt("Output Spec A")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTB,DBF_OUTLINK) {
|
||||
prompt("Output Spec B")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTC,DBF_OUTLINK) {
|
||||
prompt("Output Spec C")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTD,DBF_OUTLINK) {
|
||||
prompt("Output Spec D")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTE,DBF_OUTLINK) {
|
||||
prompt("Output Spec E")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTF,DBF_OUTLINK) {
|
||||
prompt("Output Spec F")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTG,DBF_OUTLINK) {
|
||||
prompt("Output Spec G")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUTH,DBF_OUTLINK) {
|
||||
prompt("Output Spec H")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
|
||||
@@ -10,7 +10,6 @@ recordtype(eg) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(MOD1,DBF_MENU) {
|
||||
|
||||
@@ -19,7 +19,6 @@ recordtype(egevent) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ENM,DBF_LONG) {
|
||||
|
||||
@@ -13,7 +13,6 @@ recordtype(er) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ENAB,DBF_MENU) {
|
||||
|
||||
@@ -13,7 +13,6 @@ recordtype(erevent) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ENAB,DBF_MENU) {
|
||||
|
||||
@@ -118,21 +118,10 @@ static long init_record(pevent,pass)
|
||||
if (pevent->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pevent->siml,DBF_USHORT,&pevent->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pevent->siml), (void *) pevent, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if (pevent->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pevent->siol,DBF_USHORT,&pevent->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pevent->siol), (void *) pevent, DBR_USHORT, "SVAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if( (pdset=(struct eventdset *)(pevent->dset)) && (pdset->init_record) )
|
||||
status=(*pdset->init_record)(pevent);
|
||||
@@ -200,7 +189,7 @@ static long readValue(pevent)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pevent->siml), (void *)pevent, &(pevent->simm));
|
||||
status=dbGetLink(&(pevent->siml),DBR_USHORT,&(pevent->simm),0,0);
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
@@ -210,7 +199,8 @@ static long readValue(pevent)
|
||||
return(status);
|
||||
}
|
||||
if (pevent->simm == YES){
|
||||
status=recGblGetFastLink(&(pevent->siol), (void *)pevent, &(pevent->sval));
|
||||
status=dbGetLink(&(pevent->siol),DBR_USHORT,
|
||||
&(pevent->sval),0,0);
|
||||
if (status==0) {
|
||||
pevent->val=pevent->sval;
|
||||
pevent->udf=FALSE;
|
||||
|
||||
@@ -8,13 +8,11 @@ recordtype(event) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_USHORT) {
|
||||
@@ -23,7 +21,6 @@ recordtype(event) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -121,13 +121,6 @@ static long init_record(pfanout,pass)
|
||||
if (pfanout->sell.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pfanout->sell,DBF_USHORT,&pfanout->seln);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pfanout->sell), (void *) pfanout,
|
||||
DBR_USHORT, "SELN");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@@ -141,30 +134,26 @@ static long process(pfanout)
|
||||
unsigned short state;
|
||||
short i;
|
||||
long status=0;
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
unsigned short monitor_mask;
|
||||
|
||||
pfanout->pact = TRUE;
|
||||
|
||||
/* fetch link selection */
|
||||
recGblGetLinkValue(&(pfanout->sell),(void *)pfanout,DBR_USHORT,
|
||||
&(pfanout->seln),&options,&nRequest);
|
||||
|
||||
dbGetLink(&(pfanout->sell),DBR_USHORT,&(pfanout->seln),0,0);
|
||||
switch (pfanout->selm){
|
||||
case (SELECT_ALL):
|
||||
if (pfanout->lnk1.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk1.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk1.value.pv_link.pvt)->precord);
|
||||
if (pfanout->lnk2.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk2.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk2.value.pv_link.pvt)->precord);
|
||||
if (pfanout->lnk3.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk3.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk3.value.pv_link.pvt)->precord);
|
||||
if (pfanout->lnk4.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk4.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk4.value.pv_link.pvt)->precord);
|
||||
if (pfanout->lnk5.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk5.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk5.value.pv_link.pvt)->precord);
|
||||
if (pfanout->lnk6.type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk6.value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)pfanout->lnk6.value.pv_link.pvt)->precord);
|
||||
break;
|
||||
case (SELECTED):
|
||||
if(pfanout->seln>6) {
|
||||
@@ -176,7 +165,7 @@ static long process(pfanout)
|
||||
}
|
||||
plink=&(pfanout->lnk1);
|
||||
plink += (pfanout->seln-1);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)plink->value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)plink->value.pv_link.pvt)->precord);
|
||||
break;
|
||||
case (SELECT_MASK):
|
||||
if(pfanout->seln==0) {
|
||||
@@ -190,7 +179,7 @@ static long process(pfanout)
|
||||
state=pfanout->seln;
|
||||
for ( i=0; i<6; i++, state>>=1, plink++) {
|
||||
if(state & 1 && plink->type==DB_LINK)
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)plink->value.db_link.pdbAddr)->precord);
|
||||
dbScanPassive((void *)pfanout,((struct dbAddr *)plink->value.pv_link.pvt)->precord);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -24,43 +24,36 @@ recordtype(fanout) {
|
||||
field(SELL,DBF_INLINK) {
|
||||
prompt("Link Selection Loc")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK1,DBF_FWDLINK) {
|
||||
prompt("Forward Link 1")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK2,DBF_FWDLINK) {
|
||||
prompt("Forward Link 2")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK3,DBF_FWDLINK) {
|
||||
prompt("Forward Link 3")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK4,DBF_FWDLINK) {
|
||||
prompt("Forward Link 4")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK5,DBF_FWDLINK) {
|
||||
prompt("Forward Link 5")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(LNK6,DBF_FWDLINK) {
|
||||
prompt("Forward Link 6")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,11 +124,6 @@ static long init_record(psub,pass)
|
||||
for(i=0; i<ARG_MAX; i++, plink++, pvalue++) {
|
||||
if(plink->type==CONSTANT)
|
||||
recGblInitConstantLink(plink,DBF_FLOAT,pvalue);
|
||||
if (plink->type == PV_LINK)
|
||||
{
|
||||
status = dbCaAddInlink(plink, (void *) psub, Fldnames[i]);
|
||||
if(status) return(status);
|
||||
} /* endif */
|
||||
}
|
||||
|
||||
/* convert the initialization subroutine name */
|
||||
@@ -385,14 +380,11 @@ struct gsubRecord *psub;
|
||||
{
|
||||
struct link *plink; /* structure of the link field */
|
||||
float *pvalue;
|
||||
long options=0,nRequest=1;
|
||||
int i;
|
||||
long status;
|
||||
|
||||
for(i=0, plink=&psub->inpa, pvalue=&psub->a; i<ARG_MAX; i++, plink++, pvalue++) {
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(plink,(void *)psub,DBR_FLOAT,
|
||||
pvalue,&options,&nRequest);
|
||||
status=dbGetLink(plink,DBR_FLOAT,pvalue,0,0);
|
||||
if (!RTN_SUCCESS(status)) return(-1);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -34,37 +34,31 @@ recordtype(gsub) {
|
||||
field(INPA,DBF_INLINK) {
|
||||
prompt("Input A")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPB,DBF_INLINK) {
|
||||
prompt("Input B")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPC,DBF_INLINK) {
|
||||
prompt("Input C")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPD,DBF_INLINK) {
|
||||
prompt("Input D")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPE,DBF_INLINK) {
|
||||
prompt("Input E")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPF,DBF_INLINK) {
|
||||
prompt("Input F")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
|
||||
@@ -197,21 +197,10 @@ static long init_record(phistogram,pass)
|
||||
if (phistogram->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&phistogram->siml,DBF_USHORT,&phistogram->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(phistogram->siml), (void *) phistogram, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if (phistogram->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&phistogram->siol,DBF_DOUBLE,&phistogram->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(phistogram->siol), (void *) phistogram, DBR_DOUBLE, "SVAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* must have device support defined */
|
||||
if(!(pdset = (struct histogramdset *)(phistogram->dset))) {
|
||||
@@ -407,7 +396,7 @@ static long readValue(phistogram)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(phistogram->siml), (void *)phistogram, &(phistogram->simm));
|
||||
status=dbGetLink(&(phistogram->siml),DBR_USHORT,&(phistogram->simm),0,0);
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
@@ -417,7 +406,9 @@ static long readValue(phistogram)
|
||||
return(status);
|
||||
}
|
||||
if (phistogram->simm == YES){
|
||||
status=recGblGetFastLink(&(phistogram->siol), (void *)phistogram, &(phistogram->sval));
|
||||
status=dbGetLink(&(phistogram->siol),DBR_DOUBLE,
|
||||
&(phistogram->sval),0,0);
|
||||
|
||||
if (status==0){
|
||||
phistogram->sgnl=phistogram->sval;
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ recordtype(histogram) {
|
||||
field(SVL,DBF_INLINK) {
|
||||
prompt("Signal Value Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(BPTR,DBF_NOACCESS) {
|
||||
@@ -94,7 +93,6 @@ recordtype(histogram) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_DOUBLE) {
|
||||
@@ -103,7 +101,6 @@ recordtype(histogram) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -128,19 +128,11 @@ static long init_record(plongin,pass)
|
||||
if (plongin->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&plongin->siml,DBF_USHORT,&plongin->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(plongin->siml), (void *) plongin, DBR_ENUM, "SIMM");
|
||||
if (status) return(status);
|
||||
}
|
||||
|
||||
/* longin.siol must be a CONSTANT or a PV_LINK or a DB_LINK */
|
||||
if (plongin->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&plongin->siol,DBF_LONG,&plongin->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(plongin->siol), (void *) plongin, DBR_LONG, "SVAL");
|
||||
if (status) return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (struct longindset *)(plongin->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)plongin,"longin: init_record");
|
||||
@@ -349,7 +341,7 @@ static long readValue(plongin)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(plongin->siml), (void *)plongin, &(plongin->simm));
|
||||
status=dbGetLink(&(plongin->siml),DBR_USHORT, &(plongin->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -358,7 +350,8 @@ static long readValue(plongin)
|
||||
return(status);
|
||||
}
|
||||
if (plongin->simm == YES){
|
||||
status=recGblGetFastLink(&(plongin->siol), (void *)plongin, &(plongin->sval));
|
||||
status=dbGetLink(&(plongin->siol),DBR_LONG,
|
||||
&(plongin->sval),0,0);
|
||||
|
||||
if (status==0) {
|
||||
plongin->val=plongin->sval;
|
||||
|
||||
@@ -8,7 +8,6 @@ recordtype(longin) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
@@ -112,7 +111,6 @@ recordtype(longin) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_LONG) {
|
||||
@@ -121,7 +119,6 @@ recordtype(longin) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -131,13 +131,6 @@ static long init_record(plongout,pass)
|
||||
if (plongout->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&plongout->siml,DBF_USHORT,&plongout->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(plongout->siml), (void *) plongout, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblInitFastOutLink(&(plongout->siol), (void *) plongout, DBR_LONG, "VAL");
|
||||
|
||||
if(!(pdset = (struct longoutdset *)(plongout->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)plongout,"longout: init_record");
|
||||
@@ -150,12 +143,8 @@ static long init_record(plongout,pass)
|
||||
}
|
||||
/* get the initial value dol is a constant*/
|
||||
if (plongout->dol.type == CONSTANT) {
|
||||
if(recGblInitConstantLink(&plongout->dol,DBF_LONG,&plongout->val))
|
||||
plongout->udf=FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(plongout->dol), (void *) plongout, DBR_LONG, "VAL");
|
||||
if(status) return(status);
|
||||
recGblInitConstantLink(&plongout->dol,DBF_LONG,&plongout->val);
|
||||
plongout->udf=FALSE;
|
||||
}
|
||||
|
||||
if( pdset->init_record ) {
|
||||
@@ -177,10 +166,8 @@ static long process(plongout)
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (!plongout->pact && plongout->omsl == CLOSED_LOOP) {
|
||||
|
||||
status = recGblGetFastLink(&(plongout->dol), (void *)plongout,
|
||||
&(plongout->val));
|
||||
|
||||
status = dbGetLink(&(plongout->dol),DBR_LONG,
|
||||
&(plongout->val),0,0);
|
||||
if (RTN_SUCCESS(status))
|
||||
plongout->udf=FALSE;
|
||||
}
|
||||
@@ -384,7 +371,7 @@ static long writeValue(plongout)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(plongout->siml), (void *)plongout, &(plongout->simm));
|
||||
status=dbGetLink(&(plongout->siml),DBR_USHORT,&(plongout->simm),0,0);
|
||||
if (!RTN_SUCCESS(status))
|
||||
return(status);
|
||||
|
||||
@@ -393,7 +380,7 @@ static long writeValue(plongout)
|
||||
return(status);
|
||||
}
|
||||
if (plongout->simm == YES){
|
||||
status=recGblPutFastLink(&(plongout->siol), (void *)plongout, &(plongout->val));
|
||||
status=dbPutLink(&plongout->siol,DBR_LONG,&plongout->val,1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(plongout,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -8,13 +8,11 @@ recordtype(longout) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
@@ -124,13 +122,11 @@ recordtype(longout) {
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -146,9 +146,6 @@ static long init_record(pmbbiDirect,pass)
|
||||
recGblInitConstantLink(&pmbbiDirect->siml,DBF_USHORT,&pmbbiDirect->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pmbbiDirect->siml), (void *) pmbbiDirect, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -163,9 +160,6 @@ static long init_record(pmbbiDirect,pass)
|
||||
recGblInitConstantLink(&pmbbiDirect->siol,DBF_USHORT,&pmbbiDirect->sval);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pmbbiDirect->siol), (void *) pmbbiDirect, "SVAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -283,8 +277,6 @@ static long readValue(pmbbiDirect)
|
||||
{
|
||||
long status;
|
||||
struct mbbidset *pdset = (struct mbbidset *) (pmbbiDirect->dset);
|
||||
long nRequest=1;
|
||||
long options=0;
|
||||
|
||||
if (pmbbiDirect->pact == TRUE){
|
||||
status=(*pdset->read_mbbi)(pmbbiDirect);
|
||||
@@ -292,8 +284,8 @@ static long readValue(pmbbiDirect)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetLinkValue(&(pmbbiDirect->siml),
|
||||
(void *)pmbbiDirect,DBR_ENUM,&(pmbbiDirect->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(pmbbiDirect->siml),DBR_ENUM,
|
||||
&(pmbbiDirect->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -303,9 +295,8 @@ static long readValue(pmbbiDirect)
|
||||
return(status);
|
||||
}
|
||||
if (pmbbiDirect->simm == YES){
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(&(pmbbiDirect->siol),
|
||||
(void *)pmbbiDirect,DBR_USHORT,&(pmbbiDirect->sval),&options,&nRequest);
|
||||
status=dbGetLink(&(pmbbiDirect->siol),
|
||||
DBR_USHORT,&(pmbbiDirect->sval),0,0);
|
||||
if (status==0){
|
||||
pmbbiDirect->val=pmbbiDirect->sval;
|
||||
pmbbiDirect->udf=FALSE;
|
||||
|
||||
@@ -15,7 +15,6 @@ recordtype(mbbiDirect) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(RVAL,DBF_ULONG) {
|
||||
@@ -55,7 +54,6 @@ recordtype(mbbiDirect) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_USHORT) {
|
||||
@@ -64,7 +62,6 @@ recordtype(mbbiDirect) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -159,21 +159,11 @@ static long init_record(pmbbi,pass)
|
||||
if (pmbbi->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pmbbi->siml,DBF_USHORT,&pmbbi->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbi->siml), (void *) pmbbi, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* mbbi.siol must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
if (pmbbi->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pmbbi->siol,DBF_USHORT,&pmbbi->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbi->siol), (void *) pmbbi, DBR_USHORT, "SVAL");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (struct mbbidset *)(pmbbi->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pmbbi,"mbbi: init_record");
|
||||
@@ -404,7 +394,7 @@ static long readValue(pmbbi)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pmbbi->siml), (void *)pmbbi, &(pmbbi->simm));
|
||||
status=dbGetLink(&(pmbbi->siml),DBR_USHORT,&(pmbbi->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -413,7 +403,7 @@ static long readValue(pmbbi)
|
||||
return(status);
|
||||
}
|
||||
if (pmbbi->simm == YES){
|
||||
status=recGblGetFastLink(&(pmbbi->siol), (void *)pmbbi, &(pmbbi->sval));
|
||||
status=dbGetLink(&(pmbbi->siol),DBR_USHORT,&(pmbbi->sval),0,0);
|
||||
if (status==0){
|
||||
pmbbi->val=pmbbi->sval;
|
||||
pmbbi->udf=FALSE;
|
||||
|
||||
@@ -14,7 +14,6 @@ recordtype(mbbi) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
@@ -420,7 +419,6 @@ recordtype(mbbi) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_USHORT) {
|
||||
@@ -429,7 +427,6 @@ recordtype(mbbi) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -123,9 +123,6 @@ static long init_record(pmbboDirect,pass)
|
||||
recGblInitConstantLink(&pmbboDirect->siml,DBF_USHORT,&pmbboDirect->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pmbboDirect->siml), (void *) pmbboDirect, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -134,12 +131,6 @@ static long init_record(pmbboDirect,pass)
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
/* mbbo.siol may be a PV_LINK */
|
||||
if (pmbboDirect->siol.type == PV_LINK){
|
||||
status = dbCaAddOutlink(&(pmbboDirect->siol), (void *) pmbboDirect, "VAL");
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (struct mbbodset *)(pmbboDirect->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pmbboDirect,"mbboDirect: init_record");
|
||||
return(S_dev_noDSET);
|
||||
@@ -187,14 +178,11 @@ static long process(pmbboDirect)
|
||||
|
||||
if (!pmbboDirect->pact) {
|
||||
if(pmbboDirect->dol.type==DB_LINK && pmbboDirect->omsl==CLOSED_LOOP){
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
long status;
|
||||
unsigned short val;
|
||||
|
||||
pmbboDirect->pact = TRUE;
|
||||
status = dbGetLink(&pmbboDirect->dol.value.db_link,(struct dbCommon *)pmbboDirect,DBR_USHORT,
|
||||
&val,&options,&nRequest);
|
||||
status = dbGetLink(&pmbboDirect->dol,DBR_USHORT,&val,0,0);
|
||||
pmbboDirect->pact = FALSE;
|
||||
if(status==0) {
|
||||
pmbboDirect->val= val;
|
||||
@@ -330,17 +318,15 @@ static long writeValue(pmbboDirect)
|
||||
struct mbboDirectRecord *pmbboDirect;
|
||||
{
|
||||
long status;
|
||||
struct mbbodset *pdset = (struct mbbodset *) (pmbboDirect->dset);
|
||||
long nRequest=1;
|
||||
long options=0;
|
||||
struct mbbodset *pdset = (struct mbbodset *) (pmbboDirect->dset);
|
||||
|
||||
if (pmbboDirect->pact == TRUE){
|
||||
status=(*pdset->write_mbbo)(pmbboDirect);
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetLinkValue(&(pmbboDirect->siml),
|
||||
(void *)pmbboDirect,DBR_ENUM,&(pmbboDirect->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(pmbboDirect->siml),
|
||||
DBR_ENUM,&(pmbboDirect->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -349,9 +335,8 @@ static long writeValue(pmbboDirect)
|
||||
return(status);
|
||||
}
|
||||
if (pmbboDirect->simm == YES){
|
||||
nRequest=1;
|
||||
status=recGblPutLinkValue(&(pmbboDirect->siol),
|
||||
(void *)pmbboDirect,DBR_USHORT,&(pmbboDirect->val),&nRequest);
|
||||
status=dbPutLink(&pmbboDirect->siol,DBR_USHORT,
|
||||
&pmbboDirect->val,1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(pmbboDirect,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -23,13 +23,11 @@ recordtype(mbboDirect) {
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(B0,DBF_UCHAR) {
|
||||
@@ -170,13 +168,11 @@ recordtype(mbboDirect) {
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -168,16 +168,6 @@ static long init_record(pmbbo,pass)
|
||||
if (pmbbo->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pmbbo->siml,DBF_USHORT,&pmbbo->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbo->siml), (void *) pmbbo, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblInitFastOutLink(&(pmbbo->siol), (void *) pmbbo, DBR_USHORT, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
if(!(pdset = (struct mbbodset *)(pmbbo->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pmbbo,"mbbo: init_record");
|
||||
@@ -189,14 +179,8 @@ static long init_record(pmbbo,pass)
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (pmbbo->dol.type == CONSTANT){
|
||||
if(recGblInitConstantLink(&pmbbo->dol,DBF_USHORT,&pmbbo->val))
|
||||
pmbbo->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pmbbo->dol), (void *) pmbbo, DBR_USHORT, "VAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
recGblInitConstantLink(&pmbbo->dol,DBF_USHORT,&pmbbo->val);
|
||||
pmbbo->udf = FALSE;
|
||||
}
|
||||
|
||||
/* initialize mask*/
|
||||
@@ -256,7 +240,7 @@ static long process(pmbbo)
|
||||
long status;
|
||||
unsigned short val;
|
||||
|
||||
status = recGblGetFastLink(&pmbbo->dol, (void *) pmbbo, &val);
|
||||
status = dbGetLink(&pmbbo->dol,DBR_USHORT, &val,0,0);
|
||||
if(status==0) {
|
||||
pmbbo->val= val;
|
||||
pmbbo->udf= FALSE;
|
||||
@@ -483,7 +467,7 @@ static long writeValue(pmbbo)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pmbbo->siml), (void *)pmbbo, &(pmbbo->simm));
|
||||
status=dbGetLink(&(pmbbo->siml),DBR_USHORT, &(pmbbo->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -492,7 +476,7 @@ static long writeValue(pmbbo)
|
||||
return(status);
|
||||
}
|
||||
if (pmbbo->simm == YES){
|
||||
status=recGblPutFastLink(&(pmbbo->siol), (void *)pmbbo, &(pmbbo->val));
|
||||
status=dbPutLink(&pmbbo->siol,DBR_USHORT, &pmbbo->val,1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(pmbbo,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -8,7 +8,6 @@ recordtype(mbbo) {
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
@@ -26,7 +25,6 @@ recordtype(mbbo) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(ZRVL,DBF_ULONG) {
|
||||
@@ -441,13 +439,11 @@ recordtype(mbbo) {
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_MBB)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -119,10 +119,6 @@ static long init_record(ppal,pass)
|
||||
if (plink->type==CONSTANT) {
|
||||
recGblInitConstantLink(plink,DBF_DOUBLE,pvalue);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(plink, (void *) ppal, DBR_DOUBLE, Fldnames[i]);
|
||||
if(status) return(status);
|
||||
} /* endif */
|
||||
}
|
||||
if ((ppal->pptr = palinit(ppal->jedf,ppal->name,&ppal->a0)) == 0)
|
||||
return -1;
|
||||
@@ -239,7 +235,7 @@ struct palRecord *ppal;
|
||||
|
||||
for(i=0, plink=&ppal->inpa, pvalue=&ppal->a; i<ARG_MAX; i++, plink++, pvalue++) {
|
||||
|
||||
status = recGblGetFastLink(plink, (void *)ppal, pvalue);
|
||||
status = dbGetLink(plink,DBR_DOUBLE, pvalue,0,0);
|
||||
if (!RTN_SUCCESS(status)) return(status);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -20,73 +20,61 @@ recordtype(pal) {
|
||||
field(INPA,DBF_INLINK) {
|
||||
prompt("Input A")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPB,DBF_INLINK) {
|
||||
prompt("Input B")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPC,DBF_INLINK) {
|
||||
prompt("Input C")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPD,DBF_INLINK) {
|
||||
prompt("Input D")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPE,DBF_INLINK) {
|
||||
prompt("Input E")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPF,DBF_INLINK) {
|
||||
prompt("Input F")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPG,DBF_INLINK) {
|
||||
prompt("Input G")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPH,DBF_INLINK) {
|
||||
prompt("Input H")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPI,DBF_INLINK) {
|
||||
prompt("Input I")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPJ,DBF_INLINK) {
|
||||
prompt("Input J")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPK,DBF_INLINK) {
|
||||
prompt("Input K")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPL,DBF_INLINK) {
|
||||
prompt("Input L")
|
||||
promptgroup(GUI_LINKS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(A0,DBF_DOUBLE) {
|
||||
|
||||
@@ -118,20 +118,9 @@ static long init_record(ppid,pass)
|
||||
|
||||
/* initialize the setpoint for constant setpoint */
|
||||
if (ppid->stpl.type == CONSTANT){
|
||||
if(recGblInitConstantLink(&ppid->stpl,DBF_FLOAT,&ppid->val))
|
||||
ppid->udf = FALSE;
|
||||
recGblInitConstantLink(&ppid->stpl,DBF_FLOAT,&ppid->val);
|
||||
ppid->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(ppid->stpl), (void *) ppid, DBR_FLOAT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
} /* endif */
|
||||
|
||||
if (ppid->cvl.type != CONSTANT) {
|
||||
status = recGblInitFastInLink(&(ppid->cvl), (void *) ppid, DBR_FLOAT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -387,14 +376,14 @@ struct pidRecord *ppid;
|
||||
if (ppid->cvl.type != DB_LINK) { /* nothing to control*/
|
||||
if (recGblSetSevr(ppid,SOFT_ALARM,INVALID_ALARM)) return(0);
|
||||
}
|
||||
if (recGblGetFastLink(&(ppid->cvl), (void *) ppid, &cval)) {
|
||||
if (dbGetLink(&ppid->cvl,DBR_FLOAT,&cval,0,0)) {
|
||||
recGblSetSevr(ppid,LINK_ALARM,INVALID_ALARM);
|
||||
return(0);
|
||||
}
|
||||
/* fetch the setpoint */
|
||||
if(ppid->smsl == CLOSED_LOOP){
|
||||
status = recGblGetFastLink(&(ppid->stpl), (void *)ppid,
|
||||
&(ppid->val));
|
||||
status = dbGetLink(&(ppid->stpl),DBR_FLOAT,
|
||||
&(ppid->val),0,0);
|
||||
|
||||
if (RTN_SUCCESS(status)) ppid->udf=FALSE;
|
||||
}
|
||||
|
||||
@@ -8,13 +8,11 @@ recordtype(pid) {
|
||||
field(CVL,DBF_INLINK) {
|
||||
prompt("Controlled Value Loc")
|
||||
promptgroup(GUI_PID)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(STPL,DBF_INLINK) {
|
||||
prompt("Setpoint Location")
|
||||
promptgroup(GUI_PID)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SMSL,DBF_MENU) {
|
||||
|
||||
@@ -155,12 +155,6 @@ static long init_record(struct pulseCounterRecord *ppc, int pass)
|
||||
if (ppc->sgl.type == CONSTANT && ppc->gtyp == SOFTWARE)
|
||||
recGblInitConstantLink(&ppc->sgl,DBF_USHORT,&ppc->sgv);
|
||||
|
||||
if (ppc->sgl.type == PV_LINK && ppc->gtyp == SOFTWARE)
|
||||
{
|
||||
status = dbCaAddInlink(&(ppc->sgl), (void *) ppc, "SGV");
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
/* must have cmd_pc functions defined */
|
||||
if( (pdset->number < 5) || (pdset->cmd_pc == NULL) )
|
||||
{
|
||||
@@ -185,12 +179,11 @@ static long init_record(struct pulseCounterRecord *ppc, int pass)
|
||||
|
||||
static long process(struct pulseCounterRecord *ppc)
|
||||
{
|
||||
struct pcdset *pdset = (struct pcdset *)(ppc->dset);
|
||||
struct callback *pcallback=(struct callback *)(ppc->cptr);
|
||||
long status=0;
|
||||
long options,nRequest;
|
||||
unsigned short save;
|
||||
unsigned char pact=ppc->pact;
|
||||
struct pcdset *pdset = (struct pcdset *)(ppc->dset);
|
||||
struct callback *pcallback=(struct callback *)(ppc->cptr);
|
||||
long status=0;
|
||||
unsigned short save;
|
||||
unsigned char pact=ppc->pact;
|
||||
|
||||
/* must have cmd_pc functions defined */
|
||||
if( (pdset==NULL) || (pdset->cmd_pc==NULL) )
|
||||
@@ -203,11 +196,7 @@ static long process(struct pulseCounterRecord *ppc)
|
||||
/* get soft hgv value when sgl is a DB_LINK and gtyp from Software */
|
||||
if (!ppc->pact && ppc->gtyp == SOFTWARE)
|
||||
{
|
||||
options=0;
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(&(ppc->sgl),
|
||||
(void *)ppc,DBR_SHORT,&(ppc->sgv),&options,&nRequest);
|
||||
|
||||
status=dbGetLink(&(ppc->sgl),DBR_SHORT,&(ppc->sgv),0,0);
|
||||
if(status==0)
|
||||
{
|
||||
if(ppc->sgv != ppc->osgv) /* sgv changed */
|
||||
|
||||
@@ -30,7 +30,6 @@ recordtype(pulseCounter) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(GTYP,DBF_MENU) {
|
||||
@@ -46,7 +45,6 @@ recordtype(pulseCounter) {
|
||||
field(SGL,DBF_INLINK) {
|
||||
prompt("Soft Gate Location")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SGV,DBF_MENU) {
|
||||
|
||||
@@ -143,24 +143,12 @@ static long init_record(ppd,pass)
|
||||
recGblInitConstantLink(&ppd->stl,DBF_USHORT,&ppd->stv);
|
||||
}
|
||||
|
||||
if(ppd->stl.type==PV_LINK)
|
||||
{
|
||||
status = dbCaAddInlink(&(ppd->stl), (void *) ppd, "STV");
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
/* get the soft gate value if glnk is a constant*/
|
||||
if(ppd->glnk.type==CONSTANT)
|
||||
{
|
||||
recGblInitConstantLink(&ppd->glnk,DBF_USHORT,&ppd->gate);
|
||||
}
|
||||
|
||||
if(ppd->glnk.type==PV_LINK)
|
||||
{
|
||||
status = dbCaAddInlink(&(ppd->glnk), (void *) ppd, "GLNK");
|
||||
if(status) return(status);
|
||||
}
|
||||
|
||||
/* call device support init_record */
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(ppd))) return(status);
|
||||
@@ -182,7 +170,6 @@ static long process(ppd)
|
||||
struct pddset *pdset = (struct pddset *)(ppd->dset);
|
||||
long status=0;
|
||||
unsigned char pact=ppd->pact;
|
||||
long nRequest,options;
|
||||
|
||||
/* must have write_pd functions defined */
|
||||
if( (pdset==NULL) || (pdset->write_pd==NULL) ) {
|
||||
@@ -194,16 +181,10 @@ static long process(ppd)
|
||||
if(!ppd->pact)
|
||||
{
|
||||
/* get soft trigger value */
|
||||
options=0;
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(&(ppd->stl),(void *)ppd,DBR_SHORT,
|
||||
&ppd->stv,&options,&nRequest);
|
||||
status=dbGetLink(&(ppd->stl),DBR_SHORT,&ppd->stv,0,0);
|
||||
|
||||
/* get soft gate value */
|
||||
options=0;
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(&(ppd->glnk),(void *)ppd,DBR_SHORT,
|
||||
&ppd->gate,&options,&nRequest);
|
||||
status=dbGetLink(&(ppd->glnk),DBR_SHORT,&ppd->gate,0,0);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,7 +34,6 @@ recordtype(pulseDelay) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(UNIT,DBF_MENU) {
|
||||
@@ -116,7 +115,6 @@ recordtype(pulseDelay) {
|
||||
field(STL,DBF_INLINK) {
|
||||
prompt("Soft Trigger Location")
|
||||
promptgroup(GUI_CLOCK)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(STV,DBF_MENU) {
|
||||
@@ -130,7 +128,6 @@ recordtype(pulseDelay) {
|
||||
field(GLNK,DBF_INLINK) {
|
||||
prompt("Soft Gate Location")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(GATE,DBF_MENU) {
|
||||
|
||||
@@ -142,12 +142,6 @@ static long init_record(ppt,pass)
|
||||
recGblInitConstantLink(&ppt->sgl,DBF_SHORT,&ppt->hgv);
|
||||
}
|
||||
|
||||
if (ppt->sgl.type == PV_LINK )
|
||||
{
|
||||
status = dbCaAddInlink(&(ppt->sgl), (void *) ppt, "SGV");
|
||||
if(status) return(status);
|
||||
} /* endif */
|
||||
|
||||
/* must have write_pt functions defined */
|
||||
if( (pdset->number < 5) || (pdset->write_pt == NULL) ) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)ppt,"pt: write_pt");
|
||||
@@ -165,7 +159,6 @@ static long process(ppt)
|
||||
{
|
||||
struct ptdset *pdset = (struct ptdset *)(ppt->dset);
|
||||
long status=0;
|
||||
long options,nRequest;
|
||||
double save;
|
||||
unsigned char pact=ppt->pact;
|
||||
|
||||
@@ -179,11 +172,7 @@ static long process(ppt)
|
||||
|
||||
/* get soft hgv value when sgl is a DB_LINK and gtyp from Software */
|
||||
if (!ppt->pact && ppt->gtyp == SOFTWARE){
|
||||
options=0;
|
||||
nRequest=1;
|
||||
status=recGblGetLinkValue(&(ppt->sgl),(void *)ppt,DBR_SHORT,
|
||||
&(ppt->sgv),&options,&nRequest);
|
||||
|
||||
status=dbGetLink(&(ppt->sgl),DBR_SHORT,&(ppt->sgv),0,0);
|
||||
if(status==0){
|
||||
if(ppt->sgv != ppt->osgv){ /* hgv changed */
|
||||
if(ppt->sgv==0){
|
||||
|
||||
@@ -30,7 +30,6 @@ recordtype(pulseTrain) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(UNIT,DBF_MENU) {
|
||||
@@ -79,7 +78,6 @@ recordtype(pulseTrain) {
|
||||
field(SGL,DBF_INLINK) {
|
||||
prompt("Soft Gate Location")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OSGV,DBF_USHORT) {
|
||||
|
||||
@@ -136,11 +136,6 @@ static long init_record(psel,pass)
|
||||
if (psel->nvl.type == CONSTANT ) {
|
||||
recGblInitConstantLink(&psel->nvl,DBF_USHORT,&psel->seln);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(psel->nvl), (void *) psel, DBR_USHORT, "SELN");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
plink = &psel->inpa;
|
||||
pvalue = &psel->a;
|
||||
@@ -149,11 +144,6 @@ static long init_record(psel,pass)
|
||||
if (plink->type==CONSTANT) {
|
||||
recGblInitConstantLink(plink,DBF_DOUBLE,pvalue);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(plink, (void *) psel, DBR_DOUBLE, Fldnames[i]);
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
@@ -468,18 +458,18 @@ struct selRecord *psel;
|
||||
/* If select mechanism is SELECTED only get selected input*/
|
||||
if(psel->selm == SELECTED) {
|
||||
/* fetch the select index */
|
||||
status=recGblGetFastLink(&(psel->nvl), (void *)psel, &(psel->seln));
|
||||
status=dbGetLink(&(psel->nvl),DBR_USHORT,&(psel->seln),0,0);
|
||||
if (!RTN_SUCCESS(status)) return(status);
|
||||
|
||||
plink += psel->seln;
|
||||
pvalue += psel->seln;
|
||||
|
||||
status=recGblGetFastLink(plink, (void *)psel, pvalue);
|
||||
status=dbGetLink(plink,DBR_DOUBLE, pvalue,0,0);
|
||||
return(status);
|
||||
}
|
||||
/* fetch all inputs*/
|
||||
for(i=0; i<SEL_MAX; i++, plink++, pvalue++) {
|
||||
status=recGblGetFastLink(plink,(void *)psel, pvalue);
|
||||
status=dbGetLink(plink,DBR_DOUBLE, pvalue,0,0);
|
||||
}
|
||||
return(status);
|
||||
}
|
||||
|
||||
@@ -27,79 +27,66 @@ recordtype(sel) {
|
||||
field(NVL,DBF_INLINK) {
|
||||
prompt("Index Value Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPA,DBF_INLINK) {
|
||||
prompt("Input A")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPB,DBF_INLINK) {
|
||||
prompt("Input B")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPC,DBF_INLINK) {
|
||||
prompt("Input C")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPD,DBF_INLINK) {
|
||||
prompt("Input D")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPE,DBF_INLINK) {
|
||||
prompt("Input E")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPF,DBF_INLINK) {
|
||||
prompt("Input F")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPG,DBF_INLINK) {
|
||||
prompt("Input G")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPH,DBF_INLINK) {
|
||||
prompt("Input H")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPI,DBF_INLINK) {
|
||||
prompt("Input I")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPJ,DBF_INLINK) {
|
||||
prompt("Input J")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPK,DBF_INLINK) {
|
||||
prompt("Input K")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPL,DBF_INLINK) {
|
||||
prompt("Input L")
|
||||
promptgroup(GUI_SELECT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
|
||||
@@ -115,7 +115,6 @@ init_record(pseq, pass)
|
||||
struct seqRecord *pseq;
|
||||
int pass;
|
||||
{
|
||||
long status = 0;
|
||||
int index;
|
||||
struct linkDesc *plink;
|
||||
|
||||
@@ -139,19 +138,11 @@ int pass;
|
||||
recGblInitConstantLink(&pseq->sell,DBF_USHORT,&pseq->seln);
|
||||
}
|
||||
|
||||
/* If is a channel access link, deal with it. */
|
||||
if (pseq->sell.type == PV_LINK)
|
||||
{
|
||||
if (seqRecDebug > 5)
|
||||
printf("init_record(%s) SELL is a CA link, attaching\n", pseq->name);
|
||||
status = dbCaAddInlink(&(pseq->sell), (void *) pseq, "SELN");
|
||||
}
|
||||
|
||||
/* Copy over ALL the input link constants here */
|
||||
plink = (struct linkDesc *)(&(pseq->dly1));
|
||||
|
||||
index = 0;
|
||||
while ((status == 0) && (index < NUM_LINKS))
|
||||
while (index < NUM_LINKS)
|
||||
{
|
||||
char DumbCaString[10];
|
||||
|
||||
@@ -160,37 +151,10 @@ int pass;
|
||||
|
||||
index++;
|
||||
|
||||
/*
|
||||
* This is so &@$%-ing stupid I can't believe it. This should be done
|
||||
* in the iocCore record init code that deals with the rest of the
|
||||
* link init stuff.
|
||||
*/
|
||||
|
||||
status = 0;
|
||||
if (plink->dol.type == PV_LINK)
|
||||
{
|
||||
if (seqRecDebug > 4)
|
||||
printf("seq-record::init_record initializing CA-link DO%1.1X\n", index);
|
||||
|
||||
sprintf(DumbCaString, "DO%1.1X", index);
|
||||
status = dbCaAddInlink(&(plink->dol), (void *) pseq, DumbCaString);
|
||||
}
|
||||
if (status == 0)
|
||||
{
|
||||
if (plink->lnk.type == PV_LINK)
|
||||
{
|
||||
|
||||
if (seqRecDebug > 4)
|
||||
printf("seq-record::init_record initializing CA-link DO%1.1X\n", index);
|
||||
|
||||
sprintf(DumbCaString, "DO%1.1X", index);
|
||||
status = dbCaAddOutlink(&(plink->lnk), (void *) pseq, DumbCaString);
|
||||
}
|
||||
}
|
||||
plink++;
|
||||
}
|
||||
|
||||
return(status);
|
||||
return(0);
|
||||
}
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -222,8 +186,6 @@ struct seqRecord *pseq;
|
||||
struct callbackSeq *pcb = (struct callbackSeq *) (pseq->dpvt);
|
||||
struct linkDesc *plink;
|
||||
unsigned short lmask;
|
||||
long options;
|
||||
long nRequest;
|
||||
int tmp;
|
||||
|
||||
if(seqRecDebug > 10)
|
||||
@@ -254,9 +216,7 @@ struct seqRecord *pseq;
|
||||
/* Fill in the SELN field */
|
||||
if (pseq->sell.type != CONSTANT)
|
||||
{
|
||||
options = 0;
|
||||
nRequest = 1;
|
||||
recGblGetLinkValue(&(pseq->sell), (void *)pseq, DBR_USHORT, &(pseq->seln), &options,&nRequest);
|
||||
dbGetLink(&(pseq->sell), DBR_USHORT, &(pseq->seln), 0,0);
|
||||
}
|
||||
if (pseq->selm == seqSELM_Specified)
|
||||
{
|
||||
@@ -415,10 +375,10 @@ CALLBACK *pcallback;
|
||||
* Link-group processing function.
|
||||
*
|
||||
* if the input link is not a constant
|
||||
* call recGblGetLinkValue() to get the link value
|
||||
* call dbGetLink() to get the link value
|
||||
* else
|
||||
* get the value from the DOV field
|
||||
* call recGblPutLinkValue() to forward the value to destination location
|
||||
* call dbPutLink() to forward the value to destination location
|
||||
* call processNextLink() to schedule the processing of the next link-group
|
||||
*
|
||||
* NOTE:
|
||||
@@ -431,8 +391,6 @@ CALLBACK *pCallback;
|
||||
{
|
||||
struct seqRecord *pseq = (struct seqRecord *)(pCallback->user);
|
||||
struct callbackSeq *pcb = (struct callbackSeq *) (pseq->dpvt);
|
||||
long options;
|
||||
long nRequest;
|
||||
double myDouble;
|
||||
|
||||
dbScanLock((struct dbCommon *)pseq);
|
||||
@@ -443,18 +401,12 @@ CALLBACK *pCallback;
|
||||
/* Save the old value */
|
||||
myDouble = pcb->plinks[pcb->index]->dov;
|
||||
|
||||
/* If the input link is a constant, don't call recGblGetLinkValue() */
|
||||
if (pcb->plinks[pcb->index]->dol.type != CONSTANT)
|
||||
{
|
||||
/* Get the value from the input link location */
|
||||
options = 0;
|
||||
nRequest = 1;
|
||||
recGblGetLinkValue(&(pcb->plinks[pcb->index]->dol), (void *)pseq, DBR_DOUBLE, &(pcb->plinks[pcb->index]->dov), &options, &nRequest);
|
||||
}
|
||||
dbGetLink(&(pcb->plinks[pcb->index]->dol), DBR_DOUBLE,
|
||||
&(pcb->plinks[pcb->index]->dov),0,0);
|
||||
|
||||
/* Dump the value to the destination field */
|
||||
nRequest = 1;
|
||||
recGblPutLinkValue(&(pcb->plinks[pcb->index]->lnk), (void *)pseq, DBR_DOUBLE, &(pcb->plinks[pcb->index]->dov), &nRequest);
|
||||
dbPutLink(&(pcb->plinks[pcb->index]->lnk), DBR_DOUBLE,
|
||||
&(pcb->plinks[pcb->index]->dov),1);
|
||||
|
||||
if (myDouble != pcb->plinks[pcb->index]->dov)
|
||||
{
|
||||
|
||||
@@ -24,7 +24,6 @@ recordtype(seq) {
|
||||
field(SELL,DBF_INLINK) {
|
||||
prompt("Link Selection Loc")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(PREC,DBF_SHORT) {
|
||||
@@ -40,7 +39,6 @@ recordtype(seq) {
|
||||
field(DOL1,DBF_INLINK) {
|
||||
prompt("Input link1")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO1,DBF_DOUBLE) {
|
||||
@@ -50,7 +48,6 @@ recordtype(seq) {
|
||||
field(LNK1,DBF_OUTLINK) {
|
||||
prompt("Output Link 1")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY2,DBF_DOUBLE) {
|
||||
@@ -61,7 +58,6 @@ recordtype(seq) {
|
||||
field(DOL2,DBF_INLINK) {
|
||||
prompt("Input link 2")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO2,DBF_DOUBLE) {
|
||||
@@ -71,7 +67,6 @@ recordtype(seq) {
|
||||
field(LNK2,DBF_OUTLINK) {
|
||||
prompt("Output Link 2")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY3,DBF_DOUBLE) {
|
||||
@@ -82,7 +77,6 @@ recordtype(seq) {
|
||||
field(DOL3,DBF_INLINK) {
|
||||
prompt("Input link 3")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO3,DBF_DOUBLE) {
|
||||
@@ -92,7 +86,6 @@ recordtype(seq) {
|
||||
field(LNK3,DBF_OUTLINK) {
|
||||
prompt("Output Link 3")
|
||||
promptgroup(GUI_SEQ1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY4,DBF_DOUBLE) {
|
||||
@@ -103,7 +96,6 @@ recordtype(seq) {
|
||||
field(DOL4,DBF_INLINK) {
|
||||
prompt("Input link 4")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO4,DBF_DOUBLE) {
|
||||
@@ -113,7 +105,6 @@ recordtype(seq) {
|
||||
field(LNK4,DBF_OUTLINK) {
|
||||
prompt("Output Link 4")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY5,DBF_DOUBLE) {
|
||||
@@ -124,7 +115,6 @@ recordtype(seq) {
|
||||
field(DOL5,DBF_INLINK) {
|
||||
prompt("Input link 5")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO5,DBF_DOUBLE) {
|
||||
@@ -134,7 +124,6 @@ recordtype(seq) {
|
||||
field(LNK5,DBF_OUTLINK) {
|
||||
prompt("Output Link 5")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY6,DBF_DOUBLE) {
|
||||
@@ -145,7 +134,6 @@ recordtype(seq) {
|
||||
field(DOL6,DBF_INLINK) {
|
||||
prompt("Input link 6")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO6,DBF_DOUBLE) {
|
||||
@@ -155,7 +143,6 @@ recordtype(seq) {
|
||||
field(LNK6,DBF_OUTLINK) {
|
||||
prompt("Output Link 6")
|
||||
promptgroup(GUI_SEQ2)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY7,DBF_DOUBLE) {
|
||||
@@ -166,7 +153,6 @@ recordtype(seq) {
|
||||
field(DOL7,DBF_INLINK) {
|
||||
prompt("Input link 7")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO7,DBF_DOUBLE) {
|
||||
@@ -176,7 +162,6 @@ recordtype(seq) {
|
||||
field(LNK7,DBF_OUTLINK) {
|
||||
prompt("Output Link 7")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY8,DBF_DOUBLE) {
|
||||
@@ -187,7 +172,6 @@ recordtype(seq) {
|
||||
field(DOL8,DBF_INLINK) {
|
||||
prompt("Input link 8")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO8,DBF_DOUBLE) {
|
||||
@@ -197,7 +181,6 @@ recordtype(seq) {
|
||||
field(LNK8,DBF_OUTLINK) {
|
||||
prompt("Output Link 8")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLY9,DBF_DOUBLE) {
|
||||
@@ -208,7 +191,6 @@ recordtype(seq) {
|
||||
field(DOL9,DBF_INLINK) {
|
||||
prompt("Input link 9")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DO9,DBF_DOUBLE) {
|
||||
@@ -218,7 +200,6 @@ recordtype(seq) {
|
||||
field(LNK9,DBF_OUTLINK) {
|
||||
prompt("Output Link 9")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DLYA,DBF_DOUBLE) {
|
||||
@@ -229,7 +210,6 @@ recordtype(seq) {
|
||||
field(DOLA,DBF_INLINK) {
|
||||
prompt("Input link 10")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOA,DBF_DOUBLE) {
|
||||
@@ -239,7 +219,6 @@ recordtype(seq) {
|
||||
field(LNKA,DBF_OUTLINK) {
|
||||
prompt("Output Link 10")
|
||||
promptgroup(GUI_SEQ3)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -205,17 +205,9 @@ static long init_record(psm,pass)
|
||||
|
||||
/* get the initial value if dol is a constant*/
|
||||
if (psm->dol.type == CONSTANT ){
|
||||
if(recGblInitConstantLink(&psm->dol,DBF_FLOAT,&psm->val))
|
||||
psm->udf = FALSE;
|
||||
recGblInitConstantLink(&psm->dol,DBF_FLOAT,&psm->val);
|
||||
psm->udf = FALSE;
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(psm->dol), (void *) psm, DBR_FLOAT, "VAL");
|
||||
if (status)
|
||||
return(status);
|
||||
} /* endif */
|
||||
|
||||
/* initialize readback link */
|
||||
status = recGblInitFastInLink(&(psm->rdbl), (void *) psm, DBR_FLOAT, "VAL");
|
||||
|
||||
init_sm(psm);
|
||||
return(0);
|
||||
@@ -770,7 +762,7 @@ struct steppermotorRecord *psm;
|
||||
|
||||
/* fetch the desired value if there is a database link */
|
||||
if (psm->omsl == CLOSED_LOOP) {
|
||||
status=recGblGetFastLink(&(psm->dol), (void *)psm, &(psm->val));
|
||||
status=dbGetLink(&(psm->dol),DBR_FLOAT, &(psm->val),0,0);
|
||||
if (!RTN_SUCCESS(status)) return;
|
||||
psm->udf = FALSE;
|
||||
}
|
||||
@@ -827,7 +819,7 @@ struct steppermotorRecord *psm;
|
||||
|
||||
/* fetch the desired value if there is a database link */
|
||||
if (psm->omsl == CLOSED_LOOP){
|
||||
status=recGblGetFastLink(&(psm->dol), (void *)psm, &(psm->val));
|
||||
status=dbGetLink(&(psm->dol),DBR_FLOAT, &(psm->val),0,0);
|
||||
if (!RTN_SUCCESS(status)) return;
|
||||
psm->udf = FALSE;
|
||||
}
|
||||
@@ -907,7 +899,7 @@ struct steppermotorRecord *psm;
|
||||
|
||||
reset = psm->init;
|
||||
if (reset == 0) psm->init = 1;
|
||||
if(recGblGetFastLink(&(psm->rdbl),(void *)psm, &new_pos)) {
|
||||
if(dbGetLink(&psm->rdbl,DBR_FLOAT, &new_pos,0,0)) {
|
||||
recGblSetSevr(psm,READ_ALARM,INVALID_ALARM);
|
||||
psm->init = reset;
|
||||
return;
|
||||
|
||||
@@ -18,19 +18,16 @@ recordtype(steppermotor) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(RDBL,DBF_INLINK) {
|
||||
prompt("Readback Location")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
|
||||
@@ -120,22 +120,11 @@ static long init_record(pstringin,pass)
|
||||
if (pstringin->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pstringin->siml,DBF_USHORT,&pstringin->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pstringin->siml), (void *) pstringin, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
/* stringin.siol must be a CONSTANT or a PV_LINK or a DB_LINK */
|
||||
if (pstringin->siol.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pstringin->siol,DBF_STRING,pstringin->sval);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pstringin->siol), (void *) pstringin, DBR_STRING, "SVAL");
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
if(!(pdset = (struct stringindset *)(pstringin->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pstringin,"stringin: init_record");
|
||||
@@ -200,7 +189,8 @@ static void monitor(pstringin)
|
||||
|
||||
monitor_mask = recGblResetAlarms(pstringin);
|
||||
if(strncmp(pstringin->oval,pstringin->val,sizeof(pstringin->val))) {
|
||||
db_post_events(pstringin,&(pstringin->val[0]),monitor_mask|DBE_VALUE);
|
||||
db_post_events(pstringin,&(pstringin->val[0]),
|
||||
monitor_mask|DBE_VALUE|DBE_LOG);
|
||||
strncpy(pstringin->oval,pstringin->val,sizeof(pstringin->val));
|
||||
}
|
||||
return;
|
||||
@@ -217,7 +207,7 @@ static long readValue(pstringin)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pstringin->siml), (void *)pstringin, &(pstringin->simm));
|
||||
status=dbGetLink(&(pstringin->siml),DBR_USHORT, &(pstringin->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -226,7 +216,8 @@ static long readValue(pstringin)
|
||||
return(status);
|
||||
}
|
||||
if (pstringin->simm == YES){
|
||||
status=recGblGetFastLink(&(pstringin->siol), (void *)pstringin, pstringin->sval);
|
||||
status=dbGetLink(&(pstringin->siol),DBR_STRING,
|
||||
pstringin->sval,0,0);
|
||||
if (status==0) {
|
||||
strcpy(pstringin->val,pstringin->sval);
|
||||
pstringin->udf=FALSE;
|
||||
|
||||
@@ -16,13 +16,11 @@ recordtype(stringin) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_STRING) {
|
||||
@@ -33,7 +31,6 @@ recordtype(stringin) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -126,13 +126,6 @@ static long init_record(pstringout,pass)
|
||||
if (pstringout->siml.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pstringout->siml,DBF_USHORT,&pstringout->simm);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(pstringout->siml), (void *) pstringout, DBR_ENUM, "SIMM");
|
||||
if (status)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status = recGblInitFastOutLink(&(pstringout->siol), (void *) pstringout, DBR_STRING, "VAL");
|
||||
|
||||
if(!(pdset = (struct stringoutdset *)(pstringout->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)pstringout,"stringout: init_record");
|
||||
@@ -145,15 +138,9 @@ static long init_record(pstringout,pass)
|
||||
}
|
||||
/* get the initial value dol is a constant*/
|
||||
if (pstringout->dol.type == CONSTANT){
|
||||
if(recGblInitConstantLink(&pstringout->dol,DBF_STRING,pstringout->val))
|
||||
pstringout->udf=FALSE;
|
||||
}
|
||||
if (pstringout->dol.type == PV_LINK)
|
||||
{
|
||||
status = dbCaAddInlink(&(pstringout->dol), (void *) pstringout, "VAL");
|
||||
if(status) return(status);
|
||||
recGblInitConstantLink(&pstringout->dol,DBF_STRING,pstringout->val);
|
||||
pstringout->udf=FALSE;
|
||||
} /* endif */
|
||||
}
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(pstringout))) return(status);
|
||||
}
|
||||
@@ -173,11 +160,8 @@ static long process(pstringout)
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
if (!pstringout->pact && pstringout->omsl == CLOSED_LOOP){
|
||||
long options=0;
|
||||
long nRequest=1;
|
||||
|
||||
status = recGblGetLinkValue(&(pstringout->dol),(void *)pstringout,
|
||||
DBR_STRING,pstringout->val,&options,&nRequest);
|
||||
status = dbGetLink(&(pstringout->dol),
|
||||
DBR_STRING,pstringout->val,0,0);
|
||||
if(RTN_SUCCESS(status)) pstringout->udf=FALSE;
|
||||
}
|
||||
|
||||
@@ -242,7 +226,8 @@ static void monitor(pstringout)
|
||||
|
||||
monitor_mask = recGblResetAlarms(pstringout);
|
||||
if(strncmp(pstringout->oval,pstringout->val,sizeof(pstringout->val))) {
|
||||
db_post_events(pstringout,&(pstringout->val[0]),monitor_mask|DBE_VALUE);
|
||||
db_post_events(pstringout,&(pstringout->val[0]),
|
||||
monitor_mask|DBE_VALUE|DBE_LOG);
|
||||
strncpy(pstringout->oval,pstringout->val,sizeof(pstringout->val));
|
||||
}
|
||||
return;
|
||||
@@ -259,7 +244,8 @@ static long writeValue(pstringout)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetFastLink(&(pstringout->siml), (void *)pstringout, &(pstringout->simm));
|
||||
status=dbGetLink(&(pstringout->siml),DBR_USHORT,
|
||||
&(pstringout->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -268,7 +254,8 @@ static long writeValue(pstringout)
|
||||
return(status);
|
||||
}
|
||||
if (pstringout->simm == YES){
|
||||
status=recGblPutFastLink(&(pstringout->siol), (void *)pstringout, pstringout->val);
|
||||
status=dbPutLink(&pstringout->siol,DBR_STRING,
|
||||
pstringout->val,1);
|
||||
} else {
|
||||
status=-1;
|
||||
recGblSetSevr(pstringout,SOFT_ALARM,INVALID_ALARM);
|
||||
|
||||
@@ -16,7 +16,6 @@ recordtype(stringout) {
|
||||
field(DOL,DBF_INLINK) {
|
||||
prompt("Desired Output Loc")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OMSL,DBF_MENU) {
|
||||
@@ -28,19 +27,16 @@ recordtype(stringout) {
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_OUTPUT)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIOL,DBF_OUTLINK) {
|
||||
prompt("Sim Output Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -23,7 +23,6 @@ recordtype(subArray) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_BITS1)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
|
||||
@@ -137,12 +137,6 @@ static long init_record(psub,pass)
|
||||
if (plink->type==CONSTANT) {
|
||||
recGblInitConstantLink(plink,DBF_DOUBLE,pvalue);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(plink, (void *) psub, DBR_DOUBLE, Fldnames[i]);
|
||||
|
||||
if (status)
|
||||
return(status);
|
||||
} /* endif */
|
||||
}
|
||||
|
||||
/* convert the initialization subroutine name */
|
||||
@@ -407,7 +401,7 @@ struct subRecord *psub;
|
||||
long status;
|
||||
|
||||
for(i=0, plink=&psub->inpa, pvalue=&psub->a; i<ARG_MAX; i++, plink++, pvalue++) {
|
||||
status=recGblGetFastLink(plink, (void *)psub, pvalue);
|
||||
status=dbGetLink(plink,DBR_DOUBLE, pvalue,0,0);
|
||||
if (!RTN_SUCCESS(status)) return(-1);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -34,73 +34,61 @@ recordtype(sub) {
|
||||
field(INPA,DBF_INLINK) {
|
||||
prompt("Input A")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPB,DBF_INLINK) {
|
||||
prompt("Input B")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPC,DBF_INLINK) {
|
||||
prompt("Input C")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPD,DBF_INLINK) {
|
||||
prompt("Input D")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPE,DBF_INLINK) {
|
||||
prompt("Input E")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPF,DBF_INLINK) {
|
||||
prompt("Input F")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPG,DBF_INLINK) {
|
||||
prompt("Input G")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPH,DBF_INLINK) {
|
||||
prompt("Input H")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPI,DBF_INLINK) {
|
||||
prompt("Input I")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPJ,DBF_INLINK) {
|
||||
prompt("Input J")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPK,DBF_INLINK) {
|
||||
prompt("Input K")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(INPL,DBF_INLINK) {
|
||||
prompt("Input L")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
|
||||
@@ -144,10 +144,6 @@ static long init_record(ptimer, pass)
|
||||
if (ptimer->torg.type == CONSTANT) {
|
||||
recGblInitConstantLink(&ptimer->torg,DBF_FLOAT,&ptimer->trdl);
|
||||
}
|
||||
else {
|
||||
status = recGblInitFastInLink(&(ptimer->torg), (void *) ptimer, DBR_FLOAT, "TRDL");
|
||||
if(status) return(status);
|
||||
} /* endif */
|
||||
|
||||
/* read to maintain time pulses over a restart */
|
||||
return read_timer(ptimer);
|
||||
@@ -286,7 +282,7 @@ static long write_timer(struct timerRecord *ptimer)
|
||||
|
||||
/* get the delay from trigger source */
|
||||
if (ptimer->torg.type == DB_LINK) {
|
||||
status=recGblGetFastLink(&(ptimer->torg), (void *)ptimer, &(ptimer->trdl));
|
||||
status=dbGetLink(&(ptimer->torg),DBR_FLOAT,&(ptimer->trdl),0,0);
|
||||
if (!RTN_SUCCESS(status)) return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,13 +17,11 @@ recordtype(timer) {
|
||||
field(TORG,DBF_INLINK) {
|
||||
prompt("Trigger Origin")
|
||||
promptgroup(GUI_TIMER)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(OUT,DBF_OUTLINK) {
|
||||
prompt("Output Specification")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(VAL,DBF_SHORT) {
|
||||
|
||||
@@ -330,14 +330,11 @@ static long process(pwait)
|
||||
{
|
||||
short async = FALSE;
|
||||
long status;
|
||||
long nRequest = 1;
|
||||
long options = 0;
|
||||
|
||||
pwait->pact = TRUE;
|
||||
|
||||
/* Check for simulation mode */
|
||||
status=recGblGetLinkValue(&(pwait->siml),
|
||||
(void *)pwait,DBR_ENUM,&(pwait->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(pwait->siml),DBR_ENUM,&(pwait->simm),0,0);
|
||||
|
||||
/* reset procPending before getting values */
|
||||
((struct cbStruct *)pwait->cbst)->procPending = 0;
|
||||
@@ -353,9 +350,7 @@ static long process(pwait)
|
||||
}
|
||||
}
|
||||
else { /* SIMULATION MODE */
|
||||
nRequest = 1;
|
||||
status = recGblGetLinkValue(&(pwait->siol),
|
||||
(void *)pwait,DBR_DOUBLE,&(pwait->sval),&options,&nRequest);
|
||||
status = dbGetLink(&(pwait->siol),DBR_DOUBLE,&(pwait->sval),0,0);
|
||||
if (status==0){
|
||||
pwait->val=pwait->sval;
|
||||
pwait->udf=FALSE;
|
||||
@@ -604,9 +599,6 @@ struct waitRecord *pwait;
|
||||
recGblInitConstantLink(&pwait->siml,DBF_USHORT,&pwait->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pwait->siml), (void *) pwait, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -621,9 +613,6 @@ struct waitRecord *pwait;
|
||||
recGblInitConstantLink(&pwait->siol,DBF_DOUBLE,&pwait->sval);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pwait->siol), (void *) pwait, "SVAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
|
||||
@@ -495,7 +495,6 @@ recordtype(wait) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SVAL,DBF_DOUBLE) {
|
||||
@@ -504,7 +503,6 @@ recordtype(wait) {
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_PULSE)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
@@ -164,9 +164,6 @@ static long init_record(pwf,pass)
|
||||
recGblInitConstantLink(&pwf->siml,DBF_USHORT,&pwf->simm);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pwf->siml), (void *) pwf, "SIMM");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -181,9 +178,6 @@ static long init_record(pwf,pass)
|
||||
pwf->nord = 0;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
status = dbCaAddInlink(&(pwf->siol), (void *) pwf, "VAL");
|
||||
if(status) return(status);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
@@ -362,9 +356,8 @@ static long readValue(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
long status;
|
||||
long nRequest;
|
||||
struct wfdset *pdset = (struct wfdset *) (pwf->dset);
|
||||
long nRequest=1;
|
||||
long options=0;
|
||||
|
||||
|
||||
if (pwf->pact == TRUE){
|
||||
@@ -372,8 +365,7 @@ static long readValue(pwf)
|
||||
return(status);
|
||||
}
|
||||
|
||||
status=recGblGetLinkValue(&(pwf->siml),
|
||||
(void *)pwf,DBR_ENUM,&(pwf->simm),&options,&nRequest);
|
||||
status=dbGetLink(&(pwf->siml), DBR_ENUM,&(pwf->simm),0,0);
|
||||
if (status)
|
||||
return(status);
|
||||
|
||||
@@ -383,8 +375,8 @@ static long readValue(pwf)
|
||||
}
|
||||
if (pwf->simm == YES){
|
||||
nRequest=pwf->nelm;
|
||||
status=recGblGetLinkValue(&(pwf->siol),
|
||||
(void *)pwf,pwf->ftvl,pwf->bptr,&options,&nRequest);
|
||||
status=dbGetLink(&(pwf->siol),
|
||||
pwf->ftvl,pwf->bptr,0,&nRequest);
|
||||
/* nord set only for db links: needed for old db_access */
|
||||
if (pwf->siol.type == DB_LINK )pwf->nord = nRequest;
|
||||
if (status==0){
|
||||
|
||||
@@ -22,7 +22,6 @@ recordtype(waveform) {
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(EGU,DBF_STRING) {
|
||||
@@ -73,13 +72,11 @@ recordtype(waveform) {
|
||||
field(SIOL,DBF_INLINK) {
|
||||
prompt("Sim Input Specifctn")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIML,DBF_INLINK) {
|
||||
prompt("Sim Mode Location")
|
||||
promptgroup(GUI_INPUTS)
|
||||
special(SPC_NOMOD)
|
||||
interest(1)
|
||||
}
|
||||
field(SIMM,DBF_MENU) {
|
||||
|
||||
Reference in New Issue
Block a user