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


C++ AMListAction3::addSubAction方法代码示例

本文整理汇总了C++中AMListAction3::addSubAction方法的典型用法代码示例。如果您正苦于以下问题:C++ AMListAction3::addSubAction方法的具体用法?C++ AMListAction3::addSubAction怎么用?C++ AMListAction3::addSubAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在AMListAction3的用法示例。


在下文中一共展示了AMListAction3::addSubAction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1:

AMAction3* CLSSIS3820ScalerDarkCurrentMeasurementAction::createMeasurementAction(double secondsDwell)
{
	AMAction3 *result = 0;

	CLSSIS3820Scaler *scaler = CLSBeamline::clsBeamline()->scaler();

	if (scaler) {
		AMListAction3 *measurementAction = new AMListAction3(new AMListActionInfo3("Taking dark current measurement.", "Taking dark current measurement."), AMListAction3::Sequential);

		measurementAction->addSubAction(scaler->createDwellTimeAction3(secondsDwell));
		measurementAction->addSubAction(scaler->createTriggerAction(AMDetectorDefinitions::SingleRead));

		AMListAction3 *notifyChannelDetectors = new AMListAction3(new AMListActionInfo3("Set last measurement as dark current measurement", "Set last measurement as dark current measurement"));

		for (int i = 0; i < scaler->channels().count(); i++) {
			CLSSIS3820ScalerChannel *channel = scaler->channelAt(i);

			if (channel && channel->isEnabled() && channel->detector() && channel->detector()->canDoDarkCurrentCorrection()) {
				notifyChannelDetectors->addSubAction(channel->detector()->createSetLastMeasurementAsDarkCurrentAction());
			}
		}

		measurementAction->addSubAction(notifyChannelDetectors);

		result = measurementAction;
	}

	return result;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:29,代码来源:CLSSIS3820ScalerDarkCurrentMeasurementAction.cpp

示例2: createMoveAction

AMAction3* BioXASMirrorRollControl::createMoveAction(double setpoint)
{
	AMAction3 *result = 0;

	if (isConnected()) {

		AMListAction3 *move = new AMListAction3(new AMListActionInfo3(name()+" move", name()+" move"), AMListAction3::Parallel);

		double pitch = calculatePitch(upstreamInboard_->xPosition(), upstreamInboard_->yPosition(), upstreamInboard_->zPositionSetpoint(), upstreamOutboard_->xPosition(), upstreamOutboard_->yPosition(), upstreamOutboard_->zPositionSetpoint(), downstream_->xPosition(), downstream_->yPosition(), downstream_->zPositionSetpoint());
		double height = calculateHeight(upstreamInboard_->xPosition(), upstreamInboard_->yPosition(), upstreamInboard_->zPositionSetpoint(), upstreamOutboard_->xPosition(), upstreamOutboard_->yPosition(), upstreamOutboard_->zPositionSetpoint(), downstream_->xPosition(), downstream_->yPosition(), downstream_->zPositionSetpoint());

		double upstreamInboardDestination = calculateUpstreamInboardPosition(upstreamInboard_->xPosition(), upstreamInboard_->yPosition(), pitch, setpoint, height);
		move->addSubAction(AMActionSupport::buildControlMoveAction(upstreamInboard_, upstreamInboardDestination));

		double upstreamOutboardDestination = calculateUpstreamOutboardPosition(upstreamOutboard_->xPosition(), upstreamOutboard_->yPosition(), pitch, setpoint, height);
		move->addSubAction(AMActionSupport::buildControlMoveAction(upstreamOutboard_, upstreamOutboardDestination));

		double downstreamDestination = calculateDownstreamPosition(downstream_->xPosition(), downstream_->yPosition(), pitch, setpoint, height);
		move->addSubAction(AMActionSupport::buildControlMoveAction(downstream_, downstreamDestination));

		result = move;
	}

	return result;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:25,代码来源:BioXASMirrorRollControl.cpp

示例3: createMoveAction

AMAction3* SGMVATValveState::createMoveAction(double indexSetpoint)
{
	AMListAction3 *action = new AMListAction3(new AMListActionInfo3("Moving leak valve", "Moving leak valve"), AMListAction3::Sequential);

	AMAction3 *updateSpeed = 0;

	// If the valve is opening, always want to move at the min speed.

	if (int(indexSetpoint) == Open)
		updateSpeed = AMActionSupport::buildControlMoveAction(speed_, SGMVATVALVE_SPEED_MIN);
	else
		updateSpeed = AMActionSupport::buildControlMoveAction(speed_, SGMVATVALVE_SPEED_MAX);

	// Add modifying the speed to the list of actions.

	action->addSubAction(updateSpeed);

	// Add the valve position change.

	action->addSubAction(AMSingleEnumeratedControl::createMoveAction(indexSetpoint));

	// Return the action.

	return action;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:25,代码来源:SGMVATValveState.cpp

示例4: value

AMAction3 * SGMGratingAngleControl::createMoveAction(double setpoint)
{
	AMListAction3* moveAction = new AMListAction3(new AMListActionInfo3("Moving Grating Angle",
	                                                                    "Moving Grating Angle"),
	                                              AMListAction3::Sequential);


	if(isClosedLoop()) {

		moveAction->addSubAction(AMActionSupport::buildControlMoveAction(encoderControl_, setpoint));
	} else {

		// Get distance to move in terms of the encoder
		double deltaDistanceEncoder = setpoint - value();

		// Convert into steps
		double deltaDistanceSteps = deltaDistanceEncoder * stepsPerEncoderCount();

		// Get current step position
		double currentStepPosition = stepMotorControl_->value();
		// Get the setpoint in terms of steps
		double stepSetpoint = currentStepPosition + deltaDistanceSteps;

		// Up our tolerance
		moveAction->addSubAction(new AMChangeToleranceAction(new AMChangeToleranceActionInfo(toInfo(), 400),this));

		// Do the move
		moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepMotorControl_, stepSetpoint));

	}

	return moveAction;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:33,代码来源:SGMGratingAngleControl.cpp

示例5: createScanCleanupAction

AMAction3* IDEASBeamline::createScanCleanupAction(AMScanConfiguration *configuration)
{
	Q_UNUSED(configuration)
	AMListAction3 *cleanupActions = new AMListAction3(new AMListActionInfo3("IDEAS XAS Cleanup Actions", "IDEAS XAS Cleanup Actions"));

	cleanupActions->addSubAction(IDEASBeamline::ideas()->scaler()->createDwellTimeAction3(0.25));
	cleanupActions->addSubAction(IDEASBeamline::ideas()->scaler()->createContinuousEnableAction3(true));

	return cleanupActions;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:10,代码来源:IDEASBeamline.cpp

示例6: createMoveAction

AMAction3* BioXASCarbonFilterFarmActuatorPositionControl::createMoveAction(double setpoint)
{
	AMListAction3 *action = new AMListAction3(new AMListActionInfo3("Move BioXAS Carbon Filter Farm Actuator", "Move BioXAS Carbon Filter Farm Actuator"), AMListAction3::Sequential);

	AMAction3 *move = AMActionSupport::buildControlMoveAction(position_, setpoint);
	action->addSubAction(move);

	AMAction3 *check = AMActionSupport::buildControlWaitAction(status_, InPosition, TIMEOUT_MOVE);
	action->addSubAction(check);

	return action;
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:12,代码来源:BioXASCarbonFilterFarmActuatorPositionControl.cpp

示例7: AMChangeToleranceAction

AMAction3 * SGMGratingAngleControl::createDefaultsAction()
{
	AMListAction3* returnAction = new AMListAction3(new AMListActionInfo3("Set Grating Angle Defaults",
	                                                                      "Set Grating Angle Defaults"),
	                                                AMListAction3::Sequential);

	returnAction->addSubAction(new AMChangeToleranceAction(new AMChangeToleranceActionInfo(toInfo(), 5),this));

	AMListAction3* moveAction = new AMListAction3(new AMListActionInfo3("Set Values",
	                                                                    "Set Values"),
	                                              AMListAction3::Parallel);

	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepVelocityControl_, DEFAULT_GRATING_ANGLE_VELOCITY));
	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(stepAccelerationControl_, DEFAULT_GRATING_ANGLE_ACCELERATION));
	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(movementTypeControl_, DEFAULT_GRATING_ANGLE_MOVE_TYPE));

	AMListAction3* waitAction = new AMListAction3(new AMListActionInfo3("Wait for Values",
	                                                                    "Wait for Values"),
	                                              AMListAction3::Parallel);

	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(stepVelocityControl_, DEFAULT_GRATING_ANGLE_VELOCITY, 10, AMControlWaitActionInfo::MatchWithinTolerance));
	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(stepAccelerationControl_, DEFAULT_GRATING_ANGLE_ACCELERATION, 10, AMControlWaitActionInfo::MatchWithinTolerance));
	waitAction->addSubAction(AMActionSupport::buildControlWaitAction(movementTypeControl_, DEFAULT_GRATING_ANGLE_MOVE_TYPE, 10, AMControlWaitActionInfo::MatchWithinTolerance));

	returnAction->addSubAction(moveAction);
	returnAction->addSubAction(waitAction);

	return returnAction;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:29,代码来源:SGMGratingAngleControl.cpp

