Renamed "ipPortUser_" to "ipPortAsynOctetSyncIO_"

I learned that there might be multiple asynUsers connected to the same
port for different types (asynInt32, asynOctet, ...). Therefore I
renamed "ipPortUser_" to better reflect this.
This commit is contained in:
2025-04-15 17:15:34 +02:00
parent eb94379efe
commit 4c3254687d
3 changed files with 18 additions and 16 deletions

View File

@@ -51,7 +51,9 @@ sinqController::sinqController(const char *portName,
msgPrintControl_(4) {
asynStatus status = asynSuccess;
ipPortUser_ = nullptr;
// Handle to the asynUser of the IP port asyn driver
ipPortAsynOctetSyncIO_ = nullptr;
// Initial values for the average timeout mechanism, can be overwritten
// later by a FFI function
@@ -79,8 +81,9 @@ sinqController::sinqController(const char *portName,
We try to connect to the port via the port name provided by the constructor.
If this fails, the function is terminated via exit.
*/
pasynOctetSyncIO->connect(ipPortConfigName, 0, &ipPortUser_, NULL);
if (status != asynSuccess || ipPortUser_ == nullptr) {
pasynOctetSyncIO->connect(ipPortConfigName, 0, &ipPortAsynOctetSyncIO_,
NULL);
if (status != asynSuccess || ipPortAsynOctetSyncIO_ == nullptr) {
errlogPrintf("Controller \"%s\" => %s, line %d:\nFATAL ERROR (cannot "
"connect to MCU controller).\n"
"Terminating IOC",
@@ -353,7 +356,7 @@ asynStatus sinqController::couldNotParseResponse(const char *command,
int line) {
asynStatus pl_status = asynSuccess;
asynPrint(ipPortUser_, ASYN_TRACE_ERROR,
asynPrint(ipPortAsynOctetSyncIO_, ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d:\nCould not interpret "
"response \"%s\" for command \"%s\".\n",
portName, axisNo, functionName, line, response, command);
@@ -382,7 +385,7 @@ asynStatus sinqController::paramLibAccessFailed(asynStatus status,
int line) {
if (status != asynSuccess) {
asynPrint(ipPortUser_, ASYN_TRACE_ERROR,
asynPrint(ipPortAsynOctetSyncIO_, ASYN_TRACE_ERROR,
"Controller \"%s\", axis %d => %s, line %d:\n Accessing the "
"parameter library failed for parameter %s with error %s.\n",
portName, axisNo, functionName, line, parameter,
@@ -651,9 +654,9 @@ asynStatus setMaxSubsequentTimeouts(const char *portName,
if (ptr == nullptr) {
/*
We can't use asynPrint here since this macro would require us
to get a ipPortUser_ from a pointer to an asynPortDriver.
to get a ipPortAsynOctetSyncIO_ from a pointer to an asynPortDriver.
However, the given pointer is a nullptr and therefore doesn't
have a ipPortUser_! printf is an EPICS alternative which
have a ipPortAsynOctetSyncIO_! printf is an EPICS alternative which
works w/o that, but doesn't offer the comfort provided
by the asynTrace-facility
*/