本文整理汇总了C++中AMBeamlineControlMoveAction类的典型用法代码示例。如果您正苦于以下问题:C++ AMBeamlineControlMoveAction类的具体用法?C++ AMBeamlineControlMoveAction怎么用?C++ AMBeamlineControlMoveAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AMBeamlineControlMoveAction类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AMBeamlineControlMoveAction
AMBeamlineActionItem* CLSMAXvMotor::createEncoderPercentApproachAction(double encoderPercentApproach){
if(!isConnected())
return 0;
AMBeamlineControlMoveAction *action = new AMBeamlineControlMoveAction(encoderPercentApproach_);
action->setSetpoint(encoderPercentApproach);
return action;
}
示例2: AMBeamlineParallelActionsList
bool SGMXASScanController::beamlineInitialize(){
AMBeamlineControlMoveAction *tmpAction = 0; //NULL
AMBeamlineActionItem *tmpBAction = 0; //NULL
bool cleanupFailed = false;
cleanUpActions_ = new AMBeamlineParallelActionsList();
cleanUpActions_->appendStage(new QList<AMBeamlineActionItem*>());
tmpBAction = SGMBeamline::sgm()->scaler()->createContinuousEnableAction(SGMBeamline::sgm()->scaler()->isContinuous());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
tmpBAction = SGMBeamline::sgm()->scaler()->createScansPerBufferAction(SGMBeamline::sgm()->scaler()->isContinuous() ? 1 : SGMBeamline::sgm()->scaler()->scansPerBuffer());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
tmpBAction = SGMBeamline::sgm()->scaler()->createTotalScansAction(SGMBeamline::sgm()->scaler()->isContinuous() ? 1 : SGMBeamline::sgm()->scaler()->totalScans());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
// CLSSynchronizedDwellTime *clsDwellTime = qobject_cast<CLSSynchronizedDwellTime*>(SGMBeamline::sgm()->synchronizedDwellTime());
for(int x = 0; x < SGMBeamline::sgm()->synchronizedDwellTime()->elementCount(); x++){
// tmpBAction = clsDwellTime->elementAt(x)->createEnableAction(SGMBeamline::sgm()->synchronizedDwellTime()->enabledAt(x));
//tmpBAction = SGMBeamline::sgm()->synchronizedDwellTime()->elementAt(x)->createEnableAction(SGMBeamline::sgm()->synchronizedDwellTime()->enabledAt(x));
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
}
/*
tmpBAction = SGMBeamline::sgm()->createSDD1EnableAction(SGMBeamline::sgm()->isSDD1Enabled());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
tmpBAction = SGMBeamline::sgm()->createSDD2EnableAction(SGMBeamline::sgm()->isSDD2Enabled());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
*/
// tmpBAction = SGMBeamline::sgm()->synchronizedDwellTime()->createMasterTimeAction(SGMBeamline::sgm()->synchronizedDwellTime()->time());
tmpBAction ? cleanUpActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
tmpAction = new AMBeamlineControlMoveAction(SGMBeamline::sgm()->fastShutterVoltage());
tmpAction->setSetpoint(SGMBeamline::sgm()->fastShutterVoltage()->value());
cleanUpActions_->appendAction(0, tmpAction);
/* NTBA - August 25th, 2011 (David Chevrier)
Who's going to delete the list and the actions?"
*/
bool initializationFailed = false;
initializationActions_ = new AMBeamlineParallelActionsList();
initializationActions_->appendStage(new QList<AMBeamlineActionItem*>());
tmpAction = new AMBeamlineControlMoveAction(SGMBeamline::sgm()->grating());
tmpAction->setSetpoint(config_->fluxResolutionGroup().controlNamed(SGMBeamline::sgm()->grating()->name()).value());
initializationActions_->appendAction(0, tmpAction);
tmpAction = new AMBeamlineControlMoveAction(SGMBeamline::sgm()->exitSlitGap());
tmpAction->setSetpoint(config_->fluxResolutionGroup().controlNamed(SGMBeamline::sgm()->exitSlitGap()->name()).value());
initializationActions_->appendAction(0, tmpAction);
bool enableSync = false;
for(int x = 0; x < config_->allDetectors()->count(); x++){
/*
if( (config_->allDetectors()->detectorAt(x) == SGMBeamline::sgm()->amptekSDD1()) || (config_->allDetectors()->detectorAt(x) == SGMBeamline::sgm()->amptekSDD2()) ){
if(config_->allDetectorConfigurations().isActiveNamed(SGMBeamline::sgm()->amptekSDD1()->detectorName()) != config_->allDetectorConfigurations().isActiveNamed(SGMBeamline::sgm()->amptekSDD2()->detectorName()))
enableSync = true;
else if(config_->allDetectorConfigurations().isActiveNamed(SGMBeamline::sgm()->amptekSDD1()->detectorName()))
enableSync = true;
else
enableSync = false;
}
else*/ if(config_->allDetectorConfigurations().isActiveAt(x)){
enableSync = true;
config_->allDetectors()->detectorAt(x)->activate();
if(config_->allDetectors()->detectorAt(x)->turnOnAction()){
// qdebug() << "Adding HV turn on to initialization actions";
initializationActions_->appendAction(0, config_->allDetectors()->detectorAt(x)->turnOnAction());
}
}
else
enableSync = false;
int syncIndex = SGMBeamline::sgm()->synchronizedDwellTimeDetectorIndex(config_->allDetectors()->detectorAt(x));
// CLSSynchronizedDwellTime *clsDwellTime = qobject_cast<CLSSynchronizedDwellTime*>(SGMBeamline::sgm()->synchronizedDwellTime());
if( (syncIndex > 1) && (SGMBeamline::sgm()->synchronizedDwellTime()->enabledAt(syncIndex) != enableSync) ){
// tmpBAction = clsDwellTime->elementAt(syncIndex)->createEnableAction(enableSync);
//tmpBAction = SGMBeamline::sgm()->synchronizedDwellTime()->elementAt(syncIndex)->createEnableAction(enableSync);
tmpBAction ? initializationActions_->appendAction(0, tmpBAction) : cleanupFailed = true;
}
}
/*
if(config_->allDetectorConfigurations().isActiveNamed(SGMBeamline::sgm()->amptekSDD1()->detectorName()))
tmpBAction = SGMBeamline::sgm()->createSDD1EnableAction(true);
else
tmpBAction = SGMBeamline::sgm()->createSDD1EnableAction(false);
tmpBAction ? initializationActions_->appendAction(0, tmpBAction) : initializationFailed = true;
if(config_->allDetectorConfigurations().isActiveNamed(SGMBeamline::sgm()->amptekSDD2()->detectorName()))
tmpBAction = SGMBeamline::sgm()->createSDD2EnableAction(true);
else
tmpBAction = SGMBeamline::sgm()->createSDD2EnableAction(false);
tmpBAction ? initializationActions_->appendAction(0, tmpBAction) : initializationFailed = true;
*/
// tmpBAction = SGMBeamline::sgm()->synchronizedDwellTime()->createMasterTimeAction(config_->regionTime(0));
tmpBAction ? initializationActions_->appendAction(0, tmpBAction) : initializationFailed = true;
tmpAction = new AMBeamlineControlMoveAction(SGMBeamline::sgm()->nextDwellTimeTrigger());
tmpAction->setSetpoint(0);
tmpAction ? initializationActions_->appendAction(0, tmpAction) : initializationFailed = true;
tmpAction = new AMBeamlineControlMoveAction(SGMBeamline::sgm()->nextDwellTimeConfirmed());
//.........这里部分代码省略.........