- Removed old code
- Extended tasker to support task groups - Added task functions for motors and counters - Modifed devexec to use the new task functions - Modified TAS to treat the monochromator separatly - Coded a EIGER monochromator module to reflect even more new requirements - Added EPICS counters and motors - Modified multicounter to be better performing
This commit is contained in:
92
psi.c
92
psi.c
@@ -24,15 +24,12 @@
|
||||
#include "site.h"
|
||||
#include <motor.h>
|
||||
#include <site.h>
|
||||
#include "ecbdriv.h"
|
||||
#include "ecbcounter.h"
|
||||
#include "sinqhmdriv.i"
|
||||
#include "tdchm.h"
|
||||
#include "tecsdriv.h"
|
||||
#include "itc4.h"
|
||||
#include "bruker.h"
|
||||
#include "ltc11.h"
|
||||
#include "A1931.h"
|
||||
#include "eurodriv.h"
|
||||
#include "el755driv.h"
|
||||
#include <evdriver.i>
|
||||
@@ -110,10 +107,8 @@ static void AddPsiCommands(SicsInterp * pInter)
|
||||
SCMD("MakeAmorStatus", AmorStatusFactory);
|
||||
SCMD("MakeECB", MakeECB);
|
||||
SCMD("MakeFocusAverager", MakeFA);
|
||||
SCMD("MakeJulCho", JulChoFactory);
|
||||
SCMD("MakeLMD200", MakeLMD200);
|
||||
SCMD("MakePIMotor", PIMotorFactory);
|
||||
SCMD("MakePoldiReiss", MakePoldiReiss);
|
||||
SCMD("MakePSDFrame", MakeFrameFunc);
|
||||
SCMD("MakeRitaFix", MakeRitaFix);
|
||||
SCMD("MakeRitaWin", MakeRitaWin);
|
||||
@@ -132,6 +127,7 @@ static void AddPsiCommands(SicsInterp * pInter)
|
||||
SCMD("PolterInstall", PolterInstall);
|
||||
SCMD("SerialInit", SerialInit);
|
||||
SCMD("MakeEiger", InitEiger);
|
||||
SCMD("MakeEigerMono", InitEigerMono);
|
||||
PCMD("cnvrt", CnvrtAction);
|
||||
|
||||
/*
|
||||
@@ -146,8 +142,6 @@ static void AddPsiCommands(SicsInterp * pInter)
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------------------*/
|
||||
MotorDriver *CreateEL734(SConnection * pCon, int argc, char *argv[]);
|
||||
MotorDriver *CreateEL734DC(SConnection * pCon, int argc, char *argv[]);
|
||||
MotorDriver *CreateEL734HP(SConnection * pCon, int argc, char *argv[]);
|
||||
MotorDriver *CreateEL734HPT(SConnection * pCon, int argc, char *argv[]);
|
||||
MotorDriver *MakePiPiezo(Tcl_Interp * pTcl, char *pArray);
|
||||
@@ -173,18 +167,6 @@ static pMotor CreatePsiMotor(SConnection * pCon, int argc, char *argv[])
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return NULL;
|
||||
}
|
||||
} else if (strcmp(argv[1], "el734") == 0) {
|
||||
pDriver = (MotorDriver *) CreateEL734(pCon, argc - 2, &argv[2]);
|
||||
if (!pDriver) {
|
||||
return NULL;
|
||||
}
|
||||
/* create the motor */
|
||||
pNew = MotorInit("EL734", argv[0], pDriver);
|
||||
if (!pNew) {
|
||||
snprintf(pBueffel,131, "Failure to create motor %s", argv[1]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return NULL;
|
||||
}
|
||||
} else if (strcmp(argv[1], "el734hp") == 0) {
|
||||
pDriver = (MotorDriver *) CreateEL734HP(pCon, argc - 2, &argv[2]);
|
||||
if (!pDriver) {
|
||||
@@ -209,30 +191,6 @@ static pMotor CreatePsiMotor(SConnection * pCon, int argc, char *argv[])
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return NULL;
|
||||
}
|
||||
} else if (strcmp(argv[1], "el734dc") == 0) {
|
||||
pDriver = (MotorDriver *) CreateEL734DC(pCon, argc - 2, &argv[2]);
|
||||
if (!pDriver) {
|
||||
return NULL;
|
||||
}
|
||||
/* create the motor */
|
||||
pNew = MotorInit("EL734DC", argv[0], pDriver);
|
||||
if (!pNew) {
|
||||
snprintf(pBueffel,131, "Failure to create motor %s", argv[1]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return NULL;
|
||||
}
|
||||
} else if (strcmp(argv[1], "ecb") == 0) {
|
||||
pDriver = (MotorDriver *) CreateECBMotor(pCon, argc - 2, &argv[2]);
|
||||
if (!pDriver) {
|
||||
return NULL;
|
||||
}
|
||||
/* create the motor */
|
||||
pNew = MotorInit("ECB", argv[0], pDriver);
|
||||
if (!pNew) {
|
||||
snprintf(pBueffel,131, "Failure to create motor %s", argv[0]);
|
||||
SCWrite(pCon, pBueffel, eError);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
return pNew;
|
||||
}
|
||||
@@ -246,6 +204,8 @@ extern pCounterDriver MakeEL737HPV2(SConnection * pCon, char *name,
|
||||
int argc, char *argv[]);
|
||||
pCounterDriver MakeEL737hpsps(SConnection * pCon, char *name,
|
||||
int argc, char *argv[]);
|
||||
|
||||
pCounterDriver MakeEPICSCounter(char *rootname);
|
||||
/*-------------------------------------------------------------------*/
|
||||
static pCounterDriver CreatePsiCounterDriver(SConnection * pCon,
|
||||
int argc, char *argv[])
|
||||
@@ -263,20 +223,17 @@ static pCounterDriver CreatePsiCounterDriver(SConnection * pCon,
|
||||
pNew = MakeEL737hpsps(pCon, argv[1], argc - 3, &argv[3]);
|
||||
} else if (strcmp(argv[2], "el737hpv2") == 0) {
|
||||
pNew = MakeEL737HPV2(pCon, argv[1], argc - 3, &argv[3]);
|
||||
} else if (strcmp(argv[2], "ecb") == 0) {
|
||||
} else if (strcmp(argv[2], "epics") == 0) {
|
||||
if (argc < 4) {
|
||||
SCWrite(pCon,
|
||||
"ERROR: insufficient no of arguments to create ECB counter",
|
||||
"ERROR: insufficient no of arguments to create epics counter",
|
||||
eError);
|
||||
return NULL;
|
||||
}
|
||||
pNew = MakeECBCounter(argv[3]);
|
||||
pNew = MakeEPICSCounter(argv[3]);
|
||||
}
|
||||
return pNew;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
extern pHistDriver MakeDelcamHM(pStringDict options); /* in delcam.c */
|
||||
/*--------------------------------------------------------------------*/
|
||||
static HistDriver *CreatePsiHistMem(char *name, pStringDict pOptions)
|
||||
{
|
||||
@@ -288,24 +245,6 @@ static HistDriver *CreatePsiHistMem(char *name, pStringDict pOptions)
|
||||
pNew = MakeTDCHM(pOptions);
|
||||
} else if (strcmp(name, "sinqhttp") == 0) {
|
||||
pNew = CreateSinqHttpDriver(pOptions);
|
||||
} else if (strcmp(name, "delcam") == 0) {
|
||||
pNew = MakeDelcamHM(pOptions);
|
||||
}
|
||||
return pNew;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
extern pVelSelDriv VSCreateDornierSINQ(char *name, Tcl_Interp * pTcl);
|
||||
extern pVelSelDriv VSCreateDornier2003(char *name, Tcl_Interp * pTcl);
|
||||
/*-------------------------------------------------------------------*/
|
||||
static pVelSelDriv CreatePsiVelSelDriv(char *name, char *array,
|
||||
Tcl_Interp * pTcl)
|
||||
{
|
||||
pVelSelDriv pNew = NULL;
|
||||
if (strcmp(name, "dornier") == 0) {
|
||||
pNew = VSCreateDornierSINQ(array, pTcl);
|
||||
} else if (strcmp(name, "dornier2003") == 0) {
|
||||
pNew = VSCreateDornier2003(array, pTcl);
|
||||
}
|
||||
return pNew;
|
||||
}
|
||||
@@ -375,7 +314,6 @@ static void ConfigureController(char *name, pEVControl pNew,
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------*/
|
||||
extern pEVDriver CreateSLSDriv(int argc, char *argv[]);
|
||||
extern pEVDriver CreateSLSVMEDriv(int argc, char *argv[]);
|
||||
/*------------------------------------------------------------------*/
|
||||
|
||||
@@ -436,28 +374,12 @@ static pEVControl InstallPsiEnvironmentController(SicsInterp * pSics,
|
||||
commandInstalled = 1;
|
||||
}
|
||||
}
|
||||
} else if (strcmp(argv[3], "a1931") == 0) {
|
||||
checkError = 1;
|
||||
pDriv = CreateA1931Driver(argc - 4, &argv[4]);
|
||||
if (pDriv != NULL) {
|
||||
pNew = CreateEVController(pDriv, argv[2], &status);
|
||||
if (pNew != NULL) {
|
||||
AddCommand(pSics, argv[2], A1931Action, DeleteEVController, pNew);
|
||||
commandInstalled = 1;
|
||||
}
|
||||
}
|
||||
} else if (strcmp(argv[3], "euro") == 0) {
|
||||
checkError = 1;
|
||||
pDriv = CreateEURODriv(argc - 4, &argv[4]);
|
||||
if (pDriv != NULL) {
|
||||
pNew = CreateEVController(pDriv, argv[2], &status);
|
||||
}
|
||||
} else if (strcmp(argv[3], "psi-dsp") == 0) {
|
||||
checkError = 1;
|
||||
pDriv = CreateSLSDriv(argc - 4, &argv[4]);
|
||||
if (pDriv != NULL) {
|
||||
pNew = CreateEVController(pDriv, argv[2], &status);
|
||||
}
|
||||
} else if (strcmp(argv[3], "vme-dsp") == 0) {
|
||||
checkError = 1;
|
||||
pDriv = CreateSLSVMEDriv(argc - 4, &argv[4]);
|
||||
@@ -538,7 +460,7 @@ pSite getSite(void)
|
||||
sitePSI->CreateMotor = CreatePsiMotor;
|
||||
sitePSI->CreateCounterDriver = CreatePsiCounterDriver;
|
||||
sitePSI->CreateHistogramMemoryDriver = CreatePsiHistMem;
|
||||
sitePSI->CreateVelocitySelector = CreatePsiVelSelDriv;
|
||||
sitePSI->CreateVelocitySelector = NULL;
|
||||
sitePSI->CreateControllerDriver = CreatePsiController;
|
||||
sitePSI->InstallEnvironmentController =
|
||||
InstallPsiEnvironmentController;
|
||||
|
||||
Reference in New Issue
Block a user