forked from epics_driver_modules/motorBase
Merge pull request #112 from EuropeanSpallationSource/base-3_16_typedef_rset
Base 3.16 typedef rset
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* The following is needed to compile against Base R3.16.1 without a warning */
|
||||
#define USE_TYPED_RSET
|
||||
|
||||
#include "epicsFindSymbol.h"
|
||||
#include "dbAccess.h"
|
||||
#include "recGbl.h"
|
||||
|
||||
@@ -51,15 +51,7 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <dbAccess.h>
|
||||
#include <recGbl.h>
|
||||
#include <recSup.h>
|
||||
#include <errlog.h>
|
||||
#include <devSup.h>
|
||||
#include <alarm.h>
|
||||
#include <epicsEvent.h>
|
||||
#include <cantProceed.h> /* !! for callocMustSucceed() */
|
||||
#include <dbEvent.h>
|
||||
#include "motor_epics_inc.h"
|
||||
|
||||
#include <asynDriver.h>
|
||||
#include <asynInt32.h>
|
||||
|
||||
@@ -198,16 +198,10 @@ USAGE... Motor Record Support.
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <alarm.h>
|
||||
#include <dbDefs.h>
|
||||
#include <callback.h>
|
||||
#include <dbAccess.h>
|
||||
#include <dbScan.h>
|
||||
#include <recGbl.h>
|
||||
#include <recSup.h>
|
||||
#include <dbEvent.h>
|
||||
#include <devSup.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "motor_epics_inc.h"
|
||||
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "motorRecord.h"
|
||||
#undef GEN_SIZE_OFFSET
|
||||
@@ -249,38 +243,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(struct dbCommon*, int);
|
||||
static long process(struct dbCommon*);
|
||||
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(const struct 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 +3111,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 +3168,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 +3219,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);
|
||||
@@ -3304,7 +3299,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);
|
||||
|
||||
@@ -29,6 +29,8 @@ USAGE... Motor Record Utility Support.
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "motor_epics_inc.h"
|
||||
|
||||
|
||||
#include <cantProceed.h>
|
||||
#include <dbStaticLib.h>
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef INCmotorepicsinc
|
||||
#define INCmotorepicsinc 1
|
||||
|
||||
#include "epicsVersion.h"
|
||||
|
||||
#ifndef VERSION_INT
|
||||
# define VERSION_INT(V,R,M,P) ( ((V)<<24) | ((R)<<16) | ((M)<<8) | (P))
|
||||
#endif
|
||||
|
||||
#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
|
||||
#define USE_TYPED_RSET
|
||||
#endif
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <callback.h>
|
||||
#include <dbScan.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recGbl.h>
|
||||
#include <recSup.h>
|
||||
#include <errlog.h>
|
||||
#include <devSup.h>
|
||||
#include <alarm.h>
|
||||
#include <epicsEvent.h>
|
||||
#include <cantProceed.h> /* !! for callocMustSucceed() */
|
||||
#include <dbEvent.h>
|
||||
#include <devSup.h>
|
||||
|
||||
#endif
|
||||
@@ -63,12 +63,7 @@ USAGE... This file contains device functions that are common to all motor
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
#include <callback.h>
|
||||
#include <dbAccess.h>
|
||||
#include <recGbl.h>
|
||||
#include <recSup.h>
|
||||
#include <dbEvent.h>
|
||||
#include <devSup.h>
|
||||
#include "motor_epics_inc.h"
|
||||
|
||||
#include "motorRecord.h"
|
||||
#include "motor.h"
|
||||
|
||||
@@ -46,6 +46,8 @@ NOTES...
|
||||
- Can't call CA functions until after dbLockInitRecords() has been called and initialized lock sets.
|
||||
*/
|
||||
|
||||
/* The following is needed to compile against Base R3.16.1 without a warning */
|
||||
#define USE_TYPED_RSET
|
||||
|
||||
#include <dbDefs.h>
|
||||
#include <dbFldTypes.h>
|
||||
|
||||
Reference in New Issue
Block a user