Current status of the detector tower.
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
#include <iocsh.h>
|
||||
|
||||
/**
|
||||
* @brief Construct a new turboPmacController::turboPmacController object
|
||||
* @brief Construct a new detectorTowerController object
|
||||
*
|
||||
* @param portName See documentation of sinqController
|
||||
* @param ipPortConfigName See documentation of sinqController
|
||||
@@ -27,7 +27,8 @@ detectorTowerController::detectorTowerController(
|
||||
|
||||
asynStatus status = asynSuccess;
|
||||
|
||||
status = createParam("POSITION_STATE", asynParamInt32, &positionState_);
|
||||
status =
|
||||
createParam("POSITION_STATE_RBV", asynParamInt32, &positionStateRBV_);
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
|
||||
@@ -37,18 +38,7 @@ detectorTowerController::detectorTowerController(
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
status = createParam("MOVE_TO_WORKING_POSITION", asynParamInt32,
|
||||
&moveToWorkingPosition_);
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
|
||||
"parameter failed with %s).\nTerminating IOC",
|
||||
portName, __PRETTY_FUNCTION__, __LINE__,
|
||||
stringifyAsynStatus(status));
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
status = createParam("RESET_ERROR", asynParamInt32, &resetError_);
|
||||
status = createParam("CHANGE_STATE", asynParamInt32, &changeState_);
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
|
||||
@@ -65,7 +55,7 @@ asynStatus detectorTowerController::readInt32(asynUser *pasynUser,
|
||||
// Check if the axis is a detectorTowerAxis
|
||||
detectorTowerAxis *axis = getDetectorTowerAxis(pasynUser);
|
||||
if (axis == nullptr) {
|
||||
// This is apparently a "normal" turboPmacAxis or an offsetAxis
|
||||
// This is apparently a "normal" turboPmacAxis or an auxiliaryAxis
|
||||
return turboPmacController::readInt32(pasynUser, value);
|
||||
} else {
|
||||
// The detector tower cannot be disabled
|
||||
@@ -87,13 +77,11 @@ asynStatus detectorTowerController::writeInt32(asynUser *pasynUser,
|
||||
detectorTowerAxis *axis = getDetectorTowerAxis(pasynUser);
|
||||
|
||||
if (axis == nullptr) {
|
||||
// This is apparently a "normal" turboPmacAxis or an offsetAxis
|
||||
// This is apparently a "normal" turboPmacAxis or an auxiliaryAxis
|
||||
return turboPmacController::writeInt32(pasynUser, value);
|
||||
} else {
|
||||
if (function == moveToWorkingPosition_) {
|
||||
return axis->moveToWorkingPosition(value != 0);
|
||||
} else if (function == resetError_) {
|
||||
return axis->reset();
|
||||
if (function == changeState_) {
|
||||
return axis->toggleWorkingChangerState(value);
|
||||
} else {
|
||||
return turboPmacController::writeInt32(pasynUser, value);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user