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

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