Skip to content
Snippets Groups Projects
Commit a6e1b377 authored by Johannes Eder's avatar Johannes Eder
Browse files

model element factory update new sensor models

parent 834d439b
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,8 @@ import org.fortiss.af3.platform.raspberry.model.ActuatorConnector;
import org.fortiss.af3.platform.raspberry.model.ActuatorPWM;
import org.fortiss.af3.platform.raspberry.model.CanBus;
import org.fortiss.af3.platform.raspberry.model.CanConnector;
import org.fortiss.af3.platform.raspberry.model.GPI;
import org.fortiss.af3.platform.raspberry.model.GPO;
import org.fortiss.af3.platform.raspberry.model.ModelFactory;
import org.fortiss.af3.platform.raspberry.model.RaspberryPi;
import org.fortiss.af3.platform.raspberry.model.SensorConnector;
......@@ -30,6 +32,19 @@ import org.fortiss.af3.platform.raspberry.model.SensorGamepad;
import org.fortiss.af3.platform.raspberry.model.SensorIMU;
import org.fortiss.af3.platform.raspberry.model.SensorLaserRangeFinder;
import org.fortiss.af3.platform.raspberry.model.SensorLaserScanner;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button1;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button2;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button3;
import org.fortiss.af3.platform.raspberry.model.gamepad.Button4;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL1;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonL2;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR1;
import org.fortiss.af3.platform.raspberry.model.gamepad.ButtonR2;
import org.fortiss.af3.platform.raspberry.model.gamepad.GamepadFactory;
import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickX_Position;
import org.fortiss.af3.platform.raspberry.model.gamepad.Left_StickY_Position;
import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickX_Position;
import org.fortiss.af3.platform.raspberry.model.gamepad.Right_StickY_Position;
import org.fortiss.tooling.base.utils.LayoutModelElementFactory;
/**
......@@ -121,4 +136,117 @@ public class RaspberryModelElementFactory {
createConnectorLayout(connector);
return connector;
}
/** Creates a {@link GPI}. */
public static GPI createGPI() {
GPI gpi = ModelFactory.eINSTANCE.createGPI();
gpi.setName("GPI");
createConnectorLayout(gpi);
return gpi;
}
/** Creates a {@link GPI}. */
public static GPO createGPO() {
GPO gpo = ModelFactory.eINSTANCE.createGPO();
gpo.setName("GPO");
createConnectorLayout(gpo);
return gpo;
}
/** Creates a {@link Button1}. */
public static Button1 createButton1() {
Button1 button = GamepadFactory.eINSTANCE.createButton1();
button.setName("Button1 (Triangle)");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Button2}. */
public static Button2 createButton2() {
Button2 button = GamepadFactory.eINSTANCE.createButton2();
button.setName("Button1 (Circle)");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Button3}. */
public static Button3 createButton3() {
Button3 button = GamepadFactory.eINSTANCE.createButton3();
button.setName("Button3 (X)");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Button4}. */
public static Button4 createButton4() {
Button4 button = GamepadFactory.eINSTANCE.createButton4();
button.setName("Button4 (Square)");
createConnectorLayout(button);
return button;
}
/** Creates a {@link ButtonL1}. */
public static ButtonL1 createButtonL1() {
ButtonL1 button = GamepadFactory.eINSTANCE.createButtonL1();
button.setName("ButtonL1");
createConnectorLayout(button);
return button;
}
/** Creates a {@link ButtonR2}. */
public static ButtonR2 createButtonR2() {
ButtonR2 button = GamepadFactory.eINSTANCE.createButtonR2();
button.setName("ButtonR2");
createConnectorLayout(button);
return button;
}
/** Creates a {@link ButtonL2}. */
public static ButtonL2 createButtonL2() {
ButtonL2 button = GamepadFactory.eINSTANCE.createButtonL2();
button.setName("ButtonL2");
createConnectorLayout(button);
return button;
}
/** Creates a {@link ButtonR1}. */
public static ButtonR1 createButtonR1() {
ButtonR1 button = GamepadFactory.eINSTANCE.createButtonR1();
button.setName("ButtonR1");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Left_StickX_Position}. */
public static Left_StickX_Position createLeftStickX() {
Left_StickX_Position button = GamepadFactory.eINSTANCE.createLeft_StickX_Position();
button.setName("Left_StickX");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Left_StickY_Position}. */
public static Left_StickY_Position createLeftStickY() {
Left_StickY_Position button = GamepadFactory.eINSTANCE.createLeft_StickY_Position();
button.setName("Left_StickY");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Right_StickX_Position}. */
public static Right_StickX_Position createRightStickX() {
Right_StickX_Position button = GamepadFactory.eINSTANCE.createRight_StickX_Position();
button.setName("Right_StickX");
createConnectorLayout(button);
return button;
}
/** Creates a {@link Right_StickY_Position}. */
public static Right_StickY_Position createRightStickY() {
Right_StickY_Position button = GamepadFactory.eINSTANCE.createRight_StickY_Position();
button.setName("Right_StickY");
createConnectorLayout(button);
return button;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment