Remove REC_TYPE and UNTYPED_RSET/oldRecSup.h; add casts to record types

This commit is contained in:
Ralph Lange
2017-03-24 17:07:22 +01:00
parent 40c9e4799b
commit ef2da59c24
38 changed files with 221 additions and 250 deletions

View File

@@ -21,8 +21,6 @@
#include <stdio.h>
#define REC_TYPE arrRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "dbAccess.h"
@@ -39,8 +37,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(arrRecord *, int);
static long process(arrRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -77,8 +75,10 @@ rset arrRSET = {
};
epicsExportAddress(rset, arrRSET);
static long init_record(arrRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct arrRecord *prec = (struct arrRecord *)pcommon;
if (pass == 0) {
if (prec->nelm <= 0)
prec->nelm = 1;
@@ -97,8 +97,9 @@ static long init_record(arrRecord *prec, int pass)
return 0;
}
static long process(arrRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct arrRecord *prec = (struct arrRecord *)pcommon;
if(prec->clbk)
(*prec->clbk)(prec);
prec->pact = TRUE;

View File

@@ -13,8 +13,6 @@
* Ralph Lange <Ralph.Lange@bessy.de>
*/
#define REC_TYPE xRecord
#include "dbAccessDefs.h"
#include "recSup.h"
#include "recGbl.h"
@@ -28,8 +26,9 @@
#include "devx.h"
static long init_record(xRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct xRecord *prec = (struct xRecord *)pcommon;
long ret = 0;
xdset *xset = (xdset*)prec->dset;
if(!pass) return 0;
@@ -43,10 +42,12 @@ static long init_record(xRecord *prec, int pass)
return ret;
}
static long process(xRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct xRecord *prec = (struct xRecord *)pcommon;
long ret = 0;
xdset *xset = (xdset*)prec->dset;
if(prec->clbk)
(*prec->clbk)(prec);
prec->pact = TRUE;

View File

@@ -21,7 +21,6 @@ INC += guigroup.h
INC += devSup.h
INC += drvSup.h
INC += recSup.h
INC += oldRecSup.h
INC += dbStaticIocRegister.h
dbCore_SRCS += dbStaticLib.c

View File

@@ -1,30 +0,0 @@
/*
* DO NOT INCLUDE THIS FILE
*
* Instead #define UNTYPED_RSET, then #include "recSup.h"
*/
typedef long (*RECSUPFUN) (); /* ptr to record support function*/
typedef struct rset { /* record support entry table */
long number; /*number of support routines */
RECSUPFUN report; /*print report */
RECSUPFUN init; /*init support */
RECSUPFUN init_record; /*init record */
RECSUPFUN process; /*process record */
RECSUPFUN special; /*special processing */
RECSUPFUN get_value; /*no longer used */
RECSUPFUN cvt_dbaddr; /*cvt dbAddr */
RECSUPFUN get_array_info;
RECSUPFUN put_array_info;
RECSUPFUN get_units;
RECSUPFUN get_precision;
RECSUPFUN get_enum_str; /*get string from enum item*/
RECSUPFUN get_enum_strs; /*get all enum strings */
RECSUPFUN put_enum_str; /*put string from enum item*/
RECSUPFUN get_graphic_double;
RECSUPFUN get_control_double;
RECSUPFUN get_alarm_double;
}rset;
#define RSETNUMBER ( (sizeof(struct rset) - sizeof(long))/sizeof(RECSUPFUN) )

View File

@@ -23,30 +23,21 @@ extern "C" {
typedef struct rset rset;
#ifdef UNTYPED_RSET
#include "oldRecSup.h"
#else
/* defined elsewhere */
struct dbAddr;
struct dbCommon;
struct dbr_enumStrs;
struct dbr_grDouble;
struct dbr_ctrlDouble;
struct dbr_alDouble;
#ifndef REC_TYPE
#define REC_TYPE dbCommon
#endif
struct REC_TYPE;
/* record support entry table */
struct rset {
long number; /* number of support routines */
long (*report)(void *precord);
long (*init)();
long (*init_record)(struct REC_TYPE *precord, int pass);
long (*process)(struct REC_TYPE *precord);
long (*init_record)(struct dbCommon *precord, int pass);
long (*process)(struct dbCommon *precord);
long (*special)(struct dbAddr *paddr, int after);
long (*get_value)(void); /* DEPRECATED set to NULL */
long (*cvt_dbaddr)(struct dbAddr *paddr);
@@ -64,8 +55,6 @@ struct rset {
#define RSETNUMBER 17
#endif /* UNTYPED_RSET */
#define S_rec_noRSET (M_recSup| 1) /*Missing record support entry table*/
#define S_rec_noSizeOffset (M_recSup| 2) /*Missing SizeOffset Routine*/
#define S_rec_outMem (M_recSup| 3) /*Out of Memory*/

View File

@@ -39,8 +39,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(arrRecord *, int);
static long process(arrRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -77,8 +77,10 @@ rset arrRSET = {
};
epicsExportAddress(rset, arrRSET);
static long init_record(arrRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct arrRecord *prec = (struct arrRecord *)pcommon;
if (pass == 0) {
if (prec->nelm <= 0)
prec->nelm = 1;
@@ -97,8 +99,10 @@ static long init_record(arrRecord *prec, int pass)
return 0;
}
static long process(arrRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct arrRecord *prec = (struct arrRecord *)pcommon;
if(prec->clbk)
(*prec->clbk)(prec);
prec->pact = TRUE;

View File

@@ -18,8 +18,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE aSubRecord
#include "alarm.h"
#include "cantProceed.h"
#include "dbDefs.h"
@@ -46,8 +44,8 @@ typedef long (*GENFUNCPTR)(struct aSubRecord *);
#define report NULL
#define initialize NULL
static long init_record(aSubRecord *, int);
static long process(aSubRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -106,8 +104,9 @@ static const char *Ofldnames[] = {
};
static long init_record(aSubRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct aSubRecord *prec = (struct aSubRecord *)pcommon;
STATIC_ASSERT(sizeof(prec->onam)==sizeof(prec->snam));
GENFUNCPTR pfunc;
long status;
@@ -246,8 +245,9 @@ static long initFields(epicsEnum16 *pft, epicsUInt32 *pno, epicsUInt32 *pne,
}
static long process(aSubRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct aSubRecord *prec = (struct aSubRecord *)pcommon;
int pact = prec->pact;
long status = 0;

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE aaiRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsString.h"
@@ -52,8 +50,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(aaiRecord *, int);
static long process(aaiRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -102,10 +100,11 @@ struct aaidset { /* aai dset */
static void monitor(aaiRecord *);
static long readValue(aaiRecord *);
static long init_record(aaiRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
long status;
struct aaiRecord *prec = (struct aaiRecord *)pcommon;
struct aaidset *pdset = (struct aaidset *)(prec->dset);
long status;
/* must have dset defined */
if (!pdset) {
@@ -155,8 +154,9 @@ static long init_record(aaiRecord *prec, int pass)
return 0;
}
static long process(aaiRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct aaiRecord *prec = (struct aaiRecord *)pcommon;
struct aaidset *pdset = (struct aaidset *)(prec->dset);
long status;
unsigned char pact = prec->pact;

View File

@@ -27,8 +27,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE aaoRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsString.h"
@@ -52,8 +50,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(aaoRecord *, int);
static long process(aaoRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -102,10 +100,11 @@ struct aaodset { /* aao dset */
static void monitor(aaoRecord *);
static long writeValue(aaoRecord *);
static long init_record(aaoRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
long status;
struct aaoRecord *prec = (struct aaoRecord *)pcommon;
struct aaodset *pdset = (struct aaodset *)(prec->dset);
long status;
/* must have dset defined */
if (!pdset) {
@@ -155,8 +154,9 @@ static long init_record(aaoRecord *prec, int pass)
return 0;
}
static long process(aaoRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct aaoRecord *prec = (struct aaoRecord *)pcommon;
struct aaodset *pdset = (struct aaodset *)(prec->dset);
long status;
unsigned char pact = prec->pact;

View File

@@ -49,8 +49,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(aiRecord *, int);
static long process(aiRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -104,8 +104,9 @@ static void convert(aiRecord *prec);
static void monitor(aiRecord *prec);
static long readValue(aiRecord *prec);
static long init_record(aiRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct aiRecord *prec = (struct aiRecord *)pcommon;
aidset *pdset;
double eoff = prec->eoff, eslo = prec->eslo;
@@ -151,9 +152,10 @@ static long init_record(aiRecord *prec, int pass)
return(0);
}
static long process(aiRecord *prec)
static long process(struct dbCommon *pcommon)
{
aidset *pdset = (aidset *)(prec->dset);
struct aiRecord *prec = (struct aiRecord *)pcommon;
aidset *pdset = (aidset *)(prec->dset);
long status;
unsigned char pact=prec->pact;
epicsTimeStamp timeLast;

View File

@@ -20,8 +20,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE aoRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsMath.h"
@@ -48,8 +46,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(aoRecord *prec, int pass);
static long process(aoRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -103,9 +101,10 @@ static void convert(aoRecord *, double);
static void monitor(aoRecord *);
static long writeValue(aoRecord *);
static long init_record(aoRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct aodset *pdset;
struct aoRecord *prec = (struct aoRecord *)pcommon;
struct aodset *pdset;
double eoff = prec->eoff, eslo = prec->eslo;
double value;
@@ -176,9 +175,10 @@ static long init_record(aoRecord *prec, int pass)
return(0);
}
static long process(aoRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct aodset *pdset = (struct aodset *)(prec->dset);
struct aoRecord *prec = (struct aoRecord *)pcommon;
struct aodset *pdset = (struct aodset *)(prec->dset);
long status=0;
unsigned char pact=prec->pact;
double value;

View File

@@ -20,8 +20,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE biRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -43,8 +41,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(biRecord *, int);
static long process(biRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -91,8 +89,9 @@ static void checkAlarms(biRecord *);
static void monitor(biRecord *);
static long readValue(biRecord *);
static long init_record(biRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct biRecord *prec = (struct biRecord *)pcommon;
struct bidset *pdset;
long status;
@@ -118,9 +117,10 @@ static long init_record(biRecord *prec, int pass)
return(0);
}
static long process(biRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct bidset *pdset = (struct bidset *)(prec->dset);
struct biRecord *prec = (struct biRecord *)pcommon;
struct bidset *pdset = (struct bidset *)(prec->dset);
long status;
unsigned char pact=prec->pact;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE boRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -45,8 +43,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(boRecord *, int);
static long process(boRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -130,8 +128,9 @@ static void myCallbackFunc(CALLBACK *arg)
dbScanUnlock((struct dbCommon *)prec);
}
static long init_record(boRecord *prec,int pass)
static long init_record(struct dbCommon *pcommon,int pass)
{
struct boRecord *prec = (struct boRecord *)pcommon;
struct bodset *pdset;
long status=0;
myCallback *pcallback;
@@ -191,9 +190,10 @@ static long init_record(boRecord *prec,int pass)
return(status);
}
static long process(boRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct bodset *pdset = (struct bodset *)(prec->dset);
struct boRecord *prec = (struct boRecord *)pcommon;
struct bodset *pdset = (struct bodset *)(prec->dset);
long status=0;
unsigned char pact=prec->pact;

View File

@@ -45,8 +45,8 @@
#define report NULL
#define initialize NULL
static long init_record(calcRecord *prec, int pass);
static long process(calcRecord *prec);
static long init_record(struct dbCommon *prec, int pass);
static long process(struct dbCommon *prec);
static long special(DBADDR *paddr, int after);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -88,8 +88,9 @@ static void monitor(calcRecord *prec);
static int fetch_values(calcRecord *prec);
static long init_record(calcRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct calcRecord *prec = (struct calcRecord *)pcommon;
struct link *plink;
double *pvalue;
int i;
@@ -113,8 +114,9 @@ static long init_record(calcRecord *prec, int pass)
return 0;
}
static long process(calcRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct calcRecord *prec = (struct calcRecord *)pcommon;
epicsTimeStamp timeLast;
prec->pact = TRUE;

View File

@@ -21,8 +21,6 @@
#include <string.h>
#include <math.h>
#define REC_TYPE calcoutRecord
#include "alarm.h"
#include "dbDefs.h"
#include "dbAccess.h"
@@ -48,8 +46,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(calcoutRecord *, int);
static long process(calcoutRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -135,8 +133,9 @@ static long writeValue(calcoutRecord *prec);
int calcoutRecDebug;
static long init_record(calcoutRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct calcoutRecord *prec = (struct calcoutRecord *)pcommon;
DBLINK *plink;
int i;
double *pvalue;
@@ -215,8 +214,9 @@ static long init_record(calcoutRecord *prec, int pass)
return 0;
}
static long process(calcoutRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct calcoutRecord *prec = (struct calcoutRecord *)pcommon;
rpvtStruct *prpvt = prec->rpvt;
int doOutput;

View File

@@ -43,8 +43,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(compressRecord *, int);
static long process(compressRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -314,8 +314,9 @@ static int compress_scalar(struct compressRecord *prec,double *psource)
}
/*Beginning of record support routines*/
static long init_record(compressRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct compressRecord *prec = (struct compressRecord *)pcommon;
if (pass == 0) {
if (prec->nsam < 1)
prec->nsam = 1;
@@ -326,8 +327,9 @@ static long init_record(compressRecord *prec, int pass)
return 0;
}
static long process(compressRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct compressRecord *prec = (struct compressRecord *)pcommon;
long status = 0;
long nelements = 0;
int alg = prec->alg;

View File

@@ -23,8 +23,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE dfanoutRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsMath.h"
@@ -47,8 +45,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(dfanoutRecord *, int);
static long process(dfanoutRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -93,8 +91,9 @@ static void push_values(dfanoutRecord *);
#define OUT_ARG_MAX 8
static long init_record(dfanoutRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon;
if (pass==0) return(0);
recGblInitConstantLink(&prec->sell,DBF_USHORT,&prec->seln);
@@ -104,8 +103,9 @@ static long init_record(dfanoutRecord *prec, int pass)
return(0);
}
static long process(dfanoutRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct dfanoutRecord *prec = (struct dfanoutRecord *)pcommon;
long status=0;
if (!prec->pact

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE eventRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -43,8 +41,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(eventRecord *, int);
static long process(eventRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -93,8 +91,9 @@ static void monitor(eventRecord *);
static long readValue(eventRecord *);
static long init_record(eventRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct eventRecord *prec = (struct eventRecord *)pcommon;
struct eventdset *pdset;
long status=0;
@@ -115,9 +114,10 @@ static long init_record(eventRecord *prec, int pass)
return(status);
}
static long process(eventRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct eventdset *pdset = (struct eventdset *)(prec->dset);
struct eventRecord *prec = (struct eventRecord *)pcommon;
struct eventdset *pdset = (struct eventdset *)(prec->dset);
long status=0;
unsigned char pact=prec->pact;

View File

@@ -18,8 +18,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE fanoutRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -42,8 +40,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(fanoutRecord *, int);
static long process(fanoutRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -80,9 +78,9 @@ rset fanoutRSET = {
};
epicsExportAddress(rset,fanoutRSET);
static long init_record(fanoutRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct fanoutRecord *prec = (struct fanoutRecord *)pcommon;
if (pass == 0)
return 0;
@@ -90,8 +88,9 @@ static long init_record(fanoutRecord *prec, int pass)
return 0;
}
static long process(fanoutRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct fanoutRecord *prec = (struct fanoutRecord *)pcommon;
struct link *plink;
epicsUInt16 seln, events;
int i;

View File

@@ -21,8 +21,6 @@
#include <math.h>
#include <limits.h>
#define REC_TYPE histogramRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -48,8 +46,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(histogramRecord *, int);
static long process(histogramRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -164,8 +162,9 @@ static long wdogInit(histogramRecord *prec)
return 0;
}
static long init_record(histogramRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct histogramRecord *prec = (struct histogramRecord *)pcommon;
struct histogramdset *pdset;
if (pass == 0) {
@@ -214,9 +213,10 @@ static long init_record(histogramRecord *prec, int pass)
return 0;
}
static long process(histogramRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct histogramdset *pdset = (struct histogramdset *) prec->dset;
struct histogramRecord *prec = (struct histogramRecord *)pcommon;
struct histogramdset *pdset = (struct histogramdset *) prec->dset;
int pact = prec->pact;
long status;

View File

@@ -20,8 +20,6 @@
#include <string.h>
#include <math.h>
#define REC_TYPE longinRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(longinRecord *, int);
static long process(longinRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -96,8 +94,9 @@ static void monitor(longinRecord *prec);
static long readValue(longinRecord *prec);
static long init_record(longinRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct longinRecord *prec = (struct longinRecord *)pcommon;
struct longindset *pdset;
long status;
@@ -131,9 +130,10 @@ static long init_record(longinRecord *prec, int pass)
return(0);
}
static long process(longinRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct longindset *pdset = (struct longindset *)(prec->dset);
struct longinRecord *prec = (struct longinRecord *)pcommon;
struct longindset *pdset = (struct longindset *)(prec->dset);
long status;
unsigned char pact=prec->pact;
epicsTimeStamp timeLast;

View File

@@ -41,8 +41,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(longoutRecord *, int);
static long process(longoutRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -93,9 +93,9 @@ static void monitor(longoutRecord *prec);
static long writeValue(longoutRecord *prec);
static void convert(longoutRecord *prec, epicsInt32 value);
static long init_record(longoutRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct longoutRecord *prec = (struct longoutRecord *)pcommon;
struct longoutdset *pdset;
long status=0;
@@ -125,9 +125,10 @@ static long init_record(longoutRecord *prec, int pass)
return(0);
}
static long process(longoutRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct longoutdset *pdset = (struct longoutdset *)(prec->dset);
struct longoutRecord *prec = (struct longoutRecord *)pcommon;
struct longoutdset *pdset = (struct longoutdset *)(prec->dset);
long status=0;
epicsInt32 value;
unsigned char pact=prec->pact;

View File

@@ -15,8 +15,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE lsiRecord
#include "dbDefs.h"
#include "errlog.h"
#include "alarm.h"
@@ -38,8 +36,9 @@
static void monitor(lsiRecord *);
static long readValue(lsiRecord *);
static long init_record(lsiRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct lsiRecord *prec = (struct lsiRecord *)pcommon;
lsidset *pdset;
if (pass == 0) {
@@ -87,8 +86,9 @@ static long init_record(lsiRecord *prec, int pass)
return 0;
}
static long process(lsiRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct lsiRecord *prec = (struct lsiRecord *)pcommon;
int pact = prec->pact;
lsidset *pdset = (lsidset *) prec->dset;
long status = 0;

View File

@@ -42,8 +42,9 @@
static void monitor(lsoRecord *);
static long writeValue(lsoRecord *);
static long init_record(lsoRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct lsoRecord *prec = (struct lsoRecord *)pcommon;
lsodset *pdset;
if (pass == 0) {
@@ -93,8 +94,9 @@ static long init_record(lsoRecord *prec, int pass)
return 0;
}
static long process(lsoRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct lsoRecord *prec = (struct lsoRecord *)pcommon;
int pact = prec->pact;
lsodset *pdset = (lsodset *) prec->dset;
long status = 0;

View File

@@ -21,8 +21,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE mbbiDirectRecord
#include "dbDefs.h"
#include "errlog.h"
#include "alarm.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(mbbiDirectRecord *, int);
static long process(mbbiDirectRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -96,8 +94,9 @@ static long readValue(mbbiDirectRecord *);
#define NUM_BITS 16
static long init_record(mbbiDirectRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
long status = 0;
@@ -142,8 +141,9 @@ static long init_record(mbbiDirectRecord *prec, int pass)
return status;
}
static long process(mbbiDirectRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
long status;
int pact = prec->pact;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE mbbiRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -46,8 +44,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(mbbiRecord *, int);
static long process(mbbiRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -113,9 +111,10 @@ static void init_common(mbbiRecord *prec)
prec->sdef = FALSE;
}
static long init_record(mbbiRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
long status = 0;
if (pass == 0)
@@ -153,9 +152,10 @@ static long init_record(mbbiRecord *prec, int pass)
return status;
}
static long process(mbbiRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
long status;
int pact = prec->pact;
epicsTimeStamp timeLast;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE mbboDirectRecord
#include "dbDefs.h"
#include "errlog.h"
#include "alarm.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(mbboDirectRecord *, int);
static long process(mbboDirectRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -98,8 +96,9 @@ static long writeValue(mbboDirectRecord *);
#define NUM_BITS 16
static long init_record(mbboDirectRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
long status = 0;
@@ -162,8 +161,9 @@ static long init_record(mbboDirectRecord *prec, int pass)
return status;
}
static long process(mbboDirectRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
struct mbbodset *pdset = (struct mbbodset *)(prec->dset);
long status = 0;
int pact = prec->pact;

View File

@@ -45,8 +45,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(mbboRecord *, int);
static long process(mbboRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -115,8 +115,9 @@ static void init_common(mbboRecord *prec)
prec->sdef = FALSE;
}
static long init_record(mbboRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct mbboRecord *prec = (struct mbboRecord *)pcommon;
struct mbbodset *pdset;
long status;
@@ -193,9 +194,10 @@ static long init_record(mbboRecord *prec, int pass)
return status;
}
static long process(mbboRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
struct mbboRecord *prec = (struct mbboRecord *)pcommon;
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
long status = 0;
int pact = prec->pact;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE permissiveRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "dbAccess.h"
@@ -39,7 +37,7 @@
#define report NULL
#define initialize NULL
#define init_record NULL
static long process(permissiveRecord *);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -78,8 +76,9 @@ epicsExportAddress(rset,permissiveRSET);
static void monitor(permissiveRecord *);
static long process(permissiveRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct permissiveRecord *prec = (struct permissiveRecord *)pcommon;
prec->pact=TRUE;
prec->udf=FALSE;

View File

@@ -14,8 +14,6 @@
#include <stddef.h>
#include <string.h>
#define REC_TYPE printfRecord
#include "dbDefs.h"
#include "errlog.h"
#include "alarm.h"
@@ -294,8 +292,9 @@ static void doPrintf(printfRecord *prec)
}
static long init_record(printfRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct printfRecord *prec = (struct printfRecord *)pcommon;
printfdset *pdset;
if (pass == 0) {
@@ -329,8 +328,9 @@ static long init_record(printfRecord *prec, int pass)
return 0;
}
static long process(printfRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct printfRecord *prec = (struct printfRecord *)pcommon;
int pact = prec->pact;
printfdset *pdset;
long status = 0;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE selRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsMath.h"
@@ -40,8 +38,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(selRecord *, int);
static long process(selRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -86,8 +84,9 @@ static int fetch_values(selRecord *);
static void monitor(selRecord *);
static long init_record(selRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct selRecord *prec = (struct selRecord *)pcommon;
struct link *plink;
int i;
double *pvalue;
@@ -110,8 +109,9 @@ static long init_record(selRecord *prec, int pass)
return(0);
}
static long process(selRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct selRecord *prec = (struct selRecord *)pcommon;
prec->pact = TRUE;
if ( RTN_SUCCESS(fetch_values(prec)) ) {
do_sel(prec);

View File

@@ -15,8 +15,6 @@
#include <stdlib.h>
#include <string.h>
#define REC_TYPE seqRecord
#include "alarm.h"
#include "callback.h"
#include "dbAccess.h"
@@ -38,8 +36,8 @@ static void processCallback(CALLBACK *arg);
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(seqRecord *prec, int pass);
static long process(seqRecord *prec);
static long init_record(struct dbCommon *prec, int pass);
static long process(struct dbCommon *prec);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -103,8 +101,9 @@ typedef struct seqRecPvt {
} seqRecPvt;
static long init_record(seqRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct seqRecord *prec = (struct seqRecord *)pcommon;
int index;
linkGrp *grp;
seqRecPvt *pseqRecPvt;
@@ -132,8 +131,9 @@ static long init_record(seqRecord *prec, int pass)
return 0;
}
static long process(seqRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct seqRecord *prec = (struct seqRecord *)pcommon;
seqRecPvt *pcb = (seqRecPvt *) prec->dpvt;
linkGrp *pgrp;
epicsUInt16 lmask;
@@ -208,7 +208,7 @@ static void processNextLink(seqRecord *prec)
if (pgrp == NULL) {
/* None left, finish up. */
prec->rset->process(prec);
prec->rset->process((dbCommon *)prec);
return;
}

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE stateRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "dbAccess.h"
@@ -40,7 +38,7 @@
#define report NULL
#define initialize NULL
#define init_record NULL
static long process(stateRecord *);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -79,8 +77,9 @@ epicsExportAddress(rset,stateRSET);
static void monitor(stateRecord *);
static long process(stateRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct stateRecord *prec = (struct stateRecord *)pcommon;
prec->udf = FALSE;
prec->pact=TRUE;

View File

@@ -20,8 +20,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE stringinRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -42,8 +40,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(stringinRecord *, int);
static long process(stringinRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -92,8 +90,9 @@ static void monitor(stringinRecord *);
static long readValue(stringinRecord *);
static long init_record(stringinRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct stringinRecord *prec = (struct stringinRecord *)pcommon;
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
struct stringindset *pdset;
long status;
@@ -127,9 +126,10 @@ static long init_record(stringinRecord *prec, int pass)
/*
*/
static long process(stringinRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct stringindset *pdset = (struct stringindset *)(prec->dset);
struct stringinRecord *prec = (struct stringinRecord *)pcommon;
struct stringindset *pdset = (struct stringindset *)(prec->dset);
long status;
unsigned char pact=prec->pact;

View File

@@ -20,8 +20,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE stringoutRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(stringoutRecord *, int);
static long process(stringoutRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
#define cvt_dbaddr NULL
@@ -94,8 +92,9 @@ static void monitor(stringoutRecord *);
static long writeValue(stringoutRecord *);
static long init_record(stringoutRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
struct stringoutdset *pdset;
long status=0;
@@ -127,9 +126,10 @@ static long init_record(stringoutRecord *prec, int pass)
return(0);
}
static long process(stringoutRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset);
struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset);
long status=0;
unsigned char pact=prec->pact;

View File

@@ -23,8 +23,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE subArrayRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "alarm.h"
@@ -46,8 +44,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(subArrayRecord *prec, int pass);
static long process(subArrayRecord *prec);
static long init_record(struct dbCommon *prec, int pass);
static long process(struct dbCommon *prec);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *paddr);
@@ -97,9 +95,9 @@ static void monitor(subArrayRecord *prec);
static long readValue(subArrayRecord *prec);
static long init_record(subArrayRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
struct sadset *pdset;
if (pass==0){
@@ -131,8 +129,9 @@ static long init_record(subArrayRecord *prec, int pass)
return 0;
}
static long process(subArrayRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
struct sadset *pdset = (struct sadset *)(prec->dset);
long status;
unsigned char pact=prec->pact;

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE subRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsMath.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(subRecord *, int);
static long process(subRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
static long special(DBADDR *, int);
#define get_value NULL
#define cvt_dbaddr NULL
@@ -89,8 +87,9 @@ static void monitor(subRecord *);
#define INP_ARG_MAX 12
static long init_record(subRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct subRecord *prec = (struct subRecord *)pcommon;
SUBFUNCPTR psubroutine;
struct link *plink;
int i;
@@ -133,8 +132,9 @@ static long init_record(subRecord *prec, int pass)
return 0;
}
static long process(subRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct subRecord *prec = (struct subRecord *)pcommon;
long status = 0;
int pact = prec->pact;
@@ -173,7 +173,7 @@ static long special(DBADDR *paddr, int after)
if (!after) {
if (prec->snam[0] == 0 && prec->pact)
prec->pact = FALSE;
prec->rpro = FALSE;
prec->rpro = FALSE;
return 0;
}

View File

@@ -19,8 +19,6 @@
#include <stdio.h>
#include <string.h>
#define REC_TYPE waveformRecord
#include "dbDefs.h"
#include "epicsPrint.h"
#include "epicsString.h"
@@ -44,8 +42,8 @@
/* Create RSET - Record Support Entry Table*/
#define report NULL
#define initialize NULL
static long init_record(waveformRecord *, int);
static long process(waveformRecord *);
static long init_record(struct dbCommon *, int);
static long process(struct dbCommon *);
#define special NULL
#define get_value NULL
static long cvt_dbaddr(DBADDR *);
@@ -92,8 +90,9 @@ struct wfdset { /* waveform dset */
static void monitor(waveformRecord *);
static long readValue(waveformRecord *);
static long init_record(waveformRecord *prec, int pass)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct waveformRecord *prec = (struct waveformRecord *)pcommon;
struct wfdset *pdset;
if (pass==0){
@@ -131,8 +130,9 @@ static long init_record(waveformRecord *prec, int pass)
return (*pdset->init_record)(prec);
}
static long process(waveformRecord *prec)
static long process(struct dbCommon *pcommon)
{
struct waveformRecord *prec = (struct waveformRecord *)pcommon;
struct wfdset *pdset = (struct wfdset *)(prec->dset);
unsigned char pact=prec->pact;