Small renaming changes
This commit is contained in:
@@ -56,7 +56,7 @@ turboPmacAxis::turboPmacAxis(turboPmacController *pC, int axisNo,
|
||||
is a configuration error.
|
||||
*/
|
||||
if (axisNo >= pC->numAxes()) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d: FATAL ERROR: "
|
||||
"Axis index %d must be smaller than the total number of axes "
|
||||
"%d",
|
||||
@@ -86,7 +86,7 @@ turboPmacAxis::turboPmacAxis(turboPmacController *pC, int axisNo,
|
||||
status = pC_->setIntegerParam(axisNo_, pC_->rereadEncoderPosition(), 0);
|
||||
if (status != asynSuccess) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d:\nFATAL ERROR "
|
||||
"(setting a parameter value failed with %s)\n. Terminating IOC",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -136,7 +136,7 @@ asynStatus turboPmacAxis::init() {
|
||||
&motorRecResolution);
|
||||
if (status == asynParamUndefined) {
|
||||
if (now + maxInitTime < time(NULL)) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line "
|
||||
"%d\nInitializing the parameter library failed.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__,
|
||||
@@ -208,7 +208,7 @@ asynStatus turboPmacAxis::init() {
|
||||
// If we can't communicate with the parameter library, it doesn't make
|
||||
// sense to try and upstream this to the user -> Just log the error
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\ncallParamCallbacks "
|
||||
"failed with %s.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -262,8 +262,8 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, timedOut,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAsked for a "
|
||||
"handshake at %ld s and didn't get a positive reply yet "
|
||||
"(current time is %ld s).\n",
|
||||
@@ -431,9 +431,9 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
*moving = false;
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyStatus, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nEmergency stop "
|
||||
"activated.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -485,7 +485,7 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
*moving = true;
|
||||
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is moving\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
|
||||
@@ -494,9 +494,9 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
*moving = false;
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyStatus, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nReached "
|
||||
"unreachable state P%2.2d00 = %d.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -517,7 +517,7 @@ asynStatus turboPmacAxis::doPoll(bool *moving) {
|
||||
}
|
||||
|
||||
if (resetCountStatus) {
|
||||
pC_->getMsgPrintControl().resetCount(keyStatus, pC_->asynUserSelf());
|
||||
pC_->getMsgPrintControl().resetCount(keyStatus, pC_->pasynUser());
|
||||
}
|
||||
|
||||
if (*moving) {
|
||||
@@ -610,8 +610,8 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
// EPICS should already prevent this issue in the first place,
|
||||
// since it contains the user limits
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nTarget "
|
||||
"position would exceed user limits.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -633,9 +633,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
case 5:
|
||||
// Command not possible
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is "
|
||||
"still moving, but received another move command. EPICS "
|
||||
"should prevent this, check if *moving is set correctly.%s\n",
|
||||
@@ -657,8 +657,8 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
break;
|
||||
case 8:
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAir cushion "
|
||||
"feedback stopped during movement (P%2.2d01 = %d).%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -680,9 +680,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
break;
|
||||
case 9:
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nNo air cushion "
|
||||
"feedback before movement start (P%2.2d01 = %d).%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, axisNo_,
|
||||
@@ -710,9 +710,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
*/
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis hit the "
|
||||
"controller limits.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -740,9 +740,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
// Following error
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nMaximum allowed "
|
||||
"following error exceeded.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -767,8 +767,8 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
|
||||
case 12:
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nSecurity "
|
||||
"input is triggered (P%2.2d01 = %d).%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -795,8 +795,8 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
// Driver hardware error triggered
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nDriver "
|
||||
"hardware error triggered.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -822,8 +822,8 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
// since it contains the user limits
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nMove "
|
||||
"command exceeds hardware limits (P%2.2d01 = %d).%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -847,9 +847,9 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
default:
|
||||
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(keyError, true,
|
||||
pC_->asynUserSelf())) {
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nUnknown error "
|
||||
"P%2.2d01 = %d.%s\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, axisNo_,
|
||||
@@ -872,7 +872,7 @@ asynStatus turboPmacAxis::handleError(int error, char *userMessage,
|
||||
}
|
||||
|
||||
if (resetError) {
|
||||
pC_->getMsgPrintControl().resetCount(keyError, pC_->asynUserSelf());
|
||||
pC_->getMsgPrintControl().resetCount(keyError, pC_->pasynUser());
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -914,7 +914,7 @@ asynStatus turboPmacAxis::doMove(double position, int relative,
|
||||
|
||||
if (enabled == 0) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is disabled.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
return asynSuccess;
|
||||
@@ -924,7 +924,7 @@ asynStatus turboPmacAxis::doMove(double position, int relative,
|
||||
motorCoordinatesPosition = position * motorRecResolution;
|
||||
motorVelocity = maxVelocity * motorRecResolution;
|
||||
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nStart of axis to "
|
||||
"position %lf.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, position);
|
||||
@@ -946,7 +946,7 @@ asynStatus turboPmacAxis::doMove(double position, int relative,
|
||||
motorVelocity);
|
||||
writeOffset = strlen(command);
|
||||
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nSetting speed "
|
||||
"to %lf.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -970,7 +970,7 @@ asynStatus turboPmacAxis::doMove(double position, int relative,
|
||||
if (rw_status != asynSuccess) {
|
||||
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nStarting movement to "
|
||||
"target position %lf failed.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
@@ -1016,7 +1016,7 @@ asynStatus turboPmacAxis::stop(double acceleration) {
|
||||
|
||||
if (rw_status != asynSuccess) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nStopping the movement "
|
||||
"failed.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
@@ -1050,7 +1050,7 @@ asynStatus turboPmacAxis::doReset() {
|
||||
rw_status = pC_->writeRead(axisNo_, command, response, 0);
|
||||
|
||||
if (rw_status != asynSuccess) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nResetting the "
|
||||
"error failed\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
@@ -1222,7 +1222,7 @@ asynStatus turboPmacAxis::rereadEncoder() {
|
||||
|
||||
// Abort if the axis is incremental
|
||||
if (strcmp(encoderType, IncrementalEncoder) == 0) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nEncoder is "
|
||||
"not reread because it is incremental.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
@@ -1239,7 +1239,7 @@ asynStatus turboPmacAxis::rereadEncoder() {
|
||||
}
|
||||
|
||||
if (enabled == 1) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_WARNING,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_WARNING,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis must be "
|
||||
"disabled before rereading the encoder.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
@@ -1255,7 +1255,7 @@ asynStatus turboPmacAxis::rereadEncoder() {
|
||||
} else {
|
||||
snprintf(command, sizeof(command), "M%2.2d=15", axisNo_);
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nRereading absolute "
|
||||
"encoder via command %s.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__, command);
|
||||
@@ -1306,7 +1306,7 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
// actually be disabled in this state!
|
||||
if (axisStatus_ == 1 || axisStatus_ == 2 || axisStatus_ == 3 ||
|
||||
axisStatus_ == 4 || axisStatus_ == 5) {
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_ERROR,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is not "
|
||||
"idle and can therefore not be enabled / disabled.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__);
|
||||
@@ -1327,7 +1327,7 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
// was sent => Do nothing
|
||||
if ((axisStatus_ != -3) == on) {
|
||||
asynPrint(
|
||||
pC_->asynUserSelf(), ASYN_TRACE_WARNING,
|
||||
pC_->pasynUser(), ASYN_TRACE_WARNING,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nAxis is already %s.\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
on ? "enabled" : "disabled");
|
||||
@@ -1344,7 +1344,7 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
|
||||
// Enable / disable the axis if it is not moving
|
||||
snprintf(command, sizeof(command), "M%2.2d14=%d", axisNo_, on);
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\n%s axis\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
on ? "Enable" : "Disable");
|
||||
@@ -1391,7 +1391,7 @@ asynStatus turboPmacAxis::enable(bool on) {
|
||||
|
||||
// Failed to change axis status within timeout_enable_disable => Send a
|
||||
// corresponding message
|
||||
asynPrint(pC_->asynUserSelf(), ASYN_TRACE_FLOW,
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_FLOW,
|
||||
"Controller \"%s\", axis %d => %s, line %d\nFailed to %s axis "
|
||||
"within %d seconds\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
|
||||
Reference in New Issue
Block a user