diff --git a/src/rec/Makefile.Vx b/src/rec/Makefile.Vx index 726367900..c5dce0391 100644 --- a/src/rec/Makefile.Vx +++ b/src/rec/Makefile.Vx @@ -4,6 +4,10 @@ include $(EPICS)/config/CONFIG_BASE USR_INCLUDES = -I../drv/ansi -I../../drv/old +INC += egDefs.h +INC += erDefs.h +INC += ereventDefs.h + RECTYPES += aaiRecord.h RECTYPES += aaoRecord.h RECTYPES += aiRecord.h diff --git a/src/rec/aaiRecord.ascii b/src/rec/aaiRecord.db similarity index 98% rename from src/rec/aaiRecord.ascii rename to src/rec/aaiRecord.db index 737b5ba5a..b6852d837 100644 --- a/src/rec/aaiRecord.ascii +++ b/src/rec/aaiRecord.db @@ -1,5 +1,5 @@ recordtype(aai) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0) diff --git a/src/rec/aaoRecord.ascii b/src/rec/aaoRecord.db similarity index 98% rename from src/rec/aaoRecord.ascii rename to src/rec/aaoRecord.db index 5708cb054..abe7c1f68 100644 --- a/src/rec/aaoRecord.ascii +++ b/src/rec/aaoRecord.db @@ -1,5 +1,5 @@ recordtype(aao) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0) diff --git a/src/rec/aiRecord.c b/src/rec/aiRecord.c index 1f107e092..8e6bc482d 100644 --- a/src/rec/aiRecord.c +++ b/src/rec/aiRecord.c @@ -98,7 +98,7 @@ static long init_record(); static long process(); static long special(); -static long get_value(); +#define get_value NULL #define cvt_dbaddr NULL #define get_array_info NULL #define put_array_info NULL @@ -131,7 +131,7 @@ struct rset aiRSET={ get_control_double, get_alarm_double}; -struct aidset { /* analog input dset */ +typedef struct aidset { /* analog input dset */ long number; DEVSUPFUN dev_report; DEVSUPFUN init; @@ -140,7 +140,7 @@ struct aidset { /* analog input dset */ DEVSUPFUN read_ai;/*(0,2)=> success and convert,don't convert)*/ /* if convert then raw value stored in rval */ DEVSUPFUN special_linconv; -}; +}aidset; /*Following from timing system */ @@ -148,17 +148,16 @@ struct aidset { /* analog input dset */ extern unsigned int gts_trigger_counter; */ -static void alarm(); -static void convert(); -static void monitor(); -static long readValue(); +static void alarm(aiRecord *pai); +static void convert(aiRecord *pai); +static void monitor(aiRecord *pai); +static long readValue(aiRecord *pai); -static long init_record(pai,pass) - struct aiRecord *pai; - int pass; +static long init_record(void *precord,int pass) { - struct aidset *pdset; - long status; + aiRecord *pai = (aiRecord *)precord; + aidset *pdset; + long status; if (pass==0) return(0); @@ -180,7 +179,7 @@ static long init_record(pai,pass) if (status) return(status); } - if(!(pdset = (struct aidset *)(pai->dset))) { + if(!(pdset = (aidset *)(pai->dset))) { recGblRecordError(S_dev_noDSET,(void *)pai,"ai: init_record"); return(S_dev_noDSET); } @@ -197,10 +196,10 @@ static long init_record(pai,pass) return(0); } -static long process(pai) - struct aiRecord *pai; +static long process(void *precord) { - struct aidset *pdset = (struct aidset *)(pai->dset); + aiRecord *pai = (aiRecord *)precord; + aidset *pdset = (aidset *)(pai->dset); long status; unsigned char pact=pai->pact; @@ -243,13 +242,11 @@ static long process(pai) return(status); } -static long special(paddr,after) - struct dbAddr *paddr; - int after; +static long special(DBADDR *paddr,int after) { - struct aiRecord *pai = (struct aiRecord *)(paddr->precord); - struct aidset *pdset = (struct aidset *) (pai->dset); - int special_type = paddr->special; + aiRecord *pai = (aiRecord *)(paddr->precord); + aidset *pdset = (aidset *) (pai->dset); + int special_type = paddr->special; switch(special_type) { case(SPC_LINCONV): @@ -265,32 +262,18 @@ static long special(paddr,after) return(S_db_badChoice); } } - -static long get_value(pai,pvdes) - struct aiRecord *pai; - struct valueDes *pvdes; -{ - pvdes->field_type = DBF_DOUBLE; - pvdes->no_elements=1; - (double *)(pvdes->pvalue) = &pai->val; - return(0); -} -static long get_units(paddr,units) - struct dbAddr *paddr; - char *units; +static long get_units(DBADDR *paddr, char *units) { - struct aiRecord *pai=(struct aiRecord *)paddr->precord; + aiRecord *pai=(aiRecord *)paddr->precord; strncpy(units,pai->egu,DB_UNITS_SIZE); return(0); } -static long get_precision(paddr,precision) - struct dbAddr *paddr; - long *precision; +static long get_precision(DBADDR *paddr, long *precision) { - struct aiRecord *pai=(struct aiRecord *)paddr->precord; + aiRecord *pai=(aiRecord *)paddr->precord; *precision = pai->prec; if(paddr->pfield == (void *)&pai->val) return(0); @@ -298,57 +281,55 @@ static long get_precision(paddr,precision) return(0); } -static long get_graphic_double(paddr,pgd) - struct dbAddr *paddr; - struct dbr_grDouble *pgd; +static long get_graphic_double(DBADDR *paddr,struct dbr_grDouble *pgd) { - struct aiRecord *pai=(struct aiRecord *)paddr->precord; + aiRecord *pai=(aiRecord *)paddr->precord; + int fieldIndex = dbGetFieldIndex(paddr); - if(paddr->pfield==(void *)&pai->val || - paddr->pfield==(void *)&pai->hihi || - paddr->pfield==(void *)&pai->high || - paddr->pfield==(void *)&pai->low || - paddr->pfield==(void *)&pai->lolo){ + if(fieldIndex == aiRecordVAL + || fieldIndex == aiRecordHIHI + || fieldIndex == aiRecordHIGH + || fieldIndex == aiRecordLOW + || fieldIndex == aiRecordLOLO + || fieldIndex == aiRecordHOPR + || fieldIndex == aiRecordLOPR) { pgd->upper_disp_limit = pai->hopr; pgd->lower_disp_limit = pai->lopr; } else recGblGetGraphicDouble(paddr,pgd); return(0); } -static long get_control_double(paddr,pcd) - struct dbAddr *paddr; - struct dbr_ctrlDouble *pcd; +static long get_control_double(DBADDR *paddr,struct dbr_ctrlDouble *pcd) { - struct aiRecord *pai=(struct aiRecord *)paddr->precord; + aiRecord *pai=(aiRecord *)paddr->precord; + int fieldIndex = dbGetFieldIndex(paddr); - if(paddr->pfield==(void *)&pai->val || - paddr->pfield==(void *)&pai->hihi || - paddr->pfield==(void *)&pai->high || - paddr->pfield==(void *)&pai->low || - paddr->pfield==(void *)&pai->lolo){ - pcd->upper_ctrl_limit = pai->hopr; - pcd->lower_ctrl_limit = pai->lopr; + if(fieldIndex == aiRecordVAL + || fieldIndex == aiRecordHIHI + || fieldIndex == aiRecordHIGH + || fieldIndex == aiRecordLOW + || fieldIndex == aiRecordLOLO) { + pcd->upper_ctrl_limit = pai->hopr; + pcd->lower_ctrl_limit = pai->lopr; } else recGblGetControlDouble(paddr,pcd); return(0); } -static long get_alarm_double(paddr,pad) - struct dbAddr *paddr; - struct dbr_alDouble *pad; +static long get_alarm_double(DBADDR *paddr,struct dbr_alDouble *pad) { - struct aiRecord *pai=(struct aiRecord *)paddr->precord; + aiRecord *pai=(aiRecord *)paddr->precord; + int fieldIndex = dbGetFieldIndex(paddr); - if(paddr->pfield==(void *)&pai->val){ - pad->upper_alarm_limit = pai->hihi; - pad->upper_warning_limit = pai->high; - pad->lower_warning_limit = pai->low; - pad->lower_alarm_limit = pai->lolo; + if(fieldIndex == aiRecordVAL) { + pad->upper_alarm_limit = pai->hihi; + pad->upper_warning_limit = pai->high; + pad->lower_warning_limit = pai->low; + pad->lower_alarm_limit = pai->lolo; } else recGblGetAlarmDouble(paddr,pad); return(0); } -static void alarm(pai) - struct aiRecord *pai; +static void alarm(aiRecord *pai) { double val; float hyst, lalm, hihi, high, low, lolo; @@ -391,8 +372,7 @@ static void alarm(pai) return; } -static void convert(pai) -struct aiRecord *pai; +static void convert(aiRecord *pai) { double val; float aslo=pai->aslo; @@ -428,8 +408,7 @@ struct aiRecord *pai; return; } -static void monitor(pai) - struct aiRecord *pai; +static void monitor(aiRecord *pai) { unsigned short monitor_mask; double delta; @@ -466,11 +445,10 @@ static void monitor(pai) return; } -static long readValue(pai) - struct aiRecord *pai; +static long readValue(aiRecord *pai) { long status; - struct aidset *pdset = (struct aidset *) (pai->dset); + aidset *pdset = (aidset *) (pai->dset); if (pai->pact == TRUE){ status=(*pdset->read_ai)(pai); diff --git a/src/rec/aiRecord.ascii b/src/rec/aiRecord.db similarity index 99% rename from src/rec/aiRecord.ascii rename to src/rec/aiRecord.db index eaf14a378..898667d05 100644 --- a/src/rec/aiRecord.ascii +++ b/src/rec/aiRecord.db @@ -1,5 +1,5 @@ recordtype(ai) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_DOUBLE) { prompt("Current EGU Value") asl(ASL0) diff --git a/src/rec/aoRecord.ascii b/src/rec/aoRecord.db similarity index 99% rename from src/rec/aoRecord.ascii rename to src/rec/aoRecord.db index ea2eb7859..f9a18fc88 100644 --- a/src/rec/aoRecord.ascii +++ b/src/rec/aoRecord.db @@ -3,7 +3,7 @@ menu(aoOIF) { choice(aoOIF_Incremental,"Incremental") } recordtype(ao) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_DOUBLE) { prompt("Desired Output") asl(ASL0) diff --git a/src/rec/biRecord.ascii b/src/rec/biRecord.db similarity index 98% rename from src/rec/biRecord.ascii rename to src/rec/biRecord.db index 3320e86ea..fc312674f 100644 --- a/src/rec/biRecord.ascii +++ b/src/rec/biRecord.db @@ -1,5 +1,5 @@ recordtype(bi) { - include "dbCommon.ascii" + include "dbCommon.db" field(INP,DBF_INLINK) { prompt("Input Specification") promptgroup(GUI_INPUTS) diff --git a/src/rec/boRecord.ascii b/src/rec/boRecord.db similarity index 99% rename from src/rec/boRecord.ascii rename to src/rec/boRecord.db index 9ac8a3f17..907c2ff24 100644 --- a/src/rec/boRecord.ascii +++ b/src/rec/boRecord.db @@ -1,5 +1,5 @@ recordtype(bo) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_ENUM) { prompt("Current Value") asl(ASL0) diff --git a/src/rec/calcRecord.c b/src/rec/calcRecord.c index ef47bf14f..e41837685 100644 --- a/src/rec/calcRecord.c +++ b/src/rec/calcRecord.c @@ -135,7 +135,7 @@ static int fetch_values(); #define ARG_MAX 12 /* Fldnames should have as many as ARG_MAX */ - static char Fldnames[ARG_MAX][FLDNAME_SZ] = + static char *Fldnames[ARG_MAX] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}; diff --git a/src/rec/calcRecord.ascii b/src/rec/calcRecord.db similarity index 99% rename from src/rec/calcRecord.ascii rename to src/rec/calcRecord.db index 29d96b340..7e419dd6c 100644 --- a/src/rec/calcRecord.ascii +++ b/src/rec/calcRecord.db @@ -1,5 +1,5 @@ recordtype(calc) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_DOUBLE) { prompt("Result") asl(ASL0) diff --git a/src/rec/choiceScan.h b/src/rec/choiceScan.h new file mode 100644 index 000000000..b13f8f036 --- /dev/null +++ b/src/rec/choiceScan.h @@ -0,0 +1,106 @@ +/* + * Author: Ned Arnold + * Date: 4-28-94 + * + * 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 08-23-94 nda Added SPC_SC_? for easier determination of special fields + * .03 12-06-94 nda Added SPC_SC_FFO, SPC_SC_F, and REC_SCAN_FFO + */ + +#ifndef INC_SCANchoice_h +#define INC_SCANchoice 1 + +#define SPC_SC_S 111 /* start position */ +#define SPC_SC_I 112 /* step increment */ +#define SPC_SC_E 113 /* end position */ +#define SPC_SC_C 114 /* center position */ +#define SPC_SC_W 115 /* width */ +#define SPC_SC_N 116 /* # of steps */ +#define SPC_SC_FFO 117 /* FrzFlag Override */ +#define SPC_SC_F 118 /* FrzFlag Changing */ +#define SPC_SC_DPT 119 /* Desired Pt */ +#define SPC_SC_MO 120 /* scan mode */ + +#define REC_SC_P1 130 +#define REC_SC_P2 131 +#define REC_SC_P3 132 +#define REC_SC_P4 133 + +#define REC_SC_R1 134 +#define REC_SC_R2 135 +#define REC_SC_R3 136 +#define REC_SC_R4 137 + +#define REC_SC_D1 138 +#define REC_SC_D2 139 +#define REC_SC_D3 140 +#define REC_SC_D4 141 +#define REC_SC_D5 142 +#define REC_SC_D6 143 +#define REC_SC_D7 144 +#define REC_SC_D8 145 +#define REC_SC_D9 146 +#define REC_SC_D10 147 +#define REC_SC_D11 148 +#define REC_SC_D12 149 +#define REC_SC_D13 150 +#define REC_SC_D14 151 +#define REC_SC_D15 152 + +#define REC_SC_T1 153 +#define REC_SC_T2 154 + +#define REC_SC_BS 155 +#define REC_SC_AS 156 + +#define REC_SCAN_MO 0 +#define REC_SCAN_MO_LIN 0 +#define REC_SCAN_MO_TAB 1 +#define REC_SCAN_MO_OTF 2 + +#define REC_SCAN_FRZ 1 +#define REC_SCAN_FRZ_NO 0 +#define REC_SCAN_FRZ_YES 1 + +#define REC_SCAN_FFO 2 +#define REC_SCAN_FFO_NO 0 +#define REC_SCAN_FFO_YES 1 + +#define REC_SCAN_AS 3 +#define REC_SCAN_AS_NO 0 +#define REC_SCAN_AS_ST 1 +#define REC_SCAN_AS_BS 2 + +#define REC_SCAN_AR 4 +#define REC_SCAN_AR_ABS 0 +#define REC_SCAN_AR_REL 1 + +#define REC_SCAN_DYNL 5 +#define REC_SCAN_DYNL_OK 0 +#define REC_SCAN_DYNL_NC 1 +#define REC_SCAN_DYNL_NO_PV 2 + +#endif diff --git a/src/rec/choiceWait.h b/src/rec/choiceWait.h new file mode 100644 index 000000000..aee992c44 --- /dev/null +++ b/src/rec/choiceWait.h @@ -0,0 +1,73 @@ +/* + * Author: Ned Arnold + * Date: 4-28-94 + * + * 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 + */ + +#ifndef INC_WAITchoice_h +#define INC_WAITchoice 1 + +#define REC_WAIT_OUT_OPT 0 +#define REC_WAIT_OUT_OPT_EVERY 0 +#define REC_WAIT_OUT_OPT_CHANGE 1 +#define REC_WAIT_OUT_OPT_WHEN_ZERO 2 +#define REC_WAIT_OUT_OPT_WHEN_NZERO 3 +#define REC_WAIT_OUT_OPT_CHG_TO_ZERO 4 +#define REC_WAIT_OUT_OPT_CHG_TO_NZERO 5 + +#define REC_WAIT_DATA_OPT 1 +#define REC_WAIT_DATA_OPT_VAL 0 +#define REC_WAIT_DATA_OPT_DOL 1 + +#define REC_WAIT_INPP 2 +#define REC_WAIT_INPP_NPROC 0 +#define REC_WAIT_INPP_PROC 1 + +#define REC_WAIT_DYNL 3 +#define REC_WAIT_DYNL_OK 0 +#define REC_WAIT_DYNL_NC 1 +#define REC_WAIT_DYNL_NO_PV 2 + +/* DON'T CHANGE THESE DEFINITIONS !!!! */ +/* Indexes used to process dynamic links */ +/* Must start above 103, because SPC_CALC = 103 */ +#define REC_WAIT_A 110 +#define REC_WAIT_B 111 +#define REC_WAIT_C 112 +#define REC_WAIT_D 113 +#define REC_WAIT_E 114 +#define REC_WAIT_F 115 +#define REC_WAIT_G 116 +#define REC_WAIT_H 117 +#define REC_WAIT_I 118 +#define REC_WAIT_J 119 +#define REC_WAIT_K 120 +#define REC_WAIT_L 121 +#define REC_WAIT_O 122 +#define REC_WAIT_P 123 + +#endif diff --git a/src/rec/compressRecord.ascii b/src/rec/compressRecord.db similarity index 98% rename from src/rec/compressRecord.ascii rename to src/rec/compressRecord.db index 8e26105af..b5411bb10 100644 --- a/src/rec/compressRecord.ascii +++ b/src/rec/compressRecord.db @@ -6,7 +6,7 @@ menu(compressALG) { choice(compressALG_Circular_Buffer,"Circular Buffer") } recordtype(compress) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0) diff --git a/src/rec/dfanoutRecord.c b/src/rec/dfanoutRecord.c index f618b5832..ca468c0f6 100644 --- a/src/rec/dfanoutRecord.c +++ b/src/rec/dfanoutRecord.c @@ -76,7 +76,7 @@ static long push_values(); #define OUT_ARG_MAX 8 -static char Ofldnames[OUT_ARG_MAX][FLDNAME_SZ] = +static char *Ofldnames[OUT_ARG_MAX] = {"OUTA", "OUTB", "OUTC", "OUTD", "OUTE", "OUTF", "OUTG", "OUTH"}; diff --git a/src/rec/dfanoutRecord.ascii b/src/rec/dfanoutRecord.db similarity index 99% rename from src/rec/dfanoutRecord.ascii rename to src/rec/dfanoutRecord.db index 5f13500ac..41e524c74 100644 --- a/src/rec/dfanoutRecord.ascii +++ b/src/rec/dfanoutRecord.db @@ -1,5 +1,5 @@ recordtype(dfanout) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_LONG) { prompt("Desired Output") asl(ASL0) diff --git a/src/rec/egDefs.h b/src/rec/egDefs.h new file mode 100644 index 000000000..e43d6066c --- /dev/null +++ b/src/rec/egDefs.h @@ -0,0 +1,39 @@ +/* $Id$ */ +#ifndef EPICS_EGDEFS_H +#define EPICS_EGDEFS_H + +typedef long (*EG_PROC_FUN)(struct egRecord *prec); +typedef long (*EG_INIT_REC_FUN)(struct egRecord *prec); +typedef long (*EG_INIT_DEV_FUN)(int pass); +typedef struct +{ + long number; + DEVSUPFUN report; + EG_INIT_DEV_FUN init; + EG_INIT_REC_FUN initRec; + DEVSUPFUN get_ioint_info; + EG_PROC_FUN proc; +} EgDsetStruct; + +#define EG_SEQ_RAM_SIZE (1024*32) + +#define EG_SEQ_RAM_EVENT_NULL 0 +#define EG_SEQ_RAM_EVENT_END 127 +#define EG_SEQ_RAM_EVENT_FREEZE 126 +#define EG_SEQ_RAM_EVENT_RESET_TIME 125 +#define EG_SEQ_RAM_EVENT_TICK_TIME 124 +#define EG_SEQ_RAM_EVENT_RESET_PRESCALE 123 +#define EG_SEQ_RAM_EVENT_HEARTBEAT 122 + +#define REC_EGEVENT_UNIT_TICKS (0) +#define REC_EGEVENT_UNIT_FORTNIGHTS (1) +#define REC_EGEVENT_UNIT_WEEKS (2) +#define REC_EGEVENT_UNIT_DAYS (3) +#define REC_EGEVENT_UNIT_HOURS (4) +#define REC_EGEVENT_UNIT_MINUITES (5) +#define REC_EGEVENT_UNIT_SECONDS (6) +#define REC_EGEVENT_UNIT_MILLISECONDS (7) +#define REC_EGEVENT_UNIT_MICROSECONDS (8) +#define REC_EGEVENT_UNIT_NANOSECONDS (9) + +#endif diff --git a/src/rec/egRecord.ascii b/src/rec/egRecord.db similarity index 99% rename from src/rec/egRecord.ascii rename to src/rec/egRecord.db index 75df288c7..ec1e90a65 100644 --- a/src/rec/egRecord.ascii +++ b/src/rec/egRecord.db @@ -6,7 +6,7 @@ menu(egMOD1) { choice(egMOD1_Alternate,"Alternate") } recordtype(eg) { - include "dbCommon.ascii" + include "dbCommon.db" field(OUT,DBF_OUTLINK) { prompt("Output Specification") promptgroup(GUI_OUTPUT) diff --git a/src/rec/egeventRecord.ascii b/src/rec/egeventRecord.db similarity index 98% rename from src/rec/egeventRecord.ascii rename to src/rec/egeventRecord.db index fac907fee..ecc1139cb 100644 --- a/src/rec/egeventRecord.ascii +++ b/src/rec/egeventRecord.db @@ -15,7 +15,7 @@ menu(egeventUNIT) { choice(egeventUNIT_Nanoseconds,"Nanoseconds") } recordtype(egevent) { - include "dbCommon.ascii" + include "dbCommon.db" field(OUT,DBF_OUTLINK) { prompt("Output Specification") promptgroup(GUI_OUTPUT) diff --git a/src/rec/erDefs.h b/src/rec/erDefs.h new file mode 100644 index 000000000..72a8f5268 --- /dev/null +++ b/src/rec/erDefs.h @@ -0,0 +1,13 @@ + +#ifndef EPICS_ERDEFS_H +#define EPICS_ERDEFS_H + +typedef struct ErDsetStruct { + long number; + DEVSUPFUN report; + DEVSUPFUN init; + DEVSUPFUN init_record; + DEVSUPFUN get_ioint_info; + DEVSUPFUN proc; +} ErDsetStruct; +#endif diff --git a/src/rec/erRecord.ascii b/src/rec/erRecord.db similarity index 99% rename from src/rec/erRecord.ascii rename to src/rec/erRecord.db index c4fdb4b54..72844e719 100644 --- a/src/rec/erRecord.ascii +++ b/src/rec/erRecord.db @@ -3,7 +3,7 @@ menu(erTRG0) { choice(erTRG0_Enabled,"Enabled") } recordtype(er) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_CHAR) { prompt("Worthless Value") asl(ASL0) diff --git a/src/rec/ereventDefs.h b/src/rec/ereventDefs.h new file mode 100644 index 000000000..c0a6f6ffa --- /dev/null +++ b/src/rec/ereventDefs.h @@ -0,0 +1,12 @@ +#ifndef EPICS_EREVENTDEFS_H +#define EPICS_EREVENTDEFS_H + +typedef struct EreventDsetStruct { + long number; + DEVSUPFUN report; + DEVSUPFUN init; + DEVSUPFUN initRec; + DEVSUPFUN get_ioint_info; + DEVSUPFUN proc; +} EreventDsetStruct; +#endif diff --git a/src/rec/ereventRecord.ascii b/src/rec/ereventRecord.db similarity index 98% rename from src/rec/ereventRecord.ascii rename to src/rec/ereventRecord.db index 1fa3f24fc..cf0c33696 100644 --- a/src/rec/ereventRecord.ascii +++ b/src/rec/ereventRecord.db @@ -3,7 +3,7 @@ menu(ereventENAB) { choice(ereventENAB_Enabled,"Enabled") } recordtype(erevent) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_CHAR) { prompt("Worthless Value") asl(ASL0) diff --git a/src/rec/eventRecord.ascii b/src/rec/eventRecord.db similarity index 96% rename from src/rec/eventRecord.ascii rename to src/rec/eventRecord.db index aeb2bcb78..4b413ffd6 100644 --- a/src/rec/eventRecord.ascii +++ b/src/rec/eventRecord.db @@ -1,5 +1,5 @@ recordtype(event) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_USHORT) { prompt("Event Number To Post") promptgroup(GUI_INPUTS) diff --git a/src/rec/fanoutRecord.ascii b/src/rec/fanoutRecord.db similarity index 97% rename from src/rec/fanoutRecord.ascii rename to src/rec/fanoutRecord.db index 949357692..068d69498 100644 --- a/src/rec/fanoutRecord.ascii +++ b/src/rec/fanoutRecord.db @@ -4,7 +4,7 @@ menu(fanoutSELM) { choice(fanoutSELM_Mask,"Mask") } recordtype(fanout) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_LONG) { prompt("Used to trigger") asl(ASL0) diff --git a/src/rec/gsubRecord.c b/src/rec/gsubRecord.c index 308da1a86..b611f16b9 100644 --- a/src/rec/gsubRecord.c +++ b/src/rec/gsubRecord.c @@ -99,7 +99,7 @@ static void monitor(); #define ARG_MAX 6 /* Fldnames should have as many as ARG_MAX */ - static char Fldnames[ARG_MAX][FLDNAME_SZ] = + static char *Fldnames[ARG_MAX] = {"A", "B", "C", "D", "E", "F"}; diff --git a/src/rec/gsubRecord.ascii b/src/rec/gsubRecord.db similarity index 99% rename from src/rec/gsubRecord.ascii rename to src/rec/gsubRecord.db index 33996e85b..414baf87e 100644 --- a/src/rec/gsubRecord.ascii +++ b/src/rec/gsubRecord.db @@ -1,5 +1,5 @@ recordtype(gsub) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_FLOAT) { prompt("Result") asl(ASL0) diff --git a/src/rec/histogramRecord.ascii b/src/rec/histogramRecord.db similarity index 98% rename from src/rec/histogramRecord.ascii rename to src/rec/histogramRecord.db index 2559dcb44..cccd4de2f 100644 --- a/src/rec/histogramRecord.ascii +++ b/src/rec/histogramRecord.db @@ -6,7 +6,7 @@ menu(histogramCMD) { choice(histogramCMD_Setup,"Setup") } recordtype(histogram) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0) diff --git a/src/rec/longinRecord.ascii b/src/rec/longinRecord.db similarity index 98% rename from src/rec/longinRecord.ascii rename to src/rec/longinRecord.db index 06bd4ca30..c985babcf 100644 --- a/src/rec/longinRecord.ascii +++ b/src/rec/longinRecord.db @@ -1,5 +1,5 @@ recordtype(longin) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_LONG) { prompt("Current value") asl(ASL0) diff --git a/src/rec/longoutRecord.ascii b/src/rec/longoutRecord.db similarity index 99% rename from src/rec/longoutRecord.ascii rename to src/rec/longoutRecord.db index b3dea2ef9..d525c10fa 100644 --- a/src/rec/longoutRecord.ascii +++ b/src/rec/longoutRecord.db @@ -1,5 +1,5 @@ recordtype(longout) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_LONG) { prompt("Desired Output") asl(ASL0) diff --git a/src/rec/mbbiDirectRecord.ascii b/src/rec/mbbiDirectRecord.db similarity index 99% rename from src/rec/mbbiDirectRecord.ascii rename to src/rec/mbbiDirectRecord.db index c76ba0064..824c5fdef 100644 --- a/src/rec/mbbiDirectRecord.ascii +++ b/src/rec/mbbiDirectRecord.db @@ -1,5 +1,5 @@ recordtype(mbbiDirect) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_USHORT) { prompt("Current Value") asl(ASL0) diff --git a/src/rec/mbbiRecord.ascii b/src/rec/mbbiRecord.db similarity index 99% rename from src/rec/mbbiRecord.ascii rename to src/rec/mbbiRecord.db index 91c989c15..60a3ec02d 100644 --- a/src/rec/mbbiRecord.ascii +++ b/src/rec/mbbiRecord.db @@ -1,5 +1,5 @@ recordtype(mbbi) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_ENUM) { prompt("Current Value") asl(ASL0) diff --git a/src/rec/mbboDirectRecord.ascii b/src/rec/mbboDirectRecord.db similarity index 99% rename from src/rec/mbboDirectRecord.ascii rename to src/rec/mbboDirectRecord.db index ada3170ce..e59fd986d 100644 --- a/src/rec/mbboDirectRecord.ascii +++ b/src/rec/mbboDirectRecord.db @@ -1,5 +1,5 @@ recordtype(mbboDirect) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_USHORT) { prompt("Word") asl(ASL0) diff --git a/src/rec/mbboRecord.ascii b/src/rec/mbboRecord.db similarity index 99% rename from src/rec/mbboRecord.ascii rename to src/rec/mbboRecord.db index e1082ff94..01c9a7eaf 100644 --- a/src/rec/mbboRecord.ascii +++ b/src/rec/mbboRecord.db @@ -1,5 +1,5 @@ recordtype(mbbo) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_ENUM) { prompt("Desired Value") asl(ASL0) diff --git a/src/rec/palRecord.c b/src/rec/palRecord.c index 128d2d37a..f286a770c 100644 --- a/src/rec/palRecord.c +++ b/src/rec/palRecord.c @@ -95,7 +95,7 @@ struct pal * palinit(); #define ARG_MAX 12 /* Fldnames should have as many as ARG_MAX */ - static char Fldnames[ARG_MAX][FLDNAME_SZ] = + static char *Fldnames[ARG_MAX] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}; #define OUT_MAX 12 diff --git a/src/rec/palRecord.ascii b/src/rec/palRecord.db similarity index 99% rename from src/rec/palRecord.ascii rename to src/rec/palRecord.db index c390833c9..5a7d5faf6 100644 --- a/src/rec/palRecord.ascii +++ b/src/rec/palRecord.db @@ -1,5 +1,5 @@ recordtype(pal) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_ULONG) { prompt("Result") asl(ASL0) diff --git a/src/rec/permissiveRecord.ascii b/src/rec/permissiveRecord.db similarity index 94% rename from src/rec/permissiveRecord.ascii rename to src/rec/permissiveRecord.db index b854dd623..a2afc200a 100644 --- a/src/rec/permissiveRecord.ascii +++ b/src/rec/permissiveRecord.db @@ -1,5 +1,5 @@ recordtype(permissive) { - include "dbCommon.ascii" + include "dbCommon.db" field(LABL,DBF_STRING) { prompt("Button Label") promptgroup(GUI_DISPLAY) diff --git a/src/rec/pidRecord.ascii b/src/rec/pidRecord.db similarity index 99% rename from src/rec/pidRecord.ascii rename to src/rec/pidRecord.db index 5b6a41186..882ea264e 100644 --- a/src/rec/pidRecord.ascii +++ b/src/rec/pidRecord.db @@ -1,5 +1,5 @@ recordtype(pid) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_FLOAT) { prompt("Setpoint") asl(ASL0) diff --git a/src/rec/pulseCounterRecord.ascii b/src/rec/pulseCounterRecord.db similarity index 98% rename from src/rec/pulseCounterRecord.ascii rename to src/rec/pulseCounterRecord.db index f5f96fac6..6f9be7714 100644 --- a/src/rec/pulseCounterRecord.ascii +++ b/src/rec/pulseCounterRecord.db @@ -22,7 +22,7 @@ menu(pulseCounterCSIZ) { choice(pulseCounterCSIZ_32_bit,"32 bit") } recordtype(pulseCounter) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_ULONG) { prompt("Counter Value") asl(ASL0) diff --git a/src/rec/pulseDelayRecord.ascii b/src/rec/pulseDelayRecord.db similarity index 99% rename from src/rec/pulseDelayRecord.ascii rename to src/rec/pulseDelayRecord.db index 6a11298f3..f572bf189 100644 --- a/src/rec/pulseDelayRecord.ascii +++ b/src/rec/pulseDelayRecord.db @@ -30,7 +30,7 @@ menu(pulseDelayVAL) { choice(pulseDelayVAL_Active,"Active") } recordtype(pulseDelay) { - include "dbCommon.ascii" + include "dbCommon.db" field(OUT,DBF_OUTLINK) { prompt("Output Specification") promptgroup(GUI_PULSE) diff --git a/src/rec/pulseTrainRecord.ascii b/src/rec/pulseTrainRecord.db similarity index 99% rename from src/rec/pulseTrainRecord.ascii rename to src/rec/pulseTrainRecord.db index 9ba379022..86bdfae4f 100644 --- a/src/rec/pulseTrainRecord.ascii +++ b/src/rec/pulseTrainRecord.db @@ -26,7 +26,7 @@ menu(pulseTrainUNIT) { choice(pulseTrainUNIT_Picoseconds,"Picoseconds") } recordtype(pulseTrain) { - include "dbCommon.ascii" + include "dbCommon.db" field(OUT,DBF_OUTLINK) { prompt("Output Specification") promptgroup(GUI_PULSE) diff --git a/src/rec/scanRecord.c b/src/rec/scanRecord.c index 4961f8791..d7f9e973a 100644 --- a/src/rec/scanRecord.c +++ b/src/rec/scanRecord.c @@ -96,7 +96,6 @@ #include #include -#include #include #include #include diff --git a/src/rec/scanRecord.ascii b/src/rec/scanRecord.db similarity index 99% rename from src/rec/scanRecord.ascii rename to src/rec/scanRecord.db index e68066400..91ca5edd7 100644 --- a/src/rec/scanRecord.ascii +++ b/src/rec/scanRecord.db @@ -26,7 +26,7 @@ menu(scanP1NV) { choice(scanP1NV_No_PV,"No PV") } recordtype(scan) { - include "dbCommon.ascii" + include "dbCommon.db" field(VERS,DBF_DOUBLE) { prompt("Code Version") special(SPC_NOMOD) diff --git a/src/rec/selRecord.c b/src/rec/selRecord.c index cd8365742..3d7acc23c 100644 --- a/src/rec/selRecord.c +++ b/src/rec/selRecord.c @@ -116,7 +116,7 @@ static void monitor(); #define ARG_MAX 12 /* Fldnames should have as many as ARG_MAX */ - static char Fldnames[ARG_MAX][FLDNAME_SZ] = + static char *Fldnames[ARG_MAX] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}; diff --git a/src/rec/selRecord.ascii b/src/rec/selRecord.db similarity index 99% rename from src/rec/selRecord.ascii rename to src/rec/selRecord.db index 82ef755fd..7b1662915 100644 --- a/src/rec/selRecord.ascii +++ b/src/rec/selRecord.db @@ -5,7 +5,7 @@ menu(selSELM) { choice(selSELM_Median_Signal,"Median Signal") } recordtype(sel) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_DOUBLE) { prompt("Result") asl(ASL0) diff --git a/src/rec/seqRecord.c b/src/rec/seqRecord.c index ceb1f8ab0..5cf35ca60 100644 --- a/src/rec/seqRecord.c +++ b/src/rec/seqRecord.c @@ -51,7 +51,6 @@ #define GEN_SIZE_OFFSET #include #undef GEN_SIZE_OFFSET -#include int seqRecDebug = 0; @@ -241,12 +240,12 @@ struct seqRecord *pseq; pcb->callBack.priority = pseq->prio; /* - * We should not bother supporting REC_SEQ_SELM_ALL or REC_SEQ_SELM_SPECIFIC - * they can both be supported by simply providing REC_SEQ_SELM_MASK. + * We should not bother supporting seqSELM_All or seqSELM_Specified + * they can both be supported by simply providing seqSELM_Mask. * build the proper mask using these other silly modes if necessary. */ - if (pseq->selm == REC_SEQ_SELM_ALL) + if (pseq->selm == seqSELM_All) { lmask = SELN_BIT_MASK; } @@ -259,7 +258,7 @@ struct seqRecord *pseq; nRequest = 1; recGblGetLinkValue(&(pseq->sell), (void *)pseq, DBR_USHORT, &(pseq->seln), &options,&nRequest); } - if (pseq->selm == REC_SEQ_SELM_SPECIFIC) + if (pseq->selm == seqSELM_Specified) { if(pseq->seln>10) { /* Invalid selection number */ @@ -272,7 +271,7 @@ struct seqRecord *pseq; lmask = 1; lmask <<= pseq->seln - 1; } - else if (pseq->selm == REC_SEQ_SELM_MASK) + else if (pseq->selm == seqSELM_Mask) { lmask = (pseq->seln) & SELN_BIT_MASK; } diff --git a/src/rec/seqRecord.ascii b/src/rec/seqRecord.db similarity index 99% rename from src/rec/seqRecord.ascii rename to src/rec/seqRecord.db index 72ea49fc0..218cc08c3 100644 --- a/src/rec/seqRecord.ascii +++ b/src/rec/seqRecord.db @@ -4,7 +4,7 @@ menu(seqSELM) { choice(seqSELM_Mask,"Mask") } recordtype(seq) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_LONG) { prompt("Used to trigger") asl(ASL0) diff --git a/src/rec/stateRecord.ascii b/src/rec/stateRecord.db similarity index 89% rename from src/rec/stateRecord.ascii rename to src/rec/stateRecord.db index 4262936cb..98d287cfb 100644 --- a/src/rec/stateRecord.ascii +++ b/src/rec/stateRecord.db @@ -1,5 +1,5 @@ recordtype(state) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_STRING) { prompt("Value") promptgroup(GUI_DISPLAY) diff --git a/src/rec/steppermotorRecord.ascii b/src/rec/steppermotorRecord.db similarity index 99% rename from src/rec/steppermotorRecord.ascii rename to src/rec/steppermotorRecord.db index 818e0dec6..62166dfe0 100644 --- a/src/rec/steppermotorRecord.ascii +++ b/src/rec/steppermotorRecord.db @@ -8,7 +8,7 @@ menu(steppermotorMODE) { choice(steppermotorMODE_Position,"Position") } recordtype(steppermotor) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_FLOAT) { prompt("Desired Value") asl(ASL0) diff --git a/src/rec/stringinRecord.ascii b/src/rec/stringinRecord.db similarity index 97% rename from src/rec/stringinRecord.ascii rename to src/rec/stringinRecord.db index d0397678c..247f5f4ad 100644 --- a/src/rec/stringinRecord.ascii +++ b/src/rec/stringinRecord.db @@ -1,5 +1,5 @@ recordtype(stringin) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_STRING) { prompt("Current Value") promptgroup(GUI_INPUTS) diff --git a/src/rec/stringoutRecord.ascii b/src/rec/stringoutRecord.db similarity index 97% rename from src/rec/stringoutRecord.ascii rename to src/rec/stringoutRecord.db index 7bce709e8..1c9785073 100644 --- a/src/rec/stringoutRecord.ascii +++ b/src/rec/stringoutRecord.db @@ -1,5 +1,5 @@ recordtype(stringout) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_STRING) { prompt("Current Value") promptgroup(GUI_OUTPUT) diff --git a/src/rec/subArrayRecord.ascii b/src/rec/subArrayRecord.db similarity index 98% rename from src/rec/subArrayRecord.ascii rename to src/rec/subArrayRecord.db index 378e6d515..884bc6623 100644 --- a/src/rec/subArrayRecord.ascii +++ b/src/rec/subArrayRecord.db @@ -1,5 +1,5 @@ recordtype(subArray) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0) diff --git a/src/rec/subRecord.c b/src/rec/subRecord.c index 917fb7681..893aa5860 100644 --- a/src/rec/subRecord.c +++ b/src/rec/subRecord.c @@ -112,7 +112,7 @@ static void monitor(); #define ARG_MAX 12 /* Fldnames should have as many as ARG_MAX */ - static char Fldnames[ARG_MAX][FLDNAME_SZ] = + static char *Fldnames[ARG_MAX] = {"A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L"}; diff --git a/src/rec/subRecord.ascii b/src/rec/subRecord.db similarity index 99% rename from src/rec/subRecord.ascii rename to src/rec/subRecord.db index 0ae571f9a..b8e7b7df5 100644 --- a/src/rec/subRecord.ascii +++ b/src/rec/subRecord.db @@ -1,5 +1,5 @@ recordtype(sub) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_DOUBLE) { prompt("Result") asl(ASL0) diff --git a/src/rec/timerRecord.ascii b/src/rec/timerRecord.db similarity index 99% rename from src/rec/timerRecord.ascii rename to src/rec/timerRecord.db index dd70a184f..d725b7e6e 100644 --- a/src/rec/timerRecord.ascii +++ b/src/rec/timerRecord.db @@ -13,7 +13,7 @@ menu(timerPTST) { choice(timerPTST_high,"high") } recordtype(timer) { - include "dbCommon.ascii" + include "dbCommon.db" field(TORG,DBF_INLINK) { prompt("Trigger Origin") promptgroup(GUI_TIMER) diff --git a/src/rec/waitRecord.c b/src/rec/waitRecord.c index a5a81bbfb..6e2261dfb 100644 --- a/src/rec/waitRecord.c +++ b/src/rec/waitRecord.c @@ -77,7 +77,6 @@ #include #include -#include #include #include #include @@ -165,7 +164,7 @@ struct { #define DOL_INDEX ARG_MAX #define OUT_INDEX (ARG_MAX + IN_PVS) #define NUM_LINKS (ARG_MAX + IN_PVS + OUT_PVS) -#define PVN_SIZE 40 /*must match the length defined in waitRecord.ascii*/ +#define PVN_SIZE 40 /*must match the length defined in waitRecord.db*/ #define Q_SIZE 50 #define PV_OK REC_WAIT_DYNL_OK /* from choiceWait.h */ #define PV_NC REC_WAIT_DYNL_NC /* from choiceWait.h */ diff --git a/src/rec/waitRecord.ascii b/src/rec/waitRecord.db similarity index 99% rename from src/rec/waitRecord.ascii rename to src/rec/waitRecord.db index 3b85b347a..d2902a680 100644 --- a/src/rec/waitRecord.ascii +++ b/src/rec/waitRecord.db @@ -20,7 +20,7 @@ menu(waitINAV) { choice(waitINAV_No_PV,"No PV") } recordtype(wait) { - include "dbCommon.ascii" + include "dbCommon.db" field(VERS,DBF_FLOAT) { prompt("Code Version") special(SPC_NOMOD) diff --git a/src/rec/waveformRecord.ascii b/src/rec/waveformRecord.db similarity index 98% rename from src/rec/waveformRecord.ascii rename to src/rec/waveformRecord.db index a44920b3f..1f4275a87 100644 --- a/src/rec/waveformRecord.ascii +++ b/src/rec/waveformRecord.db @@ -1,5 +1,5 @@ recordtype(waveform) { - include "dbCommon.ascii" + include "dbCommon.db" field(VAL,DBF_NOACCESS) { prompt("Value") asl(ASL0)