|
|
Experimental Physics and
| ||||||||||||||||
|
|
Oops. Here's the corrected one. On this URL [1] a version 3-12 is mentioned. I'm not sure if the github repo is kept up to date with the tarballs in [1].[1] https://www.gmca.aps.anl.gov/TPMAC2/ Bruno On Thu, Feb 15, 2018 at 3:55 PM, Mark Rivers <[email protected]> wrote:
diff --git a/pmacApp/pmacAsynMotorPortSrc/pmacController.cpp b/pmacApp/pmacAsynMotorPortSrc/pmacController.cpp
index aba5b37..36cc123 100644
--- a/pmacApp/pmacAsynMotorPortSrc/pmacController.cpp
+++ b/pmacApp/pmacAsynMotorPortSrc/pmacController.cpp
@@ -322,19 +322,23 @@ asynStatus pmacController::lowLevelWriteRead(const char *command, char *response
//Use the controller-wide param PMAC_C_CommsError_
getIntegerParam(PMAC_C_CommsError_, &commsError);
- if (!commsError) {
- status = pasynOctetSyncIO->writeRead(lowLevelPortUser_ ,
+ status = pasynOctetSyncIO->writeRead(lowLevelPortUser_ ,
command, strlen(command),
response, PMAC_MAXBUF_,
PMAC_TIMEOUT_,
&nwrite, &nread, &eomReason );
- if (status) {
- asynPrint(lowLevelPortUser_, ASYN_TRACE_ERROR, "%s: Error from pasynOctetSyncIO->writeRead. command: %s\n", functionName, command);
- setIntegerParam(PMAC_C_CommsError_, PMAC_ERROR_);
- } else {
- setIntegerParam(PMAC_C_CommsError_, PMAC_OK_);
- }
+ if (status) {
+ asynInterface *pasynInterface = pasynManager->findInterface(lowLevelPortUser_,
+ asynCommonType, true);
+ asynCommon *pasynCommon = (asynCommon*) pasynInterface->pinterface;
+
+ asynPrint(lowLevelPortUser_, ASYN_TRACE_ERROR, "%s: Error from pasynOctetSyncIO->writeRead. command: %s, status=%d\n", functionName, command, status);
+ setIntegerParam(PMAC_C_CommsError_, PMAC_ERROR_);
+ pasynCommon->disconnect(pasynInterface->drvPvt, lowLevelPortUser_);
+
+ } else {
+ setIntegerParam(PMAC_C_CommsError_, PMAC_OK_);
}
asynPrint(lowLevelPortUser_, ASYN_TRACEIO_DRIVER, "%s: response: %s\n", functionName, response);
| ||||||||||||||||
| ANJ, 15 Feb 2018 |
·
Home
·
News
·
About
·
Talk
·
Base
·
Modules
·
Extensions
·
· Distributions · Download · Documents · Links · Licensing · |