Small renaming changes

This commit is contained in:
2025-04-17 16:15:39 +02:00
parent e5a4af14ea
commit 181ccdec56
2 changed files with 63 additions and 64 deletions

View File

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

View File

@ -63,7 +63,7 @@ turboPmacController::turboPmacController(const char *portName,
status = createParam("REREAD_ENCODER_POSITION", asynParamInt32, status = createParam("REREAD_ENCODER_POSITION", asynParamInt32,
&rereadEncoderPosition_); &rereadEncoderPosition_);
if (status != asynSuccess) { if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a " "Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
"parameter failed with %s).\nTerminating IOC", "parameter failed with %s).\nTerminating IOC",
portName, __PRETTY_FUNCTION__, __LINE__, portName, __PRETTY_FUNCTION__, __LINE__,
@ -73,7 +73,7 @@ turboPmacController::turboPmacController(const char *portName,
status = createParam("READ_CONFIG", asynParamInt32, &readConfig_); status = createParam("READ_CONFIG", asynParamInt32, &readConfig_);
if (status != asynSuccess) { if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a " "Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
"parameter failed with %s).\nTerminating IOC", "parameter failed with %s).\nTerminating IOC",
portName, __PRETTY_FUNCTION__, __LINE__, portName, __PRETTY_FUNCTION__, __LINE__,
@ -83,7 +83,7 @@ turboPmacController::turboPmacController(const char *portName,
status = createParam("FLUSH_HARDWARE", asynParamInt32, &flushHardware_); status = createParam("FLUSH_HARDWARE", asynParamInt32, &flushHardware_);
if (status != asynSuccess) { if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a " "Controller \"%s\" => %s, line %d\nFATAL ERROR (creating a "
"parameter failed with %s).\nTerminating IOC", "parameter failed with %s).\nTerminating IOC",
portName, __PRETTY_FUNCTION__, __LINE__, portName, __PRETTY_FUNCTION__, __LINE__,
@ -104,7 +104,7 @@ turboPmacController::turboPmacController(const char *portName,
message_from_device, message_from_device,
strlen(message_from_device)); strlen(message_from_device));
if (status != asynSuccess) { if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d\nFATAL ERROR " "Controller \"%s\" => %s, line %d\nFATAL ERROR "
"(setting input EOS failed with %s).\nTerminating IOC", "(setting input EOS failed with %s).\nTerminating IOC",
portName, __PRETTY_FUNCTION__, __LINE__, portName, __PRETTY_FUNCTION__, __LINE__,
@ -115,7 +115,7 @@ turboPmacController::turboPmacController(const char *portName,
status = callParamCallbacks(); status = callParamCallbacks();
if (status != asynSuccess) { if (status != asynSuccess) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\" => %s, line %d\nFATAL ERROR " "Controller \"%s\" => %s, line %d\nFATAL ERROR "
"(executing ParamLib callbacks failed " "(executing ParamLib callbacks failed "
"with %s).\nTerminating IOC", "with %s).\nTerminating IOC",
@ -222,9 +222,9 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
if (status == asynTimeout) { if (status == asynTimeout) {
if (msgPrintControl_.shouldBePrinted(comKey, true, pasynUserSelf)) { if (msgPrintControl_.shouldBePrinted(comKey, true, pasynUser())) {
asynPrint( asynPrint(
this->pasynUserSelf, ASYN_TRACE_ERROR, this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d\nTimeout while " "Controller \"%s\", axis %d => %s, line %d\nTimeout while "
"writing to the MCU.%s\n", "writing to the MCU.%s\n",
portName, axisNo, __PRETTY_FUNCTION__, __LINE__, portName, axisNo, __PRETTY_FUNCTION__, __LINE__,
@ -243,7 +243,7 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
pasynOctetSyncIOipPort(), command, commandLength, response, pasynOctetSyncIOipPort(), command, commandLength, response,
MAXBUF_, comTimeout_, &nbytesOut, &nbytesIn, &eomReason); MAXBUF_, comTimeout_, &nbytesOut, &nbytesIn, &eomReason);
if (status != asynTimeout) { if (status != asynTimeout) {
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line " "Controller \"%s\", axis %d => %s, line "
"%d\nReconnected after write timeout\n", "%d\nReconnected after write timeout\n",
portName, axisNo, __PRETTY_FUNCTION__, __LINE__); portName, axisNo, __PRETTY_FUNCTION__, __LINE__);
@ -251,16 +251,16 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
} }
} }
} else if (status != asynSuccess) { } else if (status != asynSuccess) {
if (msgPrintControl_.shouldBePrinted(comKey, true, pasynUserSelf)) { if (msgPrintControl_.shouldBePrinted(comKey, true, pasynUser())) {
asynPrint( asynPrint(
this->pasynUserSelf, ASYN_TRACE_ERROR, this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d\nError %s while " "Controller \"%s\", axis %d => %s, line %d\nError %s while "
"writing to the controller.%s\n", "writing to the controller.%s\n",
portName, axisNo, __PRETTY_FUNCTION__, __LINE__, portName, axisNo, __PRETTY_FUNCTION__, __LINE__,
stringifyAsynStatus(status), msgPrintControl_.getSuffix()); stringifyAsynStatus(status), msgPrintControl_.getSuffix());
} }
} else { } else {
msgPrintControl_.resetCount(comKey, pasynUserSelf); msgPrintControl_.resetCount(comKey, pasynUser());
} }
if (timeoutStatus == asynError) { if (timeoutStatus == asynError) {
@ -278,16 +278,15 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
"call the support.", "call the support.",
eomReason); eomReason);
if (msgPrintControl_.shouldBePrinted(terminateKey, true, if (msgPrintControl_.shouldBePrinted(terminateKey, true, pasynUser())) {
pasynUserSelf)) { asynPrint(this->pasynUser(), ASYN_TRACE_ERROR,
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d\nMessage " "Controller \"%s\", axis %d => %s, line %d\nMessage "
"terminated due to reason %i.%s\n", "terminated due to reason %i.%s\n",
portName, axisNo, __PRETTY_FUNCTION__, __LINE__, portName, axisNo, __PRETTY_FUNCTION__, __LINE__,
eomReason, msgPrintControl_.getSuffix()); eomReason, msgPrintControl_.getSuffix());
} }
} else { } else {
msgPrintControl_.resetCount(terminateKey, pasynUserSelf); msgPrintControl_.resetCount(terminateKey, pasynUser());
} }
/* /*
@ -305,9 +304,9 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
adjustResponseForPrint(modResponse, response, MAXBUF_); adjustResponseForPrint(modResponse, response, MAXBUF_);
if (msgPrintControl_.shouldBePrinted(numResponsesKey, true, if (msgPrintControl_.shouldBePrinted(numResponsesKey, true,
pasynUserSelf)) { pasynUser())) {
asynPrint( asynPrint(
this->pasynUserSelf, ASYN_TRACE_ERROR, this->pasynUser(), ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d\nUnexpected " "Controller \"%s\", axis %d => %s, line %d\nUnexpected "
"response '%s' (carriage returns are replaced with spaces) " "response '%s' (carriage returns are replaced with spaces) "
"for command %s.%s\n", "for command %s.%s\n",
@ -322,7 +321,7 @@ asynStatus turboPmacController::writeRead(int axisNo, const char *command,
modResponse, command); modResponse, command);
status = asynError; status = asynError;
} else { } else {
msgPrintControl_.resetCount(numResponsesKey, pasynUserSelf); msgPrintControl_.resetCount(numResponsesKey, pasynUser());
} }
// Create custom error messages for different failure modes, if no error // Create custom error messages for different failure modes, if no error