示例8:

AMAction3 *CLSMAXvMotor::createCalibrationAction(double oldPosition, double newPosition)
{
	AMAction3 *result = 0;

	if (isConnected()) {
		AMListAction3 *calibrationAction = new AMListAction3(new AMListActionInfo3("Motor calibration", "Motor calibration"), AMListAction3::Sequential);
		calibrationAction->addSubAction(AMActionSupport::buildControlMoveAction(this, oldPosition));
		calibrationAction->addSubAction(AMActionSupport::buildControlMoveAction(EGUSetPosition_, newPosition));

		result = calibrationAction;
	}

	return result;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:14,代码来源:CLSMAXvMotor.cpp

示例9: createCleanupActions

AMAction3* VESPERSEnergyScanActionController::createCleanupActions()
{
	AMListAction3 *cleanupAction = qobject_cast<AMListAction3 *>(buildCleanupAction());

	cleanupAction->addSubAction(VESPERSBeamline::vespers()->mono()->createEaAction(originalEnergy_));

	return cleanupAction;}
开发者ID:acquaman,项目名称:acquaman,代码行数:7,代码来源:VESPERSEnergyScanActionController.cpp

示例10: currentGlobalSetpoints

AMAction3 * AM3DCoordinatedSystemControl::createMoveAction(double setpoint)
{
	AMListAction3* action = 0;

	if(globalXAxis_ && globalYAxis_ && globalZAxis_) {

		action = new AMListAction3(new AMListActionInfo3(QString("Moving %1").arg(name()),
														 QString("Moving %1 from %2 to %3")
														 .arg(value()).arg(setpoint)),
								   AMListAction3::Sequential);

		AMListAction3* moveActions = new AMListAction3(new AMListActionInfo3(QString("Moving %1").arg(name()),
																			 QString("Moving %1").arg(name())),
													   AMListAction3::Parallel);

		// Grab the current global positions:
		QVector3D currentGlobalSetpoints(globalXAxis_->setpoint(), globalYAxis_->setpoint(), globalZAxis_->setpoint());
		// Transform it to our system:
		QVector3D primeSetpoint = globalAxisToPrime(currentGlobalSetpoints);

		// Set the value in terms of our system based on the axis we are:
		switch(axis_) {
		case XAxis:
			primeSetpoint.setX(setpoint);
			break;
		case YAxis:
			primeSetpoint.setY(setpoint);
			break;
		case ZAxis:
			primeSetpoint.setZ(setpoint);

		}

		// Transform back the the global system:
		QVector3D newGlobalSetpoints = primeAxisToGlobal(primeSetpoint);

		// Create the required move actions in the global system:
		moveActions->addSubAction(AMActionSupport::buildControlMoveAction(globalXAxis_, newGlobalSetpoints.x()));
		moveActions->addSubAction(AMActionSupport::buildControlMoveAction(globalYAxis_, newGlobalSetpoints.y()));
		moveActions->addSubAction(AMActionSupport::buildControlMoveAction(globalZAxis_, newGlobalSetpoints.z()));


		action->addSubAction(moveActions);
	}

	return action;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:47,代码来源:AM3DCoordinatedSystemControl.cpp

示例11: createBeamOffActions

AMAction3* SXRMBBeamline::createBeamOffActions() const
{
	if(!isConnected() || PSH1406B1002Shutter_->isClosed())
		return 0;

	AMListAction3 *beamOffControlActionsList = new AMListAction3(new AMListActionInfo3("SXRMB Beam off action list", "SXRMB Beam off "), AMListAction3::Sequential);
	beamOffControlActionsList->addSubAction(AMActionSupport::buildControlMoveAction(PSH1406B1002Shutter_, 0));

	AMListAction3 *beamOffControlWaitActionsList = new AMListAction3(new AMListActionInfo3("SXRMB Beam off Wait action list", "SXRMB Beam off"), AMListAction3::Parallel);
	beamOffControlWaitActionsList->addSubAction(AMActionSupport::buildControlWaitAction(PSH1406B1002Shutter_, 0));

	AMListAction3 *beamOffActionsList = new AMListAction3(new AMListActionInfo3("SXRMB Beam Off", "SXRMB Beam Off"), AMListAction3::Parallel);
	beamOffActionsList->addSubAction(beamOffControlActionsList);
	beamOffActionsList->addSubAction(beamOffControlWaitActionsList);

	return beamOffActionsList;
}
开发者ID:anukat2015,项目名称:acquaman,代码行数:17,代码来源:SXRMBBeamline.cpp

示例12: createScanInitializationAction

AMAction3* IDEASBeamline::createScanInitializationAction(AMScanConfiguration *configuration)
{
	AMAction3 *result = 0;

	AMStepScanConfiguration *stepScanConfiguration = qobject_cast<AMStepScanConfiguration*>(configuration);

	if (stepScanConfiguration) {
		AMListAction3 *initializationActions = new AMListAction3(new AMListActionInfo3("IDEAS XAS Initialization Stage 1", "IDEAS XAS Initialization Stage 1"), AMListAction3::Parallel);
		initializationActions->addSubAction(AMBeamline::createInitializeScanAxisControlsAction(stepScanConfiguration));
		initializationActions->addSubAction(IDEASBeamline::ideas()->scaler()->createContinuousEnableAction3(false));
		initializationActions->addSubAction(IDEASBeamline::ideas()->scaler()->createDwellTimeAction3(stepScanConfiguration->scanAxisAt(0)->regionAt(0)->regionTime()));

		result = initializationActions;
	}

	return result;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:17,代码来源:IDEASBeamline.cpp

示例13: generateActionTree

void AMScanActionControllerScanAssembler::generateActionTree(){
	actionTree_ = generateActionTreeForAxis(controls_->at(0), axes_.at(0));

	QList<AMAction3*> insertionPoints = findInsertionPoints(actionTree_);
	for(int x = 1; x < axes_.count(); x++){
		QList<AMAction3*> newInsertionPoints;
		newInsertionPoints.clear();

		for(int y = 0; y < insertionPoints.count(); y++){
			AMListAction3 *castParentToListAction = qobject_cast<AMListAction3*>(insertionPoints.at(y)->parentAction());
			if(castParentToListAction){
				int indexOfAction = castParentToListAction->indexOfSubAction(insertionPoints.at(y));
				castParentToListAction->insertSubAction(generateActionTreeForAxis(controls_->at(x), axes_.at(x)), indexOfAction);
				castParentToListAction->deleteSubAction(indexOfAction+1);
				newInsertionPoints.append(findInsertionPoints(castParentToListAction->subActionAt(indexOfAction)));
			}
		}
		insertionPoints.clear();
		insertionPoints = newInsertionPoints;
	}

	QList<AMAction3*> detectorInsertionPoints = findInsertionPoints(actionTree_);
	for(int x = 0; x < detectorInsertionPoints.count(); x++){
		AMListAction3 *castParentToListAction = qobject_cast<AMListAction3*>(detectorInsertionPoints.at(x)->parentAction());
		if(castParentToListAction){
			int indexOfAction = castParentToListAction->indexOfSubAction(detectorInsertionPoints.at(x));
			castParentToListAction->insertSubAction(generateActionListForDetectorAcquisition(), indexOfAction);
			castParentToListAction->deleteSubAction(indexOfAction+1);
		}
	}

	AMListAction3 *castRetValToListAction = qobject_cast<AMListAction3*>(actionTree_);
	if(castRetValToListAction){
		AMListAction3 *castFirstToListAction = qobject_cast<AMListAction3*>(castRetValToListAction->subActionAt(1));
		if(castFirstToListAction)
			castFirstToListAction->addSubAction(generateActionListForDetectorInitialization());

		AMListAction3 *castLastToListAction = qobject_cast<AMListAction3*>(castRetValToListAction->subActionAt(castRetValToListAction->subActionCount()-2));
		if(castLastToListAction)
			castLastToListAction->addSubAction(generateActionListForDetectorCleanup());
	}

	emit actionTreeGenerated(actionTree_);
}
开发者ID:Cpppro,项目名称:acquaman,代码行数:44,代码来源:AMScanActionControllerScanAssembler.cpp

示例14:

AMAction3 * SGMUndulatorControl::createMoveAction(double setpoint)
{
	AMListAction3* moveAction = new AMListAction3(new AMListActionInfo3("Moving Undulator",
	                                                                    "Moving Undulator"),
	                                              AMListAction3::Sequential);

	moveAction->addSubAction(AMActionSupport::buildControlMoveAction(encoderControl_,
	                                                                 setpoint));

	return moveAction;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:11,代码来源:SGMUndulatorControl.cpp

示例15: if

AMAction3 *REIXSBeamline::buildBeamStateChangeAction(bool beamOn) const
{
	AMListAction3 *list = new AMListAction3(new AMListActionInfo3("REIXS Beam On", "REIXS Beam Off"));

	if (beamOn){

		if (REIXSBeamline::bl()->valvesAndShutters()->ssh1()->value() != 1.0)
			list->addSubAction(AMActionSupport::buildControlMoveAction(REIXSBeamline::bl()->valvesAndShutters()->ssh1(), 1.0));

		if (REIXSBeamline::bl()->valvesAndShutters()->psh2()->value() != 1.0)
			list->addSubAction(AMActionSupport::buildControlMoveAction(REIXSBeamline::bl()->valvesAndShutters()->psh2(), 1.0));

		if (REIXSBeamline::bl()->valvesAndShutters()->psh4()->value() != 1.0)
			list->addSubAction(AMActionSupport::buildControlMoveAction(REIXSBeamline::bl()->valvesAndShutters()->psh4(), 1.0));
	}

	else if (!beamOn && REIXSBeamline::bl()->valvesAndShutters()->psh4()->value() != 0.0)
		list->addSubAction(AMActionSupport::buildControlMoveAction(REIXSBeamline::bl()->valvesAndShutters()->psh4(), 0.0));

	return list;
}
开发者ID:acquaman,项目名称:acquaman,代码行数:21,代码来源:REIXSBeamline.cpp


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