restructure; new Symb support
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
TOP=../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
include $(TOP)/config/RULES_ARCHS
|
||||
@@ -0,0 +1,26 @@
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
DBDINSTALL = symb.dbd
|
||||
|
||||
SRCS.c += ../devAiSymb.c
|
||||
SRCS.c += ../devAoSymb.c
|
||||
SRCS.c += ../devBiSymb.c
|
||||
SRCS.c += ../devBoSymb.c
|
||||
SRCS.c += ../devLiSymb.c
|
||||
SRCS.c += ../devLoSymb.c
|
||||
SRCS.c += ../devMbbiSymb.c
|
||||
SRCS.c += ../devMbbiSymbRaw.c
|
||||
SRCS.c += ../devMbboSymb.c
|
||||
SRCS.c += ../devMbboSymbRaw.c
|
||||
SRCS.c += ../devSiSymb.c
|
||||
SRCS.c += ../devSoSymb.c
|
||||
SRCS.c += ../devSymbFind.c
|
||||
SRCS.c += ../devWfSymb.c
|
||||
|
||||
PROD = $(SRCS.c:../%.c=%.o)
|
||||
LIBOBJS = $(SRCS.c:../%.c=%.o)
|
||||
LIBNAME = symb
|
||||
|
||||
|
||||
include $(TOP)/config/RULES.Vx
|
||||
@@ -0,0 +1,43 @@
|
||||
README file for dev/symb directory
|
||||
----------------------------------
|
||||
|
||||
This directory contains all files necessary to build and test a version
|
||||
of EPICS vxWorks global variable device support which uses the INST_IO
|
||||
string as the variable name specification rather than deriving the name
|
||||
from the record name.
|
||||
|
||||
In addition to specifying a variable name, a leading "*" operator indicates
|
||||
that the variable is a pointer and a trailing "[nnnn]" indicates that an
|
||||
element of an array should be accessed.
|
||||
|
||||
Refer to the header comments of devSymbFind.c for full details.
|
||||
|
||||
The following files are in the release:
|
||||
|
||||
README This file
|
||||
|
||||
Makefile UAE Makefile
|
||||
Makefile.Vx UAE vxWorks Makefile
|
||||
|
||||
devAiSymb.c Modified versions of standard EPICS
|
||||
devAoSymb.c vxWorks global variable device support
|
||||
devLiSymb.c
|
||||
devLoSymb.c
|
||||
devSiSymb.c
|
||||
devSoSymb.c
|
||||
|
||||
devSymbFind.c New module containing parsing code
|
||||
(includes conditionally compiled test routine)
|
||||
|
||||
devSymbTest.c Defines globals and a routine for test
|
||||
|
||||
devSup.ascii New INST_IO entries for the above six records
|
||||
|
||||
symb.sr Test database (works with devSymbTest.c)
|
||||
symbStartup.vws Test vxWorks startup script
|
||||
|
||||
|
||||
08-Jun-96, William Lupton (wlupton@keck.hawaii.edu), CVS tag: symb-1-0
|
||||
----------------------------------------------------------------------
|
||||
|
||||
first release
|
||||
@@ -0,0 +1,115 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devAiSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Analog Input Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devAiSymb */
|
||||
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;
|
||||
}devAiSymb={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_ai,
|
||||
NULL};
|
||||
|
||||
double testd = 5.5;
|
||||
|
||||
static long init_record(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pai->name, &pai->inp, &pai->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pai,
|
||||
"devAiSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
pai->linr=0; /* prevent any conversions */
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_ai(pai)
|
||||
struct aiRecord *pai;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) pai->dpvt;
|
||||
|
||||
if (private)
|
||||
{
|
||||
pai->val = *((double *)(*private->ppvar) + private->index);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if(RTN_SUCCESS(status)) pai->udf=FALSE;
|
||||
|
||||
return(2); /*don't convert*/
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devAoSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Analog Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
|
||||
/* Create the dset for devAoSymb */
|
||||
static long init_record();
|
||||
static long write_ao();
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSymb={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_ao,
|
||||
NULL};
|
||||
|
||||
|
||||
static long init_record(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pao->name, &pao->out, &pao->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pao,
|
||||
"devAoSymb (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(2); /* don't convert */
|
||||
}
|
||||
|
||||
static long write_ao(pao)
|
||||
struct aoRecord *pao;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) pao->dpvt;
|
||||
|
||||
if (private)
|
||||
*((double *)(*private->ppvar) + private->index) = pao->val;
|
||||
else
|
||||
return(1);
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devBiSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Binary Input Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 12-Dec-96 created from longin support
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devBiSymb */
|
||||
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;
|
||||
}devBiSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_bi};
|
||||
|
||||
long testb = 1;
|
||||
|
||||
static long init_record(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pbi->name, &pbi->inp, &pbi->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pbi,
|
||||
"devBiSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_bi(pbi)
|
||||
struct biRecord *pbi;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) pbi->dpvt;
|
||||
|
||||
if (pbi->dpvt)
|
||||
{
|
||||
pbi->val = *((unsigned short *)(*private->ppvar) + private->index);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if(RTN_SUCCESS(status)) pbi->udf=FALSE;
|
||||
|
||||
return(2); /*don't convert*/
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devBoSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Binary Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 12-Dec-96 created from longout support
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
static long init_record();
|
||||
static long write_bo();
|
||||
|
||||
/* Create the dset for devBoSymb */
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_bo};
|
||||
|
||||
|
||||
static long init_record(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pbo->name, &pbo->out, &pbo->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pbo,
|
||||
"devBoSymb (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long write_bo(pbo)
|
||||
struct boRecord *pbo;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) pbo->dpvt;
|
||||
|
||||
if (private)
|
||||
*((unsigned short *)(*private->ppvar) + private->index) = pbo->val;
|
||||
else
|
||||
return(1);
|
||||
|
||||
pbo->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devLiSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Longin Input Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devLiSymb */
|
||||
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;
|
||||
}devLiSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_longin};
|
||||
|
||||
long testl = 5463;
|
||||
|
||||
static long init_record(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(plongin->name, &plongin->inp, &plongin->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)plongin,
|
||||
"devLiSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_longin(plongin)
|
||||
struct longinRecord *plongin;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) plongin->dpvt;
|
||||
|
||||
if (plongin->dpvt)
|
||||
{
|
||||
plongin->val = *((long *)(*private->ppvar) + private->index);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if(RTN_SUCCESS(status)) plongin->udf=FALSE;
|
||||
|
||||
return(status);
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devLoSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Longout Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
static long init_record();
|
||||
static long write_longout();
|
||||
|
||||
/* Create the dset for devLoSymb */
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_longout;
|
||||
}devLoSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_longout};
|
||||
|
||||
|
||||
static long init_record(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(plongout->name, &plongout->out, &plongout->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)plongout,
|
||||
"devLoSymb (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long write_longout(plongout)
|
||||
struct longoutRecord *plongout;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) plongout->dpvt;
|
||||
|
||||
if (private)
|
||||
*((long *)(*private->ppvar) + private->index) = plongout->val;
|
||||
else
|
||||
return(1);
|
||||
|
||||
plongout->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devBiSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Multi-bit Binary Input Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 13-Dec-96 created from bi support
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devMbbiSymb */
|
||||
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;
|
||||
}devMbbiSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi};
|
||||
|
||||
long testmb = 1;
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pmbbi->name, &pmbbi->inp, &pmbbi->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
"devMbbiSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) pmbbi->dpvt;
|
||||
|
||||
if (pmbbi->dpvt)
|
||||
{
|
||||
pmbbi->val = *((long *)(*private->ppvar) + private->index);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if(RTN_SUCCESS(status)) pmbbi->udf=FALSE;
|
||||
|
||||
return(2); /*don't convert*/
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devMbbiSymbRaw.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Multi-bit Binary Input Raw Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 13-Dec-96 created from bi support
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devMbbiSymbRaw */
|
||||
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;
|
||||
}devMbbiSymbRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_mbbi};
|
||||
|
||||
long testmbr = 1;
|
||||
|
||||
static long init_record(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pmbbi->name, &pmbbi->inp, &pmbbi->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pmbbi,
|
||||
"devMbbiSymbRaw (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_mbbi(pmbbi)
|
||||
struct mbbiRecord *pmbbi;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) pmbbi->dpvt;
|
||||
|
||||
if (pmbbi->dpvt)
|
||||
{
|
||||
pmbbi->rval = *((long *)(*private->ppvar) + private->index);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devMbboSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Multi-bit Binary Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 13-Dec-96 created from bo support
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
|
||||
/* Create the dset for devMbboSymb */
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo};
|
||||
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pmbbo->name, &pmbbo->out, &pmbbo->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pmbbo,
|
||||
"devMbboSymb (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) pmbbo->dpvt;
|
||||
|
||||
if (private)
|
||||
*((long *)(*private->ppvar) + private->index) = pmbbo->val;
|
||||
else
|
||||
return(1);
|
||||
|
||||
pmbbo->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devMbboSymbRaw.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol Raw Multi-bit Binary Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
* wfl 13-Dec-96 created from bo support
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
static long init_record();
|
||||
static long write_mbbo();
|
||||
|
||||
/* Create the dset for devMbboSymbRaw */
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSymbRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo};
|
||||
|
||||
|
||||
static long init_record(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pmbbo->name, &pmbbo->out, &pmbbo->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pmbbo,
|
||||
"devMbboSymbRaw (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long write_mbbo(pmbbo)
|
||||
struct mbboRecord *pmbbo;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) pmbbo->dpvt;
|
||||
|
||||
if (private)
|
||||
*((long *)(*private->ppvar) + private->index) = pmbbo->rval;
|
||||
else
|
||||
return(1);
|
||||
|
||||
pmbbo->udf=FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devSiSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol String Input Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* Create the dset for devSiSymb */
|
||||
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;
|
||||
}devSiSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_stringin};
|
||||
|
||||
char tests[] = {"01234567891123456789212345678931234567894123456789"};
|
||||
|
||||
static long init_record(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pstringin->name, &pstringin->inp, &pstringin->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pstringin,
|
||||
"devSiSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_stringin(pstringin)
|
||||
struct stringinRecord *pstringin;
|
||||
{
|
||||
long status;
|
||||
struct vxSym *private = (struct vxSym *) pstringin->dpvt;
|
||||
|
||||
if (private)
|
||||
{
|
||||
pstringin->val[39] = '\0';
|
||||
strncpy(pstringin->val, (char *)(*private->ppvar) + private->index, 39);
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
if(RTN_SUCCESS(status)) pstringin->udf=FALSE;
|
||||
|
||||
return(status);
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* @(#)devSoSymb.c 1.1 6/4/93
|
||||
* Device Support for VxWorks Global Symbol String Output Records
|
||||
*
|
||||
*
|
||||
* Author: Carl Lionberger
|
||||
* Date: 060893
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* wfl 06-Jun-96 call devSymbFind() to parse PARM field and
|
||||
* look up symbol
|
||||
* anj 14-Oct-96 Changed devSymbFind() parameters.
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
static long init_record();
|
||||
static long write_stringout();
|
||||
|
||||
/* Create the dset for devSoSymb */
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_stringout;
|
||||
}devSoSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_stringout};
|
||||
|
||||
|
||||
static long init_record(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pstringout->name, &pstringout->out, &pstringout->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pstringout,
|
||||
"devSoSymb (init_record) Illegal NAME or OUT field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long write_stringout(pstringout)
|
||||
struct stringoutRecord *pstringout;
|
||||
{
|
||||
struct vxSym *private = (struct vxSym *) pstringout->dpvt;
|
||||
|
||||
if (private)
|
||||
{
|
||||
pstringout->val[39] = '\0';
|
||||
strcpy((char *)(*private->ppvar) + private->index, pstringout->val);
|
||||
}
|
||||
else
|
||||
return(1);
|
||||
|
||||
pstringout->udf = FALSE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/* devSymb.h - Header for vxWorks global var device support routines */
|
||||
|
||||
/* $Id$
|
||||
*
|
||||
* Author: Andrew Johnson (RGO)
|
||||
* Date: 11 October 1996
|
||||
*/
|
||||
|
||||
/* Modification History:
|
||||
* $Log$
|
||||
* Revision 1.1 1996/10/24 18:29:20 wlupton
|
||||
* Andrew Johnson's changes (upwards-compatible)
|
||||
*
|
||||
* Revision 1.1 1996/10/22 15:30:24 anj
|
||||
* vxWorks Variable support changed to do pointer indirection at
|
||||
* run-time. Also added device support for the Waveform record.
|
||||
*
|
||||
*/
|
||||
|
||||
/* This is the device private structure */
|
||||
|
||||
struct vxSym {
|
||||
void **ppvar;
|
||||
void *pvar;
|
||||
long index;
|
||||
};
|
||||
|
||||
|
||||
/* This is the call to create it */
|
||||
|
||||
extern int devSymbFind(char *name, struct link *plink, void *pdpvt);
|
||||
@@ -0,0 +1,305 @@
|
||||
/* devSymbFind.c - Support routines for vxWorks global var device support */
|
||||
|
||||
/* $Id$
|
||||
*
|
||||
* Author: William Lupton (Keck)
|
||||
* Date: 7 June 1996
|
||||
*/
|
||||
|
||||
/* modification history:
|
||||
* $Log$
|
||||
* Revision 1.2.2.1 1997/10/11 02:26:54 wlupton
|
||||
* now working with R3.13
|
||||
*
|
||||
* Revision 1.2 1996/10/24 18:29:20 wlupton
|
||||
* Andrew Johnson's changes (upwards-compatible)
|
||||
*
|
||||
* Revision 1.2 1996/10/22 15:30:25 anj
|
||||
* vxWorks Variable support changed to do pointer indirection at
|
||||
* run-time. Also added device support for the Waveform record.
|
||||
*
|
||||
* Revision 1.1 1996/09/17 09:55:37 anj
|
||||
* Added William Lupton's vxWorks global variable device support, and
|
||||
* some slight adjustment to the ANB display screens.
|
||||
*
|
||||
* Revision 1.1 1996/06/09 00:52:24 wlupton
|
||||
* initial insertion
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
This module contains routines for converting a vxWorks global variable
|
||||
name specification into its address. Two cases are supported:
|
||||
|
||||
1. If the supplied link field is of type INST_IO, its string value is
|
||||
assumed to be of the form:
|
||||
|
||||
[ "*" ] name [ "[" index "]" ]
|
||||
|
||||
where quoted items are literal and square brackets imply optional
|
||||
items. White space is ignored. The leading "*", if specified,
|
||||
implies that the variable in question contains the address of the
|
||||
desired data. The name is the name of the vxWorks global variable (a
|
||||
leading underscore is added). The optional array index is multipled
|
||||
by the data element size (e.g. sizeof(char), sizeof(long) or
|
||||
sizeof(double)) and applied as an offset to the data address.
|
||||
|
||||
For example:
|
||||
|
||||
a) "fred" refers to the value of the vxWorks global variable "_fred"
|
||||
|
||||
b) "*fred" refers to the value whose address is the value of the
|
||||
vxWorks global variable "_fred"
|
||||
|
||||
c) "fred[1]" assumes that the vxWorks global variable "_fred" is an
|
||||
array and refers to its second element
|
||||
|
||||
d) "*fred[1]" assumes that the vxWorks global variable "_fred"
|
||||
contains the address of an array and refers to the second element
|
||||
of the array
|
||||
|
||||
Note that the interpretation of the "*" operator is not the same as
|
||||
in C. For example, "fred" and "fred[0]" are the same and "*fred" and
|
||||
"fred[0]" are not the same. In this version of the driver, the
|
||||
value of the pointer is read at run-time rather than initialisation.
|
||||
|
||||
Finally note that strings are not treated any differently from longs
|
||||
or doubles in that the address returned from this routine is simply
|
||||
the address of the data. "fred" is the entire string. "fred[2]"
|
||||
starts at the third character of the string.
|
||||
|
||||
2. Otherwise, behavior is the same as before: the name of the vxWorks
|
||||
global variable is derived from the record name by stripping off any
|
||||
prefix ending with the first ":" and any suffix starting with the
|
||||
last ";". As in the other case, an underscore is automatically
|
||||
prefixed.
|
||||
|
||||
For example:
|
||||
|
||||
a) "ppp:fred;sss" refers to the vxWorks global variable "_fred"
|
||||
|
||||
b) "a:b:c;d;e" refers to the vxWorks global variable "_b:c;d"
|
||||
|
||||
The second case is supported for backwards compatibility. The first
|
||||
(INST_IO) is preferred.
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <link.h>
|
||||
#include <devSymb.h>
|
||||
|
||||
/* forward references */
|
||||
static int parseInstio(char *string, int *deref, char **name, int *index);
|
||||
static int parseName(char *string, int *deref, char **name, int *index);
|
||||
|
||||
/*
|
||||
* Determine vxWorks variable name and return address of data
|
||||
*/
|
||||
int devSymbFind(char *name, struct link *plink, void *pdpvt)
|
||||
{
|
||||
int deref;
|
||||
char *nptr;
|
||||
int index;
|
||||
SYM_TYPE stype;
|
||||
void *paddr;
|
||||
struct vxSym *private;
|
||||
struct vxSym **pprivate = (struct vxSym **) pdpvt;
|
||||
|
||||
/* if link is of type INST_IO, parse INST_IO string */
|
||||
if (plink->type == INST_IO)
|
||||
{
|
||||
struct instio *pinstio = (struct instio *) &plink->value.instio;
|
||||
if (parseInstio(pinstio->string, &deref, &nptr, &index))
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* otherwise derive variable name from record name as before */
|
||||
else
|
||||
{
|
||||
if (parseName(name, &deref, &nptr, &index))
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
if (symFindByName(sysSymTbl, nptr, (char **) &paddr, &stype))
|
||||
return ERROR;
|
||||
|
||||
/* Name exists, allocate a private structure */
|
||||
private = (struct vxSym *) malloc(sizeof (struct vxSym));
|
||||
if (private == NULL)
|
||||
return ERROR;
|
||||
|
||||
/* Fill in the fields */
|
||||
private->index = index;
|
||||
|
||||
/* Setup pointers to the found symbol address */
|
||||
if (deref) {
|
||||
private->ppvar = paddr;
|
||||
/* private->pvar is not needed with deref symbols */
|
||||
} else {
|
||||
private->ppvar = &private->pvar;
|
||||
private->pvar = paddr;
|
||||
}
|
||||
|
||||
/* Pass new private structure back to caller */
|
||||
*pprivate = private;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Parse string of the form ["*"]name["["index"]"] (white space is ignored).
|
||||
*/
|
||||
static int parseInstio(char *string, int *deref, char **name, int *index)
|
||||
{
|
||||
static char pname[256];
|
||||
char *begin;
|
||||
|
||||
/* copy leading underscore to name */
|
||||
strcpy(pname, "_");
|
||||
|
||||
/* set default return values */
|
||||
*deref = 0;
|
||||
*name = pname;
|
||||
*index = 0;
|
||||
|
||||
/* skip leading white space */
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
/* if next char is "*", will dereference */
|
||||
if (*string == '*')
|
||||
{
|
||||
*deref = 1;
|
||||
string++;
|
||||
}
|
||||
|
||||
/* skip white space */
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
/* variable name begins here */
|
||||
begin = string;
|
||||
|
||||
/* search for white space or "[" */
|
||||
for (; *string && !isspace(*string) && *string != '['; string++);
|
||||
|
||||
/* copy and terminate variable name */
|
||||
strncat(pname, begin, string-begin);
|
||||
pname[string-begin+1] = '\0';
|
||||
|
||||
/* skip white space */
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
/* if found "[", parse index */
|
||||
if (*string == '[')
|
||||
{
|
||||
string++;
|
||||
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
for(; isdigit(*string); string++)
|
||||
{
|
||||
*index *= 10;
|
||||
*index += *string - '0';
|
||||
}
|
||||
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
if (*string != ']')
|
||||
{
|
||||
printf("no trailing ]\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
string++;
|
||||
}
|
||||
|
||||
/* skip trailing white space */
|
||||
for (; isspace(*string); string++);
|
||||
|
||||
/* expect to be at end of string */
|
||||
if (*string != '\0')
|
||||
{
|
||||
printf("unexpected trailing characters\n");
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Extract vxWorks global variable name from string of form "ppp:name;sss".
|
||||
*/
|
||||
static int parseName(char *string, int *deref, char **name, int *index)
|
||||
{
|
||||
static char pname[256];
|
||||
|
||||
/* no dereferencing */
|
||||
*deref = 0;
|
||||
|
||||
/* variable names from C have a prepended underscore */
|
||||
strcpy(pname,"_");
|
||||
strcat(pname, string);
|
||||
|
||||
/* find any suffix and terminate it */
|
||||
*name = strrchr(pname, ';');
|
||||
if (*name)
|
||||
**name = '\0';
|
||||
|
||||
/* find any prefix and bypass it */
|
||||
*name = strchr(pname, ':');
|
||||
if (*name)
|
||||
**name = '_';
|
||||
else
|
||||
*name = pname;
|
||||
|
||||
/* no indexing */
|
||||
*index = 0;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* conditionally compiled routine for testing parsing routines
|
||||
*/
|
||||
#ifdef TEST
|
||||
int test(char *string)
|
||||
{
|
||||
int error;
|
||||
int deref;
|
||||
char *nptr;
|
||||
int index;
|
||||
char *addr;
|
||||
SYM_TYPE stype;
|
||||
|
||||
printf( "instio: %s -> ", string);
|
||||
error = parseInstio(string, &deref, &nptr, &index);
|
||||
printf("%s: ", error ? "error" : "ok" );
|
||||
printf("deref=%d, name=%s, index=%d", deref, nptr, index);
|
||||
if (!symFindByName(sysSymTbl, nptr, &addr, &stype))
|
||||
{
|
||||
if (deref) addr = *((char **)addr);
|
||||
addr += sizeof(long) * index;
|
||||
printf(" -> value = %d", *(long *)addr);
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
printf( "name: %s -> ", string);
|
||||
error = parseName(string, &deref, &nptr, &index);
|
||||
printf("%s: ", error ? "error" : "ok" );
|
||||
printf("deref=%d, name=%s, index=%d", deref, nptr, index);
|
||||
if (!symFindByName(sysSymTbl, nptr, &addr, &stype))
|
||||
printf(" -> value = %d", *(long *)addr);
|
||||
printf("\n");
|
||||
|
||||
return OK;
|
||||
}
|
||||
#endif /* TEST */
|
||||
@@ -0,0 +1,101 @@
|
||||
/* devSymbTest.c - Test routines for vxWorks global var device support */
|
||||
|
||||
/* $Id$
|
||||
*
|
||||
* Author: William Lupton (Keck)
|
||||
* Date: 8 June 1996
|
||||
*/
|
||||
|
||||
/* modification history:
|
||||
* $Log$
|
||||
* Revision 1.1 1996/06/09 00:52:25 wlupton
|
||||
* initial insertion
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
DESCRIPTION:
|
||||
|
||||
This module contains routines for testing vxWorks global variable
|
||||
device support.
|
||||
*/
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <link.h>
|
||||
|
||||
/* global variables for testing */
|
||||
|
||||
/* long scalar */
|
||||
long testLongScalar = 42;
|
||||
|
||||
/* long array */
|
||||
long testLongArray[] = {0,1,2,3,4,5,6,7,8,9};
|
||||
|
||||
/* double scalar */
|
||||
double testDoubleScalar = 125.0;
|
||||
|
||||
/* double array */
|
||||
double testDoubleArray[] = {20.0,21.0,22.0,23.0,24.0,25.0,26.0,27.0,28.0,29.0};
|
||||
|
||||
/* string */
|
||||
char testString[] = "0123456789";
|
||||
|
||||
/* structure and variables referencing its fields */
|
||||
struct {
|
||||
long xxxx;
|
||||
double yyyy[3];
|
||||
char zzzz[80];
|
||||
} testStruct = {35, {1.0,2.0,3.0}, "hello dolly"};
|
||||
|
||||
long *testLongPtr = &testStruct.xxxx;
|
||||
double *testDoublePtr = testStruct.yyyy;
|
||||
char *testStringPtr = testStruct.zzzz;
|
||||
|
||||
/* routines for starting and stopping auto-change of values */
|
||||
long testRunning = 0;
|
||||
|
||||
int testStart() {
|
||||
int i, j;
|
||||
|
||||
testRunning = 1;
|
||||
|
||||
for ( i = 0; testRunning; i++ ) {
|
||||
|
||||
/* change global data values */
|
||||
testLongScalar++;
|
||||
for ( j = 0; j < sizeof( testLongArray ) / sizeof( long ); j++ )
|
||||
testLongArray[j]++;
|
||||
testDoubleScalar++;
|
||||
for ( j = 0; j < sizeof( testDoubleArray ) / sizeof( double ); j++ )
|
||||
testDoubleArray[j]++;
|
||||
for ( j = 0; j < strlen( testString ) - 1; j++ )
|
||||
testString[j] = testString[j+1];
|
||||
testString[j] = testString[0];
|
||||
testStruct.xxxx++;
|
||||
testStruct.yyyy[0]++;
|
||||
testStruct.yyyy[1]++;
|
||||
testStruct.yyyy[2]++;
|
||||
if ( i % 2 )
|
||||
strcpy( testStruct.zzzz, "hello dolly" );
|
||||
else
|
||||
strcpy( testStruct.zzzz, "dolly hello" );
|
||||
|
||||
/* wait a second */
|
||||
taskDelay( sysClkRateGet() );
|
||||
}
|
||||
printf( "test stopped\n" );
|
||||
return 0;
|
||||
}
|
||||
|
||||
int testStop() {
|
||||
testRunning = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
/* devWfSymb.c */
|
||||
/* base/src/dev $Id$ */
|
||||
|
||||
/* devWfSymb.c - Device Support for vxWorks Global Symbol Waveform Records*/
|
||||
/*
|
||||
* Author: Andrew Johnson
|
||||
* Date: 15-10-96
|
||||
*
|
||||
* 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:
|
||||
* -----------------
|
||||
* ...
|
||||
*/
|
||||
|
||||
|
||||
#include <vxWorks.h>
|
||||
#include <sysSymTbl.h>
|
||||
#include <types.h>
|
||||
#include <stdioLib.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>
|
||||
#include <devSymb.h>
|
||||
|
||||
|
||||
/* Create the dset for devWfSymb */
|
||||
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;
|
||||
}devWfSymb={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
read_wf};
|
||||
|
||||
static int sizeofTypes[] = {MAX_STRING_SIZE,1,1,2,2,4,4,4,8,2};
|
||||
|
||||
double testwf[] = {1.1, 2.2, 4.4, 8.8, 16.16, 32.32};
|
||||
|
||||
|
||||
static long init_record(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
/* determine address of record value */
|
||||
if (devSymbFind(pwf->name, &pwf->inp, &pwf->dpvt))
|
||||
{
|
||||
recGblRecordError(S_db_badField,(void *)pwf,
|
||||
"devWfSymb (init_record) Illegal NAME or INP field");
|
||||
return(S_db_badField);
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
static long read_wf(pwf)
|
||||
struct waveformRecord *pwf;
|
||||
{
|
||||
long status, typesize;
|
||||
struct vxSym *private = (struct vxSym *) pwf->dpvt;
|
||||
|
||||
if (private)
|
||||
{
|
||||
typesize = sizeofTypes[pwf->ftvl];
|
||||
|
||||
/* Copy the data */
|
||||
memcpy(pwf->bptr,
|
||||
(char *)(*private->ppvar) + typesize * private->index,
|
||||
pwf->nelm * typesize);
|
||||
|
||||
pwf->nord = pwf->nelm; /* We always get it all */
|
||||
pwf->udf = FALSE; /* Record also does this (but shouldn't) */
|
||||
status = 0;
|
||||
}
|
||||
else
|
||||
status = 1;
|
||||
|
||||
return(status); /* Record actually ignores this... */
|
||||
}
|
||||
@@ -0,0 +1,368 @@
|
||||
record(ai,"testDoubleArray5") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@testDoubleArray[5]")
|
||||
field(PREC,"0")
|
||||
field(LINR,"NO CONVERSION")
|
||||
field(EGUF,"0.0000000e+00")
|
||||
field(EGUL,"0.0000000e+00")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0.0000000e+00")
|
||||
field(LOPR,"0.0000000e+00")
|
||||
field(AOFF,"0.0000000e+00")
|
||||
field(ASLO,"1.0000000")
|
||||
field(SMOO,"0.0000000e+00")
|
||||
field(HIHI,"0.0000000e+00")
|
||||
field(LOLO,"0.0000000e+00")
|
||||
field(HIGH,"0.0000000e+00")
|
||||
field(LOW,"0.0000000e+00")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0.000000000000000e+00")
|
||||
field(ADEL,"0.000000000000000e+00")
|
||||
field(MDEL,"0.000000000000000e+00")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(ai,"testDoublePtr") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@*testDoublePtr[2]")
|
||||
field(PREC,"0")
|
||||
field(LINR,"NO CONVERSION")
|
||||
field(EGUF,"0.0000000e+00")
|
||||
field(EGUL,"0.0000000e+00")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0.0000000e+00")
|
||||
field(LOPR,"0.0000000e+00")
|
||||
field(AOFF,"0.0000000e+00")
|
||||
field(ASLO,"1.0000000")
|
||||
field(SMOO,"0.0000000e+00")
|
||||
field(HIHI,"0.0000000e+00")
|
||||
field(LOLO,"0.0000000e+00")
|
||||
field(HIGH,"0.0000000e+00")
|
||||
field(LOW,"0.0000000e+00")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0.000000000000000e+00")
|
||||
field(ADEL,"0.000000000000000e+00")
|
||||
field(MDEL,"0.000000000000000e+00")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(ai,"testDoubleScalar") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@testDoubleScalar")
|
||||
field(PREC,"0")
|
||||
field(LINR,"NO CONVERSION")
|
||||
field(EGUF,"0.0000000e+00")
|
||||
field(EGUL,"0.0000000e+00")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0.0000000e+00")
|
||||
field(LOPR,"0.0000000e+00")
|
||||
field(AOFF,"0.0000000e+00")
|
||||
field(ASLO,"1.0000000")
|
||||
field(SMOO,"0.0000000e+00")
|
||||
field(HIHI,"0.0000000e+00")
|
||||
field(LOLO,"0.0000000e+00")
|
||||
field(HIGH,"0.0000000e+00")
|
||||
field(LOW,"0.0000000e+00")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0.000000000000000e+00")
|
||||
field(ADEL,"0.000000000000000e+00")
|
||||
field(MDEL,"0.000000000000000e+00")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(ao,"testDoubleScalarOut") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,"Passive")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(OUT,"@testDoubleScalar")
|
||||
field(OROC,"0.0000000e+00")
|
||||
field(DOL,"0.000000000000000e+00")
|
||||
field(OMSL,"supervisory")
|
||||
field(OIF,"Full")
|
||||
field(PREC,"0")
|
||||
field(LINR,"NO CONVERSION")
|
||||
field(EGUF,"0.0000000e+00")
|
||||
field(EGUL,"0.0000000e+00")
|
||||
field(EGU,"")
|
||||
field(DRVH,"0.0000000e+00")
|
||||
field(DRVL,"0.0000000e+00")
|
||||
field(HOPR,"0.0000000e+00")
|
||||
field(LOPR,"0.0000000e+00")
|
||||
field(AOFF,"0.0000000e+00")
|
||||
field(ASLO,"0.0000000e+00")
|
||||
field(HIHI,"0.0000000e+00")
|
||||
field(LOLO,"0.0000000e+00")
|
||||
field(HIGH,"0.0000000e+00")
|
||||
field(LOW,"0.0000000e+00")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0.000000000000000e+00")
|
||||
field(ADEL,"0.000000000000000e+00")
|
||||
field(MDEL,"0.000000000000000e+00")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
field(IVOA,"Continue normally")
|
||||
field(IVOV,"0.000000000000000e+00")
|
||||
}
|
||||
record(longin,"testLongArray5") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@testLongArray[5]")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0")
|
||||
field(LOPR,"0")
|
||||
field(HIHI,"0")
|
||||
field(LOLO,"0")
|
||||
field(HIGH,"0")
|
||||
field(LOW,"0")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0")
|
||||
field(ADEL,"0")
|
||||
field(MDEL,"0")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(longin,"testLongPtr") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@*testLongPtr")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0")
|
||||
field(LOPR,"0")
|
||||
field(HIHI,"0")
|
||||
field(LOLO,"0")
|
||||
field(HIGH,"0")
|
||||
field(LOW,"0")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0")
|
||||
field(ADEL,"0")
|
||||
field(MDEL,"0")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(longin,"testLongScalar") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(INP,"@testLongScalar")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0")
|
||||
field(LOPR,"0")
|
||||
field(HIHI,"0")
|
||||
field(LOLO,"0")
|
||||
field(HIGH,"0")
|
||||
field(LOW,"0")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0")
|
||||
field(ADEL,"0")
|
||||
field(MDEL,"0")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(longout,"testLongScalarOut") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,"Passive")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(OUT,"@testLongScalar")
|
||||
field(DOL,"0.000000000000000e+00")
|
||||
field(OMSL,"supervisory")
|
||||
field(EGU,"")
|
||||
field(HOPR,"0")
|
||||
field(LOPR,"0")
|
||||
field(HIHI,"0")
|
||||
field(LOLO,"0")
|
||||
field(HIGH,"0")
|
||||
field(LOW,"0")
|
||||
field(HHSV,"NO_ALARM")
|
||||
field(LLSV,"NO_ALARM")
|
||||
field(HSV,"NO_ALARM")
|
||||
field(LSV,"NO_ALARM")
|
||||
field(HYST,"0")
|
||||
field(ADEL,"0")
|
||||
field(MDEL,"0")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
field(IVOA,"Continue normally")
|
||||
field(IVOV,"0")
|
||||
}
|
||||
record(stringin,"testString") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(VAL,"")
|
||||
field(INP,"@testString")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(stringin,"testStringPtr") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,".1 second")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(VAL,"")
|
||||
field(INP,"@*testStringPtr")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
}
|
||||
record(stringout,"testStringOut") {
|
||||
field(DESC,"")
|
||||
field(ASG,"")
|
||||
field(SCAN,"Passive")
|
||||
field(PINI,"NO")
|
||||
field(PHAS,"0")
|
||||
field(EVNT,"0")
|
||||
field(TSEL,"0.000000000000000e+00")
|
||||
field(DTYP,"vxWorks Variable (INST_IO)")
|
||||
field(DISV,"1")
|
||||
field(SDIS,"0.000000000000000e+00")
|
||||
field(DISS,"NO_ALARM")
|
||||
field(PRIO,"LOW")
|
||||
field(FLNK,"0.000000000000000e+00")
|
||||
field(VAL,"")
|
||||
field(DOL,"0.000000000000000e+00")
|
||||
field(OMSL,"supervisory")
|
||||
field(OUT,"@testString")
|
||||
field(SIOL,"0.000000000000000e+00")
|
||||
field(SIML,"0.000000000000000e+00")
|
||||
field(SIMS,"NO_ALARM")
|
||||
field(IVOA,"Continue normally")
|
||||
field(IVOV,"")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
device( "ai" , INST_IO, "devAiSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "ao" , INST_IO, "devAoSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "bi" , INST_IO, "devBiSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "bo" , INST_IO, "devBoSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "longin" , INST_IO, "devLiSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "longout" , INST_IO, "devLoSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "mbbi" , INST_IO, "devMbbiSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "mbbo" , INST_IO, "devMbboSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "stringin" , INST_IO, "devSiSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "stringout", INST_IO, "devSoSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "waveform" , INST_IO, "devWfSymb" , "vxWorks Variable (INST_IO)" )
|
||||
device( "mbbi" , INST_IO, "devMbbiSymbRaw", "Raw vxWorks Variable (INST_IO)" )
|
||||
device( "mbbo" , INST_IO, "devMbboSymbRaw", "Raw vxWorks Variable (INST_IO)" )
|
||||
Reference in New Issue
Block a user