diff --git a/hardsup/makefile_linux b/hardsup/makefile_linux index 08a262d..81cefd1 100644 --- a/hardsup/makefile_linux +++ b/hardsup/makefile_linux @@ -6,10 +6,10 @@ # Markus Zolliker, March 2003 #-------------------------------------------------------------------------- # the following line only for fortified version -DFORTIFY=-DFORTIFY +#DFORTIFY=-DFORTIFY #========================================================================== CC = gcc -CFLAGS = -g -DLINUX $(DFORTIFY) -I$(SRC). -I$(SRC).. -I../src +CFLAGS = -g -DLINUX $(DFORTIFY) -I$(SRC). -I.. -I../.. include $(SRC)make_gen diff --git a/makefile_linux b/makefile_linux new file mode 100644 index 0000000..f07cc76 --- /dev/null +++ b/makefile_linux @@ -0,0 +1,20 @@ +#--------------------------------------------------------------------------- +# Makefile for SICS +# machine-dependent part for Redhat Linux with AFS at PSI +# +# Mark Koennecke 1996-2001 +# Markus Zolliker, March 2003 +#========================================================================== +# the following lines only for fortified version +#DFORTIFY=-DFORTIFY +#FORTIFYOBJ=strdup.o fortify.o +#========================================================================== + +CC = gcc +CFLAGS = -I$(HDFROOT)/include -DHDF4 -DHDF5 $(NI) -Ihardsup \ + -I../ -fwritable-strings -DCYGNUS -DNONINTF -g $(DFORTIFY) + +HDFROOT=/afs/psi.ch/project/sinq/linux +EXTRA=nintf.o + +include make_gen diff --git a/sinqhmdriv.i b/sinqhmdriv.i index 7ca0b87..a6a121a 100644 --- a/sinqhmdriv.i +++ b/sinqhmdriv.i @@ -1,5 +1,5 @@ -#line 63 "sinqhmdriv.w" +#line 64 "sinqhmdriv.w" /*-------------------------------------------------------------------------- S I N Q H M @@ -24,18 +24,19 @@ HistMode eHistMode; int iBinWidth; OverFlowMode eFlow; + int extraDetector; } SinqHMDriv; -#line 76 "sinqhmdriv.w" +#line 77 "sinqhmdriv.w" /*-------------------------------------------------------------------------*/ -#line 58 "sinqhmdriv.w" +#line 59 "sinqhmdriv.w" pHistDriver CreateSINQDriver(pStringDict pOption); int isSINQHMDriv(pHistDriver test); -#line 78 "sinqhmdriv.w" +#line 79 "sinqhmdriv.w" #endif diff --git a/sinqhmdriv.w b/sinqhmdriv.w index 03718b6..44fc75f 100644 --- a/sinqhmdriv.w +++ b/sinqhmdriv.w @@ -28,6 +28,7 @@ already reflected by the driver private data structure: HistMode eHistMode; int iBinWidth; OverFlowMode eFlow; + int extraDetector; } SinqHMDriv; @} diff --git a/swmotor.c b/swmotor.c index 6a5881f..dd4690d 100644 --- a/swmotor.c +++ b/swmotor.c @@ -11,18 +11,48 @@ #include #include #include -#include "fortify.h" -#include "sics.h" -#include "SCinter.h" -#include "splitter.h" +#include +#include +#include +#include #include "hardsup/sinq_prototypes.h" #include "hardsup/rs232c_def.h" #include "hardsup/el734_def.h" #include "hardsup/el734fix.h" -#include "modriv.h" +#include #include "swmotor.h" #include "swmotor.i" + typedef struct __MoDriv { + /* general motor driver interface + fields. REQUIRED! + */ + float fUpper; /* upper limit */ + float fLower; /* lower limit */ + char *name; + int (*GetPosition)(void *self,float *fPos); + int (*RunTo)(void *self, float fNewVal); + int (*GetStatus)(void *self); + void (*GetError)(void *self, int *iCode, char *buffer, int iBufLen); + int (*TryAndFixIt)(void *self,int iError, float fNew); + int (*Halt)(void *self); + int (*GetDriverPar)(void *self, char *name, + float *value); + int (*SetDriverPar)(void *self,SConnection *pCon, + char *name, float newValue); + void (*ListDriverPar)(void *self, char *motorName, + SConnection *pCon); + void (*KillPrivate)(void *self); + + + /* EL-734 specific fields */ + int iPort; + char *hostname; + int iChannel; + int iMotor; + void *EL734struct; + int iMSR; + } EL734Driv; /*======================================================================== We start of by implementing the interface functions for the various interfaces this module has to implement. diff --git a/tecs/makefile_linux b/tecs/makefile_linux index eda4593..95ecbaa 100644 --- a/tecs/makefile_linux +++ b/tecs/makefile_linux @@ -14,7 +14,7 @@ SICS=$(SRC).. CC = gcc FC = g77 -CFLAGS = -DLINUX -g $(DFORTIFY) +CFLAGS = -DLINUX -g $(DFORTIFY) -I../.. FFLAGS = -u -fvxt -g ARFLAGS = cr @@ -26,7 +26,7 @@ PGPLOT =/afs/psi.ch/user/z/zolliker/pgplot/ PGLIB =$(PGPLOT)/libpgplot.a -L/usr/X11R6/lib -lX11 # -- library for ASYNSRV -HARDSUPLIB=$(SICST)/hardsup/libhlib.a +HARDSUPLIB=../hardsup/libhlib.a # -- readline library RDLIB =-lreadline -ltermcap