Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
699b588ba5 | |||
e86c517fc7 | |||
f733718ee7 | |||
a8c3499dc5 |
2
Makefile
2
Makefile
@ -13,7 +13,7 @@ REQUIRED+=sinqMotor
|
|||||||
motorBase_VERSION=7.2.2
|
motorBase_VERSION=7.2.2
|
||||||
|
|
||||||
# Specify the version of sinqMotor we want to build against
|
# Specify the version of sinqMotor we want to build against
|
||||||
sinqMotor_VERSION=0.10.0
|
sinqMotor_VERSION=0.12.0
|
||||||
|
|
||||||
# These headers allow to depend on this library for derived drivers.
|
# These headers allow to depend on this library for derived drivers.
|
||||||
HEADERS += src/masterMacsAxis.h
|
HEADERS += src/masterMacsAxis.h
|
||||||
|
@ -70,7 +70,8 @@ masterMacsController::masterMacsController(const char *portName,
|
|||||||
the message length is encoded in the message header.
|
the message length is encoded in the message header.
|
||||||
*/
|
*/
|
||||||
const char *message_from_device = "\x0D"; // Hex-code for CR
|
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));
|
strlen(message_from_device));
|
||||||
if (status != asynSuccess) {
|
if (status != asynSuccess) {
|
||||||
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
|
asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
|
||||||
@ -78,7 +79,7 @@ masterMacsController::masterMacsController(const char *portName,
|
|||||||
"input EOS failed with %s).\nTerminating IOC",
|
"input EOS failed with %s).\nTerminating IOC",
|
||||||
portName, __PRETTY_FUNCTION__, __LINE__,
|
portName, __PRETTY_FUNCTION__, __LINE__,
|
||||||
stringifyAsynStatus(status));
|
stringifyAsynStatus(status));
|
||||||
pasynOctetSyncIO->disconnect(ipPortUser_);
|
pasynOctetSyncIO->disconnect(ipPortAsynOctetSyncIO_);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +90,7 @@ masterMacsController::masterMacsController(const char *portName,
|
|||||||
"ParamLib callbacks failed with %s).\nTerminating IOC",
|
"ParamLib callbacks failed with %s).\nTerminating IOC",
|
||||||
portName, __PRETTY_FUNCTION__, __LINE__,
|
portName, __PRETTY_FUNCTION__, __LINE__,
|
||||||
stringifyAsynStatus(status));
|
stringifyAsynStatus(status));
|
||||||
pasynOctetSyncIO->disconnect(ipPortUser_);
|
pasynOctetSyncIO->disconnect(ipPortAsynOctetSyncIO_);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -185,7 +186,7 @@ asynStatus masterMacsController::writeRead(int axisNo, int tcpCmd,
|
|||||||
adjustForPrint(printableCommand, fullCommand, MAXBUF_);
|
adjustForPrint(printableCommand, fullCommand, MAXBUF_);
|
||||||
|
|
||||||
// Send out the command
|
// Send out the command
|
||||||
status = pasynOctetSyncIO->write(ipPortUser_, fullCommand,
|
status = pasynOctetSyncIO->write(ipPortAsynOctetSyncIO_, fullCommand,
|
||||||
fullCommandLength, comTimeout, &nbytesOut);
|
fullCommandLength, comTimeout, &nbytesOut);
|
||||||
|
|
||||||
if (status != asynSuccess) {
|
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
|
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)
|
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_,
|
status = pasynOctetSyncIO->read(ipPortAsynOctetSyncIO_,
|
||||||
comTimeout, &nbytesIn, &eomReason);
|
fullResponse, MAXBUF_, comTimeout,
|
||||||
pasynOctetSyncIO->flush(ipPortUser_);
|
&nbytesIn, &eomReason);
|
||||||
|
pasynOctetSyncIO->flush(ipPortAsynOctetSyncIO_);
|
||||||
|
|
||||||
if (status == asynSuccess) {
|
if (status == asynSuccess) {
|
||||||
status = parseResponse(fullCommand, fullResponse,
|
status = parseResponse(fullCommand, fullResponse,
|
||||||
|
Reference in New Issue
Block a user