Made reporting of hardware more consistant
This commit is contained in:
@@ -80,7 +80,6 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
@@ -90,9 +89,8 @@ static long init_record(pai)
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiDvx2502 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiDvx2502 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
@@ -102,9 +100,8 @@ static long init_record(pai)
|
||||
/* call driver so that it configures card */
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
if(status=dvx_driver(pvmeio->card,pvmeio->signal,&value)) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiDvx2502 (init_record) dvx_driver error");
|
||||
errMessage(status,message);
|
||||
recGblRecordError(status,pai,
|
||||
"devAiDvx2502 (init_record) dvx_driver error");
|
||||
return(status);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -78,9 +78,7 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pai->inp.type) {
|
||||
@@ -95,9 +93,8 @@ long status;
|
||||
case (DB_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
/* Make sure record processing routine does not perform any conversion*/
|
||||
@@ -108,7 +105,6 @@ long status;
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* ai.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -135,9 +131,8 @@ static long read_ai(pai)
|
||||
default :
|
||||
if(recGblSetSevr(pai,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pai->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiSoft (read_ai) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiSoft (read_ai) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,9 +79,7 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pai->inp.type) {
|
||||
@@ -97,9 +95,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiSoftRaw (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -108,7 +105,6 @@ long status;
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* ai.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -136,9 +132,8 @@ static long read_ai(pai)
|
||||
default :
|
||||
if(recGblSetSevr(pai,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pai->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiSoftRaw (read_ai) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiSoftRaw (read_ai) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* ai.inp must be a CONSTANT*/
|
||||
@@ -112,9 +111,8 @@ static long init_record(pai)
|
||||
pai->udf = FALSE;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiTestAsyn (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiTestAsyn (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -123,7 +121,6 @@ static long init_record(pai)
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pai->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -145,9 +142,8 @@ static long read_ai(pai)
|
||||
default :
|
||||
if(recGblSetSevr(pai,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pai->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiTestAsyn (read_ai) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiTestAsyn (read_ai) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,6 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
@@ -86,9 +85,8 @@ static long init_record(pai)
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566Di (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiXy566Di (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
@@ -98,9 +96,8 @@ static long init_record(pai)
|
||||
/* call driver so that it configures card */
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
if(status=ai_xy566_driver(pvmeio->card,pvmeio->signal,XY566DI,&value)) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566Di (init_record) ai_xy566_driver error");
|
||||
errMessage(status,message);
|
||||
recGblRecordError(status,pai,
|
||||
"devAiXy566Di (init_record) ai_xy566_driver error");
|
||||
return(status);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -78,7 +78,6 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
@@ -88,9 +87,8 @@ static long init_record(pai)
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566DiL (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiXy566DiL (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
@@ -100,9 +98,8 @@ static long init_record(pai)
|
||||
/* call driver so that it configures card */
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
if(status=ai_xy566_driver(pvmeio->card,pvmeio->signal,XY566DIL,&value)) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566DiL (init_record) ai_xy566_driver error");
|
||||
errMessage(status,message);
|
||||
recGblRecordError(status,pai,
|
||||
"devAiXy566DiL (init_record) ai_xy566_driver error");
|
||||
return(status);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -75,7 +75,6 @@ struct {
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
char message[100];
|
||||
unsigned short value;
|
||||
struct vmeio *pvmeio;
|
||||
long status;
|
||||
@@ -85,9 +84,8 @@ static long init_record(pai)
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566Se (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pai,
|
||||
"devAiXy566Se (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
@@ -97,9 +95,8 @@ static long init_record(pai)
|
||||
/* call driver so that it configures card */
|
||||
pvmeio = (struct vmeio *)&(pai->inp.value);
|
||||
if(status=ai_xy566_driver(pvmeio->card,pvmeio->signal,XY566SE,&value)) {
|
||||
strcpy(message,pai->name);
|
||||
strcat(message,": devAiXy566Se (init_record) ai_xy566_driver error");
|
||||
errMessage(status,message);
|
||||
recGblRecordError(status,pai,
|
||||
"devAiXy566Se (init_record) ai_xy566_driver error");
|
||||
return(status);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -95,7 +95,6 @@ struct aoRecord *pao;
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
@@ -120,9 +119,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pao,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pao->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pao->name);
|
||||
strcat(message,": devAoSoft (write_ao) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pao,
|
||||
"devAoSoft (write_ao) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,11 +92,9 @@ long status;
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long options;
|
||||
long nrequest;
|
||||
|
||||
/* ao.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pao->out.type) {
|
||||
@@ -117,9 +115,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pao,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pao->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pao->name);
|
||||
strcat(message,": devAoSoftRaw (write_ao) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pao,
|
||||
"devAoSoftRaw (write_ao) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* ao.out must be a CONSTANT*/
|
||||
@@ -113,9 +112,8 @@ static long init_record(pao)
|
||||
pcallback->wd_id = wdCreate();
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pao->name);
|
||||
strcat(message,": devAoTestAsyn (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pao,
|
||||
"devAoTestAsyn (init_record) Illegal OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(2);
|
||||
@@ -124,7 +122,6 @@ static long init_record(pao)
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pao->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -146,9 +143,8 @@ static long write_ao(pao)
|
||||
default :
|
||||
if(recGblSetSevr(pao,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pao->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pao->name);
|
||||
strcat(message,": devAoTestAsyn (read_ao) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pao,
|
||||
"devAoTestAsyn (read_ao) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,16 +81,14 @@ struct {
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* ao.out must be an VME_IO */
|
||||
switch (pao->out.type) {
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pao->name);
|
||||
strcat(message,": devAoVmiVme4100 (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pao,
|
||||
"devAoVmiVme4100 (init_record) Illegal OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,6 @@ struct {
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bi.inp must be an VME_IO */
|
||||
@@ -83,9 +82,8 @@ static long init_record(pbi)
|
||||
pbi->mask <<= pvmeio->signal;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiMpv910 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiMpv910 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -75,9 +75,7 @@ struct {
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pbi->inp.type) {
|
||||
@@ -94,9 +92,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -105,7 +102,6 @@ long status;
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* bi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -132,9 +128,8 @@ static long read_bi(pbi)
|
||||
default :
|
||||
if(recGblSetSevr(pbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiSoft (read_bi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiSoft (read_bi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,9 +76,7 @@ struct {
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pbi->inp.type) {
|
||||
@@ -94,9 +92,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiSoftRaw (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -105,7 +102,6 @@ long status;
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* bi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -132,9 +128,8 @@ static long read_bi(pbi)
|
||||
default :
|
||||
if(recGblSetSevr(pbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiSoftRaw (read_bi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiSoftRaw (read_bi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* bi.inp must be a CONSTANT*/
|
||||
@@ -114,9 +113,8 @@ static long init_record(pbi)
|
||||
pbi->udf = FALSE;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiTestAsyn (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiTestAsyn (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -125,7 +123,6 @@ static long init_record(pbi)
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pbi->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -147,9 +144,8 @@ static long read_bi(pbi)
|
||||
default :
|
||||
if(recGblSetSevr(pbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiTestAsyn (read_bi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiTestAsyn (read_bi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,7 +72,6 @@ struct {
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
char message[100];
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bi.inp must be an VME_IO */
|
||||
@@ -83,9 +82,8 @@ static long init_record(pbi)
|
||||
pbi->mask <<= pvmeio->signal;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbi->name);
|
||||
strcat(message,": devBiXVme210 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbi,
|
||||
"devBiXVme210 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -72,8 +72,7 @@ struct {
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
int value,status;
|
||||
int value,status=0;
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bo.out must be an VME_IO */
|
||||
@@ -84,27 +83,15 @@ static long init_record(pbo)
|
||||
pbo->mask <<= pvmeio->signal;
|
||||
/* read the value via bo driver */
|
||||
status = bb902_read(pvmeio->card,pbo->mask,&value);
|
||||
if(status == 0) {
|
||||
pbo->rval = value;
|
||||
} else if(status == -1) {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoMpv902 (init_record) card does not exist");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
} else {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoMpv902 (init_record) illegal device");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
}
|
||||
if(status == 0) pbo->rval = value;
|
||||
else status = 2;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoMpv902 (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,pbo,
|
||||
"devBoMpv902 (init_record) Illegal OUT field");
|
||||
}
|
||||
return(0);
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long write_bo(pbo)
|
||||
|
||||
@@ -92,11 +92,7 @@ struct boRecord *pbo;
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* bo.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pbo->out.type) {
|
||||
@@ -116,9 +112,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoSoft (write_bo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbo,
|
||||
"devBoSoft (write_bo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ long status;
|
||||
if (pbo->out.type == PV_LINK)
|
||||
status = dbCaAddOutlink(&(pbo->out), (void *) pbo, "RVAL");
|
||||
else
|
||||
status = 0L;
|
||||
status = 2;
|
||||
|
||||
return status;
|
||||
|
||||
@@ -90,11 +90,7 @@ long status;
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* bo.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pbo->out.type) {
|
||||
@@ -115,9 +111,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoSoftRaw (write_bo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbo,
|
||||
"devBoSoftRaw (write_bo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* bo.out must be a CONSTANT*/
|
||||
@@ -113,9 +112,8 @@ static long init_record(pbo)
|
||||
pcallback->wd_id = wdCreate();
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoTestAsyn (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbo,
|
||||
"devBoTestAsyn (init_record) Illegal OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(2);
|
||||
@@ -124,7 +122,6 @@ static long init_record(pbo)
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pbo->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -146,9 +143,8 @@ static long write_bo(pbo)
|
||||
default :
|
||||
if(recGblSetSevr(pbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoTestAsyn (read_bo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pbo,
|
||||
"devBoTestAsyn (read_bo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,8 @@ struct {
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
char message[100];
|
||||
unsigned int value;
|
||||
int status;
|
||||
int status=0;
|
||||
struct vmeio *pvmeio;
|
||||
|
||||
/* bo.out must be an VME_IO */
|
||||
@@ -84,27 +83,15 @@ static long init_record(pbo)
|
||||
pbo->mask = 1;
|
||||
pbo->mask <<= pvmeio->signal;
|
||||
status = xy220_read(pvmeio->card,pbo->mask,&value);
|
||||
if(status == 0) {
|
||||
pbo->rval = value;
|
||||
} else if(status == -1) {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoXVme220 (init_record) card does not exist");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
} else {
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoXVme220 (init_record) illegal device");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
}
|
||||
if(status == 0) pbo->rbv = pbo->rval = value;
|
||||
else status = 2;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pbo->name);
|
||||
strcat(message,": devBoXVme220 (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,pbo,
|
||||
"devBoXVme220 (init_record) Illegal OUT field");
|
||||
}
|
||||
return(0);
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long write_bo(pbo)
|
||||
|
||||
@@ -72,9 +72,7 @@ struct {
|
||||
static long init_record(pevent)
|
||||
struct eventRecord *pevent;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* event.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pevent->inp.type) {
|
||||
@@ -93,9 +91,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pevent->name);
|
||||
strcat(message,": devEventSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pevent,
|
||||
"devEventSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -104,7 +101,6 @@ long status;
|
||||
static long read_event(pevent)
|
||||
struct eventRecord *pevent;
|
||||
{
|
||||
char message[100];
|
||||
long status=0,options,nRequest;
|
||||
|
||||
/* event.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -131,9 +127,8 @@ static long read_event(pevent)
|
||||
default :
|
||||
if(recGblSetSevr(pevent,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pevent->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pevent->name);
|
||||
strcat(message,": devEventSoft (read_event) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pevent,
|
||||
"devEventSoft (read_event) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,15 +57,13 @@ struct {
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_event;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devEventTestIoEvent={
|
||||
6,
|
||||
5,
|
||||
NULL,
|
||||
init,
|
||||
NULL,
|
||||
get_ioint_info,
|
||||
read_event,
|
||||
NULL};
|
||||
read_event};
|
||||
|
||||
static IOSCANPVT ioscanpvt;
|
||||
WDOG_ID wd_id=NULL;
|
||||
|
||||
@@ -74,7 +74,6 @@ struct {
|
||||
static long init_record(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* histogram.svl must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (phistogram->svl.type) {
|
||||
@@ -88,9 +87,8 @@ static long init_record(phistogram)
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,phistogram->name);
|
||||
strcat(message,": devHistogramSoft (init_record) Illegal SVL field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,phistogram,
|
||||
"devHistogramSoft (init_record) Illegal SVL field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -99,7 +97,6 @@ static long init_record(phistogram)
|
||||
static long read_histogram(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* histogram.svl must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -125,9 +122,8 @@ static long read_histogram(phistogram)
|
||||
phistogram->nsev = VALID_ALARM;
|
||||
phistogram->nsta = SOFT_ALARM;
|
||||
if(phistogram->stat!=SOFT_ALARM) {
|
||||
strcpy(message,phistogram->name);
|
||||
strcat(message,": devHistogramSoft (read_histogram) Illegal SVL field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,phistogram,
|
||||
"devHistogramSoft (read_histogram) Illegal SVL field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* histogram.svl must be a CONSTANT*/
|
||||
@@ -110,9 +109,8 @@ static long init_record(phistogram)
|
||||
phistogram->sgnl = phistogram->svl.value.value;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,phistogram->name);
|
||||
strcat(message,": devHistogramTestAsyn (init_record) Illegal SVL field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,phistogram,
|
||||
"devHistogramTestAsyn (init_record) Illegal SVL field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -121,7 +119,6 @@ static long init_record(phistogram)
|
||||
static long read_histogram(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(phistogram->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -143,9 +140,8 @@ static long read_histogram(phistogram)
|
||||
default :
|
||||
if(recGblSetSevr(phistogram,SOFT_ALARM,VALID_ALARM)){
|
||||
if(phistogram->stat!=SOFT_ALARM) {
|
||||
strcpy(message,phistogram->name);
|
||||
strcat(message,": devHistogramTestAsyn (read_histogram) Illegal SVL field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,phistogram,
|
||||
"devHistogramTestAsyn (read_histogram) Illegal SVL field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ struct {
|
||||
static long init_record(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* longin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (plongin->inp.type) {
|
||||
@@ -91,9 +89,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,plongin->name);
|
||||
strcat(message,": devLiSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,plongin,
|
||||
"devLiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -102,7 +99,6 @@ long status;
|
||||
static long read_longin(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
char message[100];
|
||||
long status=0,options,nRequest;
|
||||
|
||||
/* longin.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -129,9 +125,8 @@ static long read_longin(plongin)
|
||||
default :
|
||||
if(recGblSetSevr(plongin,SOFT_ALARM,VALID_ALARM)){
|
||||
if(plongin->stat!=SOFT_ALARM) {
|
||||
strcpy(message,plongin->name);
|
||||
strcat(message,": devLiSoft (read_longin) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,plongin,
|
||||
"devLiSoft (read_longin) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,11 +88,7 @@ long status;
|
||||
static long write_longout(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* longout.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (plongout->out.type) {
|
||||
@@ -113,9 +109,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(plongout,SOFT_ALARM,VALID_ALARM)){
|
||||
if(plongout->stat!=SOFT_ALARM) {
|
||||
strcpy(message,plongout->name);
|
||||
strcat(message,": devLoSoft (write_longout) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,plongout,
|
||||
"devLoSoft (write_longout) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ struct {
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* mbbi.inp must be an VME_IO */
|
||||
switch (pmbbi->inp.type) {
|
||||
@@ -82,9 +81,8 @@ static long init_record(pmbbi)
|
||||
pmbbi->mask <<= pmbbi->shft;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiMpv910 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiMpv910 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -76,9 +76,7 @@ struct {
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
@@ -95,9 +93,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -106,7 +103,6 @@ long status;
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -133,9 +129,8 @@ static long read_mbbi(pmbbi)
|
||||
default :
|
||||
if(recGblSetSevr(pmbbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiSoft (read_mbbi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiSoft (read_mbbi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,9 +77,7 @@ struct {
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
@@ -95,9 +93,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiSoftRaw (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -106,7 +103,6 @@ long status;
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
long status,options,nRequest;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -133,9 +129,8 @@ static long read_mbbi(pmbbi)
|
||||
default :
|
||||
if(recGblSetSevr(pmbbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiSoftRaw (read_mbbi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiSoftRaw (read_mbbi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* mbbi.inp must be a CONSTANT*/
|
||||
@@ -113,9 +112,8 @@ static long init_record(pmbbi)
|
||||
pmbbi->udf = FALSE;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiTestAsyn (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiTestAsyn (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -124,7 +122,6 @@ static long init_record(pmbbi)
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pmbbi->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -146,9 +143,8 @@ static long read_mbbi(pmbbi)
|
||||
default :
|
||||
if(recGblSetSevr(pmbbi,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbi->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiTestAsyn (read_mbbi) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiTestAsyn (read_mbbi) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,6 @@ struct {
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* mbbi.inp must be an VME_IO */
|
||||
switch (pmbbi->inp.type) {
|
||||
@@ -82,9 +81,8 @@ static long init_record(pmbbi)
|
||||
pmbbi->mask <<= pmbbi->shft;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbi->name);
|
||||
strcat(message,": devMbbiXVme210 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbi,
|
||||
"devMbbiXVme210 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -73,10 +73,9 @@ struct {
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
unsigned long value;
|
||||
struct vmeio *pvmeio;
|
||||
int status;
|
||||
int status=0;
|
||||
|
||||
/* mbbo.out must be an VME_IO */
|
||||
switch (pmbbo->out.type) {
|
||||
@@ -86,14 +85,14 @@ static long init_record(pmbbo)
|
||||
pmbbo->mask <<= pmbbo->shft;
|
||||
status = bb902_read(pvmeio->card,pmbbo->mask,&value);
|
||||
if(status==0) pmbbo->rbv = pmbbo->rval = value;
|
||||
else status = 2;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboMpv902 (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,pmbbo,
|
||||
"devMbboMpv902 (init_record) Illegal OUT field");
|
||||
}
|
||||
return(0);
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
|
||||
@@ -94,11 +94,7 @@ struct mbboRecord *pmbbo;
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* mbbo.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbo->out.type) {
|
||||
@@ -119,9 +115,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pmbbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboSoft (write_mbbo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbo,
|
||||
"devMbboSoft (write_mbbo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ long status;
|
||||
if (pmbbo->out.type == PV_LINK)
|
||||
status = dbCaAddOutlink(&(pmbbo->out), (void *) pmbbo, "RVAL");
|
||||
else
|
||||
status = 0L;
|
||||
status = 2;
|
||||
|
||||
return status;
|
||||
|
||||
@@ -90,11 +90,7 @@ long status;
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* mbbo.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbo->out.type) {
|
||||
@@ -115,9 +111,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pmbbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboSoftRaw (write_mbbo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbo,
|
||||
"devMbboSoftRaw (write_mbbo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +100,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* mbbo.out must be a CONSTANT*/
|
||||
@@ -113,9 +112,8 @@ static long init_record(pmbbo)
|
||||
pcallback->wd_id = wdCreate();
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboTestAsyn (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbo,
|
||||
"devMbboTestAsyn (init_record) Illegal OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(2);
|
||||
@@ -124,7 +122,6 @@ static long init_record(pmbbo)
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pmbbo->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -146,9 +143,8 @@ static long write_mbbo(pmbbo)
|
||||
default :
|
||||
if(recGblSetSevr(pmbbo,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pmbbo->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboTestAsyn (read_mbbo) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pmbbo,
|
||||
"devMbboTestAsyn (read_mbbo) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,10 +73,9 @@ struct {
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
char message[100];
|
||||
unsigned long value;
|
||||
struct vmeio *pvmeio;
|
||||
int status;
|
||||
int status=0;
|
||||
|
||||
/* mbbo.out must be an VME_IO */
|
||||
switch (pmbbo->out.type) {
|
||||
@@ -86,14 +85,14 @@ static long init_record(pmbbo)
|
||||
pmbbo->mask = pmbbo->shft;
|
||||
status = xy220_read(pvmeio->card,pmbbo->mask,&value);
|
||||
if(status==0) pmbbo->rbv = pmbbo->rval = value;
|
||||
else status = 2;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pmbbo->name);
|
||||
strcat(message,": devMbboXVme220 (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
return(S_db_badField);
|
||||
status = S_db_badField;
|
||||
recGblRecordError(status,pmbbo,
|
||||
"devMbboXVme220 (init_record) Illegal OUT field");
|
||||
}
|
||||
return(0);
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
|
||||
@@ -89,11 +89,7 @@ long status;
|
||||
static long write_pt(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* pt.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (ppt->out.type) {
|
||||
@@ -113,9 +109,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(ppt,WRITE_ALARM,VALID_ALARM)){
|
||||
if(ppt->stat!=SOFT_ALARM) {
|
||||
strcpy(message,ppt->name);
|
||||
strcat(message,": devPtSoft (write_pt) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,ppt,
|
||||
"devPtSoft (write_pt) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,9 +73,7 @@ struct {
|
||||
static long init_record(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* stringin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pstringin->inp.type) {
|
||||
@@ -95,9 +93,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pstringin->name);
|
||||
strcat(message,": devSiSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringin,
|
||||
"devSiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -106,7 +103,6 @@ long status;
|
||||
static long read_stringin(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
char message[100];
|
||||
long status=0,options,nRequest;
|
||||
|
||||
/* stringin.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -133,9 +129,8 @@ static long read_stringin(pstringin)
|
||||
default :
|
||||
if(recGblSetSevr(pstringin,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pstringin->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pstringin->name);
|
||||
strcat(message,": devSiSoft (read_stringin) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringin,
|
||||
"devSiSoft (read_stringin) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* stringin.inp must be a CONSTANT*/
|
||||
@@ -114,9 +113,8 @@ static long init_record(pstringin)
|
||||
}
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pstringin->name);
|
||||
strcat(message,": devSiTestAsyn (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringin,
|
||||
"devSiTestAsyn (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -125,7 +123,6 @@ static long init_record(pstringin)
|
||||
static long read_stringin(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pstringin->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -147,9 +144,8 @@ static long read_stringin(pstringin)
|
||||
default :
|
||||
if(recGblSetSevr(pstringin,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pstringin->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pstringin->name);
|
||||
strcat(message,": devSiTestAsyn (read_stringin) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringin,
|
||||
"devSiTestAsyn (read_stringin) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,11 +88,7 @@ long status;
|
||||
static long write_stringout(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
char message[100];
|
||||
long status;
|
||||
/* added for Channel Access Links */
|
||||
long options;
|
||||
long nrequest;
|
||||
long status,options,nrequest;
|
||||
|
||||
/* stringout.out must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
switch (pstringout->out.type) {
|
||||
@@ -113,9 +109,8 @@ long nrequest;
|
||||
default :
|
||||
if(recGblSetSevr(pstringout,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pstringout->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pstringout->name);
|
||||
strcat(message,": devSoSoft (write_stringout) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringout,
|
||||
"devSoSoft (write_stringout) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* stringout.out must be a CONSTANT*/
|
||||
@@ -111,9 +110,8 @@ static long init_record(pstringout)
|
||||
pcallback->wd_id = wdCreate();
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pstringout->name);
|
||||
strcat(message,": devSoTestAsyn (init_record) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringout,
|
||||
"devSoTestAsyn (init_record) Illegal OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -122,7 +120,6 @@ static long init_record(pstringout)
|
||||
static long write_stringout(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pstringout->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -144,9 +141,8 @@ static long write_stringout(pstringout)
|
||||
default :
|
||||
if(recGblSetSevr(pstringout,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pstringout->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pstringout->name);
|
||||
strcat(message,": devSoTestAsyn (read_stringout) Illegal OUT field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pstringout,
|
||||
"devSoTestAsyn (read_stringout) Illegal OUT field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,16 +133,14 @@ static long get_ioint_info(cmd,pwf,io_type,card_type,card_number)
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* wf.inp must be an VME_IO */
|
||||
switch (pwf->inp.type) {
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfJoergerVtr1 (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfJoergerVtr1 (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -74,9 +74,7 @@ struct {
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
/* Added for Channel Access Links */
|
||||
long status;
|
||||
long status;
|
||||
|
||||
/* wf.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pwf->inp.type) {
|
||||
@@ -92,9 +90,8 @@ long status;
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfSoft (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -103,7 +100,6 @@ long status;
|
||||
static long read_wf(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
long options,nRequest;
|
||||
|
||||
/* wf.inp must be a CONSTANT or a DB_LINK or a CA_LINK*/
|
||||
@@ -130,9 +126,8 @@ static long read_wf(pwf)
|
||||
default :
|
||||
if(recGblSetSevr(pwf,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pwf->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfSoft (read_wf) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfSoft (read_wf) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,6 @@ static void myCallback(pcallback)
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback;
|
||||
|
||||
/* wf.inp must be a CONSTANT*/
|
||||
@@ -111,9 +110,8 @@ static long init_record(pwf)
|
||||
pwf->nord = 0;
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfTestAsyn (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfTestAsyn (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
@@ -122,7 +120,6 @@ static long init_record(pwf)
|
||||
static long read_wf(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
struct callback *pcallback=(struct callback *)(pwf->dpvt);
|
||||
int wait_time;
|
||||
|
||||
@@ -144,9 +141,8 @@ static long read_wf(pwf)
|
||||
default :
|
||||
if(recGblSetSevr(pwf,SOFT_ALARM,VALID_ALARM)){
|
||||
if(pwf->stat!=SOFT_ALARM) {
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfTestAsyn (read_wf) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfTestAsyn (read_wf) Illegal INP field");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,16 +100,14 @@ static void myCallback(pwf,no_read,pdata)
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
char message[100];
|
||||
|
||||
/* wf.inp must be an VME_IO */
|
||||
switch (pwf->inp.type) {
|
||||
case (VME_IO) :
|
||||
break;
|
||||
default :
|
||||
strcpy(message,pwf->name);
|
||||
strcat(message,": devWfXy566Sc (init_record) Illegal INP field");
|
||||
errMessage(S_db_badField,message);
|
||||
recGblRecordError(S_db_badField,pwf,
|
||||
"devWfXy566Sc (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
|
||||
Reference in New Issue
Block a user