int MMC100Axis::check_error() { if (pc_->homing_axis_ && !homing_) return asynError; size_t read; int error=0; static const char* functionName = "MMC100Controller::check_error"; char input[MMC100_STRING_SIZE]; queryStatus(); if (errored_) { asynStatus status = pc_->writeRead(input, &read, "%dERR?", id_); const char *err; if (status == asynSuccess && read > 0) { err = strnchr(input, MMC100_STRING_SIZE, '-'); if (err) { asynPrint(pc_->pasynUser_, ASYN_TRACE_ERROR|ASYN_TRACE_FLOW, "%s:%s: axis: %d error: %s\n", driverName, functionName, id_, err); error = 1; } } if (!error) { asynPrint(pc_->pasynUser_, 0x255, //ASYN_TRACE_FLOW, "%s:%s: axis: %d success (or no response)\n", driverName, functionName, id_); } } return error; }
asynStatus MMC100Axis::poll(bool *moving) { if (pc_->homing_axis_) // cannot send any commands while homing return asynSuccess; pc_->lock(); queryStatus(moving); queryPosition(); pc_->unlock(); callParamCallbacks(); return asynSuccess; }
//-------------------------------------------------------------------------------- bool QmvSqlQuery::updateRelationSet() { int status = getRelation()->open( sqlQuery(), controller ); if ( controller ) controller->reset(); if ( status < 0 ) { query_errormessage = getRelation()->lastError(); query_status = false; } else { query_errormessage = ""; query_status = true; emit relationChanged( getRelation() ); } emit queryStatus( status, getRelation() ); return query_status; }
asynStatus ddriveAxis::poll(bool *moving) { pc_->lock(); queryPosition(); if (query_status_) { queryStatus(); #if !DDRIVE_FAST_STATUS query_status_ = false; #endif } checkMoving(); queryParameters(); pc_->unlock(); *moving = moving_; callParamCallbacks(); return asynSuccess; }