- Record updates:
. aoRecord . biRecord . boRecord . mbbiRecord . mbbiDirectRecord . mbboRecord . mbboDirectRecord . longinRecord . longoutRecord . stringoutRecord . stringinRecord . waveformRecord . calcoutRecord . subArrayRecord - Device support updates: . devAoSoft, devAoSoftCallback, devAoSoftRaw (aoRecord) . devBiSoft, devBiSoftCallback, devBiSoftRaw, devBiDbState (biRecord) . devBoSoft, devBoSoftCallback, devBoSoftRaw, devBoDbState, devGeneralTime (boRecord) . devMbbiSoft, devMbbiSoftCallback, devMbbiSoftRaw (mbbiRecord) . devMbboSoft, devMbboSoftCallback, devMbboSoftRaw (mbboRecord) . devMbbiDirectSoft, devMbbiDirectSoftCallback, devMbbiDirectSoftRaw (mbbiDirectRecord) . devMbboDirectSoft, devMbboDirectSoftCallback, devMbboDirectSoftRaw (mbboDirectRecord) . devGeneralTime, devLiSoft, devLiSoftCallback (longinRecord) . devLoSoft, devLoSoftCallback (longoutRecord) . devSoSoft, devSoSoftCallback, devStdio (stringoutRecord) . devSiSoft, devSiSoftCallback, devEnviron, devGeneralTime, devTimestamp (stringinRecord) . devWfSoft (waveformRecord) . devCalcoutSoft, devCalcoutSoftCallback (recordCalcout) . devSASoft (subArrayRecord)
This commit is contained in:
@@ -19,14 +19,21 @@ devAiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoft.c
|
||||
devAiSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoftRaw.c
|
||||
devAoSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAoSoft.c
|
||||
devAoSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAoSoftRaw.c
|
||||
devBiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBiSoft.c
|
||||
dbRecStd_SRCS += devBiSoftRaw.c
|
||||
devBiDbState_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBiDbState.c
|
||||
devBoSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBoSoft.c
|
||||
devBoSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBoSoftRaw.c
|
||||
dbRecStd_SRCS += devBoDbState.c
|
||||
devCalcoutSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devCalcoutSoft.c
|
||||
dbRecStd_SRCS += devEventSoft.c
|
||||
dbRecStd_SRCS += devHistogramSoft.c
|
||||
@@ -34,49 +41,75 @@ devI64inSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64inSoft.c
|
||||
devI64outSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64outSoft.c
|
||||
devLiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLiSoft.c
|
||||
devLoSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLoSoft.c
|
||||
devLsiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLsiSoft.c
|
||||
devLsoSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLsoSoft.c
|
||||
devMbbiDirectSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiDirectSoft.c
|
||||
devMbbiDirectSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiDirectSoftRaw.c
|
||||
devMbbiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiSoft.c
|
||||
devMbbiSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiSoftRaw.c
|
||||
devMbboDirectSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboDirectSoft.c
|
||||
devMbboDirectSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboDirectSoftRaw.c
|
||||
devMbboSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboSoft.c
|
||||
devMbboSoftRaw_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboSoftRaw.c
|
||||
devPrintfSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devPrintfSoft.c
|
||||
devSASoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devSASoft.c
|
||||
devSiSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devSiSoft.c
|
||||
devSoSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devSoSoft.c
|
||||
devWfSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devWfSoft.c
|
||||
|
||||
devAiSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAiSoftCallback.c
|
||||
devBiSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBiSoftCallback.c
|
||||
devI64inSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64inSoftCallback.c
|
||||
devLiSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLiSoftCallback.c
|
||||
devMbbiDirectSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiDirectSoftCallback.c
|
||||
devMbbiCallbackSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbbiSoftCallback.c
|
||||
devSiSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devSiSoftCallback.c
|
||||
|
||||
devAoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devAoSoftCallback.c
|
||||
devBoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devBoSoftCallback.c
|
||||
devCalcoutSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devCalcoutSoftCallback.c
|
||||
devI64outSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devI64outSoftCallback.c
|
||||
devLoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLoSoftCallback.c
|
||||
devLsoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devLsoSoftCallback.c
|
||||
devMbboSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboSoftCallback.c
|
||||
devMbboDirectSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devMbboDirectSoftCallback.c
|
||||
devPrintfSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devPrintfSoftCallback.c
|
||||
devSoSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devSoSoftCallback.c
|
||||
|
||||
devGeneralTime_CFLAGS += -DUSE_TYPED_DSET
|
||||
|
||||
@@ -31,31 +31,17 @@
|
||||
#include "aoRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* added for Channel Access Links */
|
||||
static long init_record(aoRecord *prec);
|
||||
|
||||
/* Create the dset for devAoSoft */
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long write_ao(aoRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSoft={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_ao,
|
||||
NULL};
|
||||
epicsExportAddress(dset,devAoSoft);
|
||||
|
||||
|
||||
static long init_record(aoRecord *prec)
|
||||
aodset devAoSoft = {
|
||||
{6, NULL, NULL, init_record, NULL},
|
||||
write_ao, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAoSoft);
|
||||
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
|
||||
long status=0;
|
||||
|
||||
@@ -31,23 +31,12 @@
|
||||
|
||||
/* Create the dset for devAoSoftCallback */
|
||||
static long write_ao(aoRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSoftCallback={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_ao,
|
||||
NULL};
|
||||
epicsExportAddress(dset,devAoSoftCallback);
|
||||
|
||||
aodset devAoSoftCallback = {
|
||||
{6, NULL, NULL, NULL, NULL},
|
||||
write_ao, NULL
|
||||
};
|
||||
epicsExportAddress(dset, devAoSoftCallback);
|
||||
|
||||
static long write_ao(aoRecord *prec)
|
||||
{
|
||||
|
||||
@@ -33,25 +33,13 @@
|
||||
|
||||
/* Create the dset for devAoSoftRaw */
|
||||
static long write_ao(aoRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_ao;
|
||||
DEVSUPFUN special_linconv;
|
||||
}devAoSoftRaw={
|
||||
6,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_ao,
|
||||
NULL
|
||||
|
||||
aodset devAoSoftRaw = {
|
||||
{6, NULL, NULL, NULL, NULL},
|
||||
write_ao, NULL
|
||||
};
|
||||
epicsExportAddress(dset,devAoSoftRaw);
|
||||
|
||||
epicsExportAddress(dset, devAoSoftRaw);
|
||||
|
||||
static long write_ao(aoRecord *prec)
|
||||
{
|
||||
long status;
|
||||
|
||||
@@ -69,20 +69,9 @@ static long read_bi(biRecord *prec)
|
||||
return 2;
|
||||
}
|
||||
|
||||
static struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;
|
||||
} devBiDbState = {
|
||||
5,
|
||||
NULL,
|
||||
init,
|
||||
NULL,
|
||||
NULL,
|
||||
read_bi
|
||||
/* Create the dset for devBiDbState */
|
||||
bidset devBiDbState = {
|
||||
{5, NULL, init, NULL, NULL},
|
||||
read_bi
|
||||
};
|
||||
|
||||
epicsExportAddress(dset, devBiDbState);
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devBiSoft */
|
||||
static long init_record(biRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_bi(biRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;
|
||||
} devBiSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
bidset devBiSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_bi
|
||||
};
|
||||
epicsExportAddress(dset, devBiSoft);
|
||||
|
||||
static long init_record(biRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
biRecord *prec = (biRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
return 0;
|
||||
|
||||
@@ -151,8 +151,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(biRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
biRecord *prec = (biRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -204,10 +206,7 @@ static long read_bi(biRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devBiSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_bi;
|
||||
} devBiSoftCallback = {
|
||||
bidset devBiSoftCallback = {
|
||||
{5, NULL, init, init_record, NULL},
|
||||
read_bi
|
||||
};
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devBiSoftRaw */
|
||||
static long init_record(biRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_bi(biRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;
|
||||
} devBiSoftRaw = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
bidset devBiSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_bi
|
||||
};
|
||||
epicsExportAddress(dset, devBiSoftRaw);
|
||||
|
||||
static long init_record(biRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
biRecord *prec = (biRecord *)pcommon;
|
||||
|
||||
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -67,20 +67,9 @@ static long write_bo(boRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
} devBoDbState = {
|
||||
5,
|
||||
NULL,
|
||||
init,
|
||||
NULL,
|
||||
NULL,
|
||||
write_bo
|
||||
/* Create the dset for devBoDbState */
|
||||
bodset devBoDbState = {
|
||||
{5, NULL, init, NULL, NULL},
|
||||
write_bo
|
||||
};
|
||||
|
||||
epicsExportAddress(dset, devBoDbState);
|
||||
|
||||
@@ -29,31 +29,19 @@
|
||||
#include "boRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long init_record(boRecord *prec);
|
||||
|
||||
/* Create the dset for devBoSoft */
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long write_bo(boRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_bo
|
||||
bodset devBoSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_bo
|
||||
};
|
||||
epicsExportAddress(dset,devBoSoft);
|
||||
|
||||
static long init_record(boRecord *prec)
|
||||
epicsExportAddress(dset, devBoSoft);
|
||||
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
|
||||
boRecord *prec = (boRecord *)pcommon;
|
||||
long status=0;
|
||||
|
||||
/* dont convert */
|
||||
|
||||
@@ -31,22 +31,11 @@
|
||||
/* Create the dset for devBoCallbackSoft */
|
||||
static long write_bo(boRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSoftCallback={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_bo
|
||||
bodset devBoSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_bo
|
||||
};
|
||||
epicsExportAddress(dset,devBoSoftCallback);
|
||||
epicsExportAddress(dset, devBoSoftCallback);
|
||||
|
||||
static long write_bo(boRecord *prec)
|
||||
{
|
||||
@@ -64,4 +53,3 @@ static long write_bo(boRecord *prec)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,30 +28,17 @@
|
||||
#include "boRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* added for Channel Access Links */
|
||||
static long init_record(boRecord *prec);
|
||||
|
||||
/* Create the dset for devBoSoftRaw */
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long write_bo(boRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;
|
||||
}devBoSoftRaw={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_bo
|
||||
bodset devBoSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_bo
|
||||
};
|
||||
epicsExportAddress(dset,devBoSoftRaw);
|
||||
|
||||
static long init_record(boRecord *prec)
|
||||
epicsExportAddress(dset, devBoSoftRaw);
|
||||
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
long status;
|
||||
|
||||
|
||||
@@ -31,15 +31,9 @@
|
||||
|
||||
static long write_calcout(calcoutRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write;
|
||||
} devCalcoutSoft = {
|
||||
5, NULL, NULL, NULL, NULL, write_calcout
|
||||
calcoutdset devCalcoutSoft = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_calcout
|
||||
};
|
||||
epicsExportAddress(dset, devCalcoutSoft);
|
||||
|
||||
|
||||
@@ -31,15 +31,9 @@
|
||||
|
||||
static long write_calcout(calcoutRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write;
|
||||
} devCalcoutSoftCallback = {
|
||||
5, NULL, NULL, NULL, NULL, write_calcout
|
||||
calcoutdset devCalcoutSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_calcout
|
||||
};
|
||||
epicsExportAddress(dset, devCalcoutSoftCallback);
|
||||
|
||||
|
||||
@@ -119,10 +119,8 @@ static long read_stringin(stringinRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct {
|
||||
dset common;
|
||||
DEVSUPFUN read;
|
||||
} devSiEnviron = {
|
||||
{5, NULL, init_stringin, NULL, NULL}, read_stringin
|
||||
stringindset devSiEnviron = {
|
||||
{5, NULL, init_stringin, NULL, NULL},
|
||||
read_stringin
|
||||
};
|
||||
epicsExportAddress(dset, devSiEnviron);
|
||||
|
||||
@@ -150,15 +150,14 @@ static long write_bo(boRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_write;
|
||||
} devBoGeneralTime = {
|
||||
{5, NULL, NULL, init_bo, NULL}, write_bo
|
||||
bodset devBoGeneralTime = {
|
||||
{5, NULL, NULL, init_bo, NULL},
|
||||
write_bo
|
||||
};
|
||||
epicsExportAddress(dset, devBoGeneralTime);
|
||||
|
||||
|
||||
|
||||
/******* longin record *************/
|
||||
static int errorCount(void)
|
||||
{
|
||||
@@ -209,11 +208,9 @@ static long read_li(longinRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_write;
|
||||
} devLiGeneralTime = {
|
||||
{5, NULL, NULL, init_li, NULL}, read_li
|
||||
longindset devLiGeneralTime = {
|
||||
{5, NULL, NULL, init_li, NULL},
|
||||
read_li
|
||||
};
|
||||
epicsExportAddress(dset, devLiGeneralTime);
|
||||
|
||||
@@ -289,10 +286,8 @@ static long read_si(stringinRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_write;
|
||||
} devSiGeneralTime = {
|
||||
{5, NULL, NULL, init_si, NULL}, read_si
|
||||
stringindset devSiGeneralTime = {
|
||||
{5, NULL, NULL, init_si, NULL},
|
||||
read_si
|
||||
};
|
||||
epicsExportAddress(dset, devSiGeneralTime);
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devLiSoft */
|
||||
static long init_record(longinRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_longin(longinRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_longin;
|
||||
} devLiSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
longindset devLiSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_longin
|
||||
};
|
||||
epicsExportAddress(dset, devLiSoft);
|
||||
|
||||
static long init_record(longinRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
longinRecord *prec = (longinRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_LONG, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
|
||||
@@ -151,8 +151,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(longinRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
longinRecord *prec = (longinRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_LONG, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -204,10 +206,7 @@ static long read_li(longinRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devLiSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_li;
|
||||
} devLiSoftCallback = {
|
||||
longindset devLiSoftCallback = {
|
||||
{5, NULL, init, init_record, NULL},
|
||||
read_li
|
||||
};
|
||||
|
||||
@@ -26,26 +26,16 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devLoSoft */
|
||||
static long init_record(longoutRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long write_longout(longoutRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_longout;
|
||||
}devLoSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_longout
|
||||
|
||||
longoutdset devLoSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_longout
|
||||
};
|
||||
epicsExportAddress(dset,devLoSoft);
|
||||
|
||||
static long init_record(longoutRecord *prec)
|
||||
epicsExportAddress(dset, devLoSoft);
|
||||
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
return 0;
|
||||
} /* end init_record() */
|
||||
|
||||
@@ -29,22 +29,12 @@
|
||||
|
||||
/* Create the dset for devLoSoftCallback */
|
||||
static long write_longout(longoutRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_longout;
|
||||
}devLoSoftCallback={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_longout
|
||||
|
||||
longoutdset devLoSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_longout
|
||||
};
|
||||
epicsExportAddress(dset,devLoSoftCallback);
|
||||
epicsExportAddress(dset, devLoSoftCallback);
|
||||
|
||||
static long write_longout(longoutRecord *prec)
|
||||
{
|
||||
@@ -62,4 +52,3 @@ static long write_longout(longoutRecord *prec)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devMbbiDirectSoft */
|
||||
static long init_record(mbbiDirectRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_mbbi(mbbiDirectRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
} devMbbiDirectSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
mbbidirectdset devMbbiDirectSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_mbbi
|
||||
};
|
||||
epicsExportAddress(dset, devMbbiDirectSoft);
|
||||
|
||||
static long init_record(mbbiDirectRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
|
||||
@@ -151,8 +151,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(mbbiDirectRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_ULONG, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -204,10 +206,7 @@ static long read_mbbiDirect(mbbiDirectRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devMbbiDirectSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_mbbiDirect;
|
||||
} devMbbiDirectSoftCallback = {
|
||||
mbbidirectdset devMbbiDirectSoftCallback = {
|
||||
{5, NULL, init, init_record, NULL},
|
||||
read_mbbiDirect
|
||||
};
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devMbbiDirectSoftRaw */
|
||||
static long init_record(mbbiDirectRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_mbbi(mbbiDirectRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
} devMbbiDirectSoftRaw = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
mbbidirectdset devMbbiDirectSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_mbbi
|
||||
};
|
||||
epicsExportAddress(dset, devMbbiDirectSoftRaw);
|
||||
|
||||
static long init_record(mbbiDirectRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiDirectRecord *prec = (mbbiDirectRecord *)pcommon;
|
||||
|
||||
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
|
||||
|
||||
/* Preserve old functionality */
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devMbbiSoft */
|
||||
static long init_record(mbbiRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_mbbi(mbbiRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
} devMbbiSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
mbbidset devMbbiSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_mbbi
|
||||
};
|
||||
epicsExportAddress(dset, devMbbiSoft);
|
||||
|
||||
static long init_record(mbbiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiRecord *prec = (mbbiRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_ENUM, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
|
||||
@@ -151,8 +151,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(mbbiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiRecord *prec = (mbbiRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_ENUM, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -204,11 +206,8 @@ static long read_mbbi(mbbiRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devMbbiSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_mbbi;
|
||||
} devMbbiSoftCallback = {
|
||||
mbbidset devMbbiSoftCallback = {
|
||||
{5, NULL, init, init_record, NULL},
|
||||
read_mbbi
|
||||
};
|
||||
epicsExportAddress(dset,devMbbiSoftCallback);
|
||||
epicsExportAddress(dset, devMbbiSoftCallback);
|
||||
|
||||
@@ -25,28 +25,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devMbbiSoftRaw */
|
||||
static long init_record(mbbiRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_mbbi(mbbiRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;
|
||||
} devMbbiSoftRaw = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
mbbidset devMbbiSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_mbbi
|
||||
};
|
||||
epicsExportAddress(dset, devMbbiSoftRaw);
|
||||
|
||||
static long init_record(mbbiRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbbiRecord *prec = (mbbiRecord *)pcommon;
|
||||
|
||||
recGblInitConstantLink(&prec->inp, DBF_ULONG, &prec->rval);
|
||||
|
||||
/* Preserve old functionality*/
|
||||
|
||||
@@ -26,10 +26,7 @@ static long write_mbbo(mbboDirectRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devMbboDirectSoft */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN write;
|
||||
} devMbboDirectSoft = {
|
||||
mbbodirectdset devMbboDirectSoft = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
@@ -38,11 +38,8 @@ static long write_mbbo(mbboDirectRecord *prec)
|
||||
return status;
|
||||
}
|
||||
|
||||
/* Create the dset for devMbboSoft */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN write;
|
||||
} devMbboDirectSoftCallback = {
|
||||
/* Create the dset for devMbboDirectSoftCallback */
|
||||
mbbodirectdset devMbboDirectSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
#include "mbboDirectRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long init_record(mbboDirectRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbboDirectRecord *prec = (mbboDirectRecord *)pcommon;
|
||||
|
||||
if (prec->nobt == 0)
|
||||
prec->mask = 0xffffffff;
|
||||
|
||||
@@ -40,10 +42,7 @@ static long write_mbbo(mbboDirectRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devMbboDirectSoftRaw */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN write;
|
||||
} devMbboDirectSoftRaw = {
|
||||
mbbodirectdset devMbboDirectSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
@@ -27,26 +27,16 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devMbboSoft */
|
||||
static long init_record(mbboRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long write_mbbo(mbboRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSoft={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
write_mbbo
|
||||
|
||||
mbbodset devMbboSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
epicsExportAddress(dset,devMbboSoft);
|
||||
|
||||
static long init_record(mbboRecord *prec)
|
||||
epicsExportAddress(dset, devMbboSoft);
|
||||
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
/*dont convert*/
|
||||
return 2;
|
||||
|
||||
@@ -28,22 +28,12 @@
|
||||
|
||||
/* Create the dset for devMbboSoftCallback */
|
||||
static long write_mbbo(mbboRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo;
|
||||
}devMbboSoftCallback={
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
write_mbbo
|
||||
|
||||
mbbodset devMbboSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
epicsExportAddress(dset,devMbboSoftCallback);
|
||||
epicsExportAddress(dset, devMbboSoftCallback);
|
||||
|
||||
static long write_mbbo(mbboRecord *prec)
|
||||
{
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
#include "mbboRecord.h"
|
||||
#include "epicsExport.h"
|
||||
|
||||
static long init_record(mbboRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
mbboRecord *prec = (mbboRecord *)pcommon;
|
||||
|
||||
if (prec->nobt == 0)
|
||||
prec->mask = 0xffffffff;
|
||||
|
||||
@@ -40,10 +42,7 @@ static long write_mbbo(mbboRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devMbboSoftRaw */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN write;
|
||||
} devMbboSoftRaw = {
|
||||
mbbodset devMbboSoftRaw = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
write_mbbo
|
||||
};
|
||||
|
||||
@@ -26,22 +26,11 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devSASoft */
|
||||
static long init_record(subArrayRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_sa(subArrayRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_sa;
|
||||
} devSASoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
sadset devSASoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_sa
|
||||
};
|
||||
epicsExportAddress(dset, devSASoft);
|
||||
@@ -65,8 +54,9 @@ static void subset(subArrayRecord *prec, long nRequest)
|
||||
prec->udf = FALSE;
|
||||
}
|
||||
|
||||
static long init_record(subArrayRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
subArrayRecord *prec = (subArrayRecord *)pcommon;
|
||||
long nRequest = prec->indx + prec->nelm;
|
||||
long status;
|
||||
|
||||
|
||||
@@ -27,28 +27,19 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devSiSoft */
|
||||
static long init_record(stringinRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_stringin(stringinRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_stringin;
|
||||
} devSiSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
stringindset devSiSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_stringin
|
||||
};
|
||||
epicsExportAddress(dset, devSiSoft);
|
||||
|
||||
static long init_record(stringinRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
stringinRecord *prec = (stringinRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBF_STRING, prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
|
||||
@@ -153,8 +153,10 @@ static long init(int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static long init_record(stringinRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
stringinRecord *prec = (stringinRecord *)pcommon;
|
||||
|
||||
if (recGblInitConstantLink(&prec->inp, DBR_STRING, &prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
@@ -207,11 +209,8 @@ static long read_si(stringinRecord *prec)
|
||||
}
|
||||
|
||||
/* Create the dset for devSiSoftCallback */
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_li;
|
||||
} devSiSoftCallback = {
|
||||
stringindset devSiSoftCallback = {
|
||||
{5, NULL, init, init_record, NULL},
|
||||
read_si
|
||||
};
|
||||
epicsExportAddress(dset,devSiSoftCallback);
|
||||
epicsExportAddress(dset, devSiSoftCallback);
|
||||
|
||||
@@ -27,19 +27,9 @@
|
||||
|
||||
/* Create the dset for devSoSoft */
|
||||
static long write_stringout(stringoutRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_stringout;
|
||||
} devSoSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
stringoutdset devSoSoft = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_stringout
|
||||
};
|
||||
epicsExportAddress(dset, devSoSoft);
|
||||
|
||||
@@ -27,19 +27,9 @@
|
||||
|
||||
/* Create the dset for devSoSoftCallback */
|
||||
static long write_stringout(stringoutRecord *prec);
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_stringout;
|
||||
} devSoSoftCallback = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
stringoutdset devSoSoftCallback = {
|
||||
{5, NULL, NULL, NULL, NULL},
|
||||
write_stringout
|
||||
};
|
||||
epicsExportAddress(dset, devSoSoftCallback);
|
||||
@@ -60,4 +50,3 @@ static long write_stringout(stringoutRecord *prec)
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
@@ -202,10 +202,8 @@ static long write_stringout(stringoutRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct {
|
||||
dset common;
|
||||
DEVSUPFUN write;
|
||||
} devSoStdio = {
|
||||
{5, NULL, init_stringout, NULL, NULL}, write_stringout
|
||||
stringoutdset devSoStdio = {
|
||||
{5, NULL, init_stringout, NULL, NULL},
|
||||
write_stringout
|
||||
};
|
||||
epicsExportAddress(dset, devSoStdio);
|
||||
|
||||
@@ -65,10 +65,7 @@ static long read_stringin (stringinRecord *prec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct {
|
||||
dset common;
|
||||
DEVSUPFUN read_stringin;
|
||||
} devTimestampSI = {
|
||||
stringindset devTimestampSI = {
|
||||
{5, NULL, initAllow, NULL, NULL},
|
||||
read_stringin
|
||||
};
|
||||
|
||||
@@ -26,28 +26,18 @@
|
||||
#include "epicsExport.h"
|
||||
|
||||
/* Create the dset for devWfSoft */
|
||||
static long init_record(waveformRecord *prec);
|
||||
static long init_record(dbCommon *pcommon);
|
||||
static long read_wf(waveformRecord *prec);
|
||||
|
||||
struct {
|
||||
long number;
|
||||
DEVSUPFUN report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_wf;
|
||||
} devWfSoft = {
|
||||
5,
|
||||
NULL,
|
||||
NULL,
|
||||
init_record,
|
||||
NULL,
|
||||
wfdset devWfSoft = {
|
||||
{5, NULL, NULL, init_record, NULL},
|
||||
read_wf
|
||||
};
|
||||
epicsExportAddress(dset, devWfSoft);
|
||||
|
||||
static long init_record(waveformRecord *prec)
|
||||
static long init_record(dbCommon *pcommon)
|
||||
{
|
||||
waveformRecord *prec = (waveformRecord *)pcommon;
|
||||
long nelm = prec->nelm;
|
||||
long status = dbLoadLinkArray(&prec->inp, prec->ftvl, prec->bptr, &nelm);
|
||||
|
||||
|
||||
@@ -18,9 +18,12 @@ aoRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += aiRecord
|
||||
stdRecords += aoRecord
|
||||
stdRecords += aSubRecord
|
||||
biRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += biRecord
|
||||
boRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += boRecord
|
||||
stdRecords += calcRecord
|
||||
calcoutRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += calcoutRecord
|
||||
stdRecords += compressRecord
|
||||
stdRecords += dfanoutRecord
|
||||
@@ -31,15 +34,21 @@ int64inRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += int64inRecord
|
||||
int64outRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += int64outRecord
|
||||
longinRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += longinRecord
|
||||
longoutRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += longoutRecord
|
||||
lsiRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += lsiRecord
|
||||
lsoRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += lsoRecord
|
||||
mbbiRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += mbbiRecord
|
||||
mbbiDirectRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += mbbiDirectRecord
|
||||
mbboRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += mbboRecord
|
||||
mbboDirectRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += mbboDirectRecord
|
||||
stdRecords += permissiveRecord
|
||||
printfRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
@@ -48,9 +57,12 @@ stdRecords += selRecord
|
||||
stdRecords += seqRecord
|
||||
stdRecords += stateRecord
|
||||
stdRecords += stringinRecord
|
||||
stringoutRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += stringoutRecord
|
||||
stdRecords += subRecord
|
||||
subArrayRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += subArrayRecord
|
||||
waveformRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += waveformRecord
|
||||
|
||||
DBDINC += $(stdRecords)
|
||||
|
||||
@@ -81,7 +81,9 @@ rset aoRSET={
|
||||
put_enum_str,
|
||||
get_graphic_double,
|
||||
get_control_double,
|
||||
get_alarm_double };
|
||||
get_alarm_double
|
||||
};
|
||||
epicsExportAddress(rset,aoRSET);
|
||||
|
||||
static void checkAlarms(aoRecord *);
|
||||
static long fetch_value(aoRecord *, double *);
|
||||
@@ -92,7 +94,7 @@ static long writeValue(aoRecord *);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct aoRecord *prec = (struct aoRecord *)pcommon;
|
||||
struct aodset *pdset;
|
||||
aodset *pdset;
|
||||
double eoff = prec->eoff, eslo = prec->eslo;
|
||||
double value;
|
||||
long status = 0;
|
||||
@@ -101,7 +103,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
|
||||
recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
|
||||
|
||||
if(!(pdset = (struct aodset *)(prec->dset))) {
|
||||
if(!(pdset = (aodset *)(prec->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)prec,"ao: init_record");
|
||||
return(S_dev_noDSET);
|
||||
}
|
||||
@@ -110,7 +112,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
prec->udf = isnan(prec->val);
|
||||
|
||||
/* must have write_ao function defined */
|
||||
if ((pdset->number < 6) || (pdset->write_ao ==NULL)) {
|
||||
if ((pdset->common.number < 6) || (pdset->write_ao ==NULL)) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)prec,"ao: init_record");
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
@@ -120,8 +122,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
prec->eoff = prec->egul;
|
||||
}
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = (*pdset->init_record)(prec);
|
||||
if (pdset->common.init_record) {
|
||||
status = pdset->common.init_record(pcommon);
|
||||
if (prec->linr == menuConvertSLOPE) {
|
||||
prec->eoff = eoff;
|
||||
prec->eslo = eslo;
|
||||
@@ -162,7 +164,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct aoRecord *prec = (struct aoRecord *)pcommon;
|
||||
struct aodset *pdset = (struct aodset *)(prec->dset);
|
||||
aodset *pdset = (aodset *)(prec->dset);
|
||||
long status=0;
|
||||
unsigned char pact=prec->pact;
|
||||
double value;
|
||||
@@ -233,12 +235,12 @@ static long process(struct dbCommon *pcommon)
|
||||
static long special(DBADDR *paddr, int after)
|
||||
{
|
||||
aoRecord *prec = (aoRecord *)(paddr->precord);
|
||||
struct aodset *pdset = (struct aodset *) (prec->dset);
|
||||
aodset *pdset = (aodset *) (prec->dset);
|
||||
int special_type = paddr->special;
|
||||
|
||||
switch(special_type) {
|
||||
case(SPC_LINCONV):
|
||||
if(pdset->number<6 ) {
|
||||
if(pdset->common.number<6 ) {
|
||||
recGblDbaddrError(S_db_noMod,paddr,"ao: special");
|
||||
return(S_db_noMod);
|
||||
}
|
||||
@@ -543,7 +545,7 @@ static void monitor(aoRecord *prec)
|
||||
|
||||
static long writeValue(aoRecord *prec)
|
||||
{
|
||||
struct aodset *pdset = (struct aodset *) prec->dset;
|
||||
aodset *pdset = (aodset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -273,8 +273,9 @@ information on these fields.
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct aoRecord;
|
||||
%typedef struct aodset {
|
||||
% dset common;
|
||||
% long (*write_ao)(struct aoRecord *prec);
|
||||
% dset common; /*init_record returns: (0,2)=>(success,success no convert)*/
|
||||
% long (*write_ao)(struct aoRecord *prec); /*(0)=>(success ) */
|
||||
% long (*special_linconv)(struct aoRecord *prec, int after);
|
||||
%} aodset;
|
||||
%#define HAS_aodset
|
||||
%
|
||||
|
||||
@@ -75,17 +75,10 @@ rset biRSET={
|
||||
put_enum_str,
|
||||
get_graphic_double,
|
||||
get_control_double,
|
||||
get_alarm_double };
|
||||
struct bidset { /* binary input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_bi;/*(0,2)=> success and convert, don't convert)*/
|
||||
/* if convert then raw value stored in rval */
|
||||
get_alarm_double
|
||||
};
|
||||
epicsExportAddress(rset,biRSET);
|
||||
|
||||
static void checkAlarms(biRecord *);
|
||||
static void monitor(biRecord *);
|
||||
static long readValue(biRecord *);
|
||||
@@ -93,7 +86,7 @@ static long readValue(biRecord *);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct biRecord *prec = (struct biRecord *)pcommon;
|
||||
struct bidset *pdset;
|
||||
bidset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
@@ -101,17 +94,17 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
|
||||
recGblInitConstantLink(&prec->siol, DBF_USHORT, &prec->sval);
|
||||
|
||||
if(!(pdset = (struct bidset *)(prec->dset))) {
|
||||
if(!(pdset = (bidset *)(prec->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)prec,"bi: init_record");
|
||||
return(S_dev_noDSET);
|
||||
}
|
||||
/* must have read_bi function defined */
|
||||
if( (pdset->number < 5) || (pdset->read_bi == NULL) ) {
|
||||
if( (pdset->common.number < 5) || (pdset->read_bi == NULL) ) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)prec,"bi: init_record");
|
||||
return(S_dev_missingSup);
|
||||
}
|
||||
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->lalm = prec->val;
|
||||
@@ -122,7 +115,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct biRecord *prec = (struct biRecord *)pcommon;
|
||||
struct bidset *pdset = (struct bidset *)(prec->dset);
|
||||
bidset *pdset = (bidset *)(prec->dset);
|
||||
long status;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
@@ -275,7 +268,7 @@ static void monitor(biRecord *prec)
|
||||
|
||||
static long readValue(biRecord *prec)
|
||||
{
|
||||
struct bidset *pdset = (struct bidset *)prec->dset;
|
||||
bidset *pdset = (bidset *)prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -163,6 +163,15 @@ these fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct biRecord;
|
||||
%typedef struct bidset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*read_bi)(struct biRecord *prec);/*(0,2)=> success and convert, don't convert); if convert then raw value stored in rval */
|
||||
%} bidset;
|
||||
%#define HAS_bidset
|
||||
%
|
||||
field(INP,DBF_INLINK) {
|
||||
prompt("Input Specification")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -86,16 +86,6 @@ epicsExportAddress(int, boHIGHprecision);
|
||||
double boHIGHlimit = 100000;
|
||||
epicsExportAddress(double, boHIGHlimit);
|
||||
|
||||
struct bodset { /* binary output dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns:(0,2)=>(success,success no convert*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_bo;/*returns: (-1,0)=>(failure,success)*/
|
||||
};
|
||||
|
||||
|
||||
/* control block for callback*/
|
||||
typedef struct myCallback {
|
||||
epicsCallback callback;
|
||||
@@ -131,7 +121,7 @@ static void myCallbackFunc(epicsCallback *arg)
|
||||
static long init_record(struct dbCommon *pcommon,int pass)
|
||||
{
|
||||
struct boRecord *prec = (struct boRecord *)pcommon;
|
||||
struct bodset *pdset = (struct bodset *) prec->dset;
|
||||
bodset *pdset = (bodset *) prec->dset;
|
||||
unsigned short ival = 0;
|
||||
long status = 0;
|
||||
myCallback *pcallback;
|
||||
@@ -146,7 +136,7 @@ static long init_record(struct dbCommon *pcommon,int pass)
|
||||
}
|
||||
|
||||
/* must have write_bo functions defined */
|
||||
if ((pdset->number < 5) || (pdset->write_bo == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_bo == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "bo: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -163,8 +153,8 @@ static long init_record(struct dbCommon *pcommon,int pass)
|
||||
callbackSetUser(pcallback, &pcallback->callback);
|
||||
pcallback->precord = (struct dbCommon *) prec;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status=(*pdset->init_record)(prec);
|
||||
if (pdset->common.init_record) {
|
||||
status=(*pdset->common.init_record)(pcommon);
|
||||
if(status==0) {
|
||||
if(prec->rval==0) prec->val = 0;
|
||||
else prec->val = 1;
|
||||
@@ -188,7 +178,7 @@ static long init_record(struct dbCommon *pcommon,int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct boRecord *prec = (struct boRecord *)pcommon;
|
||||
struct bodset *pdset = (struct bodset *)(prec->dset);
|
||||
bodset *pdset = (bodset *)(prec->dset);
|
||||
long status=0;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
@@ -420,7 +410,7 @@ static void monitor(boRecord *prec)
|
||||
|
||||
static long writeValue(boRecord *prec)
|
||||
{
|
||||
struct bodset *pdset = (struct bodset *) prec->dset;
|
||||
bodset *pdset = (bodset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -210,6 +210,15 @@ information on these fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct boRecord;
|
||||
%typedef struct bodset {
|
||||
% dset common; /*init_record returns:(0,2)=>(success,success no convert*/
|
||||
% long (*write_bo)(struct boRecord *prec); /*returns: (-1,0)=>(failure,success)*/
|
||||
%} bodset;
|
||||
%#define HAS_bodset
|
||||
%
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Current Value")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
@@ -90,16 +90,6 @@ epicsExportAddress(int, calcoutODLYprecision);
|
||||
double calcoutODLYlimit = 100000;
|
||||
epicsExportAddress(double, calcoutODLYlimit);
|
||||
|
||||
typedef struct calcoutDSET {
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record;
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write;
|
||||
}calcoutDSET;
|
||||
|
||||
|
||||
/* To provide feedback to the user as to the connection status of the
|
||||
* links (.INxV and .OUTV), the following algorithm has been implemented ...
|
||||
*
|
||||
@@ -142,7 +132,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
double *pvalue;
|
||||
epicsEnum16 *plinkValid;
|
||||
short error_number;
|
||||
calcoutDSET *pcalcoutDSET;
|
||||
calcoutdset *pcalcoutDSET;
|
||||
rpvtStruct *prpvt;
|
||||
|
||||
if (pass == 0) {
|
||||
@@ -150,13 +140,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!(pcalcoutDSET = (calcoutDSET *)prec->dset)) {
|
||||
if (!(pcalcoutDSET = (calcoutdset *)prec->dset)) {
|
||||
recGblRecordError(S_dev_noDSET, (void *)prec, "calcout:init_record");
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
/* must have write defined */
|
||||
if ((pcalcoutDSET->number < 5) || (pcalcoutDSET->write ==NULL)) {
|
||||
if ((pcalcoutDSET->common.number < 5) || (pcalcoutDSET->write ==NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, (void *)prec, "calcout:init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -221,7 +211,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
|
||||
prec->epvt = eventNameToHandle(prec->oevt);
|
||||
|
||||
if (pcalcoutDSET->init_record) pcalcoutDSET->init_record(prec);
|
||||
if (pcalcoutDSET->common.init_record) pcalcoutDSET->common.init_record(pcommon);
|
||||
prec->pval = prec->val;
|
||||
prec->mlst = prec->val;
|
||||
prec->alst = prec->val;
|
||||
@@ -768,7 +758,7 @@ static void checkLinks(calcoutRecord *prec)
|
||||
|
||||
static long writeValue(calcoutRecord *prec)
|
||||
{
|
||||
calcoutDSET *pcalcoutDSET = (calcoutDSET *)prec->dset;
|
||||
calcoutdset *pcalcoutDSET = (calcoutdset *)prec->dset;
|
||||
|
||||
|
||||
if (!pcalcoutDSET || !pcalcoutDSET->write) {
|
||||
|
||||
@@ -659,6 +659,14 @@ manner for the VAL field.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct calcoutRecord;
|
||||
%typedef struct calcoutdset {
|
||||
% dset common;
|
||||
% long (*write)(struct calcoutRecord *prec);
|
||||
%} calcoutdset;
|
||||
%#define HAS_calcoutdset
|
||||
%
|
||||
field(RPVT,DBF_NOACCESS) {
|
||||
prompt("Record Private")
|
||||
special(SPC_NOMOD)
|
||||
|
||||
@@ -83,15 +83,6 @@ rset longinRSET={
|
||||
};
|
||||
epicsExportAddress(rset,longinRSET);
|
||||
|
||||
|
||||
struct longindset { /* longin input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_longin; /*returns: (-1,0)=>(failure,success)*/
|
||||
};
|
||||
static void checkAlarms(longinRecord *prec, epicsTimeStamp *timeLast);
|
||||
static void monitor(longinRecord *prec);
|
||||
static long readValue(longinRecord *prec);
|
||||
@@ -100,7 +91,7 @@ static long readValue(longinRecord *prec);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct longinRecord *prec = (struct longinRecord *)pcommon;
|
||||
struct longindset *pdset = (struct longindset *) prec->dset;
|
||||
longindset *pdset = (longindset *) prec->dset;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
|
||||
@@ -113,13 +104,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
|
||||
/* must have read_longin function defined */
|
||||
if ((pdset->number < 5) || (pdset->read_longin == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->read_longin == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "longin: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
|
||||
if (pdset->init_record) {
|
||||
long status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
long status = pdset->common.init_record(pcommon);
|
||||
|
||||
if (status)
|
||||
return status;
|
||||
@@ -134,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct longinRecord *prec = (struct longinRecord *)pcommon;
|
||||
struct longindset *pdset = (struct longindset *)(prec->dset);
|
||||
longindset *pdset = (longindset *)(prec->dset);
|
||||
long status;
|
||||
unsigned char pact=prec->pact;
|
||||
epicsTimeStamp timeLast;
|
||||
@@ -405,7 +396,7 @@ static void monitor(longinRecord *prec)
|
||||
|
||||
static long readValue(longinRecord *prec)
|
||||
{
|
||||
struct longindset *pdset = (struct longindset *) prec->dset;
|
||||
longindset *pdset = (longindset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -305,6 +305,15 @@ sets UDF to FALSE. read_longin returns the status of C<recGblGetLinkValue>.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct longinRecord;
|
||||
%typedef struct longindset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*read_longin)(struct longinRecord *prec); /*returns: (-1,0)=>(failure,success)*/
|
||||
%} longindset;
|
||||
%#define HAS_longindset
|
||||
%
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Current value")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -80,15 +80,6 @@ rset longoutRSET={
|
||||
};
|
||||
epicsExportAddress(rset,longoutRSET);
|
||||
|
||||
|
||||
struct longoutdset { /* longout input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_longout;/*(-1,0)=>(failure,success*/
|
||||
};
|
||||
static void checkAlarms(longoutRecord *prec);
|
||||
static void monitor(longoutRecord *prec);
|
||||
static long writeValue(longoutRecord *prec);
|
||||
@@ -97,7 +88,7 @@ static void convert(longoutRecord *prec, epicsInt32 value);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct longoutRecord *prec = (struct longoutRecord *)pcommon;
|
||||
struct longoutdset *pdset = (struct longoutdset *) prec->dset;
|
||||
longoutdset *pdset = (longoutdset *) prec->dset;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
|
||||
@@ -109,7 +100,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
|
||||
/* must have write_longout functions defined */
|
||||
if ((pdset->number < 5) || (pdset->write_longout == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_longout == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "longout: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -117,8 +108,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (recGblInitConstantLink(&prec->dol, DBF_LONG, &prec->val))
|
||||
prec->udf=FALSE;
|
||||
|
||||
if (pdset->init_record) {
|
||||
long status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
long status = pdset->common.init_record(pcommon);
|
||||
|
||||
if (status)
|
||||
return status;
|
||||
@@ -133,7 +124,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct longoutRecord *prec = (struct longoutRecord *)pcommon;
|
||||
struct longoutdset *pdset = (struct longoutdset *)(prec->dset);
|
||||
longoutdset *pdset = (longoutdset *)(prec->dset);
|
||||
long status=0;
|
||||
epicsInt32 value;
|
||||
unsigned char pact=prec->pact;
|
||||
@@ -382,7 +373,7 @@ static void monitor(longoutRecord *prec)
|
||||
|
||||
static long writeValue(longoutRecord *prec)
|
||||
{
|
||||
struct longoutdset *pdset = (struct longoutdset *) prec->dset;
|
||||
longoutdset *pdset = (longoutdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -96,6 +96,15 @@ and database links.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct longoutRecord;
|
||||
%typedef struct longoutdset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*write_longout)(struct longoutRecord *prec); /*(-1,0)=>(failure,success*/
|
||||
%} longoutdset;
|
||||
%#define HAS_longoutdset
|
||||
%
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Desired Output")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
@@ -81,15 +81,6 @@ rset mbbiDirectRSET={
|
||||
};
|
||||
epicsExportAddress(rset,mbbiDirectRSET);
|
||||
|
||||
struct mbbidset { /* multi bit binary input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure, success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi; /*returns: (0,2)=>(success, success no convert)*/
|
||||
};
|
||||
|
||||
static void monitor(mbbiDirectRecord *);
|
||||
static long readValue(mbbiDirectRecord *);
|
||||
|
||||
@@ -98,7 +89,7 @@ static long readValue(mbbiDirectRecord *);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
@@ -108,7 +99,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
if ((pdset->number < 5) || (pdset->read_mbbi == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->read_mbbi == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "mbbiDirect: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -120,8 +111,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
status = pdset->common.init_record(pcommon);
|
||||
if (status == 0) {
|
||||
epicsUInt32 val = prec->val;
|
||||
epicsUInt8 *pBn = &prec->b0;
|
||||
@@ -141,7 +132,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct mbbiDirectRecord *prec = (struct mbbiDirectRecord *)pcommon;
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
|
||||
long status;
|
||||
int pact = prec->pact;
|
||||
|
||||
@@ -248,7 +239,7 @@ static void monitor(mbbiDirectRecord *prec)
|
||||
|
||||
static long readValue(mbbiDirectRecord *prec)
|
||||
{
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidirectdset *pdset = (mbbidirectdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -85,6 +85,14 @@ description (DESC) fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct mbbiDirectRecord;
|
||||
%typedef struct mbbidirectdset {
|
||||
% dset common; /* init_record returns: (-1,0) => (failure, success)*/
|
||||
% long (*read_mbbi)(struct mbbiDirectRecord *prec); /* (0, 2) => (success, success no convert)*/
|
||||
%} mbbidirectdset;
|
||||
%#define HAS_mbbidirectdset
|
||||
%
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -83,15 +83,6 @@ rset mbbiRSET = {
|
||||
};
|
||||
epicsExportAddress(rset,mbbiRSET);
|
||||
|
||||
struct mbbidset { /* multi bit binary input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /* returns: (-1,0) => (failure, success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_mbbi;/* (0, 2) => (success, success no convert)*/
|
||||
};
|
||||
|
||||
static void checkAlarms(mbbiRecord *, epicsTimeStamp *);
|
||||
static void monitor(mbbiRecord *);
|
||||
static long readValue(mbbiRecord *);
|
||||
@@ -115,18 +106,17 @@ static void init_common(mbbiRecord *prec)
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidset *pdset = (mbbidset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
|
||||
pdset = (struct mbbidset *) prec->dset;
|
||||
if (!pdset) {
|
||||
recGblRecordError(S_dev_noDSET, prec, "mbbi: init_record");
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
if ((pdset->number < 5) || (pdset->read_mbbi == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->read_mbbi == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "mbbi: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -138,8 +128,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record)
|
||||
status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record)
|
||||
status = pdset->common.init_record(pcommon);
|
||||
|
||||
init_common(prec);
|
||||
|
||||
@@ -152,7 +142,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct mbbiRecord *prec = (struct mbbiRecord *)pcommon;
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidset *pdset = (mbbidset *) prec->dset;
|
||||
long status;
|
||||
int pact = prec->pact;
|
||||
epicsTimeStamp timeLast;
|
||||
@@ -380,7 +370,7 @@ static void monitor(mbbiRecord *prec)
|
||||
|
||||
static long readValue(mbbiRecord *prec)
|
||||
{
|
||||
struct mbbidset *pdset = (struct mbbidset *) prec->dset;
|
||||
mbbidset *pdset = (mbbidset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -119,6 +119,14 @@ description (DESC) fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct mbbiRecord;
|
||||
%typedef struct mbbidset {
|
||||
% dset common; /* init_record returns: (-1,0) => (failure, success)*/
|
||||
% long (*read_mbbi)(struct mbbiRecord *prec); /* (0, 2) => (success, success no convert)*/
|
||||
%} mbbidset;
|
||||
%#define HAS_mbbidset
|
||||
%
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -81,16 +81,6 @@ rset mbboDirectRSET = {
|
||||
};
|
||||
epicsExportAddress(rset, mbboDirectRSET);
|
||||
|
||||
struct mbbodset { /* multi bit binary output dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (0, 2)=>(success, success no convert)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo; /*returns: (0, 2)=>(success, success no convert)*/
|
||||
};
|
||||
|
||||
|
||||
static void convert(mbboDirectRecord *);
|
||||
static void monitor(mbboDirectRecord *);
|
||||
static long writeValue(mbboDirectRecord *);
|
||||
@@ -100,7 +90,7 @@ static long writeValue(mbboDirectRecord *);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
|
||||
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
|
||||
mbbodirectdset *pdset = (mbbodirectdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
@@ -110,7 +100,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
if ((pdset->number < 5) || (pdset->write_mbbo == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_mbbo == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "mbboDirect: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -124,8 +114,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
status = pdset->common.init_record(pcommon);
|
||||
if (status == 0) {
|
||||
/* Convert initial read-back */
|
||||
epicsUInt32 rval = prec->rval;
|
||||
@@ -162,7 +152,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct mbboDirectRecord *prec = (struct mbboDirectRecord *)pcommon;
|
||||
struct mbbodset *pdset = (struct mbbodset *)(prec->dset);
|
||||
mbbodirectdset *pdset = (mbbodirectdset *)(prec->dset);
|
||||
long status = 0;
|
||||
int pact = prec->pact;
|
||||
|
||||
@@ -356,7 +346,7 @@ static void convert(mbboDirectRecord *prec)
|
||||
|
||||
static long writeValue(mbboDirectRecord *prec)
|
||||
{
|
||||
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
|
||||
mbbodirectdset *pdset = (mbbodirectdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -90,6 +90,14 @@ description (DESC) fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct mbboDirectRecord;
|
||||
%typedef struct mbbodirectdset {
|
||||
% dset common; /*init_record returns: (0, 2)=>(success, success no convert)*/
|
||||
% long (*write_mbbo)(struct mbboDirectRecord *prec); /*returns: (0, 2)=>(success, success no convert)*/
|
||||
%} mbbodirectdset;
|
||||
%#define HAS_mbbodirectdset
|
||||
%
|
||||
field(VAL,DBF_LONG) {
|
||||
prompt("Word")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
@@ -82,15 +82,6 @@ rset mbboRSET = {
|
||||
};
|
||||
epicsExportAddress(rset,mbboRSET);
|
||||
|
||||
struct mbbodset { /* multi bit binary output dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (0, 2) => (success, success no convert)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_mbbo; /*returns: (0, 2) => (success, success no convert)*/
|
||||
};
|
||||
|
||||
|
||||
static void checkAlarms(mbboRecord *);
|
||||
static void convert(mbboRecord *);
|
||||
@@ -117,7 +108,7 @@ static void init_common(mbboRecord *prec)
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct mbboRecord *prec = (struct mbboRecord *)pcommon;
|
||||
struct mbbodset *pdset;
|
||||
mbbodset *pdset;
|
||||
long status;
|
||||
|
||||
if (pass == 0) {
|
||||
@@ -125,13 +116,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
return 0;
|
||||
}
|
||||
|
||||
pdset = (struct mbbodset *) prec->dset;
|
||||
pdset = (mbbodset *) prec->dset;
|
||||
if (!pdset) {
|
||||
recGblRecordError(S_dev_noDSET, prec, "mbbo: init_record");
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
if ((pdset->number < 5) || (pdset->write_mbbo == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_mbbo == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "mbbo: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -145,8 +136,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (prec->mask == 0 && prec->nobt <= 32)
|
||||
prec->mask = ((epicsUInt64) 1u << prec->nobt) - 1;
|
||||
|
||||
if (pdset->init_record) {
|
||||
status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
status = pdset->common.init_record(pcommon);
|
||||
init_common(prec);
|
||||
if (status == 0) {
|
||||
/* Convert initial read-back */
|
||||
@@ -194,7 +185,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct mbboRecord *prec = (struct mbboRecord *)pcommon;
|
||||
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
|
||||
mbbodset *pdset = (mbbodset *) prec->dset;
|
||||
long status = 0;
|
||||
int pact = prec->pact;
|
||||
|
||||
@@ -439,7 +430,7 @@ static void convert(mbboRecord *prec)
|
||||
|
||||
static long writeValue(mbboRecord *prec)
|
||||
{
|
||||
struct mbbodset *pdset = (struct mbbodset *) prec->dset;
|
||||
mbbodset *pdset = (mbbodset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -173,6 +173,14 @@ mode fields.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct mbboRecord;
|
||||
%typedef struct mbbodset {
|
||||
% dset common; /*init_record returns: (0, 2) => (success, success no convert)*/
|
||||
% long (*write_mbbo)(struct mbboRecord *prec); /*returns: (0, 2) => (success, success no convert)*/
|
||||
%} mbbodset;
|
||||
%#define HAS_mbbodset
|
||||
%
|
||||
field(VAL,DBF_ENUM) {
|
||||
prompt("Desired Value")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
@@ -80,14 +80,6 @@ rset stringinRSET={
|
||||
};
|
||||
epicsExportAddress(rset,stringinRSET);
|
||||
|
||||
struct stringindset { /* stringin input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_stringin; /*returns: (-1,0)=>(failure,success)*/
|
||||
};
|
||||
static void monitor(stringinRecord *);
|
||||
static long readValue(stringinRecord *);
|
||||
|
||||
@@ -97,7 +89,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
struct stringinRecord *prec = (struct stringinRecord *)pcommon;
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
STATIC_ASSERT(sizeof(prec->sval)==sizeof(prec->val));
|
||||
struct stringindset *pdset = (struct stringindset *) prec->dset;
|
||||
stringindset *pdset = (stringindset *) prec->dset;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
|
||||
@@ -110,13 +102,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
|
||||
/* must have read_stringin function defined */
|
||||
if ((pdset->number < 5) || (pdset->read_stringin == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->read_stringin == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "stringin: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
|
||||
if (pdset->init_record) {
|
||||
long status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
long status = pdset->common.init_record(pcommon);
|
||||
|
||||
if (status)
|
||||
return status;
|
||||
@@ -130,7 +122,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct stringinRecord *prec = (struct stringinRecord *)pcommon;
|
||||
struct stringindset *pdset = (struct stringindset *)(prec->dset);
|
||||
stringindset *pdset = (stringindset *)(prec->dset);
|
||||
long status;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
@@ -196,7 +188,7 @@ static void monitor(stringinRecord *prec)
|
||||
|
||||
static long readValue(stringinRecord *prec)
|
||||
{
|
||||
struct stringindset *pdset = (struct stringindset *) prec->dset;
|
||||
stringindset *pdset = (stringindset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -24,6 +24,15 @@ menu(stringinPOST) {
|
||||
}
|
||||
recordtype(stringin) {
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct stringinRecord;
|
||||
%typedef struct stringindset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*read_stringin)(struct stringinRecord *prec); /*returns: (-1,0)=>(failure,success)*/
|
||||
%} stringindset;
|
||||
%#define HAS_stringindset
|
||||
%
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("40 - Input")
|
||||
|
||||
@@ -82,14 +82,6 @@ rset stringoutRSET={
|
||||
};
|
||||
epicsExportAddress(rset,stringoutRSET);
|
||||
|
||||
struct stringoutdset { /* stringout input dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN write_stringout;/*(-1,0)=>(failure,success)*/
|
||||
};
|
||||
static void monitor(stringoutRecord *);
|
||||
static long writeValue(stringoutRecord *);
|
||||
|
||||
@@ -99,7 +91,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
|
||||
STATIC_ASSERT(sizeof(prec->oval)==sizeof(prec->val));
|
||||
STATIC_ASSERT(sizeof(prec->ivov)==sizeof(prec->val));
|
||||
struct stringoutdset *pdset = (struct stringoutdset *) prec->dset;
|
||||
stringoutdset *pdset = (stringoutdset *) prec->dset;
|
||||
|
||||
if (pass == 0) return 0;
|
||||
|
||||
@@ -111,7 +103,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
|
||||
/* must have write_stringout functions defined */
|
||||
if ((pdset->number < 5) || (pdset->write_stringout == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->write_stringout == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "stringout: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
@@ -120,8 +112,8 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (recGblInitConstantLink(&prec->dol, DBF_STRING, prec->val))
|
||||
prec->udf = FALSE;
|
||||
|
||||
if (pdset->init_record) {
|
||||
long status = pdset->init_record(prec);
|
||||
if (pdset->common.init_record) {
|
||||
long status = pdset->common.init_record(pcommon);
|
||||
|
||||
if(status)
|
||||
return status;
|
||||
@@ -133,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct stringoutRecord *prec = (struct stringoutRecord *)pcommon;
|
||||
struct stringoutdset *pdset = (struct stringoutdset *)(prec->dset);
|
||||
stringoutdset *pdset = (stringoutdset *)(prec->dset);
|
||||
long status=0;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
@@ -228,7 +220,7 @@ static void monitor(stringoutRecord *prec)
|
||||
|
||||
static long writeValue(stringoutRecord *prec)
|
||||
{
|
||||
struct stringoutdset *pdset = (struct stringoutdset *) prec->dset;
|
||||
stringoutdset *pdset = (stringoutdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -24,6 +24,15 @@ menu(stringoutPOST) {
|
||||
}
|
||||
recordtype(stringout) {
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct stringoutRecord;
|
||||
%typedef struct stringoutdset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*write_stringout)(struct stringoutRecord *prec); /*(-1,0)=>(failure,success)*/
|
||||
%} stringoutdset;
|
||||
%#define HAS_stringoutdset
|
||||
%
|
||||
field(VAL,DBF_STRING) {
|
||||
prompt("Current Value")
|
||||
promptgroup("50 - Output")
|
||||
|
||||
@@ -82,15 +82,6 @@ rset subArrayRSET={
|
||||
};
|
||||
epicsExportAddress(rset,subArrayRSET);
|
||||
|
||||
struct sadset { /* subArray dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_sa; /*returns: (-1,0)=>(failure,success)*/
|
||||
};
|
||||
|
||||
static void monitor(subArrayRecord *prec);
|
||||
static long readValue(subArrayRecord *prec);
|
||||
|
||||
@@ -98,7 +89,7 @@ static long readValue(subArrayRecord *prec);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
|
||||
struct sadset *pdset;
|
||||
sadset *pdset;
|
||||
|
||||
if (pass==0){
|
||||
if (prec->malm <= 0)
|
||||
@@ -114,19 +105,19 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
}
|
||||
|
||||
/* must have dset defined */
|
||||
if (!(pdset = (struct sadset *)(prec->dset))) {
|
||||
if (!(pdset = (sadset *)(prec->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)prec,"sa: init_record");
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
|
||||
/* must have read_sa function defined */
|
||||
if ( (pdset->number < 5) || (pdset->read_sa == NULL) ) {
|
||||
if ( (pdset->common.number < 5) || (pdset->read_sa == NULL) ) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)prec,"sa: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
|
||||
if (pdset->init_record)
|
||||
return pdset->init_record(prec);
|
||||
if (pdset->common.init_record)
|
||||
return pdset->common.init_record(pcommon);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -134,7 +125,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct subArrayRecord *prec = (struct subArrayRecord *)pcommon;
|
||||
struct sadset *pdset = (struct sadset *)(prec->dset);
|
||||
sadset *pdset = (sadset *)(prec->dset);
|
||||
long status;
|
||||
unsigned char pact=prec->pact;
|
||||
|
||||
@@ -309,7 +300,7 @@ static void monitor(subArrayRecord *prec)
|
||||
static long readValue(subArrayRecord *prec)
|
||||
{
|
||||
long status;
|
||||
struct sadset *pdset = (struct sadset *) (prec->dset);
|
||||
sadset *pdset = (sadset *) (prec->dset);
|
||||
|
||||
if (prec->nelm > prec->malm)
|
||||
prec->nelm = prec->malm;
|
||||
|
||||
@@ -315,6 +315,15 @@ INP is expected to point to a waveform record.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct subArrayRecord;
|
||||
%typedef struct sadset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*read_sa)(struct subArrayRecord *prec); /*returns: (-1,0)=>(failure,success)*/
|
||||
%} sadset;
|
||||
%#define HAS_sadset
|
||||
%
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
prompt("Value")
|
||||
asl(ASL0)
|
||||
|
||||
@@ -80,14 +80,6 @@ rset waveformRSET={
|
||||
get_alarm_double
|
||||
};
|
||||
epicsExportAddress(rset,waveformRSET);
|
||||
struct wfdset { /* waveform dset */
|
||||
long number;
|
||||
DEVSUPFUN dev_report;
|
||||
DEVSUPFUN init;
|
||||
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
|
||||
DEVSUPFUN get_ioint_info;
|
||||
DEVSUPFUN read_wf; /*returns: (-1,0)=>(failure,success)*/
|
||||
};
|
||||
|
||||
static void monitor(waveformRecord *);
|
||||
static long readValue(waveformRecord *);
|
||||
@@ -95,7 +87,7 @@ static long readValue(waveformRecord *);
|
||||
static long init_record(struct dbCommon *pcommon, int pass)
|
||||
{
|
||||
struct waveformRecord *prec = (struct waveformRecord *)pcommon;
|
||||
struct wfdset *pdset;
|
||||
wfdset *pdset;
|
||||
|
||||
if (pass == 0) {
|
||||
if (prec->nelm <= 0)
|
||||
@@ -111,25 +103,25 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
recGblInitSimm(pcommon, &prec->sscn, &prec->oldsimm, &prec->simm, &prec->siml);
|
||||
|
||||
/* must have dset defined */
|
||||
if (!(pdset = (struct wfdset *)(prec->dset))) {
|
||||
if (!(pdset = (wfdset *)(prec->dset))) {
|
||||
recGblRecordError(S_dev_noDSET,(void *)prec,"wf: init_record");
|
||||
return S_dev_noDSET;
|
||||
}
|
||||
/* must have read_wf function defined */
|
||||
if ((pdset->number < 5) || (pdset->read_wf == NULL)) {
|
||||
if ((pdset->common.number < 5) || (pdset->read_wf == NULL)) {
|
||||
recGblRecordError(S_dev_missingSup,(void *)prec,"wf: init_record");
|
||||
return S_dev_missingSup;
|
||||
}
|
||||
if (!pdset->init_record)
|
||||
if (!pdset->common.init_record)
|
||||
return 0;
|
||||
|
||||
return pdset->init_record(prec);
|
||||
return pdset->common.init_record(pcommon);
|
||||
}
|
||||
|
||||
static long process(struct dbCommon *pcommon)
|
||||
{
|
||||
struct waveformRecord *prec = (struct waveformRecord *)pcommon;
|
||||
struct wfdset *pdset = (struct wfdset *)(prec->dset);
|
||||
wfdset *pdset = (wfdset *)(prec->dset);
|
||||
unsigned char pact=prec->pact;
|
||||
long status;
|
||||
|
||||
@@ -328,7 +320,7 @@ static void monitor(waveformRecord *prec)
|
||||
|
||||
static long readValue(waveformRecord *prec)
|
||||
{
|
||||
struct wfdset *pdset = (struct wfdset *) prec->dset;
|
||||
wfdset *pdset = (wfdset *) prec->dset;
|
||||
long status = 0;
|
||||
|
||||
if (!prec->pact) {
|
||||
|
||||
@@ -397,6 +397,15 @@ NORD is set to the number of values returned and read_wf returns.
|
||||
=cut
|
||||
|
||||
include "dbCommon.dbd"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct waveformRecord;
|
||||
%typedef struct wfdset {
|
||||
% dset common; /*init_record returns: (-1,0)=>(failure,success)*/
|
||||
% long (*read_wf)(struct waveformRecord *prec); /*returns: (-1,0)=>(failure,success)*/
|
||||
%} wfdset;
|
||||
%#define HAS_wfdset
|
||||
%
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
prompt("Value")
|
||||
asl(ASL0)
|
||||
|
||||
Reference in New Issue
Block a user