当前位置: 首页>>代码示例>>C++>>正文


C++ AMBeamlineControlMoveAction类代码示例

本文整理汇总了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;
}
开发者ID:Cpppro,项目名称:acquaman,代码行数:8,代码来源:CLSMAXvMotor.cpp

示例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());
//.........这里部分代码省略.........
开发者ID:acquaman,项目名称:acquaman,代码行数:101,代码来源:SGMXASScanController.cpp


注:本文中的AMBeamlineControlMoveAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。