| // ***************************************************************************** |
| // Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| // All rights reserved. This program and the accompanying materials |
| // are made available under the terms of the Eclipse Public License v1.0 |
| // which accompanies this distribution, and is available at |
| // http://www.eclipse.org/legal/epl-v10.html |
| // |
| // Contributors: |
| // Pierre Allard - initial API and implementation |
| // Regent L'Archeveque |
| // |
| // SPDX-License-Identifier: EPL-1.0 |
| // ***************************************************************************** |
| @GenModel(prefix="ApogyExamplesRoboticArmApogy", |
| copyrightText="******************************************************************************* |
| Copyright (c) 2018 Agence spatiale canadienne / Canadian Space Agency |
| All rights reserved. This program and the accompanying materials |
| are made available under the terms of the Eclipse Public License v1.0 |
| which accompanies this distribution, and is available at |
| http://www.eclipse.org/legal/epl-v10.html |
| |
| Contributors: |
| Pierre Allard - initial API and implementation |
| Regent L'Archeveque |
| |
| SPDX-License-Identifier: EPL-1.0 |
| *******************************************************************************", |
| modelName="ApogyExamplesRoboticArmApogy", |
| dynamicTemplates="true", |
| templateDirectory="platform:/plugin/org.eclipse.apogy.common.emf.codegen/templates") |
| @GenModel(modelDirectory="/org.eclipse.apogy.examples.robotic_arm.apogy/src-gen") |
| @GenModel(editDirectory="/org.eclipse.apogy.examples.robotic_arm.apogy.edit/src-gen") |
| |
| package org.eclipse.apogy.examples.robotic_arm.apogy |
| |
| import org.eclipse.apogy.core.ApogySystemApiAdapter |
| import org.eclipse.apogy.core.ApogyInitializationData |
| import org.eclipse.apogy.examples.robotic_arm.MoveSpeedLevel |
| import org.eclipse.apogy.common.Apogy |
| |
| /** |
| * This class is the specialized Apogy API adapter, used for connecting |
| * the existing robotic arm example, located at |
| * {@link org.eclipse.apogy.examples.robotic_arm.RoboticArm}, |
| * to Apogy; one can override the well-known callback functions to make |
| * Apogy perform a variety of useful functions, including initialization, |
| * disposal and other features. |
| */ |
| @Apogy(hasCustomClass="true") |
| class RoboticArmApogySystemApiAdapter extends ApogySystemApiAdapter |
| { |
| /** |
| * For specific implementation details, |
| * please see |
| * {@link org.eclipse.apogy.examples.robotic_arm.apogy.impl.RoboticArmApogySystemApiAdapterImpl} |
| */ |
| } |
| |
| /** |
| * This class is the specialized data structure which is used to essentially |
| * save and later restore the state of the component; this functionality is |
| * implemented by the apply() (load) and collect() (save) methods of the robotic |
| * arm's API adapter, |
| * which is {@link org.eclipse.apogy.examples.robotic_arm.apogy.RoboticArmApogySystemApiAdapter}. |
| */ |
| class RoboticArmData extends ApogyInitializationData |
| { |
| /** |
| * This is whether or not the robotic arm should be initialized. |
| */ |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Status") |
| boolean initialized = "false" |
| |
| /** |
| * This is how quickly the robotic arm should be moving, |
| * out of the several possible speeds. |
| */ |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Status") |
| MoveSpeedLevel speed |
| |
| /** |
| * This is the angle (in degrees) that the robotic arm's turret joint should be at. |
| */ |
| @Apogy(units="deg") |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Joint Angles") |
| double turretAngle |
| |
| /** |
| * This is the angle (in degrees) that the robotic arm's shoulder joint should be at. |
| */ |
| @Apogy(units="deg") |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Joint Angles") |
| double shoulderAngle |
| |
| /** |
| * This is the angle (in degrees) that the robotic arm's elbow joint should be at. |
| */ |
| @Apogy(units="deg") |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Joint Angles") |
| double elbowAngle |
| |
| /** |
| * This is the angle (in degrees) that the robotic arm's wrist joint should be at. |
| */ |
| @Apogy(units="deg") |
| @GenModel(children="false", |
| notify="true", |
| property="Editable", |
| propertyCategory="Joint Angles") |
| double wristAngle |
| } |