Added message print control for movement timout watchdog
This commit is contained in:
@ -670,14 +670,22 @@ asynStatus sinqAxis::checkMovTimeoutWatchdog(bool moving) {
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
// Create the unique callsite identifier manually so it can be used later in
|
||||
// the shouldBePrinted calls.
|
||||
msgPrintControlKey key = msgPrintControlKey(pC_->portName, axisNo_,
|
||||
__PRETTY_FUNCTION__, __LINE__);
|
||||
|
||||
// Check if the expected time of arrival has been exceeded.
|
||||
if (expectedArrivalTime_ < time(NULL)) {
|
||||
// Check the watchdog
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d:\nExceeded "
|
||||
"expected arrival time %ld (current time is %ld).\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
expectedArrivalTime_, time(NULL));
|
||||
if (pC_->getMsgPrintControl().shouldBePrinted(key, true,
|
||||
pC_->pasynUser())) {
|
||||
asynPrint(pC_->pasynUser(), ASYN_TRACE_ERROR,
|
||||
"Controller \"%s\", axis %d => %s, line %d:\nExceeded "
|
||||
"expected arrival time %ld (current time is %ld).\n",
|
||||
pC_->portName, axisNo_, __PRETTY_FUNCTION__, __LINE__,
|
||||
expectedArrivalTime_, time(NULL));
|
||||
}
|
||||
|
||||
pl_status = setStringParam(
|
||||
pC_->motorMessageText(),
|
||||
@ -693,10 +701,11 @@ asynStatus sinqAxis::checkMovTimeoutWatchdog(bool moving) {
|
||||
pC_->paramLibAccessFailed(pl_status, "motorStatusProblem_", axisNo_,
|
||||
__PRETTY_FUNCTION__, __LINE__);
|
||||
}
|
||||
|
||||
// Even if the movement timed out, the rest of the poll should continue.
|
||||
return asynSuccess;
|
||||
} else {
|
||||
pC_->getMsgPrintControl().resetCount(key, pC_->pasynUser());
|
||||
}
|
||||
|
||||
// Even if the movement timed out, the rest of the poll should continue.
|
||||
return asynSuccess;
|
||||
}
|
||||
|
||||
@ -773,8 +782,7 @@ asynStatus setOffsetMovTimeout(const char *portName, int axisNo,
|
||||
sinqAxis *axis = dynamic_cast<sinqAxis *>(asynAxis);
|
||||
if (axis == nullptr) {
|
||||
errlogPrintf("Controller \"%s\" => %s, line %d:\nAxis %d does not "
|
||||
"exist or is not an "
|
||||
"instance of sinqAxis.",
|
||||
"exist or is not an instance of sinqAxis.",
|
||||
portName, __PRETTY_FUNCTION__, __LINE__, axisNo);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user