restructure; new Symb support
This commit is contained in:
6
src/dev/softDev/Makefile
Normal file
6
src/dev/softDev/Makefile
Normal file
@@ -0,0 +1,6 @@
|
||||
TOP=../../..
|
||||
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
|
||||
32
src/dev/softDev/Makefile.Vx
Normal file
32
src/dev/softDev/Makefile.Vx
Normal file
@@ -0,0 +1,32 @@
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c += ../devAiSoft.c
|
||||
SRCS.c += ../devAiSoftRaw.c
|
||||
SRCS.c += ../devAoSoft.c
|
||||
SRCS.c += ../devAoSoftRaw.c
|
||||
SRCS.c += ../devBiSoft.c
|
||||
SRCS.c += ../devBiSoftRaw.c
|
||||
SRCS.c += ../devBoSoft.c
|
||||
SRCS.c += ../devBoSoftRaw.c
|
||||
SRCS.c += ../devEventSoft.c
|
||||
SRCS.c += ../devHistogramSoft.c
|
||||
SRCS.c += ../devLiSoft.c
|
||||
SRCS.c += ../devLoSoft.c
|
||||
SRCS.c += ../devMbbiSoft.c
|
||||
SRCS.c += ../devMbbiSoftRaw.c
|
||||
SRCS.c += ../devMbboDirectSoft.c
|
||||
SRCS.c += ../devMbboDirectSoftRaw.c
|
||||
SRCS.c += ../devMbboSoft.c
|
||||
SRCS.c += ../devMbboSoftRaw.c
|
||||
SRCS.c += ../devPtSoft.c
|
||||
SRCS.c += ../devSASoft.c
|
||||
SRCS.c += ../devSiSoft.c
|
||||
SRCS.c += ../devSoSoft.c
|
||||
SRCS.c += ../devWfSoft.c
|
||||
|
||||
PROD = $(SRCS.c:../%.c=%.o)
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
|
||||
|
||||
102
src/dev/softDev/devAiSoft.c
Normal file
102
src/dev/softDev/devAiSoft.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/* devAiSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 3/6/91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .11 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <cvtTable.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <aiRecord.h>
|
||||
/* Create the dset for devAiSoft */
|
||||
static long init_record();
|
||||
static long read_ai();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_ai;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAiSoft={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_ai,
|
||||
NULL
|
||||
};
|
||||
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
|
||||
/* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pai->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pai->inp,DBF_DOUBLE,&pai->val))
|
||||
pai->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField, (void *)pai,
|
||||
"devAiSoft (init_record) Illegal INP field");
|
||||
|
||||
return(S_db_badField);
|
||||
}
|
||||
/* Make sure record processing routine does not perform any conversion*/
|
||||
pai->linr = 0;
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&(pai->inp),DBR_DOUBLE, &(pai->val),0,0);
|
||||
if (pai->inp.type!=CONSTANT && RTN_SUCCESS(status)) pai->udf = FALSE;
|
||||
return(2); /*don't convert*/
|
||||
}
|
||||
106
src/dev/softDev/devAiSoftRaw.c
Normal file
106
src/dev/softDev/devAiSoftRaw.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/* devAiSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-04-92 jba Added special_linconv
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <cvtTable.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <aiRecord.h>
|
||||
/* Create the dset for devAiSoftRaw */
|
||||
static long init_record();
|
||||
static long read_ai();
|
||||
static long special_linconv();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_ai;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAiSoftRaw={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_ai,
|
||||
special_linconv
|
||||
};
|
||||
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
|
||||
/* ai.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pai->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pai->inp,DBF_LONG,&pai->rval);
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pai,
|
||||
"devAiSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&(pai->inp),DBR_LONG,&(pai->rval),0,0);
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long special_linconv(pai,after)
|
||||
struct aiRecord *pai;
|
||||
int after;
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
96
src/dev/softDev/devAoSoft.c
Normal file
96
src/dev/softDev/devAoSoft.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/* devAoSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* Device Support Routines for soft Analog Output Records*/
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 02-05-92 jba Changed function arguments from paddr to precord
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* .04 04-01-92 jba Changed return of init_record to dont convert
|
||||
* .05 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <special.h>
|
||||
#include <aoRecord.h>
|
||||
|
||||
/* added for Channel Access Links */
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devAoSoft */
|
||||
static long write_ao();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSoft={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_ao,
|
||||
NULL};
|
||||
|
||||
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
|
||||
long status=0;
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pao->out,DBR_DOUBLE, &pao->oval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
100
src/dev/softDev/devAoSoftRaw.c
Normal file
100
src/dev/softDev/devAoSoftRaw.c
Normal file
@@ -0,0 +1,100 @@
|
||||
/* devAoSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* Device Support Routines for soft raw Analog Output Records*/
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 09-25-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-04-92 jba Added special_linconv
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <special.h>
|
||||
#include <aoRecord.h>
|
||||
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devAoSoftRaw */
|
||||
static long write_ao();
|
||||
static long special_linconv();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSoftRaw={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_ao,
|
||||
special_linconv};
|
||||
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pao->out,DBR_LONG,&pao->rval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long special_linconv(pao,after)
|
||||
struct aoRecord *pao;
|
||||
int after;
|
||||
{
|
||||
|
||||
if(!after) return(0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
96
src/dev/softDev/devBiSoft.c
Normal file
96
src/dev/softDev/devBiSoft.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/* devBiSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
/* Create the dset for devBiSoft */
|
||||
static long init_record();
|
||||
static long read_bi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;
|
||||
}devBiSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_bi
|
||||
};
|
||||
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK */
|
||||
switch (pbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pbi->inp,DBF_ENUM,&pbi->val))
|
||||
pbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pbi,
|
||||
"devBiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pbi->inp, DBR_USHORT, &pbi->val,0,0);
|
||||
if(pbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pbi->udf=FALSE;
|
||||
return(2);
|
||||
}
|
||||
95
src/dev/softDev/devBiSoftRaw.c
Normal file
95
src/dev/softDev/devBiSoftRaw.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/* devBiSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 02-05-92 jba Changed function arguments from paddr to precord
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <biRecord.h>
|
||||
/* Create the dset for devBiSoftRaw */
|
||||
static long init_record();
|
||||
static long read_bi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;
|
||||
}devBiSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_bi
|
||||
};
|
||||
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
|
||||
/* bi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pbi->inp,DBF_ULONG,&pbi->rval);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pbi,
|
||||
"devBiSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pbi->inp, DBR_ULONG, &pbi->rval,0,0);
|
||||
return(0);
|
||||
}
|
||||
94
src/dev/softDev/devBoSoft.c
Normal file
94
src/dev/softDev/devBoSoft.c
Normal file
@@ -0,0 +1,94 @@
|
||||
/* devBoSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* devBoSoft.c - Device Support Routines for Soft Binary Output*/
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 04-01-92 jba Changed return of init_record to dont convert
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <boRecord.h>
|
||||
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devBoSoft */
|
||||
static long write_bo();
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_bo};
|
||||
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
|
||||
long status=0;
|
||||
|
||||
/* dont convert */
|
||||
status=2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pbo->out,DBR_USHORT,&pbo->val,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
93
src/dev/softDev/devBoSoftRaw.c
Normal file
93
src/dev/softDev/devBoSoftRaw.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/* devBoSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* devBoSoftRaw.c - Device Support Routines for SoftRaw Binary Output*/
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 3-28-92
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 03-28-92 jba Initial version
|
||||
* .02 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <boRecord.h>
|
||||
|
||||
/* added for Channel Access Links */
|
||||
static long init_record();
|
||||
|
||||
/* Create the dset for devBoSoftRaw */
|
||||
static long write_bo();
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_bo};
|
||||
|
||||
|
||||
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
/*Don't convert*/
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pbo->out,DBR_LONG, &pbo->rval,1);
|
||||
|
||||
return(status);
|
||||
}
|
||||
96
src/dev/softDev/devEventSoft.c
Normal file
96
src/dev/softDev/devEventSoft.c
Normal file
@@ -0,0 +1,96 @@
|
||||
/* devEventSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 04-21-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .00 12-13-91 jba Initial definition
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* .04 03-03-94 mrk Move constant link value to val only if val is zero
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <eventRecord.h>
|
||||
|
||||
/* Create the dset for devEventSoft */
|
||||
static long init_record();
|
||||
static long read_event();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_event;
|
||||
}devEventSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_event
|
||||
};
|
||||
|
||||
static long init_record(pevent)
|
||||
struct eventRecord *pevent;
|
||||
{
|
||||
|
||||
/* event.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pevent->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pevent->inp,DBF_USHORT,&pevent->val))
|
||||
pevent->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pevent,
|
||||
"devEventSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_event(pevent)
|
||||
struct eventRecord *pevent;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pevent->inp,DBR_USHORT,&pevent->val,0,0);
|
||||
if(pevent->inp.type!=CONSTANT && RTN_SUCCESS(status)) pevent->udf=FALSE;
|
||||
return(status);
|
||||
}
|
||||
98
src/dev/softDev/devHistogramSoft.c
Normal file
98
src/dev/softDev/devHistogramSoft.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/* devHistogramSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 07/02/91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 mm-dd-yy iii Comment
|
||||
* .02 mm-dd-yy iii Comment
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <cvtTable.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <histogramRecord.h>
|
||||
/* Create the dset for devHistogramSoft */
|
||||
static long init_record();
|
||||
static long read_histogram();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_histogram;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devHistogramSoft={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_histogram,
|
||||
NULL
|
||||
};
|
||||
|
||||
static long init_record(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
long status = 0;
|
||||
|
||||
/* histogram.svl must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (phistogram->svl.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&phistogram->svl,DBF_DOUBLE,&phistogram->sgnl))
|
||||
phistogram->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)phistogram,
|
||||
"devHistogramSoft (init_record) Illegal SVL field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(status);
|
||||
}
|
||||
|
||||
static long read_histogram(phistogram)
|
||||
struct histogramRecord *phistogram;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&phistogram->svl,DBR_DOUBLE, &phistogram->sgnl,0,0);
|
||||
return(0); /*add count*/
|
||||
}
|
||||
97
src/dev/softDev/devLiSoft.c
Normal file
97
src/dev/softDev/devLiSoft.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/* devLiSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 09-23-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <longinRecord.h>
|
||||
|
||||
/* Create the dset for devLiSoft */
|
||||
static long init_record();
|
||||
static long read_longin();
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_longin;
|
||||
}devLiSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_longin
|
||||
};
|
||||
|
||||
static long init_record(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
|
||||
/* longin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (plongin->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&plongin->inp,DBF_LONG,&plongin->val))
|
||||
plongin->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)plongin,
|
||||
"devLiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_longin(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&plongin->inp,DBR_LONG, &plongin->val,0,0);
|
||||
if(plongin->inp.type!=CONSTANT && RTN_SUCCESS(status)) plongin->udf=FALSE;
|
||||
return(status);
|
||||
}
|
||||
78
src/dev/softDev/devLoSoft.c
Normal file
78
src/dev/softDev/devLoSoft.c
Normal file
@@ -0,0 +1,78 @@
|
||||
/* devLoSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 09-23-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Lource
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <longoutRecord.h>
|
||||
/* Create the dset for devLoSoft */
|
||||
static long init_record();
|
||||
static long write_longout();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_longout;
|
||||
}devLoSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_longout
|
||||
};
|
||||
|
||||
static long init_record(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
return(0);
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_longout(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&plongout->out,DBR_LONG, &plongout->val,1);
|
||||
return(0);
|
||||
}
|
||||
95
src/dev/softDev/devMbbiDirectSoft.c
Normal file
95
src/dev/softDev/devMbbiDirectSoft.c
Normal file
@@ -0,0 +1,95 @@
|
||||
/* devMbbiDirectSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Matthew Needes
|
||||
* Date: 10-08-93
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* (Modification log in devMbbiSoft.c applies)
|
||||
* .01 10-08-93 mcn (created) support for direct mbbi records
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiDirectRecord.h>
|
||||
/* Create the dset for devMbbiSoft */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
}devMbbiDirectSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi
|
||||
};
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiDirectRecord *pmbbi;
|
||||
{
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val))
|
||||
pmbbi->udf = FALSE;
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
"devMbbiDirectSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiDirectRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0);
|
||||
if (pmbbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pmbbi->udf=FALSE;
|
||||
return(2);
|
||||
}
|
||||
93
src/dev/softDev/devMbbiDirectSoftRaw.c
Normal file
93
src/dev/softDev/devMbbiDirectSoftRaw.c
Normal file
@@ -0,0 +1,93 @@
|
||||
/* devMbbiDirectSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Matthew Needes
|
||||
* Date: 10-08-93
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* (modification log of devMbbiDirectSoftRaw applies)
|
||||
* .01 10-08-93 mcn device support for direct mbbi records.
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiDirectRecord.h>
|
||||
/* Create the dset for devMbbiDirectSoftRaw */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
}devMbbiDirectSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi
|
||||
};
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiDirectRecord *pmbbi;
|
||||
{
|
||||
|
||||
/* mbbi.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pmbbi->inp.type) {
|
||||
case (CONSTANT) :
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ULONG,&pmbbi->rval);
|
||||
break;
|
||||
case (DB_LINK) :
|
||||
case (PV_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
"devMbbiDirectSoftRaw (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiDirectRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_LONG,&pmbbi->rval,0,0);
|
||||
return(0);
|
||||
}
|
||||
85
src/dev/softDev/devMbbiSoft.c
Normal file
85
src/dev/softDev/devMbbiSoft.c
Normal file
@@ -0,0 +1,85 @@
|
||||
/* devMbbiSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiRecord.h>
|
||||
/* Create the dset for devMbbiSoft */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
}devMbbiSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi
|
||||
};
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
|
||||
if (pmbbi->inp.type == CONSTANT) {
|
||||
if(recGblInitConstantLink(&pmbbi->inp,DBF_ENUM,&pmbbi->val))
|
||||
pmbbi->udf = FALSE;
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_USHORT,&pmbbi->val,0,0);
|
||||
if(pmbbi->inp.type!=CONSTANT && RTN_SUCCESS(status)) pmbbi->udf=FALSE;
|
||||
return(2);
|
||||
}
|
||||
85
src/dev/softDev/devMbbiSoftRaw.c
Normal file
85
src/dev/softDev/devMbbiSoftRaw.c
Normal file
@@ -0,0 +1,85 @@
|
||||
/* devMbbiSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 02-05-92 jba Changed function arguments from paddr to precord
|
||||
* .03 03-13-92 jba ANSI C changes
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbbiRecord.h>
|
||||
/* Create the dset for devMbbiSoftRaw */
|
||||
static long init_record();
|
||||
static long read_mbbi();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
}devMbbiSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi
|
||||
};
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
|
||||
if (pmbbi->inp.type == CONSTANT) {
|
||||
recGblInitConstantLink(&pmbbi->inp,DBF_ULONG,&pmbbi->rval);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pmbbi->inp,DBR_LONG,&pmbbi->rval,0,0);
|
||||
return(0);
|
||||
}
|
||||
83
src/dev/softDev/devMbboDirectSoft.c
Normal file
83
src/dev/softDev/devMbboDirectSoft.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/* devMbboDirectSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Matthew Needes
|
||||
* Date: 10-08-93
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* (log for devMbboSoft applies)
|
||||
* 1. 10-08-93 mcn (created) dev support for MbboDirect records
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbboDirectRecord.h>
|
||||
/* Create the dset for devMbboSoft */
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboDirectSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboDirectRecord *pmbbo;
|
||||
{
|
||||
long status = 0;
|
||||
|
||||
/* dont convert */
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboDirectRecord *pmbbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_USHORT,&pmbbo->val,1);
|
||||
return(0);
|
||||
}
|
||||
83
src/dev/softDev/devMbboDirectSoftRaw.c
Normal file
83
src/dev/softDev/devMbboDirectSoftRaw.c
Normal file
@@ -0,0 +1,83 @@
|
||||
/* devMbboDirectSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Current Author: Matthew Needes
|
||||
* Date: 10-08-93
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* (log for devMbboSoftRaw.c applies)
|
||||
* .01 10-08-93 mcn (created) device support for devMbboDirect records
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbboDirectRecord.h>
|
||||
|
||||
/* Create the dset for devMbboDirectSoftRaw */
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboDirectSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboDirectRecord *pmbbo;
|
||||
{
|
||||
long status = 0;
|
||||
|
||||
if (pmbbo->out.type != PV_LINK)
|
||||
status = 2;
|
||||
return status;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboDirectRecord *pmbbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_LONG, &pmbbo->rval,1);
|
||||
return(0);
|
||||
}
|
||||
87
src/dev/softDev/devMbboSoft.c
Normal file
87
src/dev/softDev/devMbboSoft.c
Normal file
@@ -0,0 +1,87 @@
|
||||
/* devMbboSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 04-01-92 jba Changed return of init_record to dont convert
|
||||
* .04 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbboRecord.h>
|
||||
/* Create the dset for devMbboSoft */
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
|
||||
long status=0;
|
||||
|
||||
/*dont convert*/
|
||||
status=2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_USHORT, &pmbbo->val,1);
|
||||
return(0);
|
||||
}
|
||||
84
src/dev/softDev/devMbboSoftRaw.c
Normal file
84
src/dev/softDev/devMbboSoftRaw.c
Normal file
@@ -0,0 +1,84 @@
|
||||
/* devMbboSoftRaw.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 3-28-92
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 03-28-92 jba Initial version
|
||||
* .02 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <mbboRecord.h>
|
||||
/* Create the dset for devMbboSoftRaw */
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
|
||||
long status;
|
||||
|
||||
/*dont convert*/
|
||||
status = 2;
|
||||
return status;
|
||||
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pmbbo->out,DBR_LONG, &pmbbo->rval,1);
|
||||
return(0);
|
||||
}
|
||||
80
src/dev/softDev/devPtSoft.c
Normal file
80
src/dev/softDev/devPtSoft.c
Normal file
@@ -0,0 +1,80 @@
|
||||
/* devPtSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 6-1-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <pulseTrainRecord.h>
|
||||
|
||||
/* Create the dset for devPtSoft */
|
||||
static long init_record();
|
||||
static long write_pt();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_pt;
|
||||
}devPtSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_pt
|
||||
};
|
||||
|
||||
static long init_record(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_pt(ppt)
|
||||
struct pulseTrainRecord *ppt;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&(ppt->out),DBR_SHORT,&(ppt->val),1);
|
||||
return(0);
|
||||
}
|
||||
117
src/dev/softDev/devSASoft.c
Normal file
117
src/dev/softDev/devSASoft.c
Normal file
@@ -0,0 +1,117 @@
|
||||
/* devSASoft.c */
|
||||
/* devSASoft.c - Device Support Routines for soft subArray Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 090293
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* The Control Systems Group
|
||||
* Systems Engineering Department
|
||||
* Lawrence Berkeley Laboratory
|
||||
*
|
||||
* NOTES:
|
||||
* Derived from soft record device support.
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <subArrayRecord.h>
|
||||
|
||||
static int sizeofTypes[] = {MAX_STRING_SIZE,1,1,2,2,4,4,4,8,2};
|
||||
|
||||
/* Create the dset for devSASoft */
|
||||
static long init_record();
|
||||
static long read_sa();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_sa;
|
||||
}devSASoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_sa};
|
||||
|
||||
|
||||
static long init_record(psa)
|
||||
struct subArrayRecord *psa;
|
||||
{
|
||||
|
||||
/* sa.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (psa->inp.type) {
|
||||
case (CONSTANT) :
|
||||
psa->nord = 0;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)psa,
|
||||
"devSASoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_sa(psa)
|
||||
struct subArrayRecord *psa;
|
||||
{
|
||||
long status,ecount,nRequest;
|
||||
|
||||
if ((psa->indx + psa->nelm) < psa->malm)
|
||||
nRequest= psa->indx + psa->nelm;
|
||||
else
|
||||
nRequest=psa->malm;
|
||||
status = dbGetLink(&psa->inp,psa->ftvl,psa->bptr, 0,&nRequest);
|
||||
if ((nRequest - psa->indx) > 0)
|
||||
{
|
||||
if (psa->nelm > (nRequest - psa->indx))
|
||||
ecount = nRequest - psa->indx;
|
||||
else
|
||||
ecount = psa->nelm;
|
||||
memcpy(psa->bptr,(char *)psa->bptr + psa->indx * sizeofTypes[psa->ftvl],
|
||||
ecount * sizeofTypes[psa->ftvl]);
|
||||
}
|
||||
psa->nord = nRequest - psa->indx;
|
||||
|
||||
return(0);
|
||||
}
|
||||
98
src/dev/softDev/devSiSoft.c
Normal file
98
src/dev/softDev/devSiSoft.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/* devSiSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 04-21-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <stringinRecord.h>
|
||||
|
||||
/* Create the dset for devSiSoft */
|
||||
static long init_record();
|
||||
static long read_stringin();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_stringin;
|
||||
}devSiSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_stringin
|
||||
};
|
||||
|
||||
static long init_record(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
|
||||
/* stringin.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pstringin->inp.type) {
|
||||
case (CONSTANT) :
|
||||
if(recGblInitConstantLink(&pstringin->inp,DBF_STRING,pstringin->val))
|
||||
pstringin->udf = FALSE;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pstringin,
|
||||
"devSiSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_stringin(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbGetLink(&pstringin->inp,DBR_STRING,pstringin->val,0,0);
|
||||
if(pstringin->inp.type!=CONSTANT && RTN_SUCCESS(status)) pstringin->udf=FALSE;
|
||||
return(status);
|
||||
}
|
||||
80
src/dev/softDev/devSoSoft.c
Normal file
80
src/dev/softDev/devSoSoft.c
Normal file
@@ -0,0 +1,80 @@
|
||||
/* devSoSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
/*
|
||||
* Author: Janet Anderson
|
||||
* Date: 04-21-91
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <module_types.h>
|
||||
#include <stringoutRecord.h>
|
||||
|
||||
/* Create the dset for devSoSoft */
|
||||
static long init_record();
|
||||
static long write_stringout();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_stringout;
|
||||
}devSoSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_stringout
|
||||
};
|
||||
|
||||
static long init_record(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
static long write_stringout(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
long status;
|
||||
|
||||
status = dbPutLink(&pstringout->out,DBR_STRING,pstringout->val,1);
|
||||
return(status);
|
||||
}
|
||||
104
src/dev/softDev/devWfSoft.c
Normal file
104
src/dev/softDev/devWfSoft.c
Normal file
@@ -0,0 +1,104 @@
|
||||
/* devWfSoft.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* devWfSoft.c - Device Support Routines for soft Waveform Records*/
|
||||
/*
|
||||
* Original Author: Bob Dalesio
|
||||
* Current Author: Marty Kraimer
|
||||
* Date: 6-1-90
|
||||
*
|
||||
* Experimental Physics and Industrial Control System (EPICS)
|
||||
*
|
||||
* Copyright 1991, the Regents of the University of California,
|
||||
* and the University of Chicago Board of Governors.
|
||||
*
|
||||
* This software was produced under U.S. Government contracts:
|
||||
* (W-7405-ENG-36) at the Los Alamos National Laboratory,
|
||||
* and (W-31-109-ENG-38) at Argonne National Laboratory.
|
||||
*
|
||||
* Initial development by:
|
||||
* The Controls and Automation Group (AT-8)
|
||||
* Ground Test Accelerator
|
||||
* Accelerator Technology Division
|
||||
* Los Alamos National Laboratory
|
||||
*
|
||||
* Co-developed with
|
||||
* The Controls and Computing Group
|
||||
* Accelerator Systems Division
|
||||
* Advanced Photon Source
|
||||
* Argonne National Laboratory
|
||||
*
|
||||
* Modification Log:
|
||||
* -----------------
|
||||
* .01 11-11-91 jba Moved set of alarm stat and sevr to macros
|
||||
* .02 03-13-92 jba ANSI C changes
|
||||
* .03 10-10-92 jba replaced code with recGblGetLinkValue call
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recSup.h>
|
||||
#include <devSup.h>
|
||||
#include <link.h>
|
||||
#include <waveformRecord.h>
|
||||
|
||||
/* Create the dset for devWfSoft */
|
||||
static long init_record();
|
||||
static long read_wf();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_wf;
|
||||
}devWfSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_wf};
|
||||
|
||||
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
|
||||
/* wf.inp must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
|
||||
switch (pwf->inp.type) {
|
||||
case (CONSTANT) :
|
||||
pwf->nord = 0;
|
||||
break;
|
||||
case (PV_LINK) :
|
||||
case (DB_LINK) :
|
||||
case (CA_LINK) :
|
||||
break;
|
||||
default :
|
||||
recGblRecordError(S_db_badField,(void *)pwf,
|
||||
"devWfSoft (init_record) Illegal INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_wf(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
long status,nRequest;
|
||||
|
||||
nRequest=pwf->nelm;
|
||||
status = dbGetLink(&pwf->inp,pwf->ftvl,pwf->bptr, 0,&nRequest);
|
||||
/*If dbGetLink got no values leave things as they were*/
|
||||
if(nRequest>0) pwf->nord = nRequest;
|
||||
|
||||
return(0);
|
||||
}
|
||||
Reference in New Issue
Block a user