Added AMOR detector tower special pmac motors: working now
This commit is contained in:
@@ -751,7 +751,33 @@ asynStatus pmacCreateAxes(const char *pmacName,
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* C wrapper for the pmacAmorDetectorAxis constructor.
|
||||
* See pmacAmorDetectorAxis::pmacAmorDetectorAxis.
|
||||
*
|
||||
*/
|
||||
asynStatus pmacCreateAmorDetectorAxis(const char *pmacName, /* specify which controller by port name */
|
||||
int axis, /* axis number (start from 1). */
|
||||
int function_code) /* AMOR detector axis function */
|
||||
{
|
||||
pmacController *pC;
|
||||
pmacAxis *pAxis;
|
||||
|
||||
static const char *functionName = "pmacCreateHRPTAxis";
|
||||
|
||||
pC = (pmacController*) findAsynPortDriver(pmacName);
|
||||
if (!pC) {
|
||||
printf("%s:%s: Error port %s not found\n",
|
||||
driverName, functionName, pmacName);
|
||||
return asynError;
|
||||
}
|
||||
|
||||
pC->lock();
|
||||
pAxis = new AmorDetectorAxis(pC, axis, function_code);
|
||||
pAxis = NULL;
|
||||
pC->unlock();
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
/*================================ SeleneController ===============================================*/
|
||||
|
||||
@@ -996,6 +1022,19 @@ static void configpmacAxesCallFunc(const iocshArgBuf *args)
|
||||
pmacCreateAxes(args[0].sval, args[1].ival);
|
||||
}
|
||||
|
||||
/* pmacCraeteAmorDetectorAxis */
|
||||
static const iocshArg pmacCreateAmorDetectorAxisArg0 = {"Controller port name", iocshArgString};
|
||||
static const iocshArg pmacCreateAmorDetectorAxisArg1 = {"Axis number", iocshArgInt};
|
||||
static const iocshArg pmacCreateAmorDetectorAxisArg2 = {"Function code", iocshArgInt};
|
||||
static const iocshArg * const pmacCreateAmorDetectorAxisArgs[] = {&pmacCreateAmorDetectorAxisArg0,
|
||||
&pmacCreateAmorDetectorAxisArg1, &pmacCreateAmorDetectorAxisArg2};
|
||||
static const iocshFuncDef configpmacAmorDetectorAxis = {"pmacCreateAmorDetectorAxis", 3, pmacCreateAmorDetectorAxisArgs};
|
||||
|
||||
static void configpmacAmorDetectorAxisCallFunc(const iocshArgBuf *args)
|
||||
{
|
||||
pmacCreateAmorDetectorAxis(args[0].sval, args[1].ival, args[2].ival);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void pmacControllerRegister(void)
|
||||
@@ -1005,6 +1044,7 @@ static void pmacControllerRegister(void)
|
||||
iocshRegister(&configpmacV3CreateController, configpmacV3CreateControllerCallFunc);
|
||||
iocshRegister(&configpmacAxis, configpmacAxisCallFunc);
|
||||
iocshRegister(&configpmacHRPTAxis, configpmacHRPTAxisCallFunc);
|
||||
iocshRegister(&configpmacAmorDetectorAxis, configpmacAmorDetectorAxisCallFunc);
|
||||
iocshRegister(&configSeleneCreateAxis, configSeleneCreateAxisCallFunc);
|
||||
iocshRegister(&configLiftAxis, configLiftAxisCallFunc);
|
||||
iocshRegister(&configpmacV3Axis, configpmacV3AxisCallFunc);
|
||||
|
||||
Reference in New Issue
Block a user