forked from epics_driver_modules/motorBase
Clean up the EPICS_VERSION/rec sup, use motor_epics_inc.h
Refactor the changes for the deprecated RECSUP in later EPICS base version, which need a typedef for struct rset. Unite all common code and put it into a single include file. Add motor_epics_inc.h.
This commit is contained in:
@@ -45,36 +45,13 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#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 <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#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>
|
||||
|
||||
@@ -194,35 +194,14 @@ USAGE... Motor Record Support.
|
||||
|
||||
#define VERSION 6.10
|
||||
|
||||
#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 <stdlib.h>
|
||||
#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
|
||||
|
||||
@@ -28,22 +28,9 @@ USAGE... Motor Record Utility Support.
|
||||
* .03 09-09-08 rls Visual C++ link errors on improper pdbbase declaration.
|
||||
*/
|
||||
|
||||
#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 <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
|
||||
@@ -59,31 +59,11 @@ USAGE... This file contains device functions that are common to all motor
|
||||
* motor_init_record_com(). See README R6-10 item #6 for details.
|
||||
*/
|
||||
|
||||
#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 <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"
|
||||
|
||||
Reference in New Issue
Block a user