forked from epics_driver_modules/motorBase
Adapt motorRecord.cc to base-3.16 with typed rset
This commit is contained in:
committed by
Torsten Bögershausen
parent
9aba61b06c
commit
8eacc2f05a
@@ -194,6 +194,16 @@ USAGE... Motor Record Support.
|
||||
|
||||
#define VERSION 6.10
|
||||
|
||||
#include "epicsVersion.h"
|
||||
|
||||
#define VERSION_INT_3_16 VERSION_INT(3,16,0,0)
|
||||
#if EPICS_VERSION_INT < VERSION_INT_3_16
|
||||
#define RECSUPFUN_CAST (RECSUPFUN)
|
||||
#else
|
||||
#define RECSUPFUN_CAST
|
||||
#define REC_TYPE motorRecord
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
@@ -249,38 +259,39 @@ static void syncTargetPosition(motorRecord *);
|
||||
|
||||
/*** Record Support Entry Table (RSET) functions. ***/
|
||||
|
||||
static long init_record(dbCommon *, int);
|
||||
static long process(dbCommon *);
|
||||
extern "C" {
|
||||
static long init_record(motorRecord *, int);
|
||||
static long process(motorRecord *);
|
||||
static long special(DBADDR *, int);
|
||||
static long get_units(const DBADDR *, char *);
|
||||
static long get_precision(const DBADDR *, long *);
|
||||
static long get_graphic_double(const DBADDR *, struct dbr_grDouble *);
|
||||
static long get_control_double(const DBADDR *, struct dbr_ctrlDouble *);
|
||||
static long get_alarm_double(const DBADDR *, struct dbr_alDouble *);
|
||||
|
||||
static long get_units(DBADDR *, char *);
|
||||
static long get_precision(DBADDR *, long *);
|
||||
static long get_graphic_double(DBADDR *, struct dbr_grDouble *);
|
||||
static long get_control_double(DBADDR *, struct dbr_ctrlDouble *);
|
||||
static long get_alarm_double(DBADDR *, struct dbr_alDouble *);
|
||||
|
||||
rset motorRSET =
|
||||
{
|
||||
RSETNUMBER,
|
||||
NULL,
|
||||
NULL,
|
||||
(RECSUPFUN) init_record,
|
||||
(RECSUPFUN) process,
|
||||
(RECSUPFUN) special,
|
||||
RECSUPFUN_CAST init_record,
|
||||
RECSUPFUN_CAST process,
|
||||
RECSUPFUN_CAST special,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
(RECSUPFUN) get_units,
|
||||
(RECSUPFUN) get_precision,
|
||||
RECSUPFUN_CAST get_units,
|
||||
RECSUPFUN_CAST get_precision,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
(RECSUPFUN) get_graphic_double,
|
||||
(RECSUPFUN) get_control_double,
|
||||
(RECSUPFUN) get_alarm_double
|
||||
RECSUPFUN_CAST get_graphic_double,
|
||||
RECSUPFUN_CAST get_control_double,
|
||||
RECSUPFUN_CAST get_alarm_double
|
||||
};
|
||||
extern "C" {epicsExportAddress(rset, motorRSET);}
|
||||
epicsExportAddress(rset, motorRSET);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
@@ -3116,7 +3127,7 @@ velcheckA:
|
||||
/******************************************************************************
|
||||
get_units()
|
||||
*******************************************************************************/
|
||||
static long get_units(const DBADDR *paddr, char *units)
|
||||
static long get_units(DBADDR *paddr, char *units)
|
||||
{
|
||||
motorRecord *pmr = (motorRecord *) paddr->precord;
|
||||
int siz = dbr_units_size - 1; /* "dbr_units_size" from dbAccess.h */
|
||||
@@ -3173,7 +3184,7 @@ static long get_units(const DBADDR *paddr, char *units)
|
||||
/******************************************************************************
|
||||
get_graphic_double()
|
||||
*******************************************************************************/
|
||||
static long get_graphic_double(const DBADDR *paddr, struct dbr_grDouble * pgd)
|
||||
static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble * pgd)
|
||||
{
|
||||
motorRecord *pmr = (motorRecord *) paddr->precord;
|
||||
int fieldIndex = dbGetFieldIndex(paddr);
|
||||
@@ -3224,7 +3235,7 @@ static long get_graphic_double(const DBADDR *paddr, struct dbr_grDouble * pgd)
|
||||
get_control_double()
|
||||
*******************************************************************************/
|
||||
static long
|
||||
get_control_double(const DBADDR *paddr, struct dbr_ctrlDouble * pcd)
|
||||
get_control_double(DBADDR *paddr, struct dbr_ctrlDouble * pcd)
|
||||
{
|
||||
motorRecord *pmr = (motorRecord *) paddr->precord;
|
||||
int fieldIndex = dbGetFieldIndex(paddr);
|
||||
@@ -3273,7 +3284,7 @@ static long
|
||||
/******************************************************************************
|
||||
get_precision()
|
||||
*******************************************************************************/
|
||||
static long get_precision(const DBADDR *paddr, long *precision)
|
||||
static long get_precision(DBADDR *paddr, long *precision)
|
||||
{
|
||||
motorRecord *pmr = (motorRecord *) paddr->precord;
|
||||
int fieldIndex = dbGetFieldIndex(paddr);
|
||||
@@ -3304,7 +3315,7 @@ static long get_precision(const DBADDR *paddr, long *precision)
|
||||
/******************************************************************************
|
||||
get_alarm_double()
|
||||
*******************************************************************************/
|
||||
static long get_alarm_double(const DBADDR *paddr, struct dbr_alDouble * pad)
|
||||
static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble * pad)
|
||||
{
|
||||
motorRecord *pmr = (motorRecord *) paddr->precord;
|
||||
int fieldIndex = dbGetFieldIndex(paddr);
|
||||
|
||||
Reference in New Issue
Block a user