Export and use int64outdset, set USE_TYPED_DSET
This commit is contained in:
@@ -30,6 +30,7 @@ dbRecStd_SRCS += devEventSoft.c
|
||||
dbRecStd_SRCS += devHistogramSoft.c
|
||||
devI64inSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64inSoft.c
|
||||
devI64outSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64outSoft.c
|
||||
dbRecStd_SRCS += devLiSoft.c
|
||||
dbRecStd_SRCS += devLoSoft.c
|
||||
@@ -65,6 +66,7 @@ dbRecStd_SRCS += devSiSoftCallback.c
|
||||
dbRecStd_SRCS += devAoSoftCallback.c
|
||||
dbRecStd_SRCS += devBoSoftCallback.c
|
||||
dbRecStd_SRCS += devCalcoutSoftCallback.c
|
||||
devI64outSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64outSoftCallback.c
|
||||
dbRecStd_SRCS += devLoSoftCallback.c
|
||||
devLsoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
|
||||
@@ -25,27 +25,7 @@
|
||||
#include "int64outRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devI64outSoft */
|
||||
static long init_record(int64outRecord *prec);
|
||||
static long write_int64out(int64outRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_int64out;
|
||||
} devI64outSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_int64out
|
||||
};
|
||||
epicsExportAddress(dset, devI64outSoft);
|
||||
|
||||
static long init_record(int64outRecord *prec)
|
||||
static long init_record(dbCommon *common)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -55,3 +35,10 @@ static long write_int64out(int64outRecord *prec)
|
||||
dbPutLink(&prec->out, DBR_INT64, &prec->val,1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Create the dset for devI64outSoft */
|
||||
int64outdset devI64outSoft = {
|
||||
{ 5, NULL, NULL, init_record, NULL }, write_int64out
|
||||
};
|
||||
epicsExportAddress(dset, devI64outSoft);
|
||||
|
||||
|
||||
@@ -25,25 +25,6 @@
|
||||
#include "int64outRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devI64outSoftCallback */
|
||||
static long write_int64out(int64outRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_int64out;
|
||||
} devI64outSoftCallback = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_int64out
|
||||
};
|
||||
epicsExportAddress(dset, devI64outSoftCallback);
|
||||
|
||||
static long write_int64out(int64outRecord *prec)
|
||||
{
|
||||
struct link *plink = &prec->out;
|
||||
@@ -60,3 +41,9 @@ static long write_int64out(int64outRecord *prec)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Create the dset for devI64outSoftCallback */
|
||||
int64outdset devI64outSoftCallback = {
|
||||
{ 5, NULL, NULL, NULL, NULL }, write_int64out
|
||||
};
|
||||
epicsExportAddress(dset, devI64outSoftCallback);
|
||||
|
||||
@@ -27,6 +27,7 @@ stdRecords += fanoutRecord
|
||||
stdRecords += histogramRecord
|
||||
int64inRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += int64inRecord
|
||||
int64outRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += int64outRecord
|
||||
stdRecords += longinRecord
|
||||
stdRecords += longoutRecord
|
||||
|
||||
@@ -80,14 +80,6 @@ rset int64outRSET={
|
||||
epicsExportAddress(rset,int64outRSET);
|
||||
|
||||
|
||||
struct int64outdset { /* int64out input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_int64out;/*(-1,0)=>(failure,success*/
|
||||
};
|
||||
static void checkAlarms(int64outRecord *prec);
|
||||
static void monitor(int64outRecord *prec);
|
||||
static long writeValue(int64outRecord *prec);
|
||||
@@ -109,7 +101,7 @@ static long init_record(dbCommon *pcommon, int pass)
|
||||
return(S_dev_noDSET);
|
||||
}
|
||||
/* must have write_int64out functions defined */
|
||||
if( (pdset->number < 5) || (pdset->write_int64out == NULL) ) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_int64out == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)prec,"int64out: init_record");
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
@@ -117,8 +109,8 @@ static long init_record(dbCommon *pcommon, int pass)
|
||||
if(recGblInitConstantLink(&prec->dol,DBF_INT64,&prec->val))
|
||||
prec->udf=FALSE;
|
||||
}
|
||||
if( pdset->init_record ) {
|
||||
if((status=(*pdset->init_record)(prec))) return(status);
|
||||
if (pdset->common.init_record) {
|
||||
if ((status = pdset->common.init_record(pcommon))) return status;
|
||||
}
|
||||
prec->mlst = prec->val;
|
||||
prec->alst = prec->val;
|
||||
|
||||
@@ -137,6 +137,15 @@ monitoring deadband functionality.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%#include "devSup.h"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct int64outRecord;
|
||||
%typedef struct int64outdset {
|
||||
% dset common;
|
||||
% long (*write_int64out)(struct int64outRecord *prec);
|
||||
%} int64outdset;
|
||||
%
|
||||
field(VAL,DBF_INT64) {
|
||||
prompt("Desired Output")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
Reference in New Issue
Block a user