Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
raspberry
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
af3
raspberry
Commits
a6e1b377
Commit
a6e1b377
authored
7 years ago
by
Johannes Eder
Browse files
Options
Downloads
Patches
Plain Diff
model element factory update new sensor models
parent
834d439b
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java
+128
-0
128 additions, 0 deletions
...platform/raspberry/util/RaspberryModelElementFactory.java
with
128 additions
and
0 deletions
org.fortiss.af3.platform.raspberry/trunk/src/org/fortiss/af3/platform/raspberry/util/RaspberryModelElementFactory.java
+
128
−
0
View file @
a6e1b377
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment