From 699b588ba5e3e4e412e2a2134f7e7ab4989e0f3c Mon Sep 17 00:00:00 2001 From: smathis Date: Tue, 15 Apr 2025 17:21:04 +0200 Subject: [PATCH] Replaced ipPortUser_ with ipPortAsynOctetSyncIO_ See comment to sinqMotor 0.12.0 --- Makefile | 2 +- src/masterMacsController.cpp | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index e8defd0..28223e1 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ REQUIRED+=sinqMotor motorBase_VERSION=7.2.2 # Specify the version of sinqMotor we want to build against -sinqMotor_VERSION=0.11.0 +sinqMotor_VERSION=0.12.0 # These headers allow to depend on this library for derived drivers. HEADERS += src/masterMacsAxis.h diff --git a/src/masterMacsController.cpp b/src/masterMacsController.cpp index b13043a..c08e8d8 100644 --- a/src/masterMacsController.cpp +++ b/src/masterMacsController.cpp @@ -70,7 +70,8 @@ masterMacsController::masterMacsController(const char *portName, the message length is encoded in the message header. */ const char *message_from_device = "\x0D"; // Hex-code for CR - status = pasynOctetSyncIO->setInputEos(ipPortUser_, message_from_device, + status = pasynOctetSyncIO->setInputEos(ipPortAsynOctetSyncIO_, + message_from_device, strlen(message_from_device)); if (status != asynSuccess) { asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR, @@ -78,7 +79,7 @@ masterMacsController::masterMacsController(const char *portName, "input EOS failed with %s).\nTerminating IOC", portName, __PRETTY_FUNCTION__, __LINE__, stringifyAsynStatus(status)); - pasynOctetSyncIO->disconnect(ipPortUser_); + pasynOctetSyncIO->disconnect(ipPortAsynOctetSyncIO_); exit(-1); } @@ -89,7 +90,7 @@ masterMacsController::masterMacsController(const char *portName, "ParamLib callbacks failed with %s).\nTerminating IOC", portName, __PRETTY_FUNCTION__, __LINE__, stringifyAsynStatus(status)); - pasynOctetSyncIO->disconnect(ipPortUser_); + pasynOctetSyncIO->disconnect(ipPortAsynOctetSyncIO_); exit(-1); } } @@ -185,7 +186,7 @@ asynStatus masterMacsController::writeRead(int axisNo, int tcpCmd, adjustForPrint(printableCommand, fullCommand, MAXBUF_); // Send out the command - status = pasynOctetSyncIO->write(ipPortUser_, fullCommand, + status = pasynOctetSyncIO->write(ipPortAsynOctetSyncIO_, fullCommand, fullCommandLength, comTimeout, &nbytesOut); if (status != asynSuccess) { @@ -220,9 +221,10 @@ asynStatus masterMacsController::writeRead(int axisNo, int tcpCmd, the return value of flush(), because it is always asynSuccess (see https://www.slac.stanford.edu/grp/lcls/controls/global/doc/epics-modules/R3-14-12/asyn/asyn-R4-18-lcls2/asyn/interfaces/asynOctetBase.c) */ - status = pasynOctetSyncIO->read(ipPortUser_, fullResponse, MAXBUF_, - comTimeout, &nbytesIn, &eomReason); - pasynOctetSyncIO->flush(ipPortUser_); + status = pasynOctetSyncIO->read(ipPortAsynOctetSyncIO_, + fullResponse, MAXBUF_, comTimeout, + &nbytesIn, &eomReason); + pasynOctetSyncIO->flush(ipPortAsynOctetSyncIO_); if (status == asynSuccess) { status = parseResponse(fullCommand, fullResponse,