Modify printfdset, set USE_TYPED_DSET
This commit is contained in:
@@ -42,6 +42,7 @@ dbRecStd_SRCS += devMbboDirectSoft.c
|
||||
dbRecStd_SRCS += devMbboDirectSoftRaw.c
|
||||
dbRecStd_SRCS += devMbboSoft.c
|
||||
dbRecStd_SRCS += devMbboSoftRaw.c
|
||||
devPrintfSoft_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devPrintfSoft.c
|
||||
dbRecStd_SRCS += devSASoft.c
|
||||
dbRecStd_SRCS += devSiSoft.c
|
||||
@@ -65,10 +66,12 @@ dbRecStd_SRCS += devLoSoftCallback.c
|
||||
dbRecStd_SRCS += devLsoSoftCallback.c
|
||||
dbRecStd_SRCS += devMbboSoftCallback.c
|
||||
dbRecStd_SRCS += devMbboDirectSoftCallback.c
|
||||
devPrintfSoftCallback_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devPrintfSoftCallback.c
|
||||
dbRecStd_SRCS += devSoSoftCallback.c
|
||||
|
||||
dbRecStd_SRCS += devTimestamp.c
|
||||
devStdio_CFLAGS += -DUSE_TYPED_DSET
|
||||
dbRecStd_SRCS += devStdio.c
|
||||
dbRecStd_SRCS += devEnviron.c
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ static long write_string(printfRecord *prec)
|
||||
}
|
||||
|
||||
printfdset devPrintfSoft = {
|
||||
5, NULL, NULL, NULL, NULL, write_string
|
||||
{ 5, NULL, NULL, NULL, NULL }, write_string
|
||||
};
|
||||
epicsExportAddress(dset, devPrintfSoft);
|
||||
|
||||
|
||||
@@ -40,6 +40,6 @@ static long write_string(printfRecord *prec)
|
||||
}
|
||||
|
||||
printfdset devPrintfSoftCallback = {
|
||||
5, NULL, NULL, NULL, NULL, write_string
|
||||
{ 5, NULL, NULL, NULL, NULL }, write_string
|
||||
};
|
||||
epicsExportAddress(dset, devPrintfSoftCallback);
|
||||
|
||||
@@ -153,7 +153,7 @@ static long write_printf(printfRecord *prec)
|
||||
}
|
||||
|
||||
printfdset devPrintfStdio = {
|
||||
5, NULL, init_printf, NULL, NULL, write_printf
|
||||
{5, NULL, init_printf, NULL, NULL }, write_printf
|
||||
};
|
||||
epicsExportAddress(dset, devPrintfStdio);
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ stdRecords += mbbiDirectRecord
|
||||
stdRecords += mbboRecord
|
||||
stdRecords += mbboDirectRecord
|
||||
stdRecords += permissiveRecord
|
||||
printfRecord_CFLAGS += -DUSE_TYPED_DSET
|
||||
stdRecords += printfRecord
|
||||
stdRecords += selRecord
|
||||
stdRecords += seqRecord
|
||||
|
||||
@@ -336,13 +336,13 @@ static long init_record(struct dbCommon *pcommon, int pass)
|
||||
if (!pdset)
|
||||
return 0; /* Device support is optional */
|
||||
|
||||
if (pdset->number < 5) {
|
||||
if (pdset->common.number < 5) {
|
||||
recGblRecordError(S_dev_missingSup, prec, "printf::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;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ static long process(struct dbCommon *pcommon)
|
||||
/* Call device support */
|
||||
pdset = (printfdset *) prec->dset;
|
||||
if (pdset &&
|
||||
pdset->number >= 5 &&
|
||||
pdset->common.number >= 5 &&
|
||||
pdset->write_string) {
|
||||
status = pdset->write_string(prec);
|
||||
|
||||
|
||||
@@ -10,13 +10,10 @@ recordtype(printf) {
|
||||
%#include "devSup.h"
|
||||
%
|
||||
%/* Declare Device Support Entry Table */
|
||||
%struct printfRecord;
|
||||
%typedef struct printfdset {
|
||||
% long number;
|
||||
% DEVSUPFUN report;
|
||||
% DEVSUPFUN init;
|
||||
% DEVSUPFUN init_record;
|
||||
% DEVSUPFUN get_ioint_info;
|
||||
% DEVSUPFUN write_string;
|
||||
% dset common;
|
||||
% long (*write_string)(struct printfRecord *prec);
|
||||
%} printfdset;
|
||||
%
|
||||
field(VAL,DBF_NOACCESS) {
|
||||
|
||||
Reference in New Issue
Block a user