Merge remote-tracking branch 'lp-anj7/typed-dsets' into 7.0

* lp-anj7/typed-dsets:
  Bump database version to 3.18.0, use in SHRLIB_VERSION
  Adjust example code in devSup.h
  Set USE_TYPED_DSET centrally now everything uses it
  Update the wording of the Release Notes entry
  - Record updates:   . histogramRecord   . eventRecord   . aaiRecord   . aaoRecord
  - Record updates:   . aoRecord   . biRecord   . boRecord   . mbbiRecord   . mbbiDirectRecord   . mbboRecord   . mbboDirectRecord   . longinRecord   . longoutRecord   . stringoutRecord   . stringinRecord   . waveformRecord   . calcoutRecord   . subArrayRecord
  initial typed-dset changes for ao record
  Add Release Notes entry about dsets
  Export and use aidset, set USE_TYPED_DSET
  Remove duplicated include line
  Add HAS_<record>dset macros to allow detection
  Export and use int64outdset, set USE_TYPED_DSET
  Export and use int64indset, set USE_TYPED_DSET
  Modify lsodset, set USE_TYPED_DSET
  Modify lsidset, set USE_TYPED_DSET
  Modify printfdset, set USE_TYPED_DSET
This commit is contained in:
Michael Davidsaver
2020-04-30 11:26:08 -07:00
110 changed files with 750 additions and 1060 deletions
+7 -18
View File
@@ -87,17 +87,6 @@ epicsExportAddress(rset,histogramRSET);
int histogramSDELprecision = 2;
epicsExportAddress(int, histogramSDELprecision);
struct histogramdset { /* histogram input dset */
long number;
DEVSUPFUN dev_report;
DEVSUPFUN init;
DEVSUPFUN init_record; /*returns: (-1,0)=>(failure,success)*/
DEVSUPFUN get_ioint_info;
DEVSUPFUN read_histogram;/*(0,2)=> success and add_count, don't add_count)*/
/* if add_count then sgnl added to array */
DEVSUPFUN special_linconv;
};
/* control block for callback*/
typedef struct myCallback {
epicsCallback callback;
@@ -160,7 +149,7 @@ static void wdogInit(histogramRecord *prec)
static long init_record(struct dbCommon *pcommon, int pass)
{
struct histogramRecord *prec = (struct histogramRecord *)pcommon;
struct histogramdset *pdset;
histogramdset *pdset;
if (pass == 0) {
/* allocate space for histogram array */
@@ -181,21 +170,21 @@ static long init_record(struct dbCommon *pcommon, int pass)
recGblInitConstantLink(&prec->siol, DBF_DOUBLE, &prec->sval);
/* must have device support defined */
pdset = (struct histogramdset *) prec->dset;
pdset = (histogramdset *) prec->dset;
if (!pdset) {
recGblRecordError(S_dev_noDSET, prec, "histogram: init_record");
return S_dev_noDSET;
}
/* must have read_histogram function defined */
if (pdset->number < 6 || !pdset->read_histogram) {
if (pdset->common.number < 6 || !pdset->read_histogram) {
recGblRecordError(S_dev_missingSup, prec, "histogram: init_record");
return S_dev_missingSup;
}
/* call device support init_record */
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;
@@ -206,7 +195,7 @@ static long init_record(struct dbCommon *pcommon, int pass)
static long process(struct dbCommon *pcommon)
{
struct histogramRecord *prec = (struct histogramRecord *)pcommon;
struct histogramdset *pdset = (struct histogramdset *) prec->dset;
histogramdset *pdset = (histogramdset *) prec->dset;
int pact = prec->pact;
long status;
@@ -375,7 +364,7 @@ static long clear_histogram(histogramRecord *prec)
static long readValue(histogramRecord *prec)
{
struct histogramdset *pdset = (struct histogramdset *) prec->dset;
histogramdset *pdset = (histogramdset *) prec->dset;
long status = 0;
if (!prec->pact) {